-
Notifications
You must be signed in to change notification settings - Fork 173
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
Cache holidays #117
Cache holidays #117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leonarduschen Thanks for the review. This Dockerfile builds either versions of the package and then runs a small timing script. I got: > docker build . -t mcal_old >/dev/null && docker run -it mcal_old
18.30
> docker build --build-arg NEW="true" . -t mcal_new >/dev/null && docker run -it mcal_new
1.95 My experience is that 90% of the time in |
Awesome. I tried caching the whole This seems like a far superior solution, much cleaner and not much extra memory. |
@leonarduschen I agree. The user could ask for 40-50 years worth of dates, you don't want to be taking the caching decision for them. Holidays, otoh, is not something you expect to be changing. |
Thanks for this. |
@leonarduschen @rsheftel Thank you for allowing me to contribute. I would love to help out in the future. Especially with the quantopian merger. |
@2torus thanks for your work. Maybe a good place to start helping on the merger would be looking at the calendar and code differences and seeing if you can help determine what is the correct calendar days, or help with adding the functionality to trading_calendars to close the gap. |
Addresses #108
Cache holidays computation in order to improve running time of repeated valid_days calls.