Statistical Arbitrage/Trading Strategy Revisited

Before I start this post, let me please set the standard on what I’m hoping to accomplish. Theory aside, I’m trying to figure out a mathematical algorithm that accomplishes the same base function as the system Kelton originated here:

http://forums.babypips.com/free-forex-trading-systems/43659-statistical-arb-pairs-trading-strategy-5.html

Let me share with you what I’ve found trading this system.

First, I designed an EA that accurately takes trades when the currency pairs are 20, 40, 60, 80 and 100 pips apart. The max I risk (as a function of my entire account balance) is 2.5%. Meaning when the drawdown for all my trades is at 2.5% of my account, I shut everything down.

I tart trailing prices with stoplosses when the currencies show a separation of less than 3 pips. I also start trailing the orders by 5 pips as soon as there is a 1% gain. I do not Scale Fix the currencies.

This past week was the first week the EA went into production on two demo accounts. One lost nearly half its balance due to a unique problem that I’ll describe below. The other is still trading at a modest profit after I did a work around for the problem.

Kelton’s original model (though brilliant) had one significant issue:

Repainting of the currency pairs every 15 - 30 minutes causes older deviations to dramatically change on the M1 charts. In other words if two currency pairs were 40 pips apart at time T1, at Time T1+60, the values at T1 are repainted as having crossed over and showing a 2 pip separation. This is what caused a massive loss in one of the demo accounts above

This means that trades that were started at let’s 01/26 00:00 that showed a 20 pip separation where you were selling one pair and buying another pair and then 4 hours later show that same data point was repainted and now shows that the pair you’re buying, was supposed to be sold and vice versa.

This creates a HUGE issue but one I think that can be overcome with the correct algorithm for what’s really going on. Right now I have a crafty work around but I’m not so confident that I’m about to put real money in.

Good luck!
You may have a little difficulty with EU and GU pairs until UK decides to stay with EU, which may never happen. Since the first of the year, UK prime minister has been threatening to leave EU, and this has caused a total disconnect of EU and GU pairs- they are not as correlated as they once were. If you have a risk protection, it may still work for short term trading, like 1 minute charts.

I ran across a grid trading idea that wasn’t too bad, that used correlation\hedging instead of direct trading, using EU and GU pairs. The thing is it turned out to be not much different from directly trading a grid idea on EG pair, which has been really trending since the beginnig of the year. Still, it might kind of work, again, on small TF for short market exposures. The only difference from what you are currently trading is to have trades open going the other way, so when the gap between the pairs widen, it is hitting TPs on the way out, not just on the way in. Hope this makes sense, and good luck, again!

Thanks Pip. I use a Pearson running at about 120 days on the D1 and H4 charts to gauge correlation. Despite the hectic nature of the Euro, both currencies are still showing high correlations. I am designing a function in the EA that won’t trade unless the currencies are at least 75% correlated.

This would be a good counter trade idea to offset the losses going in. I’ve toyed with this model but the issue is that it assumes that the pairs diverge. Ideally I’d love to create foundation for a statistical arbitrage (a true one) that could give a statistical probability of pairs converging/diverging based on how far apart they are on the grid, how long they’ve been that way and what happens statistically when these pairs go beyond these probabilities.

The idea was to create a statistical position that could tell us given this, our probability is that and if that doesn’t happen, the probability that another event happens, is X.

Problem I’m running into is that Grid trading is ineffective for designing such a strategy on a program. I can teach a program to “see” what I’m seeing but even then, the repainting of data distorts the assumptions used to enter into a trade. Hence the need for a logical algorithm. I know it’s there…I just don’t know where to look for it.

Again thanks for the additional insight.

You’re welcome…I would also suggest, if you want to dig quite a bit, to look into “R” with Arb-O-Mat. It basically charts correlation using standard deviation, can be useful for looking for stats.

Careful with what your doing, I was warned not a lot of brokers really like stat arber’s specifically because most of the time your trading against the broker.

Also you should factor in what the beta is between the pairs your trading.

Interesting…any brokers in particular that you’ve run into issues with? I’ve heard some horror stories about FXCM about the same but haven’t heard much about IBFX.

How did you work around the problem? Also what do you mean by " running Pearson" ??

i also trade with FXCM, but would think that this only could be an issue with broker that have a dealing desk…with a non-dealing desk model you are not trading against your broker, so why would they have something against stat arb trading…but maybe i just overlook something…

Just to refresh everyone that still looks at this thread. The original strategy with vitrite is to flawed and will not work long term.

My strategy does work but in a different way. You must use excel to normalize a set of data and then plot it so it shows the standard deviation of that currency. You repeat this process for a correlated currency and plot the two on one chart so you can see the gap in standard deviations and when they make a significant gap you buy the underperforming one and sell the over performing one and close once they go back in sync.

You can see my myfxbook here

http://www.myfxbook.com/members/ReventonTrading/tradepairscom/1069387

It’s a live real money account

I started the new way earlier this month.

I have seen Kelton in action with this strategy and I cannot emphasize just how much of a genius this guy is. Started using his strategy on my live accounts and they work wonders too.

First of all, thanks for your strategy!

I started trading the original version last week and up to now its highly successful…i trade with FXCM and there you can overlay prices on one chart…very easy and i didn’t have any problems of rescaling as i can lock the view of the chart…lets see how it continues…

by the way, i trade with 1h charts…and look up the correlation on forexticket (as also mentioned in the older thread)…i prefer trading negatively correlated pairs to trading positively correlated ones…
first i just looked for pairs that are highly (+90%) correlated on daily, but now i also look for pairs with high hourly correlation…

You trade negative correlation? What if the price continued to trend? You would eventually hit margin. And lose everything.

i look in the past what was the biggest recent gap/spread of the 2 pairs, and when the actual separation is more or less equal then i sell the overperforming and buy the underperforming pair (as you do with pos. corr. pairs)…and yes, that’s the risky version of trading negatively correlated pairs…you can also buy or sell both pairs, then you have the same result as you have trading positively correlated pairs (buy and sell)…anyway i have a mental stop at between 200/300 pips, so i adapt my position size to that, if it goes further against me i have to take the loss…but up to now i was not even near that negative level…
if you want to buy or sell both neg. corr. pairs, then i would decide looking at the more volatile pair of the two, because it would have to compensate for the other pair going negative…e.g. EURNZD and NZDCHF, i would decide on buy or sell (both) depending on EURNZD…

i post screenshots of 2 live trades, one still open and the other one was closed yesterday…

EURUSD / USDCHF


when i entered the gap was 236 pips, but i may not wait until they cross again…as it’s real money, i’m happy with part of the whole possible profit (maybe half of it or a little more) and not stay too long in the trades…don’t be too greedy :wink:

EURNZD / NZDCHF


the red lines show entry and closing of the trade…took about 18h…and profit was 210 pips…i got in a little late in that one, but that’s ok, i prefer leaving some profit on the table and be sure that i have a good feeling entering the trade…although this time i had the guts to wait until they cross again, not always the case :slight_smile:

hi kelton,

i have a question…to check the correlation, do you only look at the correlation of the timeframe you want to trade or do you also check other timeframes (higher ones)?
as i mainly trade the 1 hour charts i mainly look for high correlation on 1 hour (at forexticket), but also have an eye on the daily correlation…
and how often do you check correlation? how often would you check correlation trading 1h charts?