Benchmark Comparison

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.

  1. Why need to divided by 16?
  2. 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’)

Hi,

We are looking into this and will get back to you.

Thanks.

Hi,

Please find the response as below,

  1. The factor is to align the plots.

  2. cumsum assumes a constant notional and cumprod assumes compounding. Both are correct depending on your investment style and the reality is usually somewhere in the middle. However, cumprod may frequently produce inflated and unrealistic backrest pnls whereas cumsum is usually more conservative.

Thanks