In absolute - and ignoring the beta moves from the spot price - you'd want to be short contracts in contango (premium deflates over time) and long futures in backwardation.
Most of us probably backtest/generate trading signals using continuous/rolled contracts, but this approach does not attempt to "be smart" about the "term structure" (ie whether in backwardation/contango and the slope of the yield curve) of the instrument. I wanted to test whether this approach could be improved
The main gist of the idea for the "improved approach" is to avoid contracts with a "penalising roll yield rate". For each new Buy/Sell signal, check which contract offers the best roll yield rate and pick that one instead of the front-month contract. For any long signal, pick the contract with the lowest contango or highest backwardation rate and for any short signal, pick the contract with the highest contango or lowest backwardation rate.
I ran a comparison test on Crude Oil using a standard 20-50 day MA crossover. The first test only picks the front-contract rolling over with a fixed date trigger (ie similar to backtest/trading with standard back-adjusted contract), whereas the second test looks up all the contracts in the next 12 months and picks the one with the best implied roll yield rate.
The performance of the second test looks quite appealing - check chart below
Wonder what you guys think about this concept...
I have not (yet) considered volume/liquidity constraints (assuming that any of the next 12 months contracts would offer enough liquidity for a small trader).
A TB question I have is: how would you do this in TB? I wrote custom code for this (completely outside TBB) to load each individual contract file to calculate daily yield curves and compute the equity curve based on each contract choice, trading signals, etc. Works ok for a single instrument but I'd like to do some portfolio testing on the same concept without having to rewrite a whole backtesting software
Would appreciate any bright ideas on how to do this in Blox in a more automated manner
