I know that there are two ways to do backtesting, sliding window and expanding window.
In practice, which method is better? What are the pros and cons of each method?
In my opinion, I guess if the time series pattern is more related to the current event, then the sliding method is better.
Sliding window as below figure
Expanding window as below figure
Source: https://www.kaggle.com/cworsnup/backtesting-cross-validation-for-timeseries/notebook