A simple explanation of walk-forward testing, out-of-sample testing, and why traders use them to check whether a strategy is genuinely robust or just fitted to historical data.
Walk-Forward is one of the classic methods of robustness testing. While, like everything else in the field, it may appear as overly complicated, it actually answers a very simple question: Is the strategy robust, or does the backtest generate profit only for this specific data set and range?
First: What Is In-Sample Data?
The historical data you used while working on building your strategy.
Let me explain.
You come up with a trading idea. You come up with indicators, variables, and values. You select values of what you believe are reasonable because you looked at the chart and they seemed to make sense. The historical data that you observed is In-Sample data.
If you wrote an algo, ran backtests, and made any changes, that means you used that historical data for strategy development, which means that historical data is In-Sample data. Basically, all of the historical data that was ever used to create and tweak the strategy is In-Sample data.
What Is Out-of-Sample Testing?
Backtesting on the data you haven’t used for strategy development.
Lets say your In-Sample data covered 2016-2025 historical data of X instrument, in, lets say, Forex market. You wrote the strategy according to the behavior of that X instrument and tested it on 10 years of data, observed and tweaked according to that data. Meaning the strategy is built around that specific data set of 10 years and X instrument in Y market.
OOS testing tells whether the strategy works if it is put outside of that comfort zone.
OOS data is basically any data that was not used in the strategy development.
Sometimes, on more thorough quantitative analysis, you might come across a specific combination of values that look exceptionally good. One combination may produce an amazing equity curve simply because it happened to line up perfectly with that historical period. OOS helps to define whether it was noise that happened to generate profit on this very specific set of historical data and those specific values of each variable or it’s an actual edge worth further attention.
Walk-Forward vs Out-of-Sample Testing
The easiest way to remember the difference is:
Out-of-sample testing is one unseen test.
Walk-forward testing is a sequence of unseen tests. You take few years of data, you tweak against that data, you test on unseen (OOS) data. You repeat.
That is really all there is to it.
Full Walk-Forward over simple OOS is useful when the strategy is expected to have changes/tweaks once in a while. It can tell how sensitive the strategy is to those changes.
I hope this helped.
Email me with any questions: info@sundownquant.com


