-
Notifications
You must be signed in to change notification settings - Fork 178
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
Breaks, interruptions, special market times, and min python version #198
Comments
@Stryder-Git Looks good. Thanks! If you enhance open_at_time(), shouldn't we enable interruptions as the default case? |
Seems like a very smart solution |
@glossner, I was planning on leaving the default as is, so that backwards compatibility is not a problem. Also, adding the interruptions will cause a lot of NaN values, that I don't think most people would want. If there are no additional requests/issues pointed out I will get started on this in the next week or two and keep you posted. Thanks. |
@Stryder-Git the point about NaNs makes sense. Thanks. |
@rsheftel, For the past weeks to months, travis kept failing with the python 3.7 build. Python 3.7 is getting relatively old and exchange_calendars is advancing its minimum python version from 3.7 to 3.8 in version 4.0. So we will have to drop 3.7 anyway and then we should also add python 3.10 to the the travis build configuration. Unless you disagree or would like to do it yourself, should I open a PR for this before starting on the other suggestions in this issue? Thanks. |
This is released in v4.0 PR #210 |
@rsheftel, @glossner
This is my proposal for handling the interruptions marked as "NOT IMPLEMENTED" in NYSEExchangeCalendar.
Considering that these kind of "breaks" don't neatly fit into regular_market_times and/or the schedule, and that not everyone will care about them. I thought this would be a good way of optionally allowing access to the interruptions data.
The code for the 'MyCalendar' class is in this gist. There you will see the way such a property would be defined.
Demo:
I would integrate this into the MarketCalendar base class. The .schedule method would provide an
interruptions
kwarg that would allow these interruptions to be added to the schedule. Then the default (not adding it) would still return the same output as the current version.Also, it is already possible to add multiple breaks to regular_market_times and to set special times for any of those market_times. When implementing this update, I can clarify and demonstrate this further in the examples notebook.
Other changes I would like to include in this update:
Let me know what you think.
Additional note (mostly as a reminder to myself), offsets should also be allowed in the interruptions property.
(edit) Addtional reminder: #207
The text was updated successfully, but these errors were encountered: