Additional holiday calendars for quadruple witching et cetera + other extensions. #291
Replies: 3 comments 4 replies
-
Hi @jenskeiner This looks absolutely great! I think all of this would be more than worthy additions to My only quibble is the direct use of the It'll be @gerrymanoim's call, although for me, I'd say PLEASE do offer PRs to incorporate all of this in Wonderful stuff! |
Beta Was this translation helpful? Give feedback.
-
Hi @jenskeiner Yup, scrap any suggestion of further subclassing Having had a good look again over the existing interface, I don't feel that that the I think it's fair to say that Considering in turn each of the properties that
|
Beta Was this translation helpful? Give feedback.
-
Hi @maread99, thanks for the detailed thoughts and analysis. I think it should be a goal to add any new properties to Thanks also for all the suggestions re naming conventions, data types, et cetera. I think I would agree with most, if not all of it. At the current stage, I think there are two main considerations. The first is the build-out of the functionality I wanted to add on top of As said before, the build-out is not yet complete. At the moment, I'm adding functionality to programmatically add or remove holidays or special sessions. This is again driven by real-world experience where we often became aware of sudden ad-hoc changes to calendars (e.g. after the earthquake in Turkey) and couldn't wait for a new Most of the work is finished and when done, I will put out a new pre-release of I will then probably start work on another application that will use the extensions, and it may become more clear why I've put the calendar extensions into a separate package. Once the functionality is complete, I am very happy to actively work on bringing some or even all of the functionality over to the upstream The benefit of working in this sequential order is, I think:
So, to wrap up: I'm currently getting 1) done as quickly as possible, so 2) can get the focus after. Thanks again for the input and feedback so far. Let me know any further thoughts. Best, Jens |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I've been using the
exchange_calendars
package for some time now. In one instance, I've used it in a professional capacity to build a small HTTP-based service that would allow, for example, to retrieve the next 10 regular business days relative to a given date for an exchange.Originally, the service should have been a thin wrapper around the package, but over time, we were tasked with adding more special business days like quadruple witching, or last (regular) trading day of the month, as trading patterns on those days would merit special treatment. We added these additional days for select exchanges, but the logic was never properly pulled into a separate library.
Now, after some deliberation, I have finally started to develop a Python package exchange_calendars_extensions to add said functionality as transparently as possible to
exchange_calendars
. Rationale: I wanted to re-implement the functionality from scratch right now, but without having to try and add toexchange_calendars
directly at the same time.At this stage, I have added some additional special day types, like quadruple witching, and some convenience, e.g. a holiday calendar that combines regular and ad-hoc holidays.
Another aspect, with is not yet implemented, would be functionality to add/change holidays or other special days programmatically at runtime. This can be useful when correctness is mission-critical, you're made aware of short-term changes, and you can't wait for a new
exchange_calendars
release which may come after the fact. Until the changes are reflected upstream, it may be a good option to just apply patches to the calendars through a well-defined API.I would be interested in feedback. It's fine for me to keep all the additional stuff in a separate package, but if anything would reasonably qualify for adding to
exchange_calendars
, I would be happy to contribute.Let me know any thoughts.
Beta Was this translation helpful? Give feedback.
All reactions