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
Speed up execution suggestion. #3
Comments
That's a great idea @a904guy! In addition to this, I am also going to add a local static JSON/CSV containing all the tickers to verify the Tickers because api calls could be time taking. Suggestion by @Denbergvanthijs |
Noticed I had a bug in the function, was calling |
History Caching to speed up Yahoo Financial section.
|
Fixed in #12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cache the calls to Yahoo Finance to speed up execution.
You should replace all the calls to
yf.Ticker(symbol)
with this function:Additionally when using the notebook you can just restart the kernel or run
_symbols = {}
again to clear the caching.Why?
Because every call is being executed when yf.Ticker(symbol) is called, it's a ton of redundant calls to YF especially when your calling the same ticker repeatedly.
Additional possible speedup would to overload the history functions in a similar manner as above as well.
The text was updated successfully, but these errors were encountered: