Before you risk a single dollar on a trading strategy, you should know how it would have performed in the past. That's what backtesting does — it runs your strategy rules against historical market data to show you the results. But there's a right way and a very wrong way to do it.
What Is Backtesting?
Backtesting simulates your strategy's trades using historical price data. For every bar in the dataset, the engine checks: would my rules have triggered a trade here? If so, what would the entry, exit, and P&L have been?
The result is a performance report: total profit, win rate, maximum drawdown, average trade, and dozens of other metrics that tell you whether the strategy has a real edge.
The Curve Fitting Trap
The #1 mistake in backtesting is curve fitting — optimizing your parameters until the backtest looks perfect. The problem? You've fitted the strategy to past noise, not to a real market pattern. It will fail spectacularly in live trading. This is also where trading psychology comes in — bots don't fall in love with a backtest result the way humans do.
Signs of curve fitting:
- The strategy only works with very specific parameter values
- Small changes to parameters cause dramatic performance swings
- The equity curve looks "too perfect" — no drawdowns, no losing streaks
- The strategy has more parameters than you can logically justify
Out-of-Sample Testing
The antidote to curve fitting is out-of-sample testing. Split your data into two periods: use one for development (in-sample) and the other for validation (out-of-sample). If your strategy performs well on data it's never seen, you likely have a real edge.
A common split: develop on 2018-2023 data, validate on 2024-2026 data. If performance degrades dramatically in the validation period, go back to the drawing board.
Key Metrics to Evaluate
- Net Profit — Total earnings after all trades. But don't stop here.
- Maximum Drawdown — The largest peak-to-trough decline. This tells you how much pain you'll endure. Pair this with solid risk management to protect your capital.
- Profit Factor — Gross profit / gross loss. Above 1.5 is good, above 2.0 is excellent.
- Win Rate — Percentage of winning trades. High win rate with small losses is ideal.
- Average Trade — Net profit divided by total trades. Must be large enough to cover commissions and slippage.
- Sharpe Ratio — Risk-adjusted return. Above 1.0 is acceptable, above 2.0 is excellent.
Accounting for Slippage and Commissions
Always include realistic slippage (1-2 ticks per trade) and commissions in your backtests. A strategy that looks profitable with zero costs often becomes a loser when you add real-world execution costs.
How HEXGO Validates Strategies
Every HEXGO algorithm undergoes rigorous backtesting across 6+ years of data with walk-forward optimization. We test across multiple market regimes — bull markets, bear markets, high volatility, low volatility — to ensure robustness. Our performance page shows real, verified results — not cherry-picked backtests.



