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

[BUG] Add XWBO special close days on the last trading day of the year since 2017. #4

Merged
merged 2 commits into from
Jan 28, 2021
Merged

Conversation

jenskeiner
Copy link

This PR is to add a special close day for XWBO on the last trading day of the year. This is similar to XETR, with minor differences:

Notes:

  • I've put a link to the search form on XWBO's website into the code which can be used to pull up all the official announcements regarding the last trading day of the year. Can be used to check past and future behaviour.
  • The closing time is the time the closing auction for equities starts. I think this is in line with other exchanges.
  • Bonds e.g. close a bit later, so this is not reflected.

BTW: There seems to be a bug, possibly in the base TradingCalendar class. When I amended the XWBO CSV file with the remaining handful of dates for 2020, some tests failed since the calendar apparently didn't see 2020-12-30 as a special close day (which it was since it was the last trading day of the year). Adding 2021-01-04 (the first trading day of the new year) to the CSV fixed that issue.

I'm not sure where exactly the bug is located, but it has to do with creating a calendar with an end date x, where the last trading day before x is a special close (or open?) day. Maybe worth checking.

This doesn't show up e.g. for XETR since the corresponding CSV doesn't stops a few days before Christmas, so it doesn't end with the last trading day of the year which is also a half day.

@jenskeiner jenskeiner changed the title bug: Add XWBO special close days on the last trading day of the year since 2017 bug: Add XWBO special close days on the last trading day of the year since 2017. Jan 27, 2021
@gerrymanoim gerrymanoim changed the title bug: Add XWBO special close days on the last trading day of the year since 2017. [BUG] Add XWBO special close days on the last trading day of the year since 2017. Jan 28, 2021
@gerrymanoim gerrymanoim added the bug Something isn't working label Jan 28, 2021
@gerrymanoim
Copy link
Owner

Thanks - good catch here. All the code changes LGTM.

I suspect that there's some issue with searching through the array of holidays. Do you mind filing an issue on that and I'll take a look?

@gerrymanoim gerrymanoim merged commit e3159fa into gerrymanoim:master Jan 28, 2021
@jenskeiner
Copy link
Author

Thanks - good catch here. All the code changes LGTM.

I suspect that there's some issue with searching through the array of holidays. Do you mind filing an issue on that and I'll take a look?

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants