Closed
Description
this is how Buy & Hold Return
is calculated:
c = data.Close.values
s.loc['Buy & Hold Return [%]'] = (c[-1] - c[0]) / c[0] * 100 # long-only return
so it's calced use day one and the day last.
Expected Behavior
Buy & Hold Return is used for compare with strategy gain. Therefore, I guess they should started at same time, since the strategy get enough data to work on.
Take cross ma strategy example, use 5 days for short line and 10 days for long line, the strategy can only works from 10th trade day. It's better to make comparision since this day
- Backtesting version: 0.3