-
Notifications
You must be signed in to change notification settings - Fork 382
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
Allow users to change start_default/end_default in trading_calendars #147
Comments
Thanks for opening this - let me do some digging. |
I second this. Let me add some weight to this. I am using some assets that go as far back as the 1870s. The get_calendar() utility method currently doesn't allow me to set an earlier default date. So I resort to doing something like this:
Having a way to change the default dates from the get_calendar() utility would come in handy. |
Cool to hear you're working with asset data that goes back that far! I think passing an optional start date param via get_calendar makes sense to me, rather than messing with the defaults. @richafrank - what do you think? |
…9_XSHG Added public holidays before 1999 in XSHG.
Related to the issue: quantopian/zipline#2700
As @richafrank mentioned on the issue linked above is the module-level variable
start_default
intrading_calendars\trading_calendar.py
being '1990-01-01'.In my opinion '1990-01-01' seems somewhat arbitrary. As far as my understanding goes, the only reason it is '1990-01-01' and not earlier is to avoid caches to take up too much memory.
Disadvantages of this approach:
Possible solutions off the top of my head:
start_default
andend_default
, this is consistent with how PrecomputedTradingCalendar behavesstart_default
andend_default
(e.g. storestart_default
andend_default
in a mutable container than give access to end-user).The text was updated successfully, but these errors were encountered: