Home · Guides · When should a backtest roll MCX futures to the next contract?

HOW-TO · MCX FUTURES ROLLOVER · 1-MINUTE BARS · CATALOG VERIFIED 2026-11-25

When should a backtest roll MCX futures to the next contract?

Roll MCX CRUDEOIL and NATURALGAS futures at the start of the session before expiry day, and MCX GOLD and SILVER futures two sessions before the staggered delivery tender period begins. In Options Data (optionsdata.shop) 1-minute futures files, next-month CRUDEOIL volume first exceeded the expiring contract's on the session before expiry in 37 of 44 contracts expiring February 2023 to September 2026. Data: MCX futures, 3 years.

MCX futures, 3 yearsMCX futures + options, 1 yearFree MCX sample Get free sample by email

Get the free sample by email → check the columns

Dates on this page are read from the live file catalog, not typed by hand. Full matrix: /coverage.

MCX front-month futures, Options Data 1-minute files, contracts expiring 17 Feb 2023 to 5 Oct 2026. Crossover = first session on which the next contract's day volume exceeded the expiring contract's, counted in sessions before expiry day (expiry day = 0). Expiry-day share = expiring contract's share of the two contracts' volume on expiry day (median). Roll gap = next contract close minus expiring contract close at the last minute both traded on the crossover session, as % of the expiring close (median).

CommodityContractsExpiry day of monthVolume crossover, sessions before expiryExpiry-day shareRoll gap
CRUDEOIL44 monthly16th–21st1 in 37, 0 in 719.9%−0.48% (next lower in 30 of 44)
NATURALGAS44 monthly23rd–28th1 in 30, 2 in 12, 3 in 1, 0 in 112.6%+4.86% (next higher in 35 of 44)
SILVER19 (Mar, May, Jul, Sep, Dec)3rd–5th6 in 9, 5 in 7, 4 in 30.4%+2.21% (next higher in 19 of 19)
MCX GOLD22 (Feb, Apr, Jun, Aug, Oct, Dec)2nd–5th6 in 10, 5 in 9, 4 in 30.3%+1.04% (next higher in 22 of 22)

When should a backtest roll MCX futures to the next contract?

A backtest should roll MCX futures on the session when the next contract becomes the most traded. In Options Data files for contracts expiring February 2023 to October 2026, that was the session before expiry for CRUDEOIL and NATURALGAS, and four to six sessions before expiry for SILVER and MCX GOLD, before their delivery period.

A roll rule fixed in sessions before expiry avoids look-ahead. Choosing the contract by the same day's volume uses information a trader did not have at 09:00 IST; a calendar rule set from past crossovers, as in the code on this page, uses only the expiry date printed on every row.

When do MCX CRUDEOIL and NATURALGAS futures expire?

MCX CRUDEOIL futures expire monthly, and in Options Data files every CRUDEOIL contract from February 2023 to September 2026 expired between the 16th and the 21st of its month. NATURALGAS contracts expired between the 23rd and the 28th. Each row carries the contract's expiry_date, so a backtest reads the expiry from the data.

Expiring MCX CRUDEOIL and NATURALGAS contracts keep trading to the session close on expiry day: the last traded bar on expiry day was 23:29 IST or later in all 88 contracts. On expiry day the expiring CRUDEOIL contract carried a median 19.9% of the two contracts' volume, and NATURALGAS 12.6%.

Why do MCX GOLD and SILVER futures roll earlier?

MCX GOLD and SILVER futures settle by compulsory delivery and have a staggered delivery tender period before expiry, so traders leave the expiring contract before it starts. Both contracts' last trading day is the 5th of the expiry month, or the preceding working day if the 5th is a holiday, per MCX circular MCX/TRD/383/2025.

MCX circular MCX/TRD/383/2025 (4 August 2025) cut the tender period from the last five trading days to the last three, including expiry day, for MCX GOLD from the August 2026 expiry and SILVER from the September 2026 expiry. Volume crossover moved with it: four sessions before expiry in all three such contracts, against five or six in 35 of 38 earlier ones.

On expiry day an expiring MCX GOLD contract carried a median 0.3% of the two contracts' volume, and SILVER 0.4%, so a backtest that holds MCX GOLD or SILVER to expiry fills on thin bars.

How big is the price jump at an MCX futures roll?

At the volume crossover, the next MCX GOLD contract traded a median 1.04% above the expiring one and SILVER 2.21% above, in every roll measured. NATURALGAS was a median 4.86% above, with a 90th-percentile gap of 13.1% either way; CRUDEOIL was a median 0.48% below, lower in 30 of 44 rolls.

A continuous MCX series spliced without adjustment shows each roll gap as a false price move. Back-adjust: multiply all bars before a roll by the ratio of the new contract's close to the old contract's close on the session before the roll, so returns inside each contract stay unchanged.

How do I build a continuous MCX futures series in Python?

The pandas script loads MCX CRUDEOIL 1-minute futures files, holds the nearest contract more than ROLL sessions from expiry, and back-adjusts open, high, low and close at each roll. Run on CRUDEOIL files with ROLL = 1, it prints 44 rolls from February 2023 to September 2026 with a median ratio of −0.32%.

