Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XMOS working weekends #376

Merged
merged 5 commits into from
Feb 29, 2024
Merged

Conversation

iMikeBug
Copy link

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.

  • Modify calendar class as required.
  • Modify the test resources file (e.g tests/resources/{Exchange MIC}.csv), either manually or by executing python etc/make_exchange_calendar_test_csv.py {Exchange MIC}.
  • Check if any of the fixtures in tests/test_{Exchange MIC}_calendar.py need updating to reflect your changes.
  • Add references to any new/modified holidays in exchange_calendars/exchange_calendar_{Exchange MIC}.py.

Michail Bugaev added 5 commits February 27, 2024 14:16
Added code for creating working weekends for custom weeks.
Added working weekends
In order to update XMOS I used the code from XKRX calendar.
Error was raised if I used multiple periods for special
weekmasks.
@gerrymanoim
Copy link
Owner

Hey @iMikeBug - thanks for this!

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

@iMikeBug
Copy link
Author

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
Copy link
Owner

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

@gerrymanoim gerrymanoim merged commit 5a53d8a into gerrymanoim:master Feb 29, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants