--- id: pandas-market-calendars version: "5.4.0" license: MIT license_treatment: permissive maintenance: active --- # pandas_market_calendars — Market and exchange trading calendars for pandas License: permissive · Maintenance: active · Downloads: 2.1M/mo ## What it is and what it does pandas_market_calendars fills a gap in pandas by providing pre-built holiday, trading hours, and market break calendars for specific exchanges and OTC markets. Rather than fetching live data at runtime, calendars are shipped as package code and updated via new releases. The package wraps exchange-calendars to mirror its calendar definitions and adds utility functions to work with market schedules—most notably a date_range function that generates pandas DatetimeIndex objects containing only times when markets are open, accounting for holidays, early closes, and intraday breaks (such as lunch breaks in Asian markets or processing breaks in 24-hour futures markets). Typical usage involves loading a calendar by exchange name (e.g., NYSE), querying its schedule for a date range to see market_open and market_close times, and then generating aligned datetime sequences for backtesting, data alignment, or trading logic. The package is designed for quantitative finance workflows where precise market hours and holiday handling are essential. Use it for: - Backtest trading strategies by generating datetime sequences aligned only to market hours for a specific exchange - Align time series data to market open/close times when building multi-asset portfolios across different exchanges - Identify market holidays and early closes programmatically to avoid scheduling trades or data pulls on non-trading days - Handle intraday breaks in Asian and futures markets when calculating trading durations or generating periodic resampling - Build global trading calendars by combining schedules from multiple exchanges to coordinate cross-market strategies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides market and exchange trading calendars for pandas, including holiday, early close, and break schedules for over 50 global equity and futures markets. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a concrete problem for quantitative finance workflows. It is production-stable (Development Status 5), widely used (top 5000 PyPI), and permissively licensed. Install it if you need to work with market hours, holidays, or trading schedules in pandas. ## Install pip install pandas-market-calendars uv add pandas-market-calendars poetry add pandas-market-calendars ## Installing pandas_market_calendars Before you install: Low install friction with only two runtime dependencies (pandas and exchange-calendars). Active maintenance with a release 79 days ago and continuous repository activity; supports current Python versions (3.10–3.14). License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: pip install pandas_market_calendars import pandas_market_calendars as mcal nyse = mcal.get_calendar('NYSE') schedule = nyse.schedule(start_date='2012-07-01', end_date='2012-07-10') dates = mcal.date_range(schedule, frequency='1D') Requires Python 3.10 or later; minimum version changed in v5.0 from 3.9. Verify before relying: - Accuracy and timeliness of calendar data for all 50+ exchanges—whether updates keep pace with real-world market changes - Performance characteristics when working with large date ranges or many calendars simultaneously ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 2.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags trading calendar pandas, market hours exchange calendar, business day trading schedule, global exchange holidays, futures market calendar, OTC market hours, date range market open close, trading-finance, time-series, market-data [View on SkillFed](https://skillfed.io/packages/pandas-market-calendars) · [View on PyPI](https://pypi.org/project/pandas-market-calendars/)