Organization: Python Software Foundation (PSF)
Sub-organization: Vacanza (Python Holidays Library)
Contributor: Paresh Joshi (@pareshjoshij)
When you build systems for quantitative trading, risk management, or backtesting, date math is never just about standard weekends. A missing holiday, an unrecorded half-day closure, or an unexpected market halt can introduce catastrophic data slippage.
This summer, as part of Google Summer of Code (GSoC) 2026 under the Python Software Foundation (PSF), I set out to tackle this challenge by expanding financial exchange calendars inside Vacanza (the Python holidays library).
🎯 The Mission & Core Architecture
The primary objective of this project was to integrate 15 to 17 global financial market calendars into the Vacanza library. By expanding this coverage, the goal was to provide developers, algorithmic traders, and financial analysts with a robust, fully offline, and dependency-free tool to instantly verify trading schedules and calculate business days.
Achieving production-grade accuracy meant going far deeper than scraping standard statutory public holidays. Global financial exchanges run on intricate regulatory frameworks, shifting calendars, and unpredictable historical events:
- Shifting Weekend & Observation Rules: Accommodating markets where weekend patterns differ or statutory holidays trigger non-standard Monday or Friday roll-overs.
- Precision Half-Day Early Closes: Mapping down-to-the-minute trading pauses and early closures across different asset classes.
- Historical Market Anomalies: Coding rare, real-world events—from severe weather closures like Hurricane Sandy to unexpected hardware and telecommunication crashes—so quantitative models backtest against ground truth.
📊 Project Status: The High-Level View
Out of the proposed 15–17 financial market calendars, 13 calendars have been fully implemented and submitted:
- 11 Pull Requests Merged: Fully reviewed, tested, and integrated into upstream.
- 2 Pull Requests Open: Actively undergoing final mentor reviews.
- 2 Calendars Remaining: Finalizing complex edge cases to wrap up the entire roadmap.
🚀 Merged Work: The Complete Exchange Breakdown
Here is the comprehensive breakdown of every pull request merged into Vacanza during this project:
1. Chicago Mercantile Exchange (CME) — PR #3617
- Integrated all regular trading holidays across CME equity, commodity, and interest rate products.
- Added specific half-day early closure schedules and mid-session pause times.
- Implemented historical static closures, including the unscheduled market halts during Hurricane Sandy (2012).
- Integrated full multi-language localization support.
2. Bolsa Mexicana de Valores (BMV) — PR #3639
- Encoded Mexican banking commission regulations and stock exchange operating schedules.
- Implemented the historical 2006 statutory shift that moved specific mid-week holidays to "puente" (bridge) Mondays.
- Added the rare 2024 presidential transition holiday (October 1st switch from December 1st).
- Built comprehensive Spanish localization support.
3. Toronto Stock Exchange (TSX) — PR #3680
- Implemented Canadian national and provincial market observances (Family Day, Civic Holiday, Boxing Day).
- Programmed Christmas Eve half-day early close rules.
- Hardcoded the historical December 17, 2008 system crash, when a major computer failure halted TSX trading for an entire session.
4. New York Stock Exchange (NYSE) — PR #3600
- Expanded the existing
XNYSmarket calendar to provide comprehensive localization and internationalization capabilities across holiday names.
5. SIX Swiss Exchange — PR #3692
- Mapped Swiss canton-specific and federal bank holidays governing Zurich trading.
- Engineered a unified weekend suppression rule to accurately handle holidays that fall on weekends without observed substitute days.
6. Bolsas y Mercados Españoles (BME) — PR #3710
- Added the complete schedule of Spanish national and regional trading holidays.
- Incorporated precise 14:00 CET early market closures observed annually on Christmas Eve and New Year's Eve.
7. Johannesburg Stock Exchange (JSE) — PR #3714
- Implemented statutory South African public holidays along with the Public Holidays Act roll-over logic.
- Added early market closures at 12:00 PM SAST for key holiday eves.
- Filtered out weekend holidays that do not yield an automatic trading holiday.
8. Taiwan Stock Exchange (TWSE) — PR #3740
- Designed algorithms to handle the complex lunar calendar shifts for Chinese New Year and its multi-day pre-settlement closures.
- Handled unique Taiwanese holiday compensation rules, including Saturday make-up trading days.
- Added Labor Day exchange rules and provided full Traditional Chinese and Thai localization.
9. New Zealand Exchange (NZX) — PR #3757
- Integrated all national and provincial anniversary holidays affecting trading.
- Added support for Matariki public holiday legislation.
- Implemented exact 13:30 NZDT early market closure rules.
10. Singapore Exchange (SGX) — PR #3719
- Implemented comprehensive trading and clearing holiday logic for SGX derivatives and securities.
- Handled multi-cultural lunar, Islamic, and Hindu holiday dates observed under Singaporean market regulations.
11. Korea Exchange (KRX) — PR #3725
- Added official KRX stock market holiday schedules, including Chuseok and Lunar New Year observances.
- Mapped year-end market closure rules where Korean exchanges shut down for trading on the final business day of December.
⏳ Open Pull Requests: Currently in Review
1. Tel Aviv Stock Exchange (TASE) — PR #3768
- The Complexity: Built support around the Hebrew lunisolar calendar (Rosh Hashanah, Yom Kippur, Passover, Sukkot).
- Weekend Realignment: Handled the historical Sunday-through-Thursday trading week, Friday observance shifts, and the upcoming 2026 market transition aligning Israeli market trading with Western Monday-to-Friday schedules.
2. Australian Securities Exchange (ASX) — PR #3753
- The Complexity: Added all federal Australian public holidays and national day substitution frameworks.
- Variable Half-Days: Handled fluctuating historical early-close schedules across decades and factored in restricted settlement days.
đźš§ Remaining Work
To cross the finish line for the complete 15–17 exchange milestone:
- Euronext: Resolving complex multi-country statutory holiday overlaps (France, Netherlands, Belgium, Portugal, Ireland, Norway) where individual national holidays clash with pan-European trading schedules.
- Saudi Tadawul: Finalizing historical records for changing weekend structures (the historical Thursday–Friday to Friday–Saturday shift) and variable Eid holiday closure windows.
🙏 Mentorship & Acknowledgements
Open-source contributions at this level of domain specificity are never a solo journey.
I want to extend a massive thank you to my three mentors: @arkid15r, @KJhellico, and @PPsyrius.
Thank you for believing in me twice—first by accepting my proposal, and again at the midterm when I was falling behind schedule. Your trust gave me the motivation to push through blockers and hold every pull request to high production standards.
Your patient code reviews, guidance on writing elegant historical rules, and deep architectural feedback made this an unforgettable learning experience. I am proud of the foundation we've built, and I look forward to continuing as an active maintainer and contributor to the Vacanza ecosystem!