Skip to content

Backtesting & validation

Test the idea. Examine the evidence.

The factory tests strategy code on historical data with configured fees and execution assumptions. Optimization tools probe parameter stability, while an AI analyst evaluates the evidence and recommends the next step.

Historical strategy paths across validation windows with drawdowns and outcome distributions

See the strategy factory in motion.

Illustrative example · not a live result

Watch AI agents build and review a strategy.

AI agents develop the idea, write code and assess the test results. Review findings can send the strategy back for another iteration.

  1. Describe
  2. Build & verify
  3. Backtest
  4. Stress-test
  5. Paper-trade
01

Model the trading conditions

Backtests use historical data, configured venue fees and applicable execution assumptions. Data coverage, funding, slippage and impact can materially change the result.

02

Inspect more than a return

Read the equity curve, drawdowns, return distribution and individual trades. Check the period, sample size and assumptions alongside headline metrics.

03

Probe robustness

Sensitivity analysis, walk-forward optimization and holdout validation examine how results change outside the chosen parameters and training windows.

Keep the assumptions beside the result.

A compelling chart is a starting point for review. Compare trading costs with the expected edge, inspect out-of-sample behavior, and look for concentration in a small number of trades or periods.

  1. Inputs

    Data period, venue, fees

  2. Tests

    Backtest, walk-forward, holdout

  3. Evidence

    Metrics, trades, review notes

Let later data challenge earlier choices.

Walk-forward testing fits on an earlier window and evaluates on a later one. The reserved holdout is kept outside the optimization windows.

Read the actual split dates and trade counts. Reusing holdout feedback across many attempts can weaken its independence.

FitValidateHoldout
Schematic: three fit-and-validation windows move forward through time; the holdout remains reserved at the right. Window lengths and gaps depend on configuration.

A small cost can consume a large edge.

The more a strategy trades, the more its result depends on execution assumptions. Move the slippage control to see the same gross result under different costs.

Turnover
Total traded notional relative to starting equity; every buy and sell counts.
Fees & slippage
Check the configured venue fees and price assumptions in the actual report.
Net result
Compare the remaining edge with drawdowns, sample size and out-of-sample results.

See how execution costs change the result.

Gross return12.0%
Modeled costs2.0%
Net after these costs10.0%

Example assumptions: 12% gross return, cumulative traded notional equal to 40 times starting equity, and 2 bps fee per traded notional. Costs = turnover × (fee + slippage); 1 bp = 0.01%. Linear illustration; excludes compounding, funding and market impact.

Questions, answered.

More questions and answers
Does a good backtest guarantee future returns?

No. Backtests are hypothetical and sensitive to data, assumptions and selection. Validation helps investigate weaknesses; it does not eliminate trading risk.

Are the fees live quotes for my account?

No. They are configured simulation defaults. Your exchange tier and instrument rules may differ. Review the assumptions before interpreting the result.

How do walk-forward testing and holdout validation differ?

Walk-forward testing repeatedly fits on earlier data and evaluates on later windows. Holdout validation checks the selected parameters on a reserved period outside those optimization windows. Inspect the actual dates, trade counts and reports; repeatedly using holdout feedback can weaken its independence.

Which results should I read besides total return?

Review drawdowns, trading costs, the number and distribution of trades, holding periods and out-of-sample results. Look for dependence on a small number of trades or one market period. A high return alone does not explain how the strategy earned it or the losses along the way.

Why test nearby parameters instead of keeping the best setting?

A setting that looks excellent while its neighbors perform poorly may be fragile. Sensitivity analysis shows how the result changes around the chosen parameters. Use it with walk-forward and holdout evidence when assessing whether the pattern is broader than one selected result.

Why can two backtests of a similar idea disagree?

Different instruments, data periods, bar intervals, entry and exit rules, fees or execution assumptions can change the outcome. Compare the configuration and available data alongside the trade records before interpreting a difference as an improvement.

Start with a question worth testing.

Explore published strategies, or open a workspace to build, test and monitor your own with AI agents.

Stratmill is an AI trading strategy platform, not financial advice or a broker. Backtest and paper results are hypothetical. Trading involves risk of loss.