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

Made Good Friday always a holiday in XCBF #121

Conversation

philiptromans
Copy link

@philiptromans philiptromans commented Dec 6, 2021

rsheftel/pandas_market_calendars#116 raised an issue stating that Good Friday is a trading day when Christmas or New Years Day falls on a Friday. This was propagated into trading_calendars via quantopian#168 (which resulted in quantopian#171). I think that this is based on a misreading of the rules, and in fact Good Friday is always a market holiday in XCBF.

The original page is here (archive.org). My reading of the page is as follows:

  • There's a section on the schedule for a trading week that has no holidays in it
  • Then there's a section for the domestic holidays that are always on a Monday
  • Then there's a section for Thanksgiving (always a Thursday)
  • We then get to the section that covers floating holidays and Good Friday (but not independence day, because that's the last section).
    • This section is divided into two chunks:
      1. A section for New Year's Day and Christmas day, if they fall on a Monday - Thursday.
      2. A section for Good Friday, New Year's Day and Christmas Day (independently), if they fall on a Friday. I.e. it's saying that the schedule applies to any of Good Friday, New Year's Day and Christmas Day if they should fall on a Friday. And it's saying that the holiday is observed on the Friday, and that there are no regular or extended trading hours. It's not saying that whether or not Good Friday is a trading day is a function of which day of the week Christmas/New Year's Day falls on.
  • Then there's a section on Independence Day.

This tallies with the exchange rule book 5.1 (d). The equivalent page on the current CBOE website also makes it clear that Good Friday is a standard market holiday.

Closes #79.

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

@gerrymanoim gerrymanoim merged commit d1f4271 into gerrymanoim:master Dec 9, 2021
@gerrymanoim
Copy link
Owner

Thanks for finding and fixing this!

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.

Good Friday on XCBF and CFE calendars
3 participants