Method
How we backtest
Every performance number on this site comes from the process below. It is written down so you can check it and so we cannot quietly change it later.
1. Data
- Gold means XAUUSD spot. Not futures, not a CFD vendor's synthetic, not a gold ETF. Where a test uses a futures contract, the page says so explicitly and names the contract.
- Sources are named on the page — vendor, series identifier, coverage period, and frequency. Published dataset pages state the source and the units.
- Frequency is stated. Most of our intraday work is on tick or 1-minute data. Daily-close studies are labelled as such and are never presented as intraday results.
- Survivorship and look-ahead are checked. We never fill a candle from a value that was only published later, and we never use a symbol list that only contains today's survivors.
2. Execution model
- Every order pays the spread. Buy at ask, sell at bid. A test that fills mid-price is a bug, and we treat it as one.
- Commission is charged per lot at a stated rate, on the same currency as the P&L. Cent and standard accounts are not interchangeable, and a result quoted in cents that is read as dollars is a units error, not a rounding error.
- Slippage is modelled as a stated number of points, or as spread widening at the session open, close and around high-impact news. Tests that ignore slippage are labelled as idealised.
- Orders fill on the next tick after the signal, never on the tick that generated the signal.
- Stops and targets are filled at the traded price with slippage applied to the stop side, not to the favourable side.
3. Validation
- Out-of-sample is mandatory. Parameters are chosen on one period and reported on a later period that was not used for selection. If a result has no out-of-sample section, we do not publish the in-sample number as if it were the result.
- Walk-forward. Where a strategy has tunable parameters, we re-fit on a rolling window and report the stitched out-of-sample curve, not the best single fit.
- Overlapping windows are corrected for serial correlation when we test significance, using a block bootstrap or an HAC estimator rather than a plain t-test on overlapping trades.
- Costs are stressed. A result that survives doubling the assumed commission and slippage is treated as robust; one that does not is published with that caveat attached.
- Randomness is seeded and the seed is published, so any run can be reproduced.
4. Reporting
- Parameters and test period travel with the number. A profit factor with no parameters and no date range is not published.
- Drawdown is stated as a maximum, in both currency and percent, along with the longest losing streak in trades and in calendar days.
- Risk-adjusted figures name their inputs — which return stream, which risk-free rate, which annualisation convention.
- The failure cases are published alongside the passing ones: the periods that broke the strategy, the regime where it stopped working, and the parameter that did most of the work.
5. The checks that catch our own mistakes
Every one of these has caught a real error on this site at least once. They are the reason a number on this site can be trusted to mean what the sentence around it says.
- Unit reconciliation. Every P&L figure is traced from the tick value back to the account balance. Most "impossible" results have been a cent/dollar mix-up, not a strategy edge.
- Independent recomputation. Published dataset pages are recomputed from raw data by a script that does not share code with the one that produced them. Both numbers must agree before the page goes up.
- Trade-log audit. A sample of trades is checked by hand against the chart for the claimed period.
- Sanity bounds. Any result implying more than 100% annualised return or a Sharpe above roughly 3 is treated as an error until proven otherwise.
- Publication of the null result. When a hypothesis fails, the failure is written up with the same care as the successes.
What we cannot promise
A backtest is a study of the past under stated assumptions. It is not a forecast, and the future will not repeat the sample. Past performance on any model of any asset does not predict future results. Read the full risk disclosure.
Found an error?
If a figure here does not survive the method above, tell us through the contact form. We verify, we correct the page, and we note the correction date.