Continuous Futures: Back-Adjusted, Ratio or Raw?
How to stitch futures contracts for a backtest: calendar vs volume roll, back-adjusted vs ratio vs raw series, and why P&L must be computed per contract.
Part 4 of 20 · How to Algo · Previous: Cleaning market data · Next: Building a backtester
There is no such thing as “the ES price since 2014”. There are about fifty consecutive ES contracts, each traded for a few months, and every multi-year backtest runs on a series somebody stitched together from them. How it was stitched decides which of your numbers are real.
The short version of this part: pick the adjustment method that keeps the quantity your strategy uses intact, roll where the volume is, and compute P&L on the contract you were actually in.

Why contracts do not join smoothly
Two contracts on the same index trade at different prices at the same moment. The gap is mostly carry: for an equity index it reflects interest rates minus expected dividends until expiry; for a commodity it includes storage and supply expectations. On the day you switch from the expiring contract to the next one, a naive series jumps by that gap, even though nothing happened in the market.
If your backtest holds a position across that jump, it books the gap as profit or loss. In the simulated series above, eight quarterly contracts and seven rolls, the unadjusted line books +1,650 points of roll gaps that no position ever earned. If your signals use moving averages or breakouts, the jump can trigger them. Neither is a market event.
Three ways to stitch
Unadjusted. Simply concatenate front-month prices. Price levels are exactly what traded at the time, so anything that depends on the actual level (round numbers, a prior day’s high on the same contract, option strikes, floor pivots) is correct. Returns across each roll are wrong by the size of the gap.
Back-adjusted (difference). At each roll, shift all earlier history up or down by the gap so the series is continuous. Point moves and dollar P&L per contract within the history are preserved. Old price levels are no longer real: after years of adjustments, a back-adjusted crude oil or grain series can show prices the market never printed, sometimes negative. Percentage returns computed on old levels are distorted.
Ratio-adjusted. At each roll, multiply all earlier history by the ratio of the two contracts. Percentage returns are preserved. Point distances are not, so a 20-point stop in 2015 on a ratio-adjusted series is not the 20 points that traded.
| Your strategy uses | Use |
|---|---|
| Point-based stops, targets, ATR in points | Back-adjusted |
| Percentage returns, volatility in percent, momentum ranks | Ratio-adjusted |
| Actual price levels: round numbers, strikes, levels from the same contract | Unadjusted, per contract |
| Dollar P&L | Per contract, never the stitched line |
Many research setups need two series side by side: an adjusted one for signals and the raw contract prices for fills. That is normal, not over-engineering.
When to roll: calendar versus volume
A calendar roll switches on a fixed rule, such as eight days before expiry for equity index quarterlies. It is simple and reproducible. Its weakness is that it assumes traders move on the same schedule.
In June 2026 they did not. Our calendar rule switched NQ to the September contract on 12 June. Volume stayed in the June contract until 16 June. On those days the September contract printed about 24,000, 92,000 and 314,000 trades, against roughly 700,000 on a normal day in the active contract. For four sessions our feed and our store followed the thin contract, and the busy June prints from that window were not recoverable from the live source later; they had to be bought back from a second vendor. A customer noticed before we did.
We changed index futures to a volume roll. In the 14 days before expiry both contracts are watched. The front stays on the old contract until the new one carries at least 55% of prints over 30 minutes, with a minimum of 2,000 prints, and the switch is then final and persisted so that a restart cannot undo it. The calendar date still falls inside the window as a backstop.
Two details matter more than they look:
- Volume, not print count, when combining sources. A second vendor’s feed counted about 19% fewer prints than ours for the same contract on the same day. A stitch rule based on print counts would roll at different times depending on the source. Volume is more stable.
- Not every product should roll on volume. Metals and energy hand off around first notice and delivery dates. A volume window around a gold delivery month can flip back and forth. Those products stay on calendar rules with product-specific buffers.

Roll weeks are where artefacts hide
Roll weeks combine several hazards: two contracts trading actively, a spread that moves, possibly thin trading in the new contract, and data vendors that disagree on which contract was “front”. If a result concentrates in roll weeks, assume it is an artefact until you have shown otherwise.
The check is cheap. In a study of gold’s overnight drift we split all sessions into roll windows and everything else. The average overnight move was +1.663 points inside roll windows and +1.667 outside, and the 50 largest overnight moves were spread across both in proportion to their size. The effect was not a roll artefact. The same split on a result that is a roll artefact shows a lopsided picture immediately.
Another roll-week trap we hit in our data: the NQ roll week of March 2026 was a patchwork. One day came from the expiring contract after volume had already moved to the next one, so it was thin; the following days came from an aggregated relay recording rather than raw trades, with volume two to three times too high and whole-second timestamps. The store looked complete. We rebuilt that week from raw data of the correct contract. The general lesson: check which contract each day of your continuous series actually comes from, and whether it was the most traded contract that day.
Compute P&L on the contract you were in
The cleanest way to avoid every adjustment problem in your P&L is not to compute P&L on the stitched series at all.
- Generate signals on whichever adjusted series suits the signal.
- For each trade, record the contract it was entered in.
- Fill entries and exits at that contract’s actual prices.
- If a position must be held through a roll, model it as two trades: close the old contract and open the new one, each with commission and slippage.
Step four has a real cost that the stitched line hides. A strategy that holds positions for weeks pays a roll every quarter on index futures, and a trend rule with a 250-day lookback spans four rolls in every signal it computes. A strategy that holds for a few days rarely crosses a roll and can often simply avoid entering in the last days of a contract.
The same logic applies live. Our execution engine follows the gateway’s current front contract rather than its own calendar, and when the front changes it flattens both the new front and the contract that just rolled off before trading again. A restart across a roll therefore cannot leave a position stranded in an expiring contract.
Volume and open interest are per contract too
Indicators built on volume suffer at rolls in a way that is easy to miss. During the roll window volume is split between two contracts, so the front month’s volume drops and the next one’s rises. A volume filter on a continuous series sees an unusual quiet patch every quarter. Either sum volume across both contracts during roll windows or exclude those days from volume-based signals.
Checklist
- Know how your continuous series was built: which method, which roll rule, which dates. Ask before you buy; our historical tick data guide lists the other questions.
- Match the adjustment to the quantity your signal uses.
- Keep unadjusted contract prices for fills and P&L.
- For equity index futures, roll on volume with a calendar backstop; for metals and energy, use product-specific calendar rules.
- When combining sources, stitch on volume, not print counts.
- Model rolls held through as real trades with costs.
- Compare results inside and outside roll windows.
- Check, for every day, that the series used the most traded contract.
With clean, correctly stitched data in hand, the next question is what to run on it. Part 5: How to build a backtester, the event loop and the same-bar problem.
Frequently asked questions
What is a continuous futures contract?
A single price series built by joining consecutive contracts, for example the March, June, September and December ES contracts, at chosen roll dates. It does not trade anywhere. It is a research convenience, and the way it is stitched decides whether old price levels, returns, or both are distorted.
Should I use back-adjusted or ratio-adjusted data for backtesting?
Back-adjustment shifts history by the roll gap in points and keeps point moves and dollar P&L per contract intact, but distorts old price levels and percentage returns. Ratio adjustment scales history and keeps percentage returns intact, but distorts point moves. Use back-adjusted series for point-based stops and targets, ratio-adjusted for return-based signals, and unadjusted contract prices for anything that depends on the actual price level.
When do ES and NQ futures roll to the next contract?
A common calendar rule switches eight days before expiry of the quarterly contract, but traders do not always move on schedule. In June 2026 our calendar rule moved NQ to September on 12 June while the bulk of trading stayed in June until 16 June. We now roll index futures when the new contract carries at least 55% of prints over 30 minutes, watched in the 14 days before expiry, with the calendar date as a backstop.
Why do back-adjusted futures prices go negative?
Each roll shifts all earlier history up or down by the gap between the two contracts. After years of adjustments a back-adjusted crude oil or grain series can show prices the market never printed, sometimes negative. Point moves and per-contract P&L are still right; old price levels and percentage returns are not.
How do contract rolls distort a backtest?
A position held across the join of an unadjusted series books the carry gap as profit or loss, and the jump can trigger moving-average or breakout signals. Compute P&L on the contract each trade was actually in, and compare results inside and outside roll windows. In a gold study the average overnight move was 1.663 points inside roll windows against 1.667 outside, so that effect was not a roll artefact.