Futures rollover: automating contract continuity
Rollover is the least glamorous part of a futures system, and one of the most common ways one quietly breaks. Futures contracts expire, so a strategy that wants to stay in the market has to keep moving from the expiring contract to the next. Get that switch wrong, in the backtest or in live trading, and everything built on top of it inherits the mistake.
What rollover is, and why it is not trivial
A futures contract has an expiry. To hold a position past it, you close the expiring contract and open the equivalent one further out. That is the roll. The catch is that the two contracts do not trade at the same price, and liquidity drains out of the old one as expiry approaches, so both when you roll and how you record it matter more than they first appear.
The continuous contract problem
To research a strategy across years, you need one long price series, not a pile of three-month contracts. So you stitch the expiring contracts together into a continuous contract. The problem is the join. Consecutive contracts trade at different levels, so a naive stitch creates a price jump at every roll that never happened in any real market. Run an indicator over that and it reacts to gaps that are pure artefacts of the stitching.
Back-adjustment, and its honest trade-off
The fix is back-adjustment: shifting the older data so the price lines up across each join and the artificial jumps disappear. That gives you a clean, continuous series to build signals on. It comes with an honest trade-off worth knowing: back-adjusted prices are no longer the real historical prices, so absolute price levels from years ago are not literal. For most signal-based strategies that is fine, because they care about movement, not the exact number. The point is to know which series you are using and why.
Rolling a live position
Live rollover is its own job. The system has to know the roll rule, watch the right signals for it, usually the way volume and open interest shift from the front contract to the next, and then actually move the position: close the old, open the new, without leaving a gap where you are unintentionally flat or double-positioned. And the rule it uses live has to be the same one the backtest assumed, or the two stop describing the same strategy.
Where futures systems get it wrong
- Backtesting on un-adjusted continuous data. The roll gaps leak into every signal, and the results are quietly meaningless.
- Rolling on a fixed calendar date only. Sometimes fine, sometimes you are trading a contract everyone else has already left, in thin liquidity.
- Different roll rules in backtest and live. The backtest and the live system drift apart, and you are no longer running the strategy you tested.
Build it in from the start
Rollover is not a feature you bolt on at the end. It shapes your data, your signals and your live execution, so it belongs in the design from the first day. It is a core part of the futures and commodities systems we build, and it runs through the broker and exchange connectivity underneath. We build the software to your specification. We do not supply strategies or trading calls, and we make no claim about returns.
Common questions
- What is futures rollover?
- Futures contracts expire, so to keep a position going you close the expiring contract and open the next one. That switch is the rollover. It sounds trivial, but doing it at the right time, and stitching the contracts together correctly for research, is one of the quiet ways a futures system goes wrong.
- What is a continuous contract, and why does it need adjusting?
- A continuous contract is several expiring contracts stitched into one long price series so you can backtest across years. The problem is that consecutive contracts trade at different prices, so a raw stitch invents a price jump at every roll that never actually happened. Back-adjustment removes those jumps so your indicators and signals are not reacting to a gap that is not real.
- When should a futures position roll to the next contract?
- Usually as liquidity moves from the expiring contract to the next one, which you can track through volume and open interest, rather than waiting for the last possible day. The exact rule depends on the contract and your strategy. The important thing is that the rule is deliberate, tested, and the same in your backtest as in live trading.