Skip to content

Fixed two dividend related issues #602

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

Merged
merged 3 commits into from
Mar 13, 2019
Merged

Fixed two dividend related issues #602

merged 3 commits into from
Mar 13, 2019

Conversation

peijiche
Copy link
Contributor

-Issue 1: DataReader(symbol, 'yahoo-dividends', start, end) will have divided by zero error for some dividend stocks like "NTR".

Root cause: when the stock has event like "1/0 Stock Split", it will fail.

The fix: do numerator check first before evaluating the split ratio. In the above case, it should be Splitratio=1

-Issue 2: fixed a bug that failed dividend/split test case of "def test_yahoo_DataReader(self)" in tests/test_yahoo.py.

@addisonlynch
Copy link
Contributor

Can you please add relevant tests for this issue? Thanks!

@peijiche
Copy link
Contributor Author

peijiche commented Dec 31, 2018 via email

@peijiche
Copy link
Contributor Author

added one test case for symbol NTR. It was failed before with divided by zero error.

@addisonlynch
Copy link
Contributor

@peijiche perfect...I should have been more specific, but that's exactly what I was referring to. Thank you and happy new year!

cc @bashtage

@peijiche
Copy link
Contributor Author

peijiche commented Dec 31, 2018 via email

@bashtage bashtage merged commit 7522f75 into pydata:master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants