aion-indian-market-calendar vs pandas_market_calendars: What Breaks for India
pandas_market_calendars is a well-maintained library for US and global exchange calendars. For Indian markets — specifically MCX, NSE Currency Derivatives (CDS), and Muhurat trading — it either lacks coverage or requires manual workarounds. This page documents exactly where those gaps are and how aion-indian-market-calendar fills them.
Capability comparison
| Capability | aion-indian-market-calendar | pandas_market_calendars |
|---|---|---|
| NSE equity hours (09:15–15:30 IST) | Yes | Yes (via XBOM/XNSE) |
| BSE hours | Yes | Yes |
| NSE Currency Derivatives (CDS) — 09:00–17:00 IST | Yes — dedicated segment | No |
| CDS-specific holiday calendar | Yes — separate from NSE equity | No |
| MCX (commodity) — 09:00–23:30 IST | Yes — two-segment day | No |
| MCX evening session (after 15:30) | Yes | No |
| Muhurat trading detection (Diwali) | Yes — bundled in calendar data | No |
| Alias resolution (NFO, FNO, NIFTY, USDINR…) | Yes | No |
| Offline use (bundled holiday data) | Yes — no network at runtime | Partial |
| Live holiday override (NSE circulars) | Yes — live_events.json merge | No |
| India-specific focus | Yes — built only for India | Global, India is one entry |
The three cases where pandas_market_calendars fails for India
1. MCX evening sessions
MCX commodity trading continues until 23:30 IST. NSE equity closes at 15:30. A script using pandas_market_calendars that checks "is the market open at 20:00?" will return False for the XNSE exchange — which is correct for equity but wrong for any MCX commodity workflow (crude oil, natural gas, gold, silver).
# With pandas_market_calendars — wrong for MCX after 15:30
import pandas_market_calendars as mcal
nse = mcal.get_calendar("XNSE")
# No MCX calendar available. The only workaround is manual session logic.
# With aion-indian-market-calendar — correct
from aion_indian_market_calendar import IndiaMarketCalendar
from datetime import datetime
from zoneinfo import ZoneInfo
cal = IndiaMarketCalendar.bundled(2026)
tz = ZoneInfo("Asia/Kolkata")
cal.is_market_open("MCX", datetime(2026, 6, 18, 20, 0, tzinfo=tz)) # True
2. NSE Currency Derivatives (CDS) — wrong hours and wrong holidays
CDS covers USDINR, EURINR, GBPINR, and JPYINR futures and options. It runs from 09:00 to 17:00 IST — 90 minutes longer than NSE equity. It also has a separate holiday calendar: some days that are equity holidays are not CDS holidays, and vice versa.
There is no CDS calendar in pandas_market_calendars. The closest is XNSE (NSE equity), which gives wrong hours and potentially wrong holiday answers for CDS workflows.
# aion-indian-market-calendar handles CDS correctly
from aion_indian_market_calendar import IndiaMarketCalendar
from datetime import datetime
from zoneinfo import ZoneInfo
cal = IndiaMarketCalendar.bundled(2026)
tz = ZoneInfo("Asia/Kolkata")
# CDS closes at 17:00, not 15:30 like equity
cal.is_market_open("NSE_CURRENCY_DERIVATIVES", datetime(2026, 6, 18, 16, 0, tzinfo=tz)) # True
cal.is_market_open("USDINR", datetime(2026, 6, 18, 16, 0, tzinfo=tz)) # True — alias resolves
cal.is_market_open("NSE", datetime(2026, 6, 18, 16, 0, tzinfo=tz)) # False — NSE equity closed
3. Muhurat trading (Diwali equity session)
On Diwali, NSE holds a one-hour special equity trading session (Muhurat trading) in the evening. This is not a regular trading day — it is a partial session on an otherwise closed day. pandas_market_calendars marks Diwali as a holiday. Any scheduler that relies on it to confirm "NSE is closed today" and skips execution will miss Muhurat trading entirely.
# aion-indian-market-calendar includes Muhurat data
from aion_indian_market_calendar import IndiaMarketCalendar
cal = IndiaMarketCalendar.bundled(2026)
# Returns Muhurat trading event for Diwali
events = cal.events_on("2026-11-08", exchange="NSE")
# [(event.id, event.name, event.metadata.get("muhurat"))]
pandas_market_calendars is wrong in general — it is accurate for the exchanges it targets. The issue is that India’s exchange landscape has specific segments and session rules that fall outside the scope of a global exchange calendar library. aion-indian-market-calendar exists specifically for these India-specific cases.Migration from pandas_market_calendars
If you are using pandas_market_calendars for NSE equity only (basic trading day lookup), migration is straightforward:
# Before (pandas_market_calendars)
import pandas_market_calendars as mcal
nse = mcal.get_calendar("XNSE")
schedule = nse.schedule(start_date="2026-06-01", end_date="2026-06-30")
# After (aion-indian-market-calendar)
from aion_indian_market_calendar import IndiaMarketCalendar
cal = IndiaMarketCalendar.bundled(2026)
# Get all NSE equity trading days in June 2026
trading_days = [
d for d in cal.trading_days("NSE_EQUITY", year=2026)
if d.month == 6
]
For MCX, CDS, or Muhurat-aware workflows, pandas_market_calendars has no equivalent path — aion-indian-market-calendar is the only Python package that covers these segments with bundled, maintained data.
Install
MIT license. No API key. Works offline. Full documentation →