Method
How to backtest a trading strategy (manually)
9 min read · by the GetBacktest team
Backtesting answers a single question: “if I had applied these rules in the past, what would have happened?” Done well, a backtest turns a hunch into a measured decision. Done badly, it manufactures false confidence that costs real money. This guide describes manual backtesting — replaying history bar by bar, as if you didn't know what comes next.
1. Write testable rules
A backtestable strategy is a set of unambiguous rules: entry conditions, stop placement, target, position size and exit. If two people reading your rules wouldn't take the same trade, they aren't precise enough.
Also note what you do NOT trade (session, trend and volatility filters). An edge often comes as much from what you avoid as from what you take.
2. Replay the market bar by bar (anti-look-ahead)
The number-one trap is look-ahead bias: deciding with information that didn't exist yet at the time of the trade. You think you see a great signal… because you already know the next candle.
The fix is bar-replay: the chart is frozen, you advance one candle at a time and decide only on what's visible. On GetBacktest, history is hidden server-side — cheating is impossible, even by accident. Tick mode moves price inside each candle for a realistic replay.
3. A sufficient sample + realistic execution
Ten trades prove nothing. Aim for a large sample (ideally 100+ trades) across several market regimes (trend, range, high and low volatility).
Model real costs: spread, commissions, and the fact that a market order isn't always filled at the displayed price. A strategy that's profitable “dry” can turn losing once frictions are included.
4. Measure robustness, not just PnL
Final PnL doesn't tell you whether your edge is real or down to luck. Look at expectancy per trade, profit factor, max drawdown, and above all robustness tests: Monte-Carlo (risk of ruin), walk-forward (in-sample vs out-of-sample) and the deflated Sharpe.
These answer the real question: would my performance survive a different future, or is it just overfitting? That's the core of what GetBacktest measures.
Don't believe it — prove it
Backtest this concept on real data, tick by tick, and get a robustness verdict. 7 days of Pro free, no card.
Start for freeFrequently asked questions
How many trades for a reliable backtest?
The more the better. Below ~30 trades it's all noise. Aim for 100+ across various market conditions, and confirm with Monte-Carlo and walk-forward.
Manual or automated backtest?
Manual (bar-replay) is ideal for discretionary strategies and for learning: you feel every decision. Automated tests faster but reproduces your biases if rules are fuzzy. Both need anti-look-ahead protection.
Does a good backtest guarantee live profits?
No. It raises the odds your edge is real and shows its risk (drawdown, risk of ruin). Live adds execution and psychology — which is why practicing without risking capital matters.
Read next