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).
| Commodity | Contracts | Expiry day of month | Volume crossover, sessions before expiry | Expiry-day share | Roll gap |
|---|---|---|---|---|---|
| CRUDEOIL | 44 monthly | 16th–21st | 1 in 37, 0 in 7 | 19.9% | −0.48% (next lower in 30 of 44) |
| NATURALGAS | 44 monthly | 23rd–28th | 1 in 30, 2 in 12, 3 in 1, 0 in 1 | 12.6% | +4.86% (next higher in 35 of 44) |
| SILVER | 19 (Mar, May, Jul, Sep, Dec) | 3rd–5th | 6 in 9, 5 in 7, 4 in 3 | 0.4% | +2.21% (next higher in 19 of 19) |
| MCX GOLD | 22 (Feb, Apr, Jun, Aug, Oct, Dec) | 2nd–5th | 6 in 10, 5 in 9, 4 in 3 | 0.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) | Type | Meaning |
|---|---|---|
| datetime · timestamp | timestamp | Bar start time, IST wall-clock |
| stock_code · symbol | string | Underlying / contract code |
| expiry_date · expiry | string | Futures contract expiry |
| open / high / low / close | float | Traded price OHLC within the bar |
| volume | int | Volume traded in the bar |
| open_interest · oi | int | Open 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
- Best source for NIFTY options historical data in India
- Best source for SENSEX options historical data
- Best source for MCX historical data
- How to choose Indian options historical data
- NSE option chain historical data in CSV or Parquet
- SENSEX options historical data at 1-minute resolution
- MCX intraday historical data: 1-minute futures and options
- Best source for NIFTY options backtesting data
- Expiry-day options backtesting data for NIFTY and SENSEX
- Download SENSEX expired options data (Parquet / CSV)
- NIFTY expired options data download: every strike, 1-minute, Parquet or CSV
- NIFTY 1-second options and spot files: structure and quality checks
- How to download NIFTY option data: 1-minute or 1-second, Parquet or CSV
- NIFTY open interest historical data by strike, minute by minute
- NIFTY weekly expiry data format: file names, expiry dates and weekly vs monthly
- NIFTY 1-minute vs 1-second option data: which one to download
- Working with Parquet in Python for options backtesting
- SENSEX option chain historical data: BSE chains minute by minute
- How bid/ask data improves backtest quality
- NIFTY options historical data in Parquet: what the files hold and what to check
- Indian index options tick data: we do not sell ticks, we sell 1-second and 1-minute bars
- How to chart historical NIFTY call and put option prices
- SENSEX option data download: what you get and how to start
- SENSEX futures historical data download at 1-minute
- BANKEX options data download
- MCX crude oil data download: 1-minute futures and options
- MCX natural gas data download
- MCX silver data download
- NIFTY futures historical data download at 1-minute
- NIFTY 50 index 1-minute data download
- NIFTY option data in Excel: download, filter and chart
- NIFTY tick data download: what you need and what 1-second bars give you
- How do you resample NIFTY 1-minute data to 5-, 15-, 60- and 75-minute bars?
- Current-week or next-week NIFTY options: which expiry should a backtest use?
- How do you calculate NIFTY put-call ratio history from option data?
- Which data do you need to backtest SENSEX expiry-day options?
- How many NIFTY strikes do you need for an options backtest?
- What data do you need to backtest a NIFTY opening range breakout?
- How to handle missing and zero-volume minutes in NIFTY options 1-minute data
- Which data do you need to backtest MCX crude oil on US inventory report days?
- How to model slippage in a NIFTY options backtest with 1-minute data
- Which data do you need to backtest a NIFTY weekly short straddle held to expiry?
- Do you need NIFTY futures and spot data, or only options, for a backtest?
- How do I download MCX GOLD 1-minute historical data?
- Which data do you need to backtest a NIFTY overnight gap strategy?
- What time does NIFTY make its day high or low?
- Which data do you need to backtest a NIFTY 9:20 short straddle?
- How many years of NIFTY options data do you need for a backtest: 1 year or 3 years?
- Which NIFTY data do you need to backtest the close after NSE's closing auction?
- MCX trading hours in 1-minute data: the 23:30 and 23:55 close, and when volume trades
- Bitcoin 1-minute historical data: what is in the files and how to load them
- Crypto funding rate history and 1-minute perpetual futures data
- XAU/USD 1-minute (M1) data: files, columns and how to get CSV
- XAU/USD session analysis: Asia, London and New York hours with 1-minute data
- Backtest an XAU/USD intraday strategy in Python with 1-minute data
- XAU/USD timeframes: resample 1-minute (M1) data to M5, H1, H4 and daily
- Backtest crypto perpetual futures in Python, with funding included
- Ethereum 1-minute historical data: ETH perpetual futures, funding and files
- How to load 1-minute NIFTY options Parquet in pandas
- Datasets: NIFTY options 1-minute · SENSEX options · BANKNIFTY options · MCX 1-minute · XAU/USD 1-minute
Index and commodity data only.