Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (monk12, Quad), 830 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Multi-currency arbitrage #454743
09/17/15 13:27
09/17/15 13:27
Joined: Sep 2015
Posts: 8
T
Toronado Offline OP
Newbie
Toronado  Offline OP
Newbie
T

Joined: Sep 2015
Posts: 8
I wanted to have a little play to see what arbitrage looks like around a chain of currencies, so sketched this:

Code:
function run ()
{
	StartDate = 20150101;
	EndDate = 20150901;

	#define EURCHF 0
	#define EURUSD 1
	#define USDCHF 2

	BarPeriod = 1;
	Spread = 0;
	Slippage = 0;
	RollLong = RollShort = 0; 
	
	var prices[3] = { 0, 0, 0 };
	
	while(asset(loop("EUR/CHF","EUR/USD", "USD/CHF")))
	{
		if(Asset == "EUR/CHF") prices[EURCHF] = price();
		if(Asset == "EUR/USD") prices[EURUSD] = price();
		if(Asset == "USD/CHF") prices[USDCHF] = price();
	}
	
	var arbitrage = 1 * prices[EURCHF] * (1 / prices[USDCHF]) * (1 / prices[EURUSD]);
	
	if(abs(arbitrage - 1) < .025 ) plot("Arbitrage", arbitrage, NEW, GREEN);
	PlotHeight2 = 600;
	set(PLOTNOW+PLOTLONG);
	
		
}



That gives a nice bumpy curve with a few spikes showing that arbitrage exists at a low level in the EUR->CHF->USD->EUR chain.

How would you go about assessing if the level of arbitrage is exploitable?

@jcl, an exploration of arbitrage might make a nice post on financial hacker blog.

Re: Multi-currency arbitrage [Re: Toronado] #454745
09/17/15 14:35
09/17/15 14:35
Joined: Sep 2015
Posts: 8
T
Toronado Offline OP
Newbie
Toronado  Offline OP
Newbie
T

Joined: Sep 2015
Posts: 8
Interesting — it appears FXCM does not allow exploitation of arbitrage:

http://docs.fxcorporate.com/user-guide/ug-sb-product-guide-ltd-uk.pdf

Re: Multi-currency arbitrage [Re: Toronado] #454746
09/17/15 15:03
09/17/15 15:03
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Normally brokers prevent arbitrage technically - they just don't send quotes that you can use for spread arbitrage. But there were indeed known exceptions, especially with arbitrage between different brokers. It can pay when you observe the markets and look for arbitrage situations.

Caution: in your script above you're comparing price(), which is the mean price of a bar, not a price you can use for arbitrage. You must use priceClose() for this. Also do a backtest with tick data. This is one of the rare situations where tick data makes sense.


Re: Multi-currency arbitrage [Re: Toronado] #454788
09/20/15 19:13
09/20/15 19:13
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline
Newbie
forexcoder  Offline
Newbie

Joined: Feb 2015
Posts: 45
Italy
Hi Toronado,
could you explain me the meaning of these lines of code?
Code:
var arbitrage = 1 * prices[EURCHF] * (1 / prices[USDCHF]) * (1 / prices[EURUSD]);
	
if(abs(arbitrage - 1) < .025 )


Thanks.

Re: Multi-currency arbitrage [Re: forexcoder] #454789
09/20/15 22:40
09/20/15 22:40
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
That gives a nice bumpy curve with a few spikes showing that arbitrage exists at a low level in the EUR->CHF->USD->EUR chain.

Some time ago I did similar analysis and came to similar results, of course. Then as now I wondered how to exploit it, means how to trade this arbitrage practically. Do you have already an approach?

Re: Multi-currency arbitrage [Re: Sphin] #454821
09/23/15 09:34
09/23/15 09:34
Joined: Dec 2013
Posts: 82
Sydney, NSW
T
Thirstywolf Offline
Junior Member
Thirstywolf  Offline
Junior Member
T

Joined: Dec 2013
Posts: 82
Sydney, NSW
To arb something like this you would want to use futures or a REAL broker who charges commission and not spreads. Otherwise you are unlikely to be able to exploit any opportunities. Also, basic straight forward arb like this will usually be covered by the larger hedge funds and market makers who get quicker access to markets and don't pay exchange fees etc.

Re: Multi-currency arbitrage [Re: Thirstywolf] #454824
09/23/15 15:35
09/23/15 15:35
Joined: Sep 2015
Posts: 8
T
Toronado Offline OP
Newbie
Toronado  Offline OP
Newbie
T

Joined: Sep 2015
Posts: 8
@forexcoder

Code:
var arbitrage = 1 * prices[EURCHF] * (1 / prices[USDCHF]) * (1 / prices[EURUSD]);
	
if(abs(arbitrage - 1) < .025 )



The first of the two lines says if I take 1 EUR and use it to buy first CHF, then use the CHF to buy USD, then the USD to buy EUR back again, how many EUR would I have? In a perfectly efficient market (ignoring spreads) the answer would be 1 EUR. Arbitrage is the difference between the prices, I think.

The second line says if the difference (positive or negative) is < 0.025 then do the line below. That line is used to discard outliers in the data so that the chart is drawn to an appropriate scale.

Re: Multi-currency arbitrage [Re: Thirstywolf] #454825
09/23/15 15:36
09/23/15 15:36
Joined: Sep 2015
Posts: 8
T
Toronado Offline OP
Newbie
Toronado  Offline OP
Newbie
T

Joined: Sep 2015
Posts: 8
@Thisrtywolf that was what I thought too. I can't think of a way to exploit this on a spread account like FXCM.

Re: Multi-currency arbitrage [Re: Toronado] #456787
12/09/15 22:11
12/09/15 22:11
Joined: Dec 2015
Posts: 1
New Jersey
M
MJW Offline
Guest
MJW  Offline
Guest
M

Joined: Dec 2015
Posts: 1
New Jersey
Just out of curiosity... Wouldn't this work with this type of account on FXCM: https://www.fxcm.com/services/active-trader/

I don't think FXCM charges spread for it, just commissions.

Re: Multi-currency arbitrage [Re: MJW] #456788
12/09/15 23:32
12/09/15 23:32
Joined: Dec 2002
Posts: 1,999
Switzerland Zürich
JeyKey II Offline
Serious User
JeyKey II  Offline
Serious User

Joined: Dec 2002
Posts: 1,999
Switzerland Zürich
Do you know what is spread?
There is always a "spread".
If you know a bank, that changes money without "spread", by selling or buying a (real/virtual) currency, then let me know


[Jeder ist sich selbst am Nächsten]
Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1