Train/test split to compute performances?

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?

 

Hi Raimondo,



We are shifting the hold returns back by the holding period to evaluate the strategy returns, which is done by multiplying the position taken by the hold returns for that holding period. Now, there can be multiple ways to do this. You can try doing this using the train/train split approach and compare the outcomes for both of them. 



Hope this helps!



Thanks,

Akshay