Most traders learn what their strategy is worth the expensive way: by trading it live. A few weeks, a few losses, a blown evaluation, and only then the question "did this ever work?"
Backtesting asks that question first. You take a clearly written strategy, apply it to past price data, and count what would have happened. It costs time instead of money. This article explains why that trade is worth making, what a backtest can and cannot tell you, the mistakes that make results lie, and a simple way to start tonight.
What a backtest actually is
A backtest is an experiment. The hypothesis is "this setup, with these rules for entry, stop and exit, makes money over many trades." The data is past candles. The result is a set of numbers: win rate, average win and loss, profit factor, expectancy, maximum drawdown.
There are two ways to run it:
- Automated. You code the rules and a program runs them over years of data in seconds. Fast, but the rules must be fully mechanical, and it hides how the trades feel.
- Manual. You scroll the chart candle by candle with the future hidden, place trades as you would live, and record each one. Slower, but it works for discretionary setups that cannot be coded, and it trains your eye and your execution at the same time.
Both are valid. The one that matters is the one you will actually finish.
Why backtesting matters
1. It replaces opinion with a sample
"This setup works" is a feeling, usually built from the three trades you remember best. A backtest gives you fifty or a hundred trades with the same rules, and the memory bias disappears. A setup you loved can turn out to be breakeven. A setup you ignored can turn out to be your best.
2. It shows you the shape of losing, before you live it
Every strategy with a real edge still has losing streaks. A backtest shows you how long they last and how deep the drawdown goes. A trader who has seen "eight losses in a row happens about twice a year" on paper does not panic on loss number five. A trader who has never seen it usually breaks the rules on loss number three, which is where most of the real damage is done. (The cost of those broken rules is easy to measure: see what your trading mistakes cost.)
3. It tells you what size you can afford
Position size is not a feeling either. If the worst drawdown in your sample was 12% at 1% risk per trade, you know what 2% risk would have done to the same account. This matters most for prop firm evaluations, where one daily loss limit or one trailing drawdown breach ends the attempt. A backtest that includes the rules of the challenge, daily loss, maximum drawdown and profit target, tells you how often the strategy would have passed and how often it would have been disqualified on the way.
4. It builds the confidence to follow your rules
The most common reason a good strategy fails is not the strategy. It is that the trader abandons it after a normal drawdown, then returns to it after the recovery has already happened. Confidence that comes from a tested sample is different from hope: it survives the losing week.
5. It is cheap
A failed backtest costs an afternoon. A failed live strategy costs capital, a fee for a new evaluation, and weeks of your confidence. If the plan is going to fail, you want it to fail in the cheapest place available.
What a backtest cannot tell you
A backtest is evidence, not a promise. It cannot tell you whether the market will behave like the past, and it will not make you comfortable pulling the trigger on a bad day. It also does not capture emotion: you will behave better in a backtest than you do live, because nothing is at stake. That gap is real and measurable, and we come back to it below.
The mistakes that make a backtest lie
A backtest that looks too good usually is. These are the usual causes.
Too few trades. Twenty trades prove nothing. A fair coin can easily produce a 70% "win rate" in twenty flips. Aim for at least 100 trades per setup, spread over different market conditions: trending, ranging, quiet and volatile. If a setup only appears twice a month, a longer period is the only way to get the sample.
Look-ahead bias. You use information that was not available at the moment of the trade: a candle that had not closed yet, a level you only see in hindsight, an indicator that repaints. Manual backtesting with the future hidden is the cure, because you cannot see what you should not know.
Overfitting (curve fitting). You adjust the rules until the past looks perfect: this exact moving average length, this exact time window, this exact stop distance. The more parameters you tune, the more you fit noise instead of an edge. A good test is robustness: if changing a setting by a small amount destroys the result, you found a coincidence.
Ignoring costs. Spread, slippage and commission are small per trade and large over a hundred trades. A scalping strategy that makes 0.8 R gross can be flat after costs. Always include them, and use pessimistic numbers.
Perfect fills. Backtests assume your limit order filled at the exact price and your stop exited at the exact price. In fast markets neither is true. Count the trades that only worked because of a perfect fill as suspicious.
Cherry-picking the period. Testing only the last three months of a bull market tells you how the strategy does in a bull market. Test across different regimes, and look at the worst stretch, not only the best.
Trading the backtest differently from the plan. If you skip trades in the test that you "would never have taken", you have tested a different strategy from the one you will trade. Record every trade the rules allow.
The numbers to read in the results
Do not stop at the win rate. A 40% win rate with an average winner of 2.5 times the average loser is a very good strategy; a 70% win rate with small winners and large losers can lose money. Read these together:
- Expectancy: the average result per trade, in R. Positive after costs is the first requirement.
- Profit factor: gross profit divided by gross loss. Above 1 means profitable; the closer to 1, the thinner the margin for costs and error.
- Maximum drawdown: the deepest fall from a peak. This decides the size you can trade without risking the account.
- Longest losing streak: what you will have to sit through.
- Results by hour, day or session: often a setup only works in one window, and the rest is noise that drags the average down.
If these terms are new, win rate, profit factor, expectancy and R-multiple explains each with examples.
A simple way to start tonight
- Write the setup in one page. Entry trigger, stop, target or exit rule, the markets and sessions you trade, the risk per trade. If you cannot write it down, you cannot test it. (See how to build a trading playbook.)
- Pick a sample window. A period of past data with different conditions, ideally including a bad stretch for your style.
- Hide the future. Step through candle by candle. Decide before you reveal the next one.
- Log every trade. Entry, stop, exit, result in R, and a short note, including trades where you hesitated.
- Include costs. Spread, slippage, commission, on every trade.
- Stop at 100 trades, then read the numbers above. Resist "adjusting" after 30.
- Forward test on a small size. Trade the setup live, or on a demo account, with the smallest size that still feels real. Compare the live numbers with the backtest.
That last step is where most of the learning is. The distance between the backtest and the live results is almost always execution: late entries, moved stops, skipped trades, early exits. That gap is the single most useful number a trader can know about themselves, and it can be tightened, because it is made of habits.
Backtest vs forward test vs journal
These three are not alternatives. They answer different questions.
The backtest gives you the expected numbers. The journal gives you the actual numbers. The difference between the two is what execution costs you.
How this works in SetupBook
SetupBook is a trading journal first: you log trades or sync them from MetaTrader, cTrader, Oanda or an exchange, and see win rate, profit factor, expectancy, drawdown and the cost of every mistake, from what you actually did. That is the "actual" half of the comparison above, and it is free, with no card.
On top of it, Backtest sessions let you practise a setup on past candles with the future hidden. A new session takes a symbol, a start date, a timeframe, a starting balance, the risk per trade and the costs: spread, slippage and commission. You step bar by bar, place market, limit, stop and stop-limit orders, move the stop and the target, and close half or all. Three options help with the problems above:
- Setup ties the session to a setup in your playbook, so the session's expectancy is shown next to the same setup's expectancy in your real journal. The gap is usually what execution costs.
- Play by prop firm rules applies a daily loss limit, maximum drawdown, profit target and minimum trading days, and stops new orders when a limit is broken.
- Blind mode picks a symbol and a moment at random and hides both until you press Reveal, so you cannot recognise the day and cheat without meaning to.
Trades you step back on are marked Rewound, because they were made with hindsight, and can be left out of the stats. Practice trades stay in their session: they never mix into your real journal, dashboard or analytics. Each practice trade can be reviewed like a real one, with setup, mistakes, emotion, checklist and a note. For markets where SetupBook cannot find candles itself, you can upload your own 1-minute candles.
Backtest sessions and trade replay are part of Pro; the journal, sync, analysis and PDF reports are free on every plan. Create your free account to start the journal, log the live half of your numbers, and add Pro when you want to practise the setup on past candles.
Frequently asked questions
Is backtesting worth it, or is it a waste of time?
It is worth it if it changes a decision: whether to trade a setup, at what size, or in which session. A backtest that you never compare with live results, or one overfitted until it looks perfect, is a waste of time. A simple, honest test of 100 trades usually pays for itself the first time it stops you from trading a setup that does not work.
How many trades do I need for a backtest to be valid?
At least 100 trades per setup is a practical minimum, and more is better. Fewer than about 30 is mostly noise. What matters as much as the count is variety: trending and ranging periods, quiet and volatile ones.
Is manual backtesting as good as automated backtesting?
They answer slightly different questions. Automated testing is faster and covers more data, but only works for fully mechanical rules. Manual testing handles discretionary setups, trains execution and avoids look-ahead bias when the future is hidden. Many traders do both: coded test for the mechanical part, manual practice for the judgement.
Why does my backtest make money but my live account does not?
Usual causes are costs you did not include, perfect fills, overfitting, a sample that was too small, and behaviour: skipped trades, moved stops, early exits. Track your live trades by setup and mistake tag and compare them with the backtest, trade for trade. The difference shows which of these it is.
What is the difference between backtesting and paper trading?
A backtest runs on past data, so you can test hundreds of trades in days. Paper trading runs in real time on a demo account, so it takes as long as the market takes, but it tests live conditions such as spread changes and your own timing. Use the backtest to find an edge and a small paper or live size to confirm it.
Can I backtest a strategy for a prop firm challenge?
Yes, and you should include the challenge's rules in the test: daily loss limit, maximum or trailing drawdown, profit target and minimum trading days. A strategy that is profitable overall can still fail a challenge if its drawdown profile breaks one of those limits.