PDA

View Full Version : Statistical Arbitrage/Trading Strategy Revisited



alufejuli
10-19-2015,
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:

Statistical Arb/Pairs trading strategy!

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.

aboni
10-19-2015,
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!

akehuhar
10-20-2015,
Quote Originally Posted by pipcompounder View Post
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.
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.

Quote Originally Posted by pipcompounder View Post

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!
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.

ataocarujr
10-20-2015,
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.