Statistical Arb/Pairs trading strategy!

I’ve tested (papertraded) this strategy for the last two months finding setups on a 15m chart on Tradingview, and executing them on a Saxotrader (simulation) account. So far this has resulted in 30 trades and around 16% total trade profit. Every trade has been profitable except one, which was limited to only -0.02%. This loss was due to the chart slip/repaint. I am currently looking to find a way to import 15m chart data into a spreadsheet (Google Sheets), so as to be able to calculate the mean reversion of the different pairs. Do you know where and how I can get such data? I want to test all the aspects of this strategy so that I can expose all the possible pitfalls before I take it to our main trading account.

i made an export of the prices into an excel sheet from FXCM…they had the option to show the chart in form of a table (i think thats what they called it) of their prices…try that, demo account was enough…
i would not have the time for 15m charts, but higher TFs could be more interesting…last time i worked with this, i was looking at JPY pairs because of their high correlation…

You mentioned having to wait some time before the trades were profitable, but just how long did you actually have to wait? A trade usually lasts anywhere from 1 to 4 days when I trade the 15m time frame. I haven’t been using higher TFs because I feel like trades would take too long before becoming profitable. I don’t watch my positions that often. I may just check if there is profit on my phone a couple a times, and if the trade is in substantial profit I check my chart setup to see if there is room for more movement or if I should just close the position. In theory, this “abitrage” strategy should make it impossible to loose money, even if you leave the position unattended for over a week. The chartslip will most likely just result in a minor loss.

Hey guys! I just wanted to thank everyone for keeping this thread alive! I have basically stopped Forex for now and deal mainly with crypto’s now but I still focus on arbitrage. Good to see it has helped some people make some money or at least have a different way of thinking.

Hi Kelton,
Can I ask why you stopped pairtrading forex? I mean if you got a 43% account balance increase with just 13 trades then why did you stop? Did you experience any big losses or something like that?
Oh and btw, what abitrage do you do now?

Please contact me,I need to talk with you.thanks
[email protected]

I don’t 100% remember. It was a long time ago and I’ve been very successful with crypto currencies. I think one of the reasons was eventually the chart would slip and readjust and I couldn’t figure out where I was and I would go negative. If you have figured out a way to keep the charts more steady I would love to hear it.

As for crypto currencies, I was able to find arb opportunities between multiple exchanges. For instance a coin called Ripple would be pair against a coin called Ether. The Ask price on one exchange would sometimes be as much as 20% cheaper than the bid on another exchange. I would buy Ripple on exchange “A” using Ether then send it to exchange “B” and sell it for 5-20% more for Ether and then send the Ether back to the original exchange “A” and repeat the process. The arb opportunity in the spreads is not often but when it is there it makes a ridiculous amount of money. I was able to literally turn 1.5 Ether worth about $1500 at the time to 2.5 Ether in one day. That’s a $1000 profit in one day.

However due to fees you need to have at least $1500 or so to start. Otherwise the fees will eat up all the profit.

As for when the arb gap is closed I flip bitcoin consistently using a website called Paxful.

as i mainly traded the 1h and 4h time frame sometimes it took a bit longer…some trades took days others some weeks…as i calculated everything in excel and also made the charts there i couldn’t trade lower TFs as i had to extract the prices from my broker to put them into excel…
i believe that trading only visually (with two pairs on the same chart) is not exact enough because of the repainting of the charts…so prefer calculating everything in excel

well, i am afraid that you are wrong…real arbitrage is risk-free, but this is not the same…this is based on correlation of the involved pairs, if some event changes this correlation then you loose the same way as with other trading strategies.

1 Like

you started a great thread…it definitely deserves to be kept alive

1 Like

i was researching a bit the last days…and it seems that it’s much better to pick the pairs by cointegration than by correlation…

here is some reading…

http://www.tradelikeamachine.com/blog/cointegration-for-pairs-trading-part-1
http://www.onestepremoved.com/cointegration-forex-pairs-trading/

Thanks Forexmike,

Yes after doing true arbitrage between different exchanges trading cryptocurrencies it has gotten me back in the mood to figure out a stable process of trading using my general theory. And yes Excel is the better way to trade it. If you try to trade visually you may win or loose depending on when it repaints, but that is not safe trading. That is gambling.

Im testing out a way right now which shows much more promise than the original strategy, which is maybe what you are currently doing. However, I am using the historical 1 min data starting with 1 months worth and then slowly adding on to it each day.

I put the historical data in excel, find the mean and standard deviation of both currency pairs and then I “Standardize” the data set and plot the two charts together as they now have the same standardized reference, This way shows to be very stable and the “chart repaint” does occur but since you are dealing with such large data sets every time you add new data it only changes the “average” by a minuscule amount allowing you to more accurately see the gaps

Yes Cointegration is a better term than correlation. That is what I trade. Its just easier for people who are unfamiliar to think about correlation.

did you read the links i posted?
what i understood is that correlation and cointegration are different things…trading cointegrated pairs seems to be much safer than trading correlated pairs…

mike

didn’t you do that already 3 years agound…at least i understood it like that back then…i did pretty similar, but i haven’t done it since then, so i will have to look at my excel calcs from then.

mike

Honestly I dont know if I did this years ago or not. I have done so many things with Forex and Excel its hard to remember. I must have tried it at lease because I know how to do it very fast. If I did try it in the past I know I never used such large data sets (over 25,000 individual closing prices) in my calculations.

And yes Cointegration and Correlation are different things. However, I still trade correlated pairs when trading using cointegration. Not sure if it helps or not.

This is what I am looking at now. This is roughly 1 month of data (1 min prices) plotted. Eur/usd vs Gbp/usd

Even as I add or take away even thousands of data points the past data barely changes, making it much easier to identify good opportunities

.

it seems exactly the same what i did in excel back then…
i have to go through my old excel sheet and then we can compare if its the same…but i am afraid that i have not enough time before the weekend…

The only problem with cointegration is in the calculations themselves. From what I know, the best cointegration test to do is the Johansen test, but it’s quite a large subject and the calculations are rather advanced

you may be right…for now i am looking for tutorials how to calculate cointegration in excel…from what i read about correlation vs cointegration i am quite sure that trading with cointegration will give much better results…
let’s see if we can manage to calculate it in excel…

I you succeed in calculating cointegration between multiple variables it would be extremely useful. A combo of correlation and cointegration would be optimal for good trades. That is also pretty much the strategy used when just looking at the pair charts. Trading opportunities only occur once correlation has been broken for a very short amount of time, and the reverting back to the mean (which is basically what we trade) is then the cointegration.