Early access is open. Free sample datasets are live now. Download a sample

Learn

Continuous Futures and Roll Adjustment Methods

8 min read · Updated 19 November 2026 · By the marketdata.co data team

A single futures contract lives for a few months, so you can't run a ten-year backtest on ESZ6 alone. You have to stitch contracts together, and the way you stitch them changes your results. This page shows the three common methods, what each one breaks, and how to build one in pandas.

How it works

How a continuous series is stitched

A continuous series follows one position in the curve, usually the front month, and switches to the next contract on a roll date. Our symbols use the root plus .C plus the position: ES.C1 is the front contract, ES.C2 the second.

Two choices define the series:

  1. The roll rule. When do you switch? Common rules are the day volume in the next contract passes the current one (volume), the same test on open interest (open_interest), a fixed number of days before expiry (fixed_days_before_expiry), or before first notice day for physically delivered contracts like crude oil (first_notice).
  2. The adjustment. What do you do about the price gap between the old and new contract on roll day?

Worked example (illustrative prices)

Suppose on roll day the expiring December contract settles at 6,700.00 and the March contract settles at 6,760.00. The 60-point gap is not a market move. It is the cost of carry between two delivery dates.

  • No adjustment (none). The series jumps 60 points overnight. A breakout system sees a fake breakout, and your P&L curve shows a profit nobody earned.
  • Back adjusted, additive (back_adjusted, also called Panama). You add +60 to every price before the roll. The gap disappears, and point differences between bars stay exact. Here is the cost: old prices drift away from what actually traded, and after many rolls they can even go negative.
  • Ratio adjusted (ratio_adjusted). You multiply every earlier price by 6,760 / 6,700, about 1.00896. Percentage returns stay exact, prices never go negative, but point moves in old bars no longer match what a trader really made per contract.

Pick by what your strategy measures. Stops and targets in points want additive. Signals built on percentage returns or volatility want ratio. Anything that compares to historical price levels (old highs, round numbers) wants the raw series, kept alongside.

Details

Build a back adjusted series in pandas

Assume you have daily bars for each contract with symbol, date and close, and a list of roll dates. The code below rolls from each contract to the next and applies the Panama adjustment going backwards.

"""Example: Panama (additive) back adjustment."""
import pandas as pd

bars = pd.read_csv("es_contracts_daily.csv", parse_dates=["date"])
rolls = [  # (roll_date, old_contract, new_contract), illustrative
    ("2026-09-11", "ESU6", "ESZ6"),
    ("2026-12-11", "ESZ6", "ESH7"),
]

px = bars.pivot(index="date", columns="symbol", values="close")
series = pd.Series(index=px.index, dtype=float)
underlying = pd.Series(index=px.index, dtype=object)

start = px.index.min()
for roll_date, old, new in rolls:
    roll_date = pd.Timestamp(roll_date)
    mask = (px.index >= start) & (px.index < roll_date)
    series[mask], underlying[mask] = px.loc[mask, old], old
    start = roll_date
series[px.index >= start] = px.loc[px.index >= start, rolls[-1][2]]
underlying[px.index >= start] = rolls[-1][2]

adj = series.copy()  # walk backwards, shift prices before each roll by the gap
for roll_date, old, new in reversed(rolls):
    d = pd.Timestamp(roll_date)
    gap = px.loc[d, new] - px.loc[d, old]
    adj[adj.index < d] += gap

out = pd.DataFrame({"close": adj, "unadjusted_close": series,
                    "underlying_symbol": underlying})
print(out.loc["2026-09-08":"2026-09-15"])

Read the output around the roll. unadjusted_close should show the jump, close should not, and underlying_symbol should flip from ESU6 to ESZ6 on the roll date. If close still jumps, your gap was measured on the wrong day.

For a ratio series, replace adj[...] += gap with adj[...] *= px.loc[d, new] / px.loc[d, old].

Watch out

Common mistakes

Trading the adjusted price in a live system. A back adjusted level is a research artefact. Your broker fills on the real contract, so live orders must use unadjusted_close or the actual contract quote.

Rolling on expiry day. Volume moves to the next contract days before expiry. Rolling on the last day means your series spends its final days in a thin, wide market that you would never trade.

Ignoring first notice day. For physically delivered contracts, being long after first notice can mean a delivery notice. A roll rule based only on expiry misses that.

Forgetting the roll cost. The adjusted series hides the gap, but a real roll costs you two spreads and commissions. Add that to each roll in the backtest.

Details

Get the data

Continuous futures, three adjustments, one file per root. What you'll get: daily ES.C1-style series in none, back_adjusted and ratio_adjusted forms, with underlying_symbol, unadjusted_close, cumulative_adjustment and an is_roll_date flag on every bar.

  • Continuous futures data, available in early access
  • Suggested price: $29 per root for full daily history, or included in Starter ($29/mo) by API
  • We don't have a free futures price sample yet. A sample file is available on request.

FAQ

Frequently asked questions

What are back adjusted continuous futures?

They are a stitched series of futures contracts where every price before a roll is shifted by the gap between the old and new contract. The shift removes fake jumps on roll days. Point differences between bars stay correct, but old price levels no longer match what traded.

Which roll method should I use for backtesting?

Use back adjusted (additive) prices if your rules work in points, and ratio adjusted prices if they work in percentages. Keep the unadjusted series too, for fills and for any rule that references real price levels.

Why do some back adjusted series show negative prices?

Additive adjustment subtracts the accumulated gaps from old prices. In markets with steady contango, such as some energy contracts, the total can exceed the early prices and push them below zero. Ratio adjustment avoids this.

How do I know which contract a bar came from?

Look at the underlying_symbol field. It names the actual contract, such as ESZ6, behind each bar, and is_roll_date marks the day the series switched.

Keep reading