What is a backtest?
A backtest is a simulation that replays a trading strategy's rules against historical market data, bar by bar, to measure how the strategy would have performed. It produces an equity curve and statistics such as total return, maximum drawdown, and win rate, and it is the first gate every strategy should pass before touching real money.
The word to hold on to is evidence. A backtest cannot prove a strategy will work, because the future is not obliged to resemble the past. What it can do is disprove: a strategy that cannot survive history has no business trading the present.
What happens during a backtest?
The simulator walks through history one bar at a time, showing the strategy only what it would have known at that moment. When the rules fire, the simulator opens or closes a simulated position, charges fees and slippage, and updates the account balance. By the end, every decision the rules would have made has been recorded as a trade list and an equity curve.
That discipline about time is the whole trick. The moment a backtest lets the strategy peek at data that had not happened yet, the results stop describing trading and start describing fortune telling.
What does a trustworthy backtest include?
Realistic costs come first: trading fees, the spread, slippage on every fill, and funding payments if the market is a leveraged one. Ignoring costs is the single most common way a losing strategy is made to look like a winner.
It also needs enough data to matter. A few dozen trades tell you almost nothing; a few hundred begin to. The test period should span different market conditions, because a strategy tested only on a rising market has only been tested on half the question.
How do backtests lie?
Three failure modes account for most false confidence. Overfitting: the rules were tuned until they memorized the past. Lookahead bias: the simulation used information before it existed, such as acting on a bar's close in the middle of that bar. Survivorship bias: the data only contains assets that survived, so the strategy never met the ones that went to zero.
The common thread is that all three inflate results silently. A backtest that looks too good is not a lottery ticket; it is a bug report.
Backtesting on Horizon
On Horizon you describe a strategy in plain English, and the platform builds and backtests it against real historical data with costs modeled. The report shows the equity curve, drawdowns, and the full trade list, so the next step, paper trading or a live deployment, is a decision you make with evidence in hand.
Frequently asked questions
- How much historical data does a backtest need?
- Enough to produce a few hundred trades across different market conditions. For a daily strategy that can mean five or more years; for an intraday strategy, months can suffice. Trade count and regime variety matter more than calendar length.
- Does a good backtest guarantee future profits?
- No. A backtest shows how rules behaved in the past, and markets change. Treat a strong backtest as permission to test further with paper trading, not as a promise of returns.
- What is the difference between a backtest and paper trading?
- A backtest replays history at high speed; paper trading runs the same rules forward on live prices without real money. Backtesting covers years in minutes, while paper trading checks behavior in current conditions. A strategy should pass both before going live.
- Which backtest metrics should I look at first?
- Maximum drawdown and trade count before anything else, then risk-adjusted return such as the Sharpe ratio. Total return alone is the least informative headline number, because it says nothing about the pain or the luck involved in earning it.
