Backtesting futures - require assistance

meanreversion

Senior member
Messages
3,398
Likes
538
I'm looking to expand my trading set from FX and gold to include other commodities, for which there is no escaping the futures market.

My system is medium term in nature, with successful positions lasting 2-4 months. Backtesting FX is simple enough, but what is the "correct" approach with futures, where the main contract jumps around and/or expires?

At the moment I'm looking at continuous data as supplied by Reuters, but this is a simple splicing approach. What I'm looking to find is a data provider who can supply back adjusted futures data ... and also how does this translate into identifying entry and exit points - e.g. if I buy when 10 day MA crosses over 50 day MA, what happens to these MAs when the contract changes?
 
I'm looking to expand my trading set from FX and gold to include other commodities, for which there is no escaping the futures market.

My system is medium term in nature, with successful positions lasting 2-4 months. Backtesting FX is simple enough, but what is the "correct" approach with futures, where the main contract jumps around and/or expires?

At the moment I'm looking at continuous data as supplied by Reuters, but this is a simple splicing approach. What I'm looking to find is a data provider who can supply back adjusted futures data ... and also how does this translate into identifying entry and exit points - e.g. if I buy when 10 day MA crosses over 50 day MA, what happens to these MAs when the contract changes?

Getting it straight with data is always a problem. I am not sure which is the best provider for futures. I have found errors in the data of the ones I used so I won't recommend anyone. You raise an important issue though most people are not aware of and I was not until I read the book "Profitability and Systematic Trading" (page 103) where the author talks about the impact of various series types on backtesting results. If you can find a scanned copy around check it out, it is quite revealing I must say. In summary, it all depends on what type of stops you are using. Since continuous future contracts are adjusted by subtracting or adding a fixed number of points if you use percent stops the backtesting results will be different each time the series is updated with the addition of another contract. Quite revealing , isn't it? With stocks and splits, the results will be different if you use point stops because in that case prices are divided by the split factor. Intriguing, I must say. I wonder how many traders do backtests without them being aware of these facts. I think the author of that book I mentioned is the only one AFAIK who has elaborated on such issues and I wondered when I read that how many real experts on trading system development are actually out there or whether it is the case that very important facts are obscured so that some people maintain their edge. Also, check out the author website, his program is one of the best ones I have used for finding patterns in futures data.
 
What a can of worms.. I've spoken to Pinnacle about their data, I'll give it a whirl and let you know.
 
What a can of worms.. I've spoken to Pinnacle about their data, I'll give it a whirl and let you know.

I have used them...I must say they are the best out there. The nice thing is that they offer series without the evening sessions and they have several options for adjusting the data. Watch out adjustments in Crude, you may end up with negative numbers. Pinnacle has an option to shift those to positive numbers but I have no idea how that affects backtesting results.
 
Just as an update to this, I've been using Pinnacle for a few weeks now and the data (so far) seems to be reliable. I use it in conjunction with ProRealTime, which provides "continuous" futures contracts, in order to compare and verify the data.

For their continuous contract, Pinnacle have devised their own rollover date, which they have calculated from historical data. It's the date when their contract flips to the next month, in an attempt to provide the most realistic interpretation, i.e. what the trader would have encountered in the real world.
 
CSI, another provider (I couldn't get it to work with Amibroker), have a variety of settings for when you want the data to rollover ... this is perhaps more complex than most people need.
 
I heard CSI are good. I used CRB Trader / Barchart and can't recommend them, their software for compiling and backadjusting was full of bugs.

Premium Data seem to be quite good from my cursory trial.

This is all end-of-day though. I think tickdata.com have the software for doing all the things you want too - although the data is pricey, being intra-day and high quality.
 
For their continuous contract, Pinnacle have devised their own rollover date, which they have calculated from historical data. It's the date when their contract flips to the next month, in an attempt to provide the most realistic interpretation, i.e. what the trader would have encountered in the real world.

IMO this is the most realistic way of doing it. Whatch out, some continuous contracts like CL have negative days. They provide a parameter to shift them up.
 
Top