[BUG] Add XWBO special close days on the last trading day of the year since 2017. #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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.