# Backtesting with a walkforward approach

I am setting up a backtesting using a walkforward optimization model to find out if a trading strategy performs well or not and I would like to clarify some doubts:

First of all what is the correct width of the window (training + testing period) to consider (is there any standard or empirical method to find it out) ?

What should the portion of the window to reserve for training and the one for testing (80%/20% , 50%/50%) ?

Is it correct that the window shift period should be equal to the length of the testing period?

|--------------------------------------------------|   <--- available time series data
|----------|-----|     <--- time window
|----------|-----|
^        ^         ^
|        |         testing data
|        training data
window shift period


For each training data set the strategy will be optimized based on certain parameters. Then the optimized strategy will be used on the corresponding testing data set.

This approach could potentially produce different set of optimized parameters values for each time window.

So what is the best indicator or method to find out if a strategy performed well and what is the best way to choose the parameter values among the ones resulting from the various time window optimization ?

• Ah I see what you mean by walk forward now, that makes sense. But the last sentence you mention- pick the strategy that maximises pnl. This could very well be a working strategy, or it could be that you have cherrypicked the strategy that performed best during the backtest. It is crucial that you can distinguish between these two. – Hamish Gibson May 4 at 16:24