I have a strategy that load up all the stocks in the SP500 on initialization. I then long or short some of them base on certain criteria.
When I backtest, say since 2009, I only get 3 months with trades (6,7,8 - 2010). I am guessing this is because there might be some missing data at some point (I tried with DOW30 and works fine).
What is the best way to deal with this. Is there a way to check if Closes[x] has data or something of the sort?
Cheers,
Phil

Comment