Strategy

Backtesting Your Strategy: The Complete No-BS Guide for Retail Traders

AR
by Alex Rivera
13 min readApr 3, 2026
X / Twitter LinkedIn

What backtesting actually tests (and what it doesn't)

A backtest answers one question: would this exact set of rules, applied to this historical data, have produced a profit? It does not answer: will it work in the future? The gap between those two questions is where most traders get hurt.

Backtesting is a necessary but not sufficient condition for a viable strategy. A strategy that cannot pass a rigorous backtest almost certainly will not work live. But a strategy that passes a backtest is not guaranteed to work live either — especially if the backtest was not conducted honestly.

Survivorship bias

Most historical stock databases exclude companies that went bankrupt or were delisted. If you backtest a long-only equity strategy on today's S&P 500 constituents using historical data, your universe is filled with survivors — companies that performed well enough to remain in the index. This inflates your backtest results systematically.

The cardinal sins of backtesting

Sin 1: Look-ahead bias

Your backtest uses information that would not have been available at the time of the trade. Example: using the closing price of a candle to generate a signal and then executing at that same closing price. In reality, you can only act after the candle closes — by which point the next candle has already opened.

Sin 2: Over-optimisation (curve-fitting)

You run your backtest hundreds of times, tweaking parameters until the equity curve looks perfect. The result is a strategy that has been reverse-engineered to fit historical noise, not one that captures a real, persistent edge. The tell-tale sign: performance collapses on any data outside the optimisation window.

Sin 3: Ignoring transaction costs

A strategy that shows a 30% annual return before costs might show 5% after realistic commissions, slippage, and financing charges. Always include conservative estimates for all transaction costs before drawing any conclusions.

Sin 4: Too-short a test period

Testing on 6 months of data tells you almost nothing. The minimum for any strategy is 2–3 full market cycles (roughly 5–10 years for most markets), including at least one significant bear market or major volatility event.

The walk-forward protocol

Walk-forward testing is the closest thing to a reliable backtest. Instead of optimising over your full dataset and testing on the same data, you split the data into sequential segments and alternate between in-sample optimisation and out-of-sample testing.

Walk-forward protocol:
1. Data: Jan 2015 – Dec 2024 (10 years)
2. Split: 70% in-sample (Jan 2015 – Jun 2022), 30% out-of-sample (Jul 2022 – Dec 2024)
3. Optimise on in-sample period
4. Test on out-of-sample period WITHOUT any further adjustments
5. If performance is acceptable on out-of-sample, proceed to paper trading
6. Any further optimisation restarts the process

The honest question

Before you submit a backtest result as evidence of an edge, ask: did I look at the out-of-sample results before finalising my parameters? If yes, those results are no longer truly out-of-sample — your choices were influenced by them, even unconsciously.

Frequently Asked Questions

Found this helpful? Share it.

X / Twitter LinkedIn

Written by

AR

Alex Rivera

Alex is a systematic trader and writer with 10+ years of experience building rules-based strategies across equities and futures. He specialises in process-driven trading and risk management.

Free trading journal

Track every trade. Find your edge.

Join 14,000+ traders using SuperTrader's AI-powered journal to spot patterns, cut losses, and grow consistently.

Start free

No credit card required

Related Articles