-
Notifications
You must be signed in to change notification settings - Fork 142
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
Fix #49, #140, #142, #144, #145 and index for wk/mo intervals #141
Conversation
Fixes dpguthrie#140 by forcing index for a single daily price to 'object' dtype.
Fixes `ZeroDivisionError` being raised when yahoo split data has 'denominator' as 0. Represents this circumstance with a `float('inf')` value in the splits column (as behavior prior to v2.3).
Changes dtype of index of DataFrame returned by `Ticker.history` when interval is in terms of weeks or months. Changes dtype from tz-aware 'datetime64' to 'object' that represents dates and live indice in the same manner as for a daily interval. This behaviour should have been implemented in dpguthrie#129.
Hi @dpguthrie, I've added another couple of commits to fix things that have cropped up. They are both simple one-line changes. The first offers a way to resolve #144. The second relates to an oversight on my part that should have been implemented in #129 (sorry!). When the interval is weekly or monthly the price data should be indexed on the same basis as for daily data, although it's currently indexing as if it were intraday data, with ugly tz-aware pd.Timestamps. |
FutureWarning
Fixes dpguthrie#49 and at least part fixes dpguthrie#142 .
Fixes a v2.3 bug due to wrongly assuming that `pd.Timestamp.fromtimestamp` converts based on UTC by default (actually converts based on system time).
...one more, final, commit (Fix 142) to resolve a bug that came to light in #142 (detail there and on commit message). Collectively this PR now resolves bugs and oversights with the v2.3 changes together with fixing a preexisting bug in All tests passing locally. |
Fixes dpguthrie#145 by accounting for possibility that yahoo does not hold data for last trade time. In this unusual case last row will be indexed as if session is closed (it may be, it may not be).
Crumbs, another commit (Fix 145). This fixes a bug for edge cases where yahoo does not have last trade data for a symbol, as raised in #145. Also, I've offered an extension to the Still passing all tests locally. |
@maread99 You're a machine! Can't thank you enough for your contributions to this project! I'll get this merged in and cut another release here shortly. |
No worries @dpguthrie, most of the commits concerned bugs / oversights introduced in #129 so I felt responsible for fixing! Also, if you're looking to assign anyone as a collaborator to help out with maintenance I'd be more than happy to. I maintain a couple of my own libraries (including market-prices which depends on Cheers |
Fixes #140 by forcing index for a single daily price to 'object' dtype.