Calculation of daily market returns looks off

Im looking at the long/short portfolio in the mean reverting strategies, and the following formulla is given for computing the spx daily returns:



daily_stock_returns = np.log(spx/spx.shift(1))

daily_market_returns = np.sum(daily_stock_returns,axis=1)/500



This seems to ignore the underlying weight in the index before calculating returns, since most indices are not price weighted. I guess this is for simplifications purposes, but there was no mention of it and it's a pretty big detail. Can you clarify?





 

Hi Feras,



Thanks for raising this.



Yes, you are right, we have used equal weighted SPX index in the strategy. We will add a note about this in the IPython notebook



Thanks!

Ishan