Mean reversion strategy code -cumsum of arithmetic returns

Cell 10 in notebook "mean reverstion code" has this code

#pnl on a unit capital is really just the daily returns
df['prices_difference']= df.prices - df.prices.shift(1)
df['daily_returns'] = df.prices_difference /df.prices.shift(1)
df['pnl'] = df.positions.shift(1) * df.daily_returns
df['cumpnl'] = df.pnl.cumsum()


This is wrong ...arithmetic returns  are not addictive, log returns are.. df['cumpnl'] = df.pnl.cumsum() should be df['cumpnl'] = (1+df['pnl']).cumprod()

Hi Ricardo,



Thank you for pointing it out. We will make the required changes and update it as soon as possible. 

Hi Ricardo,



We made the required changes in the notebooks and videos across the course. Once again, thank you for your feedback.