|
Multi-currency arbitrage
#454743
09/17/15 13:27
09/17/15 13:27
|
Joined: Sep 2015
Posts: 8
Toronado
OP
Newbie
|
OP
Newbie
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:
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]
#454788
09/20/15 19:13
09/20/15 19:13
|
Joined: Feb 2015
Posts: 45 Italy
forexcoder
Newbie
|
Newbie
Joined: Feb 2015
Posts: 45
Italy
|
Hi Toronado, could you explain me the meaning of these lines of 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
User
|
User
Joined: Dec 2013
Posts: 568
Fuerth, DE
|
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: Thirstywolf]
#454824
09/23/15 15:35
09/23/15 15:35
|
Joined: Sep 2015
Posts: 8
Toronado
OP
Newbie
|
OP
Newbie
Joined: Sep 2015
Posts: 8
|
@forexcoder
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: MJW]
#456788
12/09/15 23:32
12/09/15 23:32
|
Joined: Dec 2002
Posts: 1,999 Switzerland ZĂĽrich
JeyKey II
Serious User
|
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]
|
|
|
|