Hello,
a clarification on the metholology used in the nb:
As I understand it the reason why you calculate the holding returns this way:
hold_returns = prices.pct_change(hold_days).shift(-hold_days) is to perform a vectorized backtesting on the same dataset.
Wouldn't have been more appropriate to test the strategy on a test set instead of using the same dataset ?
In that case we should not shift the returns back. Is that correct?