Backtesting
Backtesting is the process of running a trading strategy against historical price data to evaluate its performance. The output is a performance summary (return, win rate, drawdown, Sharpe) and a trade-by-trade log.
What backtesting tells you
- Whether the strategy has any edge at all (profit factor > 1.0)
- How it behaves in different market regimes (uptrend, range, crash)
- The realistic drawdown to expect
- Whether the parameters are robust or curve-fit to one specific period
Pitfalls
- Overfitting — tuning parameters until the backtest looks great. The strategy then fails on live data.
- Look-ahead bias — accidentally using data that wouldn't have been available in real time.
- Survivorship bias — testing on assets that exist today; ignoring delisted ones.
- No costs modelled — leaving out spreads, slippage, swaps, and commissions.
Walk-forward analysis
Train on data from 2020–2022, test on 2023, advance a year, repeat. Walk-forward is harder to fool than a single in-sample optimisation.
PineForge backtests every strategy on real OHLC data with realistic spreads. See our backtest engine.
Related Terms
Walk-Forward Analysis
Walk-forward analysis tests a strategy by optimising on one window and testing on the next — repeated rolling forward through history.
Overfitting
Overfitting is when a strategy is tuned so tightly to historical data that it fails on live markets. The #1 killer of backtested strategies.
Sharpe Ratio
The Sharpe ratio measures excess return per unit of volatility — the most-cited risk-adjusted performance metric in finance.
Profit Factor
Profit factor is gross winning trades divided by gross losing trades — a quick test of whether a strategy has any edge at all.
Stop Reading. Start Trading.
PineForge backtests every concept on this site against real market data.
Try It Free