Course Name: Trading Alphas: Mining, Optimisation, and System Design, Section No: 6, Unit No: 9, Unit type: Notebook
For the codes under section “Comparison with the Benchmark”
ax = backtest.cumsum().plot(figsize=[15, 7], fontsize=15, label=‘Chart Pattern Returns’)
((((spy.Close.pct_change()+1).cumprod())-1)/16).plot(label=‘SPY Returns’)
I’ve 2 questions.
- Why need to divided by 16?
- Since the backtest use cumsum(), should the benchmark also be calculated using cumsum() as well?
i.e. spy.Close.pct_change.cumsum().plot(label=‘SPY Returns’)