Compare
Python holiday libraries compared
Three free libraries cover most holiday needs in Python: holidays, exchange_calendars and pandas_market_calendars. Here is what each does well, where each stops, and when an API fits better.
In short
- holidays gives public holidays for 250 countries and their regions, plus 33 financial markets.
- exchange_calendars and pandas_market_calendars give exchange trading days and session times. pandas_market_calendars adds futures and bond markets.
- None of them covers currency settlement days or FX holidays, and only holidays covers any payment system. That is where an API like ours fits.
Side by side
holidays 0.109
- What it is
- Public holidays by country, plus some financial markets.
- Coverage
- 250 countries and their regions. 33 financial markets.
- Currency and FX holidays
- No.
- Payment systems
- TARGET2 and the Federal Reserve.
- Trading hours
- No times. Early closes for some markets, as named half days.
- Years
- Any year: the dates come from rules in the code.
- New and changed dates
- In a new release, once someone adds them. You upgrade the package.
- Works offline
- Yes.
- Languages
- Python.
- Price
- Free. MIT licence.
exchange_calendars 4.13.3
- What it is
- Trading calendars for exchanges.
- Coverage
- 72 calendars, mostly exchanges.
- Currency and FX holidays
- No.
- Payment systems
- No.
- Trading hours
- Sessions, lunch breaks and early closes.
- Years
- By default, about 20 years back to one year ahead. You can ask for more.
- New and changed dates
- In a new release, once someone adds them. You upgrade the package.
- Works offline
- Yes.
- Languages
- Python.
- Price
- Free. Apache 2.0 licence.
pandas_market_calendars 5.7.0
- What it is
- Market schedules as pandas tables. Uses exchange_calendars for many exchanges.
- Coverage
- 300 calendar names, with futures, bond and commodity markets.
- Currency and FX holidays
- No. Its FX calendar trades 24 hours, 5 days a week, with no holidays.
- Payment systems
- No.
- Trading hours
- Open and close times, lunch breaks and early closes.
- Years
- Any range you ask for.
- New and changed dates
- In a new release, once someone adds them. You upgrade the package.
- Works offline
- Yes.
- Languages
- Python.
- Price
- Free. MIT licence.
TradingCalendars API
- What it is
- Financial calendars by API, with business-day maths.
- Coverage
- 319 calendars: 68 bank centres, 29 payment systems, 50 currencies, 61 exchanges.
- Currency and FX holidays
- Settlement days and FX market holidays for 50 currencies.
- Payment systems
- 29, such as Fedwire, FedACH, CHAPS, TARGET2 and CLS.
- Trading hours
- Regular hours, early closes and live open or closed status.
- Years
- Through 2077. Far-ahead dates set by the moon or a decree are marked estimated.
- New and changed dates
- Added when the official list is out, with its source. Nothing to upgrade.
- Works offline
- No. You call the API or subscribe to calendar feeds.
- Languages
- Any language over REST, a Python client and an MCP server for AI.
- Price
- Free plan with 10 calls a day. Paid plans from $99 a month.
Library facts checked on 28 November 2026 by installing each version shown. Something out of date? Tell us.
The same question in each
Is the NYSE open on Christmas Day 2026? The last example also checks a date for a US dollar and pound payment.
from datetime import date
import holidays
nyse = holidays.financial_holidays("NYSE", years=2026)
date(2026, 12, 25) in nyse # True: Christmas Dayimport exchange_calendars as xcals
xnys = xcals.get_calendar("XNYS")
xnys.is_session("2026-12-25") # False
xnys.next_session("2026-12-24") # 2026-12-28import pandas_market_calendars as mcal
nyse = mcal.get_calendar("NYSE")
nyse.schedule(start_date="2026-12-23", end_date="2026-12-28")
# 24 Dec closes at 18:00 UTC; 25 Dec is not listedfrom tradingcalendars import TradingCalendars
tc = TradingCalendars(api_key="YOUR_API_KEY")
tc.is_business_day("XNYS.TRADE", "2026-12-25") # False
tc.is_business_day(["USD.FX", "GBP.FX"], "2026-12-28") # False: UK Boxing DayWhich one to use
holidays
Public holidays in an app: days off, delivery dates, shift plans.
exchange_calendars
Backtests and trading systems that need exchange sessions and minutes.
pandas_market_calendars
Schedules in pandas, including futures and bond markets.
TradingCalendars API
Payments, FX and settlement: currency, bank and payment-system calendars, kept up to date for you.
You can use both. Many teams keep a library for trading sessions and call the API for settlement and payment dates. Python client →
Questions
Is the holidays library good for financial markets?
It covers public holidays well, plus 33 financial markets. It does not cover currency settlement days or most payment systems.
What is the difference between exchange_calendars and pandas_market_calendars?
exchange_calendars builds trading calendars for about 70 exchanges. pandas_market_calendars uses it for many of them and adds futures, bond and commodity markets. It returns schedules as pandas tables.
Do these libraries have FX or currency holidays?
No. pandas_market_calendars has an FX calendar, but it trades 24 hours a day, 5 days a week, with no holidays. For currency settlement days, you need another source, such as our API.
How do the libraries get new holidays?
In a new release. When an exchange adds a day, such as a day of mourning, someone adds it to the code. You get it when you upgrade the package.
Can I use the API with pandas?
Yes. Our Python client returns closure dates that you can pass to pandas CustomBusinessDay.
Try the API next to your library
Currency, bank, payment and exchange calendars in one API, with a Python client. Start free with 10 calls a day.