I just noticed that Interactive Brokers has added some support for continues futures contracts! For me that’s a great feature and I certainly hope they will expand on it in the future. I’d love to see them providing automated roll over support and a continuous data feed – as a paid service, of course.
A major difference between futures and stocks is that future contracts expire. To hold an overnight position, one needs to thing about roll overs. Let’s consider an example: If we want to go long the S&P 500 and stick with it for a year, we can buy the SPY and sell it after a year. That’s it. With futures, we would have to go long the September contract (considering we do the trade today), and then we will have to roll over four times, switching first from September 2015 to December 2015, then from December 2015 to March 2016, then from March 2016 to June 2016 and finally from June 2016 to September 2016. At the end we will sell the September 2016 contract.
A roll over is as simple as selling the current contract and buying the next. In TWS one create a synthetic product which does a roll over via a single trade (my typical approach is to use a pair combo order).
I hope you see the backtesting problem now – if we want to use a 200-day moving average, which contract do we use? This problem is addressed by introducing the continuous contract. It’s an artificial creation, which glues the different contracts together creating a single and continues series. That’s what usually one gets (among many other things) from a specialized data provider, like CSIData – my current data provider. Another important feature one gets is the roll over schedule – this tells a trader on which day to do the roll over.
My first reaction, once I discovered this new functionality by IB, was to do a quick comparison between IB’s data and CSIData’s data. Here are the differences for the current contracts for the commodities:
|Future||IB Contract||CSIData Contract|
|Oats (ZO)||Sep 2015||Dec 2015|
|Corn (ZC)||Sep 2015||Sep 2015|
|Soybeans (ZS)||Aug 2015||Nov 2015|
|Soybean Meal (ZM)||Aug 2015||Dec 2015|
|Soybean Oil (ZL)||Aug 2015||Dec 2015|
|Wheat (ZW)||Sep 2015||Sep 2015|
|Rough Rice (ZR)||Sep 2015||Sep 2015|
Certainly there are some difference, although, to be fair, this was the group with most differences. A quick check of the daily volume and behavior made me conclude that the CSIData source is better, which is to be expected – that’s their area of expertise. My feeling is that IB will catch pretty quickly though.