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

XDUB: Add May bank holiday post-2021 #382

Merged
merged 1 commit into from
May 7, 2024

Conversation

mzjp2
Copy link

@mzjp2 mzjp2 commented May 6, 2024

Closes: #383

Whilst it looks correct that there is no Early May Bank Holiday for Euronext Dublin in 2019 and 2020, it does seem to have been reacted from 2021 onwards. See screenshots below of excerpts from the Euronext website:

Euronext 2019 - no May Bank (https://web.archive.org/web/20190708142940/https://www.euronext.com/en/trade/trading-hours-holidays):

image

Euronext 2020 - no May Bank (https://web.archive.org/web/20200904035212/https://www.euronext.com/en/trade/trading-hours-holidays):

image

Euronext 2021 - May Bank (https://www.euronext.com/en/trade/trading-hours-holidays):

image

and on that same page you can see calendars for 2021 onwards, all of which have the early May Bank Holiday.


Workflow to add a new Exchange Calendar

It's recommended that whilst working through the process reference be made to existing calendar and test classes.

  • Add calendar module exchange_calendars/exchange_calendar_{Exchange MIC}.py. Module should contain a subclass of the abstract base class ExchangeCalendar (in exchange_calendars/exchange_calendar.py).
    • Name subclass {Exchange MIC}ExchangeCalendar.
    • Override methods and properties as required, being guided by ExchangeCalendar documentation and in-code comments. All abstract properties must be overriden.
    • Include references / links for holidays and timings (either to class documentation or as comments).
  • Import calendar class to exchange_calendars/calendar_utils.py and add class to _default_calendar_factories.
  • Add calendar test module tests/test_{Exchange MIC}_calendar.py Module should contain a subclass of the test base class ExchangeCalendarTestBase (in tests/test_exchange_calendars.py).
    • Name subclass Test{Exchange MIC}Calendar.
    • Override fixtures as required, being guided by ExchangeCalendarTestBase documentation and in-code comments. The calendar_cls and max_session_hours fixtures must be overriden.
  • Add a .csv file containing expected timings to tests/resources/{Exchange MIC}.csv. This file be generated by executing python etc/make_exchange_calendar_test_csv.py {Exchange MIC}. See script's documentation.
  • Add new exchange to Calendars table of README.md.
  • PR it!

Workflow to modify an existing Exchange Calendar

  • 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.

@mzjp2
Copy link
Author

mzjp2 commented May 6, 2024

Would it be possible to get a release of this package if/when this is merged? We'd quite like to get this fix into our system.

@gerrymanoim gerrymanoim merged commit 8f93a3c into gerrymanoim:master May 7, 2024
9 checks passed
@mzjp2 mzjp2 deleted the xdub-may-bank-hol branch May 7, 2024 14:21
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.

XDUB missing early may bank holiday post-2021
2 participants