Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help With Nans

Hi
How do I drop or reconcile the Nans in the data set so that I can run a back test

1 response

I recommend filtering your base universe by changing:

universe = QTradableStocksUS()

to

universe = QTradableStocksUS() & value.notull() & quality.notnull()

If you're still running into NaN's, you can also use the resulting DataFrame outputted by the pipeline and call dropna() to drop rows with NaN values.