quantopian/trading_calendars is one of the open-source repositories TopGit tracks, currently at 662 stars, written primarily in Python. Calendars for various securities exchanges.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This package is currently unmaintained as the sponsor, quantopian, is going through corporate changes. As such there is a fork of this project that will receive more active maintenance, https://github.com/gerrymanoim/trading_calendars, and the actively developed and maintained alternative implimentation here: https://github.com/rsheftel/pandas_market_calendars . The process to merge these implementations will continue in those two respective repos.
trading_calendars
A Python library of exchange calendars, frequently used with Zipline.
Installation
$ pip install trading-calendars
Quick Start
import trading_calendars as tc
import pandas as pd
import pytz
Get all registered calendars with get_calendar_names:
NOTE: see the TradingCalendar class for more advanced usage.
Trading calendars also supports command line usage, printing a unix-cal like calendar indicating which days are trading sessions or holidays.
tcal XNYS 2020
2020
January February March
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
[ 1] 2 3 [ 4] [ 1]
[ 5] 6 7 8 9 10 [11] [ 2] 3 4 5 6 7 [ 8] [ 1] 2 3 4 5 6 [ 7]
[12] 13 14 15 16 17 [18] [ 9] 10 11 12 13 14 [15] [ 8] 9 10 11 12 13 [14]
[19][20] 21 22 23 24 [25] [16][17] 18 19 20 21 [22] [15] 16 17 18 19 20 [21]
[26] 27 28 29 30 31 [23] 24 25 26 27 28 [29] [22] 23 24 25 26 27 [28]
[29] 30 31
April May June
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 3 [ 4] 1 [ 2] 1 2 3 4 5 [ 6]
[ 5] 6 7 8 9 [10][11] [ 3] 4 5 6 7 8 [ 9] [ 7] 8 9 10 11 12 [13]
[12] 13 14 15 16 17 [18] [10] 11 12 13 14 15 [16] [14] 15 16 17 18 19 [20]
[19] 20 21 22 23 24 [25] [17] 18 19 20 21 22 [23] [21] 22 23 24 25 26 [27]
[26] 27 28 29 30 [24][25] 26 27 28 29 [30] [28] 29 30
[31]
July August September
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 [ 3][ 4] [ 1] 1 2 3 4 [ 5]
[ 5] 6 7 8 9 10 [11] [ 2] 3 4 5 6 7 [ 8] [ 6][ 7] 8 9 10 11 [12]
[12] 13 14 15 16 17 [18] [ 9] 10 11 12 13 14 [15] [13] 14 15 16 17 18 [19]
[19] 20 21 22 23 24 [25] [16] 17 18 19 20 21 [22] [20] 21 22 23 24 25 [26]
[26] 27 28 29 30 31 [23] 24 25 26 27 28 [29] [27] 28 29 30
[30] 31
October November December
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 [ 3] 1 2 3 4 [ 5]
[ 4] 5 6 7 8 9 [10] [ 1] 2 3 4 5 6 [ 7] [ 6] 7 8 9 10 11 [12]
[11] 12 13 14 15 16 [17] [ 8] 9 10 11 12 13 [14] [13] 14 15 16 17 18 [19]
[18] 19 20 21 22 23 [24] [15] 16 17 18 19 20 [21] [20] 21 22 23 24 [25][26]
[25] 26 27 28 29 30 [31] [22] 23 24 25 [26] 27 [28] [27] 28 29 30 31
[29] 30
tcal XNYS 1 2020
January 2020
Su Mo Tu We Th Fr Sa
[ 1] 2 3 [ 4]
[ 5] 6 7 8 9 10 [11]
[12] 13 14 15 16 17 [18]
[19][20] 21 22 23 24 [25]
[26] 27 28 29 30 31
Frequently Asked Questions
Why are open times one minute late?
Due to its historical use in the Zipline backtesting system, trading_calendars will only indicate a market is open upon the completion of the first minute bar in a day. Zipline uses minute bars labeled with the end of the bar, e.g. 9:31AM for 9:30-9:31AM. As an example, on a regular trading day for NYSE:
Does quantopian/trading_calendars have a project website?
No homepage URL was recorded for quantopian/trading_calendars in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Is quantopian/trading_calendars open source?
Yes — quantopian/trading_calendars ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/quantopian/trading_calendars.
What is quantopian/trading_calendars?
quantopian/trading_calendars (quantopian/trading_calendars) is a Python project on GitHub. From the project's own README: Calendars for various securities exchanges.
What license does quantopian/trading_calendars use?
quantopian/trading_calendars is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about quantopian/trading_calendars?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/quantopian/trading_calendars is the definitive source.
Read full README in the tab above.
Is trading_calendars worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of trading_calendars.