I've spent quite a bit of time researching this on the forum but have yet to find a clear cut answer. The solutions seem to break down as follows:
- Remove any offending rows - this removes 'good data' for other stocks on that day
- Remove any offending stocks - getting rid of an entire stock seems drastic
- Mark as zero - this would screw up any factors calculated on that window
- Forward fill - might not that be representative
- Refill
NaNvalues with the mean, e.g..apply(lambda x: x.fillna(x.mean()),axis=0)- best I've seen...?
Is there a Quantopian recommended way to deal with NaN values in price data?