Ready to go further
Next: price the gap between backtest and live
The largest part of a forward test shortfall is usually execution. Read how slippage is caused, measured and budgeted.
What is included
- What it is, in plain words
- The formula or mechanism, with exact arithmetic
- How it hits grid, martingale and DCA bots
- A check you can run before you switch a bot on
Who it is for
- People who run or plan to run a trading bot
- Anyone reading a backtest or a bot sales page
- Readers who want the numbers, not the pitch
- Not advice, and not a signal service
Key facts
- Forward testing means running a strategy on new data after its settings are frozen, on a demo account or at very small size, and recording what happens.
- It checks for overfitting, look-ahead bias and survivorship bias at once, because none of them can fit data that did not exist when the settings were chosen.
- With a true win rate of 50 percent, 30 trades can show anything from 33.3% to 66.7%; 1,000 trades narrow that to 46.9% to 53.1% (calculated by us on 27 Oct 2026, exact).
- Forward results are usually worse than backtests because of spread, slippage and fill differences. That gap is the finding, not a failure of the test.
- It does not prove future profit. It shows that the result was not an artefact of how the test was run.
What forward testing is
A backtest replays the past with the settings you chose after seeing it. A forward test runs the same frozen settings on data that arrives afterwards. Nobody, including you, knows what that data will do. If the bot still behaves like the backtest, the backtest was probably describing something real. If it does not, the backtest was probably describing noise.
There are three common ways to do it:
- Demo or paper account. Real prices, simulated fills. Free, but fills can be more generous than real ones.
- Live at minimum size. Real fills, real spread, real slippage, with a loss you have decided in advance you can accept.
- Held-out recent data. Lock away the latest months before tuning, and run on them once. This is quick, but you only get one look.
What it proves and what it does not
A forward test can show that the logic runs as designed, that the signals match the backtest, that the costs are about what you assumed, and that the result has not fallen apart on fresh data. It cannot show how the bot behaves in a market it has not met. A grid bot forward tested through three calm months has said nothing about a one-way trend, and a martingale bot has said nothing about the losing run that has not arrived yet.
How long is long enough
Length is counted in trades, not days. A win rate measured on a few trades is very loose. The table shows how much a strategy with a true 50 percent win rate can wander in a sample. It is the exact binomial range, leaving at most 2.5 percent in each tail, so at least 95 percent of samples fall inside.
| Trades in the forward test | Wins that can occur by chance | Win rate could look like | Share of samples inside |
|---|---|---|---|
| 30 | 10 to 20 | 33.3% to 66.7% | 95.7% |
| 100 | 40 to 60 | 40.0% to 60.0% | 96.5% |
| 300 | 133 to 167 | 44.3% to 55.7% | 95.7% |
| 1,000 | 469 to 531 | 46.9% to 53.1% | 95.4% |
Calculated by us on 27 Oct 2026, exact. After 30 trades a coin flip can print 66.7% and a fair strategy can print 33.3%. At 100 trades the range is still 40.0% to 60.0%. This is why a month of demo results from a bot that trades twice a day (about 60 trades) says very little by itself. A bot that makes 5 trades a day reaches 100 trades in 20 trading days; a bot that makes 5 trades a month needs years.
The win rate is only one number. The same logic applies to average win, average loss and the maximum run of losers, which needs far more trades to show up. The win rate calculator shows how wide your own sample's range is.
What to record
- The frozen settings and the date. Write them down before the test starts. Any change restarts the clock.
- Signal price and fill price for every entry and exit, so slippage can be measured (see slippage).
- Spread at entry and any commission or swap.
- Every trade, including ones the bot skipped or the broker rejected.
- Margin used and the largest floating loss at any time, not only closed profit.
- Anything unusual, such as a news spike, a platform restart, a missed order.
A worked example: backtest versus forward
These numbers are made up to show how the gap usually appears. A strategy is measured in R, where 1R is the amount risked on one trade.
| Per trade, in R | Backtest | Forward test |
|---|---|---|
| Gross edge per trade | 0.30 | 0.28 |
| Spread and commission | -0.06 | -0.08 |
| Slippage | 0.00 | -0.07 |
| Net expectancy per trade | 0.24 | 0.13 |
The gross edge is almost the same: 0.30R against 0.28R. The difference is costs. The backtest assumed a flat spread of 0.06R and no slippage. The forward test paid 0.08R in spread and commission and 0.07R in slippage, so the net edge fell from 0.24R to 0.13R, a drop of 46 percent. The logic held. The execution assumptions did not. That is the usual finding, and it is useful because you can now plan on the lower figure.
Walk-forward testing in one section
Walk-forward testing is forward testing built into the backtest. Split the history into windows. Fit the settings on the first window, then run them untouched on the window after it. Slide both windows forward and repeat. At the end you have a chain of results that were each made on data the fit had not seen.
A made-up layout: ten years of data, a 24-month fitting window and a 6-month test window, moved forward 6 months each time. That gives 16 fit-then-test cycles, and the equity curve is built only from the 16 test windows. If the stitched test curve looks like the fitted one, the method holds. If it falls apart, the fitted curve was mostly noise.
Walk-forward is much better than a single fit, and it is still not a live forward test. You chose the window sizes, you may have chosen them after seeing the results, and costs are only as realistic as the backtest assumed.
How it fits with bots
- Grid bots: forward test through at least one trending stretch. A calm forward test only shows that the grid works when price stays in the range.
- Martingale and recovery bots: record the deepest step reached and the margin used, not only closed profit. A forward test with no deep step tells you almost nothing about the risk.
- DCA bots: forward testing needs weeks or months to cover even a few buys. Track average entry and drawdown from the peak, not only the current gain.
- EAs from a seller: forward test before trusting a published record. See overfitting for how a record can be fitted.
What it does not tell you
A good forward test is not a promise. It is a sample from one stretch of market, and it only covers the conditions that happened in it. It also costs time, and the longer you wait the more it feels like the answer is already clear. The numbers above are the reminder that it is not.
Keep Going
Related Tools and Guides
Keep exploring
FAQ
Frequently Asked Questions
How long should I forward test a bot?
Count trades, not days. A hundred trades still leaves a wide range for the win rate, and the rarest, worst events need far more. Pick the number of trades before you start, and also make sure the test covers more than one kind of market.
Is a demo account enough?
It is a good first step because it uses real prices and costs nothing. Fills can be kinder than real ones, so a later live test at minimum size is the only way to see real spread and slippage.
What if the forward test is worse than the backtest?
That is normal, mostly because of spread, slippage and fill differences. Check how big the gap is and why. If the gap is only costs, plan on the lower figure. If the logic itself behaves differently, the backtest probably had a problem.
Can I change the settings during a forward test?
Not without restarting it. Changing settings after seeing results turns the new data into fitting data. Record the change and start counting trades again.
Is walk-forward testing the same as forward testing?
No. Walk-forward is a way of arranging a backtest so each result is made on data the fit had not seen. A live or demo forward test uses data that did not exist when the settings were set.
Are the numbers on this page real?
Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.
Can I use this to decide whether to run a bot?
It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.
Is this financial advice?
No. It describes a testing method in general terms. The ranges are exact arithmetic and the comparison table is made up for illustration.
Know the Risk Before You Run It
Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.
Trading carries a risk of loss