OPENAITRADE / TECHNICAL SHARING
How to compare ETF backtests
By OpenAITrade editorial · Updated
Write the comparison contract before running the code
A useful ETF backtest comparison holds the evaluation assumptions steady while changing the rule or instrument being studied. Start by recording the intended research question, symbols, bar frequency, date window, starting capital, order sizing and transaction-cost model. Record the benchmark using the same data and return convention. Otherwise, an apparent strategy difference can be a difference in inputs.
For an equity, bitcoin-exposure and gold-exposure comparison, SPY, IBIT and GLD provide three distinct exchange-traded series. They do not have identical histories or market risks. Using the common real trading calendar avoids crediting one result with extra years unavailable to another. This is a comparability choice, not an assessment that any of these instruments is suitable for an investor.
Preserve data provenance and adjustment choices
Store the provider name, retrieval time, symbol mapping, session timezone and a fingerprint of the exact input series. Document whether prices are raw or adjusted and how distributions and splits are handled. Do not compare a price-only strategy curve with a total-return benchmark without explaining the mismatch. A later provider correction should create a new data version rather than silently changing an old experiment.
Daily bars cannot reveal an intraday path. If a rule can reach both a stop and a target inside one daily candle, the assumed ordering can determine the result. Choose and disclose a supported execution convention, or mark the rule unsuitable for that data frequency. Reconstructing a favorable path would add information absent from the input.
Read the ledger before the headline metric
Check a sample of entries, exits, position sizes, fill prices, costs and cash balances against the written rule. Separate an open position at the end of the test from a completed round trip. A win rate based on closed trades can be undefined when there are no closed trades; it should not become zero merely to fill a table.
A no-trade run can be an informative compatibility result. Absolute source thresholds, original date restrictions or an oversized order can prevent execution on a new ETF. Investigate the cause before changing the rule. Record any change as a new version, so a repaired implementation is not confused with the original experiment.
Test whether the conclusion survives modest changes
After checking correctness, repeat the experiment under predeclared alternative costs, neighboring parameters and chronological validation windows. Examine drawdown, turnover, exposure, trade count and benchmark-relative behavior alongside return. An impressive ratio based on very few observations or one unresolved position needs that context.
Preserve failed and uninteresting runs as well as the best run. A comparison report should state what was attempted, which assumptions changed and which checks remain unperformed. Historical calculation and virtual paper operation are different evidence stages; neither demonstrates future execution quality or a durable investment edge.
For technical sharing, quantitative-method discussion and software testing only. Historical simulations and paper operation are not live investment records. Read the full disclaimer.