MCX futures files dated 15 July to 14 August 2026 name the time column timestamp instead of datetime; the script renames it. Both layouts are listed on the file schema page.

import glob, pandas as pd
names = {"timestamp": "datetime", "expiry": "expiry_date", "oi": "open_interest", "symbol": "stock_code"}
ROLL = 1   # sessions before expiry to switch: CRUDEOIL, NATURALGAS 1; GOLD, SILVER 6 (4 under the 3-day tender period)
df = pd.concat(pd.read_parquet(f).rename(columns=names) for f in sorted(glob.glob("CRUDEOIL_FUT_1min_*.parquet")))
df["datetime"] = pd.to_datetime(df["datetime"])                    # IST, bar start
df["day"] = df["datetime"].dt.normalize()
df["expiry"] = pd.to_datetime(df["expiry_date"], format="mixed")
days = pd.Index(sorted(df["day"].unique()))
exps = sorted(df["expiry"].unique())
left = lambda d, e: days.searchsorted(e) - days.get_loc(d)        # sessions from d to expiry e
held = {d: e for d in days for e in [next((x for x in exps if left(d, x) > ROLL), None)] if e is not None}
last = df.groupby(["day", "expiry"])["close"].last()              # each contract's last close per day
s = df[df["expiry"] == df["day"].map(held)].sort_values("datetime").copy()
s["adj"] = 1.0
for d in days[1:]:
    p = days[days.get_loc(d) - 1]
    if d in held and p in held and held[d] != held[p]:            # roll day: ratio on the previous close
        ratio = last[(p, held[d])] / last[(p, held[p])]
        s.loc[s["day"] < d, "adj"] *= ratio
        print(d.date(), "roll", held[p].date(), "->", held[d].date(), f"{(ratio - 1) * 100:+.2f}%")
s[["open", "high", "low", "close"]] = s[["open", "high", "low", "close"]].mul(s["adj"], axis=0)

How was the MCX roll timing measured?

Method: for each MCX CRUDEOIL, NATURALGAS, SILVER and MCX GOLD contract expiring 17 February 2023 to 5 October 2026, day volume was summed for the expiring and the next contract on every session both were in the files, and the crossover was the first session on which the next contract's volume was higher. Sessions were counted back from expiry day.

The MCX roll gap compared both contracts' closes at the last minute both had a traded bar on the crossover session. Expiry-day share divided the expiring contract's volume on expiry day by the volume of both contracts. Exchange holidays with only an evening session count as sessions.

Which MCX data do I need to backtest across futures rolls?

An MCX backtest across rolls needs 1-minute bars for both the expiring and the next contract on every session, with expiry_date on each row. The MCX futures, 3 years pack holds MCX GOLD, SILVER, CRUDEOIL, NATURALGAS and their mini contracts from JAN 2023–MAR 2023 (start varies by symbol) to NOV 2026; MCX futures and options, 1 year adds MCX options.

The free MCX 1-minute sample shows the file layout for one trading day. Session times and the 23:30 or 23:55 IST close are in the MCX trading hours guide; a CRUDEOIL event study is in the US crude inventory report guide. All MCX packs: MCX data.

Exactly which fields are in the files

Futures files

Column (layout A · layout B)TypeMeaning
datetime · timestamptimestampBar start time, IST wall-clock
stock_code · symbolstringUnderlying / contract code
expiry_date · expirystringFutures contract expiry
open / high / low / closefloatTraded price OHLC within the bar
volumeintVolume traded in the bar
open_interest · oiintOpen interest at that bar

Each futures row is one contract in one minute: traded OHLC, volume and open interest in lots, with the contract expiry on every row. Timestamps are IST bar starts.

Format: Parquet. Validate on the free sample and the schema page before buying.

FAQ

When should I roll MCX crude oil futures in a backtest?

At the start of the session before expiry day. In Options Data files, next-month CRUDEOIL volume first exceeded the expiring contract's on that session in 37 of 44 contracts expiring February 2023 to September 2026, and on expiry day in the other 7.

When should I roll MCX GOLD and SILVER futures in a backtest?

Two sessions before the staggered delivery tender period begins: six sessions before expiry under the five-day tender period, four under the three-day period that applies from the August 2026 MCX GOLD and September 2026 SILVER expiries.

What is the last trading day of MCX GOLD and SILVER futures?

The 5th of the contract expiry month, or the preceding working day if the 5th is a holiday, per MCX circular MCX/TRD/383/2025.

Do I need to back-adjust a continuous MCX futures series?

Yes for price-level signals. At the volume crossover the next contract traded a median 1.04% above the expiring one for MCX GOLD, 2.21% for SILVER and 4.86% for NATURALGAS, and 0.48% below for CRUDEOIL, in Options Data files.

Do Options Data MCX futures files include both contracts around expiry?

Yes. Each trading day has a 1-minute file per contract, including the expiring and the next contract, and every row carries the contract's expiry_date, so a backtest can apply any roll rule.

Get the data

Free sample · Schema · Ask the AI for your data

MCX futures, 3 yearsMCX futures + options, 1 yearFree MCX sample Get free sample by email

Related guides

Index and commodity data only.