Multi-currency arbitrage

Posted By: Toronado

Multi-currency arbitrage - 09/17/15 13:27

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.
Posted By: Toronado

Re: Multi-currency arbitrage - 09/17/15 14:35

Interesting — it appears FXCM does not allow exploitation of arbitrage:

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

Re: Multi-currency arbitrage - 09/17/15 15:03

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.

Posted By: forexcoder

Re: Multi-currency arbitrage - 09/20/15 19:13

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.
Posted By: Sphin

Re: Multi-currency arbitrage - 09/20/15 22:40

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?
Posted By: Thirstywolf

Re: Multi-currency arbitrage - 09/23/15 09:34

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.
Posted By: Toronado

Re: Multi-currency arbitrage - 09/23/15 15:35

@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.
Posted By: Toronado

Re: Multi-currency arbitrage - 09/23/15 15:36

@Thisrtywolf that was what I thought too. I can't think of a way to exploit this on a spread account like FXCM.
Posted By: MJW

Re: Multi-currency arbitrage - 12/09/15 22:11

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.
Posted By: JeyKey II

Re: Multi-currency arbitrage - 12/09/15 23:32

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
Posted By: Smon

Re: Multi-currency arbitrage - 12/23/15 15:19

Hi, I'm after statistical arbitrage with Binary Options. EURUSD and GBPUSD are highly correlated and I have the feeling that it can be used to predict the next candle on EURGBP . If EURUSD closes with a bull candle and GBPUSD with a bear candle, meaning GBP and EUR are getting out of sync moving in different directions, EURGBP should respond with a bull candle and the other way round as odds are high that they keep correlated. The concept is described here https://www.youtube.com/watch?v=ARJlaL74a5A

Anyone interested to look into this with me? I can help with a broker interface (Binary Options are normally not meant to get autotraded).

What approach would you suggest? I didn't find a correlation function that I could use in Zorro, but maybe the advise function would be a better idea anyway. However looking at Workshop 7, I don't have any clue how to use it on different currency pairs.
© 2024 lite-C Forums