A backtest checklist: costs, look-ahead and overfitting
Audit a hypothetical result before trusting its headline return, with a worked cost-sensitivity example.
Write a test specification before evaluating the result
A backtest applies rules to historical data under assumptions about execution and costs. The CFTC warns that hypothetical performance has limitations and that trading-system claims can be misleading. Start an audit with the symbol, data source, period, interval, rule version, initial balance convention and sizing method. Identify whether results are simulated or actual. A polished equity curve does not answer those questions, and no historical simulation guarantees future returns.
Check when each input becomes available
A calculation can accidentally use information that would not have been known at the modeled decision time. For a simple example, imagine a rule that decides at a bar’s open but uses that same bar’s final close. The close is not available at the open. Rewrite the timing or clearly delay the decision; do not merely relabel the report. Record when indicators update, how higher-timeframe data is handled and whether a historical bar contains enough information to support the assumed order sequence.
Hypothetical example: GROSS: $240 / 100 round trips. COST $2 each → NET $40. COST $3 each → NET −$60.
Open full-size diagram ↗Make costs visible with a sensitivity calculation
Consider an invented report of 100 round trips earning 240 USD in total before costs. A uniform assumed cost of 2 USD per round trip leaves 40 USD; a cost of 3 USD leaves −60 USD. The cost threshold that reduces this particular total to zero is 240 ÷ 100 = 2.40 USD per round trip. This arithmetic does not tell you the real cost or whether costs are constant. It shows why the assumptions can dominate a small headline profit.
Separate development from evaluation
Record how many rule variations and parameter combinations you inspected before selecting the displayed result. Choosing the best-looking version from many trials can make historical performance appear stronger than a genuinely untouched evaluation. A practical audit keeps a development log and a separate evaluation period that was not used to tune the rule. If that evaluation leads to further tuning, it is no longer untouched; identify a new evaluation procedure and disclose the earlier use.
Inspect execution assumptions and preserve the unfavorable cases
TradingView’s strategy documentation describes simulated order execution and settings for costs and related behavior. Check the actual configuration rather than assuming defaults match a broker. Review ambiguous same-bar stops and targets, gaps, unavailable prices, open positions and missing data. Report the full selected period and the losing observations, not only the best segment. Store the test settings with the report so another reader can reproduce the arithmetic. This checklist audits the credibility of a claim; it does not certify a strategy or recommend using real money.
Sources and conventions
Examples are hypothetical. Worked examples state their formulas and assumptions in the article; our methodology explains the related calculators. Broker contract specifications determine actual lot, margin and execution conditions. These sources document definitions and data; a source link does not imply endorsement of SanForex or a trading service.
- TradingView: strategy testing documentation ↗
- CFTC: limitations of trading-system performance claims ↗
These materials are prepared with AI assistance and checked against worked examples and deterministic calculation tests where applicable. They are not an expert suitability assessment or investment advice.
Open profit & loss tool ↗