exchange_calendars icon indicating copy to clipboard operation
exchange_calendars copied to clipboard

XHKG late opens (black rain half days)

Open limx0 opened this issue 3 years ago • 4 comments

19 Aug 2020

Hong Kong Exchanges and Clearing Limited (HKEX) announced that trading in the securities and derivatives markets will resume at 1:30pm, following the cancellation of Typhoon Signal No. 8. Stock Connect trading will resume from 1:30pm according to the Rules of the Exchange.

https://www.hkex.com.hk/News/Market-Communications/2020/2008192news?sc_lang=en

limx0 avatar Feb 04 '22 03:02 limx0

@limx0, thanks for the info.

By coincidence, yesterday I found the same is true of 28 June 2021. Both 2020-08-19 and 2021-06-28 shoud be declared as late opens. https://www.hkex.com.hk/News/Market-Communications/2021/2106282news?sc_lang=en https://www.hkex.com.hk/News/Market-Communications/2021/2106283news?sc_lang=en

All calendars are maintained via contributions. Guide here.

Please PR any changes you want introduced to XHKG.

maread99 avatar Feb 04 '22 08:02 maread99

Will do @maread99 - is there an established convention for late opens (I couldn't see one from the existing days in xhkg)?

limx0 avatar Feb 04 '22 10:02 limx0

There is. You should be able to just define the special_opens_adhoc property in XHKGExchangeCalendar. The doc for the property as defined on the base class explains what's expected.

I think I'm right in saying that this would be the first calendar to implement a late open, although plenty of them implement adhoc early closes and the properties are defined in the same manner.

You'll see XHKGExchangeCalendar already defines special_closes_adhoc, although you'd probably be better off checking out the simpler XNYSExchangeCalendar.special_closes_adhoc which is more in line with what you're after.

You might find the PR's not all plain sailing due to the calendar having breaks, although having said that the base implementation works fine with the early closes - recognising that those days don't have a break. In theory, it should do the same with the late opens.

Any issues let me know.

Cheers.

maread99 avatar Feb 04 '22 12:02 maread99

Seems some of the recent market closures are missing as well,

2023-07-17 for example was a typhoon closure https://www.hkex.com.hk/News/Market-Communications/2023/2307172news?sc_lang=en

npezolano avatar Aug 14 '23 22:08 npezolano