Could you explain this line of code please? I'm having issues on how you calculate the strategy return for the SAR and Stochs strategies on the Python for trading course
(ltm.strategy_return+1).cumprod().plot(figsize=(10,5), label = 'Strategy Returns')
We have already calculated the daily returns and based on that we have computed strategy returns.
To calculate the cumulative strategy returns, we applied the cumulative product (cumprod) function on 1+strategy_return. Then, we plot the cumulative strategy returns using plot function.