exchange_calendars
exchange_calendars copied to clipboard
XKRX late_opens empty although calendar has late opens...?
Hi @elbakramer, I'm migrating the calendar test modules to a new test base and XKRX is failing a new test that checks late_opens against late opens as evaluated from the answers file.
The calendar appears to have regular late opens although the late_opens property returns an empty DatetimeIndex?
The following example shows the late open on 2021-01-04:
> import exchange_calendars as xcals
> cal = xcals.get_calendar("XKRX", start="2020-12-29", end="2021-01-06")
> cal.schedule
| market_open | break_start | break_end | market_close | |
|---|---|---|---|---|
| 2020-12-29 00:00:00+00:00 | 2020-12-29 00:00:00 | NaT | NaT | 2020-12-29 06:30:00 |
| 2020-12-30 00:00:00+00:00 | 2020-12-30 00:00:00 | NaT | NaT | 2020-12-30 06:30:00 |
| 2021-01-04 00:00:00+00:00 | 2021-01-04 01:00:00 | NaT | NaT | 2021-01-04 06:30:00 |
| 2021-01-05 00:00:00+00:00 | 2021-01-05 00:00:00 | NaT | NaT | 2021-01-05 06:30:00 |
| 2021-01-06 00:00:00+00:00 | 2021-01-06 00:00:00 | NaT | NaT | 2021-01-06 06:30:00 |
yet:
> cal.late_opens
DatetimeIndex([], dtype='datetime64[ns, UTC]', freq=None)
For the default calendar, all the following sessions appear to have late opens...
DatetimeIndex(['1986-01-04 00:00:00+00:00', '1987-01-05 00:00:00+00:00',
'1988-01-04 00:00:00+00:00', '1989-01-04 00:00:00+00:00',
'1990-01-04 00:00:00+00:00', '1991-01-03 00:00:00+00:00',
'1992-01-03 00:00:00+00:00', '1993-01-04 00:00:00+00:00',
'1993-08-20 00:00:00+00:00', '1993-11-16 00:00:00+00:00',
'1994-11-23 00:00:00+00:00', '1995-01-03 00:00:00+00:00',
'1995-11-22 00:00:00+00:00', '1996-01-03 00:00:00+00:00',
'1996-11-13 00:00:00+00:00', '1997-01-03 00:00:00+00:00',
'1997-11-19 00:00:00+00:00', '1998-01-03 00:00:00+00:00',
'1998-11-18 00:00:00+00:00', '1999-01-04 00:00:00+00:00',
'1999-11-17 00:00:00+00:00', '2000-11-15 00:00:00+00:00',
'2001-01-02 00:00:00+00:00', '2001-11-07 00:00:00+00:00',
'2002-01-02 00:00:00+00:00', '2002-11-06 00:00:00+00:00',
'2003-01-02 00:00:00+00:00', '2003-11-05 00:00:00+00:00',
'2004-01-02 00:00:00+00:00', '2004-11-17 00:00:00+00:00',
'2005-01-03 00:00:00+00:00', '2005-11-23 00:00:00+00:00',
'2006-01-02 00:00:00+00:00', '2006-11-16 00:00:00+00:00',
'2007-01-02 00:00:00+00:00', '2007-11-15 00:00:00+00:00',
'2008-01-02 00:00:00+00:00', '2008-11-13 00:00:00+00:00',
'2009-01-02 00:00:00+00:00', '2009-11-12 00:00:00+00:00',
'2010-01-04 00:00:00+00:00', '2010-11-18 00:00:00+00:00',
'2011-01-03 00:00:00+00:00', '2011-11-10 00:00:00+00:00',
'2012-01-02 00:00:00+00:00', '2012-11-08 00:00:00+00:00',
'2013-01-02 00:00:00+00:00', '2013-11-07 00:00:00+00:00',
'2014-01-02 00:00:00+00:00', '2014-11-13 00:00:00+00:00',
'2015-01-02 00:00:00+00:00', '2015-11-12 00:00:00+00:00',
'2016-01-04 00:00:00+00:00', '2016-11-17 00:00:00+00:00',
'2017-01-02 00:00:00+00:00', '2017-11-16 00:00:00+00:00',
'2017-11-23 00:00:00+00:00', '2018-01-02 00:00:00+00:00',
'2018-11-15 00:00:00+00:00', '2019-01-02 00:00:00+00:00',
'2019-11-14 00:00:00+00:00', '2020-01-02 00:00:00+00:00',
'2020-12-03 00:00:00+00:00', '2021-01-04 00:00:00+00:00',
'2022-01-03 00:00:00+00:00', '2022-09-07 00:00:00+00:00'],
dtype='datetime64[ns, UTC]', freq=None)