Skip to main content

trading_calendars is a Python library with securities exchange calendars used by Quantopian's Zipline.

Project description



A Python library of exchange calendars meant to be used with Zipline.

Exchange ISO Code Country Version Added Exchange Website (English)
New York Stock Exchange XNYS USA 1.0
CBOE Futures XCBF USA 1.0
Chicago Mercantile Exchange CMES USA 1.0
Toronto Stock Exchange XTSE Canada 1.0
BMF Bovespa BVMF Brazil 1.0
London Stock Exchange XLON England 1.0
Euronext Amsterdam XAMS Netherlands 1.2
Euronext Brussels XBRU Belgium 1.2
Euronext Lisbon XLIS Portugal 1.2
Euronext Paris XPAR France 1.2
Frankfurt Stock Exchange XFRA Germany 1.2
SIX Swiss Exchange XSWX Switzerland 1.2
Tokyo Stock Exchange XTKS Japan 1.2
Austrialian Securities Exchange XASX Australia 1.3
Bolsa de Madrid XMAD Spain 1.3
Borsa Italiana XMIL Italy 1.3
New Zealand Exchange XNZE New Zealand 1.3
Wiener Borse XWBO Austria 1.3
Hong Kong Stock Exchange XHKG Hong Kong 1.3
Copenhagen Stock Exchange XCSE Denmark 1.4
Helsinki Stock Exchange XHEL Finland 1.4
Stockholm Stock Exchange XSTO Sweden 1.4
Oslo Stock Exchange XOSL Norway 1.4
Irish Stock Exchange XDUB Ireland 1.4
Bombay Stock Exchange XBOM India 1.5
Singapore Exchange XSES Singapore 1.5
Shanghai Stock Exchange XSHG China 1.5
Korea Exchange XKRX South Korea 1.6
Iceland Stock Exchange XICE Iceland 1.7
Poland Stock Exchange XWAR Poland 1.9
Santiago Stock Exchange XSGO Chile 1.9
Colombia Securities Exchange XBOG Colombia 1.9
Mexican Stock Exchange XMEX Mexico 1.9
Lima Stock Exchange XLIM Peru 1.9
Prague Stock Exchange XPRA Czech Republic 1.9
Budapest Stock Exchange XBUD Hungary 1.10
Athens Stock Exchange ASEX Greece 1.10
Istanbul Stock Exchange XIST Turkey 1.10
Johannesburg Stock Exchange XJSE South Africa 1.10
Malaysia Stock Exchange XKLS Malaysia 1.11
Moscow Exchange XMOS Russia 1.11
Philippine Stock Exchange XPHS Philippines 1.11
Stock Exchange of Thailand XBKK Thailand 1.11
Indonesia Stock Exchange XIDX Indonesia 1.11
Taiwan Stock Exchange Corp. XTAI Taiwan 1.11
Buenos Aires Stock Exchange XBUE Argentina 1.11
Pakistan Stock Exchange XKAR Pakistan 1.11

Note that exchange calendars are defined by their ISO-10383 market identifier code.


$ pip install trading-calendars


from trading_calendars import get_calendar

# US Stock Exchanges (includes NASDAQ)
us_calendar = get_calendar('XNYS')
# London Stock Exchange
london_calendar = get_calendar('XLON')
# Toronto Stock Exchange
toronto_calendar = get_calendar('XTSE')
# Tokyo Stock Exchange
tokyo_calendar = get_calendar('XTKS')
# Frankfurt Stock Exchange
frankfurt_calendar = get_calendar('XFRA')

# US Futures
us_futures_calendar = get_calendar('us_futures')
# Chicago Mercantile Exchange
cme_calendar = get_calendar('CMES')
# Intercontinental Exchange
ice_calendar = get_calendar('IEPA')
# CBOE Futures Exchange
cfe_calendar = get_calendar('XCBF')
# Brazilian Mercantile and Futures Exchange
bmf_calendar = get_calendar('BVMF')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for trading-calendars, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size trading_calendars-2.0.0.tar.gz (102.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page