Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
ValueError: cannot convert float NaN to integer

What went wrong on line 56? The backtest starts and stops after like a month, resulting in this error.
How do I fix the error?

1 response

TSLA doesn't trade until 2010, so if you've turned off date checking you're going to get some NaNs when it tries to calculate percentiles and volatility of nothing.