gerrymanoim / exchange_calendars

Calendars for various securities exchanges.
Apache License 2.0
396 stars 129 forks source link

XMOS working weekends #376

Closed iMikeBug closed 4 months ago

iMikeBug commented 4 months ago

Some years have working weekends. These working weekends are created due to extension of different regular holidays. There is no rule for that.

The idea of creating weeks with working non-regular weekends was implemented in XKRX calendar. So I used the code from XKRX. However several mistakes appeared in exchange_calendars\pandas_extensions\offsets.py file because of timedelta and timestamp comparison. I've also checked XKRX calendar for exclusion of any damage by changing code in offsets.py file. It seems it works ok.

gerrymanoim commented 4 months ago

Hey @iMikeBug - thanks for this!

For future reference do you have a source/documentation for the working weekends?

iMikeBug commented 4 months ago

Hey @gerrymanoim Honestly I don’t get the question. If you ask about some kind of official url where you can find info of working weekends than there are urls for period after 2012 from moex stock exchange. Before 2012 moex exchange was created by merging of 2 exchanges. So it is impossible to find necessary links from stock exchange. There are official calendars from government where these weekends are marked as working one. Or are you asking about something else?

gerrymanoim commented 4 months ago

Apologies - I just missed the urls you already left in special_weekmasks - all good. Thanks!