What a backtest can answer
A backtest can estimate historical trade frequency, win rate, loss rate, expectancy, drawdown, holding time and other characteristics under specified rules.
Its usefulness depends on data quality, realistic assumptions and whether the rules were genuinely known before each simulated decision.
Look-ahead bias
Look-ahead bias occurs when a simulation uses information that would not have been available at the historical decision time.
Examples include entering on a candle's close using an indicator value that required the completed candle before assuming an earlier fill.
Every signal, entry and exit must use only information available at that simulated moment.
Fees, spread, slippage and funding
Real trading has friction. Depending on the strategy, simulations may need to account for commissions, bid-ask spread, slippage and perpetual-futures funding.
Ignoring costs is especially dangerous for high-turnover strategies where small costs accumulate repeatedly.
Survivorship and selection bias
Testing only assets that survived or became successful can overstate historical results.
Selecting a coin, period or parameter because it already produced attractive results also introduces selection bias.
Overfitting
A strategy can be tuned so closely to historical noise that it performs exceptionally in-sample but fails on new data.
More parameters and repeated optimization increase the opportunity to fit randomness.
Out-of-sample testing
One approach is to develop rules on one portion of data and evaluate them on a later period that was not used to choose the rules.
Walk-forward analysis can repeat this process through time while preserving chronological order.
Intrabar execution matters
If both a stop and target could be reached inside the same candle, OHLC data alone may not reveal which occurred first.
Higher-resolution path data can reduce this ambiguity, although it still needs realistic execution assumptions.
Key takeaways
- Backtesting evaluates predefined rules on historical data.
- Look-ahead bias must be eliminated.
- Fees, spread, slippage and funding can materially change results.
- Overfitting can create excellent in-sample results that fail later.
- Out-of-sample and chronological testing provide stronger evidence than in-sample optimization alone.
Sources & further reading
This lesson is educational material. Market structure, exchange rules, fees, margin requirements and derivatives mechanics can differ by venue and can change over time. Verify current rules with the venue you use.