Backtest
Replaying a strategy's rules on historical data to measure its result before risking capital. It only means something if the rules can be written down without discretion.
Definition
A backtest replays a strategy’s rules on historical data: for every past signal you reconstruct the entry, stop, take profit and exit, then add up the results. It is not a forecast — it is a measurement of how the rules behaved on a specific market over a specific period. Without written rules there is no backtest: if a signal needs an “eye” to judge, there is nothing that can be repeated on data.
How it works
A backtest answers three questions: what the win rate is, what the average risk-to-reward ratio is, and how deep the worst equity drawdown was. Those three numbers give the expected value per trade, expectancy, and that decides whether a strategy makes sense. Costs must be included — the spread, commissions, slippage — because a strategy making 0.3R per trade often drops to zero once costs are subtracted. Results should also be split by year and by market: a strategy that only works in one volatility regime is an artefact, not a strategy.
Example
One hundred trades, a 40% win rate, a 2.5:1 risk-to-reward ratio, 500 PLN of risk per trade. Expected value is 0.4 × 2.5 − 0.6 × 1 = 0.4R per trade. One hundred trades therefore give 40R, that is 40 × 500 = 20,000 PLN. The same win rate at R = 1.5 gives 0.4 × 1.5 − 0.6 = 0R: the strategy stops making money even though you win 4 trades out of 10. The conclusion: win rate alone says nothing without R.
In practice
Run it on data you did not look at while writing the rules: splitting into a test period and a validation period protects against fitting the strategy to the past. Log every trade with its date, entry price, stop and exit reason — otherwise after fifty trades you cannot tell a rules error from an execution error. A backtest on 30 trades is an anecdote, not evidence; a meaningful sample is hundreds of trades or several years of data.
Anti-example / common mistake
The mistake is turning the parameters (stop, TP, filter) until the past chart looks good — that is fitting noise, which does not work in the future. A second: ignoring costs and slippage, which inflates the result of high-frequency strategies by several percent of capital a year. A third: a backtest on one instrument in one trend, after which the strategy is moved to a ranging market without checking how it behaves in both regimes.
Related lessons
Structure sources
Materials behind this definition — documentary sources, not recommendations.
- Investopedia — Backtesting — investopedia.com
- GPW — Warsaw Stock Exchange — gpw.pl