-
Notifications
You must be signed in to change notification settings - Fork 184
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
Fixes for traider.get_historical_prices, and tests for several data sources. #637
Conversation
The polygon helper now checks for rows with nans and considers them as missing so it can fetch them. Plus some doc comments
I was converting a tz naive index which was throwing off the dates. localizing is the correct way.
renamed the function to clarify its for display purpose
Also refactored it to separate tests for backtesting data sources vs live datasournces
set_pandas_float_display_precision renamed
fixed comment to describe what its doing
this test simulates what the call to get_yesterday_dividends does
that simulates what the call to get_yesterdays_dividend does
…ests pasa this is a weird one. i think my code is working and my tests work. But the original tests fail. I kinda think i have to fix the test, but i spent time trying to do that and i admit defeat. so im leaving my code commented out.
Korbit doesn't automatically review large (500+ lines changed) pull requests such as this one. If you want me to review anyway, use |
# with NANs in cached polygon data, you can try to enable this code and fix the tests. | ||
|
||
# # Find any dates with nan values in the df_all DataFrame | ||
# missing_dates += df_all[df_all.isnull().all(axis=1)].index.date.tolist() |
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.
I believe this is the line that doesn't work for you. Completely missing dates are not guarenteed to have an all-empty entry in the DataFrame. This commented out section can be fully removed.
Fixes a bug where I wasn't correctly converting a naive datetime to a tz aware datetime. Also adds a of tests for get_historical_prices. And bumps version of lumiwealth-tradier.
Note
I'm currently writing a description for your pull request. I should be done shortly (<1 minute). Please don't edit the description field until I'm finished, or we may overwrite each other. If I find nothing to write about, I'll delete this message.