Calendars for various securities exchanges.

Overview

IMPORTANT NOTE

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

CI PyPI version Conda version

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:

>>> tc.get_calendar_names()[:5]
['XPHS', 'FWB', 'CFE', 'CMES', 'XSGO']

Get a calendar with get_calendar:

>>> xnys = tc.get_calendar("XNYS")

Working with sessions:

>>> xnys.is_session(pd.Timestamp("2020-01-01"))
False

>>> xnys.next_open(pd.Timestamp("2020-01-01"))
Timestamp('2020-01-02 14:31:00+0000', tz='UTC')

>>> pd.Timestamp("2020-01-01", tz=pytz.UTC)+xnys.day
Timestamp('2020-01-02 00:00:00+0000', tz='UTC')

>>> xnys.previous_close(pd.Timestamp("2020-01-01"))
Timestamp('2019-12-31 21:00:00+0000', tz='UTC')

>>> xnys.sessions_in_range(
>>>     pd.Timestamp("2020-01-01", tz=pytz.UTC),
>>>     pd.Timestamp("2020-01-10", tz=pytz.UTC)
>>> )
DatetimeIndex(['2020-01-02 00:00:00+00:00', '2020-01-03 00:00:00+00:00',
                '2020-01-06 00:00:00+00:00', '2020-01-07 00:00:00+00:00',
                '2020-01-08 00:00:00+00:00', '2020-01-09 00:00:00+00:00',
                '2020-01-10 00:00:00+00:00'],
                dtype='datetime64[ns, UTC]', freq='C')

>>> xnys.sessions_window(
>>>     pd.Timestamp("2020-01-02", tz=pytz.UTC),
>>>     7
>>> )
DatetimeIndex(['2020-01-02 00:00:00+00:00', '2020-01-03 00:00:00+00:00',
                '2020-01-06 00:00:00+00:00', '2020-01-07 00:00:00+00:00',
                '2020-01-08 00:00:00+00:00', '2020-01-09 00:00:00+00:00',
                '2020-01-10 00:00:00+00:00', '2020-01-13 00:00:00+00:00'],
                dtype='datetime64[ns, UTC]', freq='C')

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:

  • 9:30:00 is treated as closed.
  • 9:30:01 is treated as closed.
  • 9:31:00 is the first time treated as open.
  • 16:00:00 is treated as open
  • 16:00:01 is treated as closed

This may change in the future.

Calendar Support

Exchange ISO Code Country Version Added Exchange Website (English)
New York Stock Exchange XNYS USA 1.0 https://www.nyse.com/index
CBOE Futures XCBF USA 1.0 https://markets.cboe.com/us/futures/overview/
Chicago Mercantile Exchange CMES USA 1.0 https://www.cmegroup.com/
ICE US IEPA USA 1.0 https://www.theice.com/index
Toronto Stock Exchange XTSE Canada 1.0 https://www.tsx.com/
BMF Bovespa BVMF Brazil 1.0 http://www.b3.com.br/en_us/
London Stock Exchange XLON England 1.0 https://www.londonstockexchange.com/home/homepage.htm
Euronext Amsterdam XAMS Netherlands 1.2 https://www.euronext.com/en/regulation/amsterdam
Euronext Brussels XBRU Belgium 1.2 https://www.euronext.com/en/regulation/brussels
Euronext Lisbon XLIS Portugal 1.2 https://www.euronext.com/en/regulation/lisbon
Euronext Paris XPAR France 1.2 https://www.euronext.com/en/regulation/paris
Frankfurt Stock Exchange XFRA Germany 1.2 http://en.boerse-frankfurt.de/
SIX Swiss Exchange XSWX Switzerland 1.2 https://www.six-group.com/exchanges/index.html
Tokyo Stock Exchange XTKS Japan 1.2 https://www.jpx.co.jp/english/
Austrialian Securities Exchange XASX Australia 1.3 https://www.asx.com.au/
Bolsa de Madrid XMAD Spain 1.3 http://www.bolsamadrid.es/ing/aspx/Portada/Portada.aspx
Borsa Italiana XMIL Italy 1.3 https://www.borsaitaliana.it/homepage/homepage.en.htm
New Zealand Exchange XNZE New Zealand 1.3 https://www.nzx.com/
Wiener Borse XWBO Austria 1.3 https://www.wienerborse.at/en/
Hong Kong Stock Exchange XHKG Hong Kong 1.3 https://www.hkex.com.hk/?sc_lang=en
Copenhagen Stock Exchange XCSE Denmark 1.4 http://www.nasdaqomxnordic.com/
Helsinki Stock Exchange XHEL Finland 1.4 http://www.nasdaqomxnordic.com/
Stockholm Stock Exchange XSTO Sweden 1.4 http://www.nasdaqomxnordic.com/
Oslo Stock Exchange XOSL Norway 1.4 https://www.oslobors.no/ob_eng/
Irish Stock Exchange XDUB Ireland 1.4 http://www.ise.ie/
Bombay Stock Exchange XBOM India 1.5 https://www.bseindia.com
Singapore Exchange XSES Singapore 1.5 https://www.sgx.com
Shanghai Stock Exchange XSHG China 1.5 http://english.sse.com.cn
Korea Exchange XKRX South Korea 1.6 http://global.krx.co.kr
Iceland Stock Exchange XICE Iceland 1.7 http://www.nasdaqomxnordic.com/
Poland Stock Exchange XWAR Poland 1.9 http://www.gpw.pl
Santiago Stock Exchange XSGO Chile 1.9 http://inter.bolsadesantiago.com/sitios/en/Paginas/home.aspx
Colombia Securities Exchange XBOG Colombia 1.9 https://www.bvc.com.co/nueva/index_en.html
Mexican Stock Exchange XMEX Mexico 1.9 https://www.bmv.com.mx
Lima Stock Exchange XLIM Peru 1.9 https://www.bvl.com.pe
Prague Stock Exchange XPRA Czech Republic 1.9 https://www.pse.cz/en/
Budapest Stock Exchange XBUD Hungary 1.10 https://bse.hu/
Athens Stock Exchange ASEX Greece 1.10 http://www.helex.gr/
Istanbul Stock Exchange XIST Turkey 1.10 https://www.borsaistanbul.com/en/
Johannesburg Stock Exchange XJSE South Africa 1.10 https://www.jse.co.za/z
Malaysia Stock Exchange XKLS Malaysia 1.11 http://www.bursamalaysia.com/market/
Moscow Exchange XMOS Russia 1.11 https://www.moex.com/en/
Philippine Stock Exchange XPHS Philippines 1.11 https://www.pse.com.ph/stockMarket/home.html
Stock Exchange of Thailand XBKK Thailand 1.11 https://www.set.or.th/set/mainpage.do?language=en&country=US
Indonesia Stock Exchange XIDX Indonesia 1.11 https://www.idx.co.id/
Taiwan Stock Exchange Corp. XTAI Taiwan 1.11 https://www.twse.com.tw/en/
Buenos Aires Stock Exchange XBUE Argentina 1.11 https://www.bcba.sba.com.ar/
Pakistan Stock Exchange XKAR Pakistan 1.11 https://www.psx.com.pk/

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

Comments
  • Data Differences Between `trading_calendars` and `pandas_market_calendars`

    Data Differences Between `trading_calendars` and `pandas_market_calendars`

    re https://github.com/rsheftel/pandas_market_calendars/issues/41

    Summary status

    • [x] XHKG
      • https://github.com/quantopian/trading_calendars/issues/152#issuecomment-689799967
    • [x] CFE
      • https://github.com/quantopian/trading_calendars/issues/152#issuecomment-689812670
      • Note: We don't know what to do about 1994-04-27 in pmc but not in tc
    • [ ] XSWX
    • [X] LSE
      • Issue: https://github.com/quantopian/trading_calendars/issues/163
      • PR: https://github.com/quantopian/trading_calendars/pull/166
    • [ ] XSHG
    • [ ] XASX
    • [X] TSX
      • https://github.com/quantopian/trading_calendars/issues/152#issuecomment-689136700)
    • [ ] BMF

    Extras not covered by diff below:

    • [x] Pre 1990 NYSE holidays
      • https://github.com/quantopian/trading_calendars/issues/162

    Details

    code generating the table below

    from collections import namedtuple 
    
    import pandas_market_calendars as pmc
    import trading_calendars as tc
    
    # todo port this back to trading calendars
    def get_tc_calendar_names():
      return list(tc.calendar_utils._default_calendar_factories.keys())+list(tc.calendar_utils._default_calendar_aliases.keys())
    
    tc.get_calendar_names = get_tc_calendar_names
    # end todo
    
    pmc_calendars = set(pmc.get_calendar_names())
    tc_calendars = set(tc.get_calendar_names())
    tc_to_pmc_mapping = {
        'XASX': 'ASX',
        'XHKG': 'HKEX',
        'XTKS': 'JPX',
        'XOSL': 'OSE',
        'XSWX': 'SIX',
        'XSHG': 'SSE',
    }
    
    in_both = (tc_calendars & pmc_calendars) | set(tc_to_pmc_mapping.keys())
    
    CompareResult = namedtuple("Result", ["only_tc", "only_pmc"])
    
    def compare_calendars(cal: str):
      tc_cal = tc.get_calendar(cal).all_sessions
      pmc_cal_name = tc_to_pmc_mapping.get(cal, cal)
      pmc_cal = pmc.get_calendar(pmc_cal_name).valid_days(min(tc_cal), max(tc_cal))
      if not (tc_cal ^ pmc_cal).empty:
        return CompareResult
    
    out = {}
    for cal in in_both:
      diff = compare_calendars(cal)
      if diff:
        out[cal] = diff
    
    # everything below this is markdown formatting
    out_str = []
    for cal, result in out.items():
      out_str.append(f"## {cal} \n")
      out_str.append("Trading Days only in `trading_calendars` \n")
      out_str.extend([f"- {item} \n" for item in result.only_tc])
      out_str.append("\n")
      out_str.append("Trading Days only in `pandas_market_calendars` \n")
      out_str.extend([f"- {item} \n" for item in result.only_pmc])
      out_str.append("\n")
    md = "".join(out_str); print(md)
    

    XHKG

    Trading Days only in trading_calendars

    • 1990-06-18 00:00:00+00:00
    • 1990-08-27 00:00:00+00:00
    • 1991-02-14 00:00:00+00:00
    • 1991-06-18 00:00:00+00:00
    • 1991-08-26 00:00:00+00:00
    • 1992-06-15 00:00:00+00:00
    • 1992-07-22 00:00:00+00:00
    • 1992-08-31 00:00:00+00:00
    • 1993-06-14 00:00:00+00:00
    • 1993-08-30 00:00:00+00:00
    • 1993-09-17 00:00:00+00:00
    • 1994-06-14 00:00:00+00:00
    • 1994-08-29 00:00:00+00:00
    • 1995-06-19 00:00:00+00:00
    • 1995-08-28 00:00:00+00:00
    • 1996-06-17 00:00:00+00:00
    • 1996-08-26 00:00:00+00:00
    • 1997-02-06 00:00:00+00:00
    • 1997-06-30 00:00:00+00:00
    • 1997-07-02 00:00:00+00:00
    • 1997-08-18 00:00:00+00:00
    • 1997-10-02 00:00:00+00:00
    • 1998-08-17 00:00:00+00:00
    • 1998-10-02 00:00:00+00:00
    • 1999-09-16 00:00:00+00:00
    • 1999-12-31 00:00:00+00:00
    • 2001-07-06 00:00:00+00:00
    • 2001-07-25 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 1990-05-01 00:00:00+00:00
    • 1990-05-02 00:00:00+00:00
    • 1990-07-02 00:00:00+00:00
    • 1990-10-01 00:00:00+00:00
    • 1991-05-01 00:00:00+00:00
    • 1991-05-21 00:00:00+00:00
    • 1991-07-01 00:00:00+00:00
    • 1991-10-01 00:00:00+00:00
    • 1992-05-01 00:00:00+00:00
    • 1992-05-11 00:00:00+00:00
    • 1992-07-01 00:00:00+00:00
    • 1992-10-01 00:00:00+00:00
    • 1993-05-28 00:00:00+00:00
    • 1993-07-01 00:00:00+00:00
    • 1994-05-02 00:00:00+00:00
    • 1994-05-18 00:00:00+00:00
    • 1994-07-01 00:00:00+00:00
    • 1995-05-01 00:00:00+00:00
    • 1995-05-08 00:00:00+00:00
    • 1995-10-02 00:00:00+00:00
    • 1996-05-01 00:00:00+00:00
    • 1996-05-24 00:00:00+00:00
    • 1996-07-01 00:00:00+00:00
    • 1996-10-01 00:00:00+00:00
    • 1997-05-01 00:00:00+00:00
    • 1997-05-14 00:00:00+00:00
    • 1998-05-01 00:00:00+00:00
    • 1998-05-04 00:00:00+00:00
    • 2021-04-06 00:00:00+00:00

    CFE

    Trading Days only in trading_calendars

    Trading Days only in pandas_market_calendars

    • 1994-04-27 00:00:00+00:00
    • 2004-06-11 00:00:00+00:00
    • 2007-01-02 00:00:00+00:00
    • 2012-10-29 00:00:00+00:00
    • 2012-10-30 00:00:00+00:00
    • 2018-12-05 00:00:00+00:00

    XSWX

    Trading Days only in trading_calendars

    • 1994-12-30 00:00:00+00:00
    • 1995-12-29 00:00:00+00:00
    • 2000-12-29 00:00:00+00:00
    • 2005-12-30 00:00:00+00:00
    • 2006-12-29 00:00:00+00:00
    • 2011-12-30 00:00:00+00:00
    • 2016-12-30 00:00:00+00:00
    • 2017-12-29 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    LSE

    Trading Days only in trading_calendars

    • 1995-05-08 00:00:00+00:00
    • 1999-12-31 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 1995-05-01 00:00:00+00:00

    XSHG

    Trading Days only in trading_calendars

    • 2020-01-31 00:00:00+00:00
    • 2022-01-31 00:00:00+00:00
    • 2022-04-04 00:00:00+00:00
    • 2022-05-02 00:00:00+00:00
    • 2022-09-12 00:00:00+00:00
    • 2022-10-06 00:00:00+00:00
    • 2022-10-07 00:00:00+00:00
    • 2023-06-23 00:00:00+00:00
    • 2023-10-06 00:00:00+00:00
    • 2024-02-09 00:00:00+00:00
    • 2024-04-05 00:00:00+00:00
    • 2024-09-16 00:00:00+00:00
    • 2024-10-07 00:00:00+00:00
    • 2025-01-28 00:00:00+00:00
    • 2025-05-02 00:00:00+00:00
    • 2025-06-02 00:00:00+00:00
    • 2025-10-06 00:00:00+00:00
    • 2025-10-07 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 2020-10-08 00:00:00+00:00

    XASX

    Trading Days only in trading_calendars

    • 1993-01-27 00:00:00+00:00
    • 1994-01-27 00:00:00+00:00
    • 1995-01-27 00:00:00+00:00
    • 1996-01-29 00:00:00+00:00
    • 1998-01-27 00:00:00+00:00
    • 1999-01-27 00:00:00+00:00
    • 2000-01-27 00:00:00+00:00
    • 2001-01-29 00:00:00+00:00
    • 2004-01-27 00:00:00+00:00
    • 2005-01-27 00:00:00+00:00
    • 2006-01-27 00:00:00+00:00
    • 2007-01-29 00:00:00+00:00
    • 2009-01-27 00:00:00+00:00
    • 2010-01-27 00:00:00+00:00
    • 2011-01-27 00:00:00+00:00
    • 2012-01-27 00:00:00+00:00
    • 2015-01-27 00:00:00+00:00
    • 2016-01-27 00:00:00+00:00
    • 2017-01-27 00:00:00+00:00
    • 2018-01-29 00:00:00+00:00
    • 2021-01-27 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 1990-12-31 00:00:00+00:00
    • 1994-01-26 00:00:00+00:00
    • 1994-12-27 00:00:00+00:00
    • 1995-01-26 00:00:00+00:00
    • 1996-01-26 00:00:00+00:00
    • 1998-01-26 00:00:00+00:00
    • 1999-01-26 00:00:00+00:00
    • 1999-12-31 00:00:00+00:00
    • 2000-01-26 00:00:00+00:00
    • 2001-01-26 00:00:00+00:00
    • 2004-01-26 00:00:00+00:00
    • 2005-01-26 00:00:00+00:00
    • 2005-12-27 00:00:00+00:00
    • 2006-01-26 00:00:00+00:00
    • 2007-01-26 00:00:00+00:00
    • 2009-01-26 00:00:00+00:00
    • 2010-01-26 00:00:00+00:00
    • 2010-04-26 00:00:00+00:00
    • 2011-01-26 00:00:00+00:00
    • 2011-04-26 00:00:00+00:00
    • 2011-12-27 00:00:00+00:00
    • 2012-01-26 00:00:00+00:00
    • 2015-01-26 00:00:00+00:00
    • 2016-01-26 00:00:00+00:00
    • 2016-12-27 00:00:00+00:00
    • 2017-01-26 00:00:00+00:00
    • 2018-01-26 00:00:00+00:00
    • 2021-01-26 00:00:00+00:00

    TSX

    Trading Days only in trading_calendars

    • 1993-12-24 00:00:00+00:00
    • 1999-12-24 00:00:00+00:00
    • 2004-12-24 00:00:00+00:00
    • 2010-12-24 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 2001-09-11 00:00:00+00:00
    • 2001-09-12 00:00:00+00:00

    BMF

    Trading Days only in trading_calendars

    • 1997-07-09 00:00:00+00:00
    • 2020-07-09 00:00:00+00:00

    Trading Days only in pandas_market_calendars

    • 1995-12-29 00:00:00+00:00
    • 2000-12-29 00:00:00+00:00
    • 2006-12-29 00:00:00+00:00
    • 2014-06-12 00:00:00+00:00
    • 2017-12-29 00:00:00+00:00
    pandas_market_calendars 
    opened by gerrymanoim 8
  • Add calendar for Tel Aviv Stock Exchange (TASE)

    Add calendar for Tel Aviv Stock Exchange (TASE)

    This PR is to add a calendar for Tel Aviv Stock Exchange (TASE) under the operating MIC XTAE.

    This is based on the respective calendar from pandas-market-calendars, but adding in holidays for 2022 and 2023 as well. I've reconciled the dates for 2019 to 2023 against the official list; see https://info.tase.co.il/eng/about_tase/corporate/pages/vacation_schedule.aspx.

    Open points:

    • Unclear which times to use as opening and close times as they differ per market segment; see https://info.tase.co.il/eng/trading/trading_schedule/pages/trading_schedule.aspx. Please advise.
    • Different close time on Sundays not yet reflected.
    • Since I don't see how holiday rules could be handled with dates in the Hebrew calendar, all holidays are defined as ad-hoc holidays. Is there a way to assign them a name, too, like for regular holidays?
    • Unit tests currently only cover 2019, more should be added.
    opened by jenskeiner 7
  • ENH: Update XLON calendars

    ENH: Update XLON calendars

    Updates XLON to include holidays from pandas_market_calendars.

    Closes https://github.com/quantopian/trading_calendars/issues/163.

    See details from original PR: https://github.com/rsheftel/pandas_market_calendars/issues/84

    enhancement 
    opened by gerrymanoim 7
  • ENH: Add rules for XTAE holidays.

    ENH: Add rules for XTAE holidays.

    This PR adds proper rules for regular XTAE holidays as opposed to just having everything defined as ad-hoc holidays.

    I've done my best to cross-check this against the official information here: https://info.tase.co.il/eng/about_tase/corporate/pages/vacation_schedule.aspx

    One open point is that it seems that Shushan Purim (which is one day after Purim and is typically not observed in Tel Aviv, but e.g. Jerusalem) will be observed from 2022 on, but wasn't observed before. I'm waiting for clarification back from TASE on this point.

    Nevertheless, the current version of the code is consistent with what is currently listed on the website at least for 2020 - 2023. I also briefly manually checked a few years before, but no unit tests are there for these yet.

    On a technical note, I've re-used Pandas Easter class -- which is a subclass of DateOffset -- for all holidays since they likewise fall on different Gregorian dates every year. To be able to do that, I had to import a few (internal) Cython functions and classes. A pure Python or even Cython re-implementation seemed to risky in terms of likely forgetting to handle this or that corner-case. We just have to be aware of these imports since they may introduce some more coupling on the specific Pandas version used.

    Let me know your thoughts...

    enhancement 
    opened by jenskeiner 6
  • XNYS - incorrect start/end times using '.is_open_on_minute' function?

    XNYS - incorrect start/end times using '.is_open_on_minute' function?

    Hi, I think I may have found an error with the start and end times for XNYS when using .is_open_on_minute to return a boolean.

    Reading through the core trading session hours for the NYSE, it seems to me that on a regular trading day the market starts at exactly 9:30:00 EST (inclusive) and is closed at exactly 16:00:00 EST (inclusive). I wrote some code to test some times and I am getting conflicting answers.

    Currently,

    • 9:30:00 returns market closed. I think this should be open.
    • 9:30:01 returns market closed. I think this should be open.
    • 9:31:00 is the first time returned as open.
    • 16:00:00 returns market open. I think this should be closed.

    My code attached.

    Thanks in advance.

    import pandas as pd
    import pytz
    import trading_calendars
    
    NY = 'America/New_York'
    us_calendar = trading_calendars.get_calendar('XNYS')
    
    #Market on Friday at 9:30:00 EST
    pd_dt1 = pd.Timestamp(year=2020, month=10, day=9, hour=9, minute=30, second=0, tz=pytz.timezone(NY))
    open_boolean1 = us_calendar.is_open_on_minute(pd_dt1)
    print("Friday at {} EST. open_boolean should be True: {}".format(pd_dt1.strftime('%H:%M:%S'), open_boolean1))
    
    #Market on Friday at 9:30:01 EST
    pd_dt2 = pd.Timestamp(year=2020, month=10, day=9, hour=9, minute=30, second=1, tz=pytz.timezone(NY))
    open_boolean2 = us_calendar.is_open_on_minute(pd_dt2)
    print("Friday at {} EST. open_boolean should be True: {}".format(pd_dt2.strftime('%H:%M:%S'), open_boolean2))
    
    #Market on Friday at 9:31:0 EST
    pd_dt3 = pd.Timestamp(year=2020, month=10, day=9, hour=9, minute=31, second=0, tz=pytz.timezone(NY))
    open_boolean3 = us_calendar.is_open_on_minute(pd_dt3)
    print("Friday at {} EST. open_boolean should be True: {}".format(pd_dt3.strftime('%H:%M:%S'), open_boolean3))
    
    #Market on Friday at 16:00:00 EST
    pd_dt4 = pd.Timestamp(year=2020, month=10, day=9, hour=16, minute=0, second=0, tz=pytz.timezone(NY))
    open_boolean4 = us_calendar.is_open_on_minute(pd_dt4)
    print("Friday at {} EST. open_boolean should be False: {}".format(pd_dt4.strftime('%H:%M:%S'), open_boolean4))
    
    #Market on Friday at 16:00:01 EST
    pd_dt5 = pd.Timestamp(year=2020, month=10, day=9, hour=16, minute=0, second=1, tz=pytz.timezone(NY))
    open_boolean5 = us_calendar.is_open_on_minute(pd_dt5)
    print("Friday at {} EST. open_boolean should be False: {}".format(pd_dt5.strftime('%H:%M:%S'), open_boolean5))
    
    #Market on Saturday at 9:30:00 EST - Should be closed
    pd_dt6 = pd.Timestamp(year=2020, month=10, day=10, hour=9, minute=30, second=0, tz=pytz.timezone(NY))
    open_boolean6 = us_calendar.is_open_on_minute(pd_dt6)
    print("Saturday at {} EST. open_boolean should be False: {}".format(pd_dt6.strftime('%H:%M:%S'), open_boolean6))
    
    
    opened by sher85 6
  • Exclude business day every week from the calendar

    Exclude business day every week from the calendar

    Hello, I'm trying to exclude a business day, any week, from a trading calendar.

    Lets say I don't want to trade on any Friday, what I'm doing is changing the weekmask:

    class CustomCalendar(IEPAExchangeCalendar):
        def __init__(self):
            super().__init__()
    
        @property
        def weekmask(self):
           return '111000'
    
    custom_calendar = CustomCalendar()
    

    but I'm getting:

    ValueError: Special dates [Timestamp('1992-07-03 17:00:00+0000', tz='UTC'), ..., ...] are not trading days.

    What is the best way to exclude business day every week?

    question 
    opened by ogenev 6
  • Slow load time for XTKS

    Slow load time for XTKS

    I noticed that the load time for most all calendars are around 1.5 seconds, except the XTKS calendar which takes 12.2 seconds to load. Is there any particular reason for that?

    This is the code and results I used:

    from datetime import datetime
    import trading_calendars as tc
    
    def load_times():
        for name in tc.calendar_utils._default_calendar_factories:
            print(name, end='')
            start = datetime.now()
            _ = mcal.get_calendar(name)
            end = datetime.now()
            print(f': run time is {end - start}')
    
    ASEX: run time is 0:00:01.462395
    BVMF: run time is 0:00:01.608703
    CMES: run time is 0:00:01.247221
    IEPA: run time is 0:00:01.221055
    XAMS: run time is 0:00:01.239995
    XASX: run time is 0:00:01.405535
    XBKK: run time is 0:00:01.483120
    XBOG: run time is 0:00:01.902455
    XBOM: run time is 0:00:00.635975
    XBRU: run time is 0:00:01.259231
    XBUD: run time is 0:00:01.545929
    XBUE: run time is 0:00:01.647241
    XCBF: run time is 0:00:01.397777
    XCSE: run time is 0:00:01.523843
    XDUB: run time is 0:00:01.301222
    XFRA: run time is 0:00:01.396143
    XHEL: run time is 0:00:01.423694
    XHKG: run time is 0:00:01.365153
    XICE: run time is 0:00:01.561660
    XIDX: run time is 0:00:01.219812
    XIST: run time is 0:00:01.244760
    XJSE: run time is 0:00:01.435470
    XKAR: run time is 0:00:01.075075
    XKLS: run time is 0:00:01.191726
    XKRX: run time is 0:00:00.940299
    XLIM: run time is 0:00:01.465012
    XLIS: run time is 0:00:01.357335
    XLON: run time is 0:00:01.407390
    XMAD: run time is 0:00:01.282585
    XMEX: run time is 0:00:01.377445
    XMIL: run time is 0:00:01.336494
    XMOS: run time is 0:00:01.307830
    XNYS: run time is 0:00:01.408174
    XNZE: run time is 0:00:01.423343
    XOSL: run time is 0:00:01.464810
    XPAR: run time is 0:00:01.283910
    XPHS: run time is 0:00:01.333504
    XPRA: run time is 0:00:01.456183
    XSES: run time is 0:00:00.961805
    XSGO: run time is 0:00:01.739328
    XSHG: run time is 0:00:00.709314
    XSTO: run time is 0:00:01.572027
    XSWX: run time is 0:00:01.435308
    XTAI: run time is 0:00:01.137340
    XTKS: run time is 0:00:12.211477
    XTSE: run time is 0:00:01.481504
    XWAR: run time is 0:00:01.544426
    XWBO: run time is 0:00:01.442748
    us_futures: run time is 0:00:00.859409
    24/7: run time is 0:00:01.463259
    24/5: run time is 0:00:01.034509
    
    pandas_market_calendars 
    opened by rsheftel 6
  • ENH: Add breaks to TradingCalendar

    ENH: Add breaks to TradingCalendar

    Adds break_start_times and break_end_times to TradingCalendar to model intraday lunch breaks. These work as vectors of values, similarly to how open_times and close_times work so we can model break times changing over time.

    Threads the breaks through necessary methods.

    Adds breaks to XHKG.

    Items with TODO I'd especially like feedback on

    enhancement 
    opened by gerrymanoim 5
  • ENH: Update XHKG calendar

    ENH: Update XHKG calendar

    WIP PR for updating XHKG. See details here: https://github.com/quantopian/trading_calendars/issues/152#issuecomment-689799967.

    Pausing for now as:

    • I need to do a bit more refactoring to get Buddha's birthday/other lunar holidays ported over correctly from pandas_market_calendars
    • I need clarification from @jmccorriston on Liberation Day (I can't see that in either calendar?)
    • I need some other clarification about whether we're pulling the rest of the missing holidays from PMC (which I believe to be the case, but I wanted to double check).
    enhancement pandas_market_calendars 
    opened by gerrymanoim 4
  • Minor failures in all calendar tests

    Minor failures in all calendar tests

    As the title suggests, there is always a minor failures in all calendar test tests\test_XXXX_calendar.py for all exchange code XXXX

    For example, running nosetests tests\test_xnys_calendar.py yields

    [success] 49.38% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minute_to_session_label: 7.4921s
    [success] 12.18% tests.test_xnys_calendar.XNYSCalendarTestCase.test_open_and_close_for_session: 1.8481s
    [success] 11.56% tests.test_xnys_calendar.XNYSCalendarTestCase.test_next_prev_open_close: 1.7531s
    [success] 11.36% tests.test_xnys_calendar.XNYSCalendarTestCase.test_next_prev_minute: 1.7233s
    [success] 3.56% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minute_index_to_session_labels_0: 0.5395s
    [success] 3.05% tests.test_xnys_calendar.XNYSCalendarTestCase.test_next_prev_session: 0.4620s
    [success] 2.26% tests.test_xnys_calendar.XNYSCalendarTestCase.test_sanity_check_session_lengths: 0.3434s
    [success] 1.79% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minute_index_to_session_labels_2: 0.2719s
    [success] 1.78% tests.test_xnys_calendar.XNYSCalendarTestCase.test_is_open_on_minute: 0.2705s
    [success] 1.73% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minute_index_to_session_labels_1: 0.2623s
    [success] 0.94% tests.test_xnys_calendar.XNYSCalendarTestCase.test_start_end: 0.1422s
    [fail] 0.12% tests.test_xnys_calendar.XNYSCalendarTestCase.test_session_closes_in_range: 0.0187s
    [success] 0.06% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minutes_for_period: 0.0096s
    [fail] 0.05% tests.test_xnys_calendar.XNYSCalendarTestCase.test_session_opens_in_range: 0.0069s
    [success] 0.04% tests.test_xnys_calendar.XNYSCalendarTestCase.test_minutes_in_range: 0.0054s
    
    Ran 27 tests in 15.773s
    
    FAILED (failures=2)
    
    opened by leonarduschen 4
  • ENH: Fix xses

    ENH: Fix xses

    Trading days fix:

    • Add 2018-02-19
    • Remove 2019-12-15
    • Add 2020-07-10
    • Add 2020-11-14

    Source: https://www.tradinghours.com/exchanges/sgx/market-holidays/2018 https://www.tradinghours.com/exchanges/sgx/market-holidays/2019 https://www.tradinghours.com/exchanges/sgx/market-holidays/2020

    Also changed closing time to the correct closing time from 15:00 to 17:00. This is consistent with the class' own documentation, as well as with this:

    https://www.tradinghours.com/exchanges/sgx/trading-hours

    opened by leonarduschen 4
  • Bump actions/checkout from 2.3.4 to 3.3.0

    Bump actions/checkout from 2.3.4 to 3.3.0

    Bumps actions/checkout from 2.3.4 to 3.3.0.

    Release notes

    Sourced from actions/checkout's releases.

    v3.3.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/checkout/compare/v3.2.0...v3.3.0

    v3.2.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/checkout/compare/v3.1.0...v3.2.0

    v3.1.0

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/checkout/compare/v3.0.2...v3.1.0

    v3.0.2

    What's Changed

    Full Changelog: https://github.com/actions/checkout/compare/v3...v3.0.2

    v3.0.1

    ... (truncated)

    Changelog

    Sourced from actions/checkout's changelog.

    Changelog

    v3.1.0

    v3.0.2

    v3.0.1

    v3.0.0

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Bump actions/cache from 2.1.3 to 3.2.2

    Bump actions/cache from 2.1.3 to 3.2.2

    Bumps actions/cache from 2.1.3 to 3.2.2.

    Release notes

    Sourced from actions/cache's releases.

    v3.2.2

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/cache/compare/v3.2.1...v3.2.2

    v3.2.1

    What's Changed

    Full Changelog: https://github.com/actions/cache/compare/v3.2.0...v3.2.1

    v3.2.0

    What's Changed

    New Contributors

    ... (truncated)

    Changelog

    Sourced from actions/cache's changelog.

    3.2.2

    • Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.
    Commits
    • 4723a57 Revert compression changes related to windows but keep version logging (#1049)
    • d1507cc Merge pull request #1042 from me-and/correct-readme-re-windows
    • 3337563 Merge branch 'main' into correct-readme-re-windows
    • 60c7666 save/README.md: Fix typo in example (#1040)
    • b053f2b Fix formatting error in restore/README.md (#1044)
    • 501277c README.md: remove outdated Windows cache tip link
    • c1a5de8 Upgrade codeql to v2 (#1023)
    • 9b0be58 Release compression related changes for windows (#1039)
    • c17f4bf GA for granular cache (#1035)
    • ac25611 docs: fix an invalid link in workarounds.md (#929)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Bump actions/setup-python from 2.2.1 to 4.4.0

    Bump actions/setup-python from 2.2.1 to 4.4.0

    Bumps actions/setup-python from 2.2.1 to 4.4.0.

    Release notes

    Sourced from actions/setup-python's releases.

    Add support to install multiple python versions

    In scope of this release we added support to install multiple python versions. For this you can try to use this snippet:

        - uses: actions/setup-python@v4
          with:
            python-version: |
                3.8
                3.9
                3.10
    

    Besides, we changed logic with throwing the error for GHES if cache is unavailable to warn (actions/setup-python#566).

    Improve error handling and messages

    In scope of this release we added improved error message to put operating system and its version in the logs (actions/setup-python#559). Besides, the release

    v4.3.0

    • Update @​actions/core to 1.10.0 version #517
    • Update @​actions/cache to 3.0.4 version #499
    • Only use github.token on github.com #443
    • Improvement of documentation #477 #479 #491 #492

    Add check-latest input and bug fixes

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, the version will then be downloaded from python-versions repository. By default check-latest is set to false. For PyPy it will to try to reach https://downloads.python.org/pypy/versions.json

    Example of usage:

    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: '3.9'
          check-latest: true
      - run: python --version
    

    Besides, it includes such changes as

    v4.1.0

    In scope of this pull request we updated actions/cache package as the new version contains fixes for caching error handling. Moreover, we added a new input update-environment. This option allows to specify if the action shall update environment variables (default) or not.

    Update-environment input

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Can't import trading_calendars

    Can't import trading_calendars


    TypeError Traceback (most recent call last) /var/folders/5z/nfxgl_ps6qlf5tvrct964q980000gn/T/ipykernel_864/56499229.py in ----> 1 import trading_calendars as tc

    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/init.py in 14 # limitations under the License. 15 ---> 16 from .trading_calendar import TradingCalendar 17 from .calendar_utils import ( 18 clear_calendars,

    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/trading_calendar.py in 31 import toolz 32 ---> 33 from .calendar_helpers import ( 34 NP_NAT, 35 compute_all_minutes,

    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/trading_calendars/calendar_helpers.py in 4 NANOSECONDS_PER_MINUTE = int(6e10) 5 ----> 6 NP_NAT = np.array([pd.NaT], dtype=np.int64)[0] 7 8

    TypeError: int() argument must be a string, a bytes-like object or a number, not 'NaTType'

    opened by AwesomeCap 1
Releases(2.1.1)
  • 2.1.1(Jan 5, 2021)

  • 2.1.0(Dec 22, 2020)

    What’s Changed

    Calendar updates

    • Add calendar for Tel Aviv Stock Exchange (TASE) (#200) @jenskeiner
    • Add XETR as a separate market. (#197) @jenskeiner
    • Bring special close day names in line with other calendars. (#198) @jenskeiner
    • Fix XTKS 2021 holidays according to JPX calendar (#199) @sercant

    Benchmark Changes

    • BENCH: Add CI benchmarking and alerting on regressions (#184) @gerrymanoim

    Build Changes

    • BLD: Run CI on master push as well (#187) @gerrymanoim
    • Bump actions/setup-python from v2.1.4 to v2.2.1 (#202) @dependabot
    • Bump actions/cache from v2.1.2 to v2.1.3 (#192) @dependabot
    • Bump actions/checkout from v2.3.3 to v2.3.4 (#191) @dependabot
    • Update actions/checkout requirement to v2.3.3 (#190) @dependabot
    • Update actions/setup-python requirement to v2.1.4 (#189) @dependabot
    • Update actions/cache requirement to v2.1.2 (#188) @dependabot

    Documentation Updates

    • DOC: Expand usage examples in README (#177) @gerrymanoim

    Test Changes

    • TST: Add py3.9 to test matrix (#173) @gerrymanoim
    • TST: Improve our CI tests speed (#186) @richafrank
    • TST: Lock requirements properly in tests (#183) @gerrymanoim
    • TST: Move off nose and on to pytest (#179) @gerrymanoim

    Enhancements

    • Added missing direct dependencies to install_requires (#185) @richafrank
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Oct 9, 2020)

    Highlights

    This release packages a lot of the ongoing work to unify trading_calendars and pandas_market_calendars. We now have better holiday coverage (in XCBF, XLON, NYSE) and calendars support midday breaks (only implemented in XHKG).

    Build Fixes

    • BLD: Add PR labeler, bump pandas/numpy in testing (#148) @gerrymanoim

    Bug Fixes

    • BUG: Fix GoodFriday for XCBF (#171) @gerrymanoim
    • BUG: Do not loop-back when count is greater than historical dates (#125) @pavitrakumar78

    Development Enhancements

    • DEV: Add a devcontainer to allow codespaces development (#174) @gerrymanoim

    Enhancements

    • ENH: Add breaks to TradingCalendar (#154) @gerrymanoim
    • ENH: Update XHKG calendar (#165) @gerrymanoim
    • ENH: NYSE Calendar prior to 1990 (#169) @gerrymanoim
    • ENH: Update XLON calendars (#166) @gerrymanoim
    • ENH: add additional aliases (#161) @rsheftel
    • ENH: Add get_calendar_names (#153) @gerrymanoim

    Maintenance

    • MAINT: Replace US/Eastern with America/New_York (#157) @gerrymanoim

    Performance

    • PERF: Refactor next_non_holiday_weekday in XTKS (#159) @leonarduschen
    Source code(tar.gz)
    Source code(zip)
  • 1.11.11(Aug 31, 2020)

  • 1.11.10(Aug 14, 2020)

  • 1.11.9(Aug 12, 2020)

  • 1.11.8(Jul 7, 2020)

    What’s Changed

    • BLD: improve release process by allowing republishes to test pypi if … (#137) @gerrymanoim
    • Fix early close time. (#136) @jenskeiner
    • Fix pandas DeprecationWarning for empty series (#133) @asweeney86
    Source code(tar.gz)
    Source code(zip)
  • 1.11.7(Mar 31, 2020)

    What’s Changed

    • Fix XTKS 2020 holidays according to JPX calendar (#131) Thanks @saubhik !
    • BLD: Fix final test install (#127) @gerrymanoim
    Source code(tar.gz)
    Source code(zip)
  • 1.11.6(Feb 18, 2020)

  • 1.11.5(Feb 18, 2020)

  • 1.11.4(Feb 18, 2020)

  • 1.11.3(Feb 18, 2020)

    Lot's of build improvements and updated test coverage. Thanks @willianpaixao @peterhbromley

    What’s Changed

    • MANT: Fix missing text (#126) @gerrymanoim
    • BLD/MANT: Update test coverage and fix build process (#123) @gerrymanoim
    • MAINT: Run GH actions on PRs as well (#122) @gerrymanoim
    • BLD: Replace status badge (#120) @gerrymanoim
    • BLD: Try traverse-namespace (#119) @gerrymanoim
    • Test out gh actions for CI testing (#102) @gerrymanoim
    • Introducing pre-commit hook (#117) @willianpaixao
    • Update setup.py (#116) @willianpaixao
    • Removed unused coveralls (#114) @gerrymanoim
    • Update README.md (#112) @willianpaixao
    Source code(tar.gz)
    Source code(zip)
  • 1.11.2(Jan 8, 2020)

    This release includes various maintenance commits/fixes as well as updates to numerous calendars for 2020.

    Changes:

    • The BVMF close time was updated to reflect a recent change (thanks @willianpaixao)
    • Compatibility fix for Python 3.8 (thanks @pando85)
    • Holiday fixes for XASX, XNYS, and XNZE (thanks @savvyyabby)
    • 2020 holidays for XBKK, XBOM, XBUE, XKAR, XKLS, XKRX (thanks @pkim81), XLON, XPHS, XSES, XSHG, XTAI, XTKS, XWBO
    Source code(tar.gz)
    Source code(zip)
  • 1.11.1(Nov 6, 2019)

    This release updates several trading calendars with trading holidays that have recently come to our attention. Holidays were added or amended in the following calendars:

    • Ireland (XDUB)
    • Singapore (XSES)
    • India (XBOM) - thanks @swapniljariwala for helping us add an election holiday to this calendar!
    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Oct 17, 2019)

  • 1.10.0(Oct 1, 2019)

    This release adds the following new calendars:

    • Budapest Stock Exchange (XBUD)
    • Athens Stock Exchange (ASEX)
    • Istanbul Stock Exchange (XIST)
    • Johannesburg Stock Exchange (XJSE)
    Source code(tar.gz)
    Source code(zip)
  • 1.9.1(Sep 25, 2019)

    This release updates the Poland calendar which was broken for many of its holidays. It also fixes a bug in which the Lima Stock Exchange open time was off by one.

    Source code(tar.gz)
    Source code(zip)
  • 1.9.0(Sep 23, 2019)

    This release adds the following new calendars:

    • Poland Stock Exchange (XWAR) - thanks @tymurbaniak!
    • Santiago Stock Exchange (XSGO)
    • Colombia Stock Exchange (XBOG)
    • Mexican Stock Exchange (XMEX)
    • Lima Stock Exchange (XLIM)
    • Prague Stock Exchange (XPRA)

    It also includes various miscellaneous dev and build improvements.

    Source code(tar.gz)
    Source code(zip)
  • 1.8.1(Jul 7, 2019)

  • 1.8.0(May 23, 2019)

    Changes:

    • Fix UTC Bug (thanks @Froskekongen)
    • Error message typo fix (thanks @Swalloow )
    • Added holiday to XSHG holidays (thanks @txu2014)
    • Shanghai Stock Exchange Website (thanks @kuagtu)
    • Script to generate cal-like trading calendars (thanks @llllllllll )
    Source code(tar.gz)
    Source code(zip)
  • 1.7.0(Jan 11, 2019)

  • 1.6.1(Dec 3, 2018)

  • 1.6.0(Nov 27, 2018)

  • 1.5.1(Nov 2, 2018)

  • 1.5.0(Nov 1, 2018)

  • 1.4.2(Oct 25, 2018)

  • 1.4.1(Oct 24, 2018)

  • 1.4.0(Oct 24, 2018)

    Calendars for the following exchanges were added:

    • Copenhagen Stock Exchange (XCSE)
    • Helsinki Stock Exchange (XHEL)
    • Stockholm Stock Exchange (XSTO)
    • Oslo Stock Exchange (XOSL)
    • Irish Stock Exchange (XDUB)
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Oct 17, 2018)

  • 1.3.0(Oct 17, 2018)

    We have added utilities for computing the dates of holidays based on lunar or solar events. These live in etc/lunisolar.

    Calendars for the following exchanges were also added:

    • Austrialian Securities Exchange (XASX)
    • Bolsa de Madrid (XMAD)
    • Borsa Italiana (XMIL)
    • New Zealand Exchange (XNZE)
    • Wiener Borse (XWBO)
    • Hong Kong Stock Exchange (XHKG)
    Source code(tar.gz)
    Source code(zip)
Owner
Quantopian, Inc.
Quantopian builds software tools and libraries for quantitative finance.
Quantopian, Inc.
Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks.

JackrabbitRelay Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks. Disclaimer Please note RA

Rose Heart 23 Jan 4, 2023
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Marcel Beining 100 Dec 6, 2022
Telegram bot with various Sticker Tools

Sticker Tools Bot @Sticker_Tools_Bot A star ⭐ from you means a lot to us! Telegram bot with various Sticker Tools Usage Deploy to Heroku Tap on above

Stark Bots 20 Dec 8, 2022
Simple Telegram Bot to extract various types of archives from a telegram file or a direct link

Unzipper Bot A Telegram Bot to Extract Various Types Of Archives Features Extract various types of archives like rar, zip, tar, 7z, tar.xz etc. Passwo

I'm Not A Bot #Left_TG 93 Dec 27, 2022
News API consisting various sources from Tanzania

Tanzania News API News API consisting various sources from Tanzania. Fork the project Clone the project git clone https://github.com/<username>/news-a

Innocent Zenda 6 Oct 6, 2022
A python package to fetch results of various national examinations done in Tanzania.

Necta-API Get a formated data of examination results scrapped from necta results website. Note this is not an official NECTA API and is still in devel

vincent laizer 16 Dec 23, 2022
Discord bot that performs various functions.

rikka-bot A Discord bot that performs various functions. Table of Contents Commands Main Commands Utility Commands Admin Commands Self-Assignable Role

Carlos Saucedo 7 Aug 27, 2021
A simple and modular Discord bot with various functionalities.

All-In-Bot for Discord A simple and modular Discord bot with various functionalities. How to use the bot? Simple! Just invite the bot to your server u

Th3J0nny 3 Jan 29, 2022
A collection of automation aids to connect various database systems into Lookout for Metrics

A collection of automation aids to connect various database systems into Lookout for Metrics

AWS Samples 3 Apr 28, 2022
FAIR Enough Metrics is an API for various FAIR Metrics Tests, written in python

☑️ FAIR Enough metrics for research FAIR Enough Metrics is an API for various FAIR Metrics Tests, written in python, conforming to the specifications

Maastricht University IDS 3 Jul 6, 2022
A simple bot to upload file to various cloud servers.

Cloudsy Bot A simple bot to upload file to various cloud servers. Variables API_HASH Your API Hash from my.telegram.org API_ID Your API ID from my.tel

Flying Santas 8 Oct 31, 2022
A Slack bot for playing Texas Hold 'Em where the currency is various workout tasks e.g. pushups

A Slack app/bot for playing Texas Hold 'Em where the currency is various workout tasks e.g. pushups. The intent is to make the workday more fun & active for remote teams.

Kyle McIntyre 3 Sep 19, 2022
A simple MTProto-based bot that can download various types of media (>10MB) on a local storage

TG Media Downloader Bot ?? A telegram bot based on Pyrogram that downloads on a local storage the following media files: animation, audio, document, p

Alessio Tudisco 11 Nov 1, 2022
Market calendar RESTful API with holiday, late open, and early close. Over 50+ unique exchange calendars for global equity and futures markets.

Trading Calendar Market calendar RESTful API with holiday, late open, and early close. Over 50+ unique exchange calendars for global equity and future

Apptastic Software 1 Feb 3, 2022
Python library for Spurwing API to schedule appointments, manage calendars and custom integrations.

Spurwing API Python Library Lightweight Python library for Spurwing's API. Spurwing's API makes it easy to add robust scheduling and booking to your a

Spurwing 1 Jul 14, 2021
Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks.

JackrabbitRelay Jackrabbit Relay is an API endpoint for stock, forex and cryptocurrency exchanges that accept REST webhooks. Disclaimer Please note RA

Rose Heart 23 Jan 4, 2023
Simplex using Jordan exchanges taught in 236A

Simplex for 236A Python script to solve LP using simplex by Jordan exchanges taught in 236A. You will need python installed along with the 'numpy' and

Kunal Kishore 1 Nov 30, 2021
Aggregate real-time market data from cryptocurrency exchanges, filter, sort and format as TradingView watchlists.

tvbuddy Aggregate real-time market data from cryptocurrency exchanges, filter, sort and format as TradingView watchlists. Developed and tested on Pyth

Ossian Winter 2 Jan 7, 2022
Free python/telegram bot for easy execution and surveillance of crypto trading plans on multiple exchanges.

EazeBot Introduction Have you ever traded cryptocurrencies and lost overview of your planned buys/sells? Have you encountered the experience that your

Marcel Beining 100 Dec 6, 2022
A python based tool that executes various CVEs to gain root privileges as root on various MAC OS platforms.

MacPer A python based tool that executes various CVEs to gain root privileges as root on various MAC OS platforms. Not all of the exploits directly sp

null 20 Nov 30, 2022