-
Notifications
You must be signed in to change notification settings - Fork 74
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
ValueError:cannot convert float NaN to integer #18
Comments
Thanks, @tys203831 Can you please provide a sample csv file that you were using for this? |
Hello @tys203831 have you resolved this issue ? as I am facing a similar problem in my project. It would be very helpful if you can guide me thanks |
Related to #23 |
Is there a way to fix this @ChillarAnand? |
I am not able to reproduce the issue. @Prasanna28Devadiga If someone can share sample data to reproduce this issue, it will be helpful. |
@ChillarAnand Here is a sample data that i was facing the issue with: |
@ChillarAnand were you able to find out what exactly is going wrong/ ways to workaround ? |
Hey guys, I think the issue is from the ATR function, called in the renko_DF function. The reason for the NaNs is because of the ATR for the Malaysian ticker.
Output is 0, when rounded and 0.0594166616598765 So in the renko_DF function, just change Which gives an ATR of 0.1 and the NaN doesnt appear anymore. Alternately, just assign a Also note that you will get NaN's whenever a stock price < 1. I think by simply adding an if/else statement within the function to check if price is > 1 or < 1 and set the rounding to 0 or 1 will help resolve the issue. closes #18 |
@chranga Thanks for submitting detailed report. Would you like to send pull request for the same? |
Below Renko works for AAPL stock tickers but not for Malaysia Exchange such as 0200.KL. It comes out ValueError:cannot convert float NaN to integer although I find no NaN on my OHLC stock price data.
The text was updated successfully, but these errors were encountered: