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.