To Rollover or not to Rollover – that is the Question!
In actuality that is only a portion of what we need to ask ourselves when dealing with rollovers and data. As you probably already know, continuous futures contracts are created by adjusting historic data in an attempt to eliminate the gap between the new and old contract. If you don’t adjust your data, then the gap causes erroneous disruptions in your historic back testing. A trade that bridges a rollover does not accurately reflect what really happened. So, we must use adjusted data. Two problems arise from using back adjusted data:
- The date of the rollover can have a large impact on algorithm performance.
- In real time trading, rollovers must take place, and this increases execution costs. If you trade a longer-term strategy, you may need to execute 12 additional spreads (exit old – enter new) in crude oil annually. If you levy a $50 charge (slip and commission) for each turn, then that is $600 in additional costs annually.
Several options can be used to trigger when to rollout of the expiring contract and roll into the new one. Some traders use consecutive days of higher volume and open interest in the new contract in relation to the expiring one to begin the process. This mechanism is also popular in creating continuous contract data. Other traders, and I was one of them, chose a particular trading day of the month based on the expiring date of the contract. Many futures contracts expire after a certain number of days have passed in the expiring month or the prior month of expiration. This mechanism, n-days into the expiring month, can also be used when creating continuous contracts.
Using TradeStation’s Default @CL
Using Wilder’s Parabolic SAR Algorithm
Using Pinnacle Data’s Adjusted Data for CL
The two equity curves are similar. However, TradeStation’s data produced nearly $60K in profit, whereas Pinnacle only produced north of $20K. I discovered in the early part of TradeStation’s @CL data, the values were derived strictly from the electronic markets. Up until about 2008 or so, I think the pits were still more active. Take a look at this graphic.
Pinnacle Data knits the pit session data with the purely electronic data during the transition period. However, this only accounts for the early trades in the back test. The parabolic indicator uses its prior output to calculate the next value. Any disruption in the differences in the relationships of historic highs and lows of the data will perpetuate through the output of subsequent parabolic calculations. Things start to work themselves out later in the back test. Indicators like the Parabolic are more sensitive to data differences.
What if you wanted to trade the Parabolic SAR real time?
This can be done, but results may look different than your back test. In trading crude oil, you should trade all 12 contracts. And you will need to execute roll spreads once a month, if you are in a position. This doesn’t answer the question on how to calculate the Parabolic once a rollover takes place. You have two options, 1.) you can use what Futures Truth coined as overlap data to calculate the new indicator reading. Basically, we would load the new contract data going back as far as we could and derive the indicator values off of the new data. This would work just fine with crude data, but many futures do not have a sufficient amount of overlap. In other words, the new contract would have very little history. And this data wasn’t sufficient to calculate accurate indicator values. 2.) Roll into the new contract and adjust the historical data of the old contracts by the discount between the two contracts that were rolled out of and into. This would alleviate the problems with the futures contract with very little history.
I like the second option best, because it works for all markets and even in crude oil you may not have overlap data to do the calculation. Even if you have enough data, it might not be all that good. If you can go back 100 days in the new contract, the data may deteriorate before you get those 100 days.
Wouldn’t it be great if we could test with this type of data? You know rollover and then adjust all the historic data that we need for our indicators using good data from the old contracts, but adjusted in terms of our new data? Well, we are in luck, I spent several hours doing this with my Python TS-18 software. I used Pinnacle Data‘s actual contract data – you get this when you buy their CLC database and derived the discount between the contracts. Pinnacle rolls at the same time each month in crude – it’s not a calendar date but a number of days into the prior expiration month. Take a look at this trade-by-trade listing.
This shows rolling out of the old contract and into the new contract, and then backing up 100 days of old contract data and adjusting the data by the discounts as they occur. This could involve more than three adjustments historically. This rollover inspired data was then fed into the parabolic indicator. The indicator was restarted on each rollover going back N days. In other words, when a rollover was observed, the indicator was reset with the new rollover adjusted historic data by using a loop. The rollover mechanism called the parabolic calculation N times going back N days into our dynamically adjusted data. Once the loop finished, the new contract data was then fed into the calculation on day at a time. This occurred until another rollover was observed.
I would show the results of this testing but…
I got very diverse results when I recalculated the parabolic on each rollover with different loop counts. On the rollover, if I looped back 40 days to bring the parabolic up to speed, I got very similar results to TradeStation’s results using Pinnacle data. What the heck I will show that to you.
The results are similar but the draw down of late concerns me. However, if I only go back 30 days to synchronize the parabolic on each rollover, the results are much better. This tells me that the parabolic is very sensitive to the data that is used for its calculations.
This post may have raised more questions than it answered. But I will try to get down to the differences between the different look back lengths on rollover and report any findings back here. However, you must keep rollovers in mind when dealing with trading futures, period.