free expiry day ↓

blog /

MCX crude oil expiry data: the last sessions of each crude contract

MCX crude oil expiry data at 1-minute: how to find each CRUDEOIL and CRUDEOILM contract's final sessions, measure the roll, and handle the evening session.

Crude oil on MCX expires once a month, and the days around each expiry are where liquidity moves from one contract to the next. MCX crude oil expiry data lets you study that hand-over minute by minute, and test strategies that trade the final sessions of a contract.

What the files hold

Futures files are named by symbol, trading day and contract expiry, for example CRUDEOIL_FUT_1min_<day>_exp<expiry>.parquet. Both the standard contract (CRUDEOIL) and the mini (CRUDEOILM) are included. Each row has open, high, low, close, volume and open interest for one minute. Options on crude oil are in the futures and options pack.

Find the last sessions of each contract

import re
from pathlib import Path
import pandas as pd

pat = re.compile(r"CRUDEOIL_FUT_1min_(\d{4}-\d{2}-\d{2})_exp(\d{4}-\d{2}-\d{2})")
rows = [(m[1], m[2], f) for f in Path("MCX").rglob("CRUDEOIL_FUT_1min_*.parquet")
        if (m := pat.search(f.name))]
df = pd.DataFrame(rows, columns=["day", "expiry", "file"])
df["sessions_left"] = df.groupby("expiry")["day"].rank(ascending=False) - 1
last3 = df[df["sessions_left"] < 3]       # final three sessions of every contract

Measure the roll

For each day, compare the volume of the expiring contract with the next one. The first day the next contract trades more is a practical roll date. It is usually several sessions before expiry, and a backtest that rolls on the expiry day itself will be trading a thin contract.

Mind the evening session

MCX energy trades from morning until late evening. Group bars by calendar date, not by a fixed equity-market window, or you will cut every session in half.

Pack: MCX futures and options, 12 months.

FAQ

Does MCX crude oil data include the mini contract?

Yes. CRUDEOIL and CRUDEOILM are both included, as separate instruments.

Are crude oil options included?

In the MCX futures and options pack. The 3-year MCX pack has futures only.

Are evening-session bars included?

Yes. Files cover the full MCX trading day, into the evening.

more guides

Building an expiry-day dataset in Python: pandas and DuckDB recipesOne-second or one-minute bars for the last hour of expiry?Does NIFTY pin to max pain on expiry day? Testing it with open interest by strike