Backtesting

Confidence intervals for trading expectancy

A confidence interval shows how uncertain a backtest expectancy really is, and whether a positive average is doing more work than the evidence.

A positive average trade is not the same thing as reliable positive expectancy. It is one estimate from one historical sample, and the next sample will not contain the same trades.

A confidence interval for trading expectancy is a range produced by a defined sampling procedure to show the uncertainty around the estimated average return per trade. It does not certify an edge. It tells you how much precision the backtest has actually earned.

Why one expectancy number is too tidy

Expectancy is the sample mean of trade outcomes when every outcome is expressed in a consistent unit, such as account return or risk units. The familiar identity is:

expectancy = (win rate × average win) − (loss rate × average loss)

Both versions reduce the history to a point estimate. That is useful for describing the observed sample, but it hides sampling error. A different sequence drawn from the same underlying process would produce a different mean.

The NIST explanation of confidence intervals frames the issue correctly: a sample statistic approximates an unknown population parameter, while an interval describes the uncertainty in that approximation. In trading, the unknown quantity is not a timeless law. It is the strategy's average outcome under the market process and implementation assumptions being studied.

That qualification matters. A narrow interval around the wrong backtest is still wrong. Look-ahead bias, missing costs, selection bias, or a regime shift are not repaired by better arithmetic.

What a confidence interval means

A 95% confidence interval does not mean there is a 95% probability that the true expectancy sits inside the interval already calculated. Under the frequentist definition, if the same data-generating process were sampled repeatedly and the same interval procedure were applied, about 95% of those intervals would contain the target parameter.

That distinction is not pedantry. The completed interval either covers the parameter or it does not; the procedure has the coverage rate. NIST makes the same distinction in its confidence limits for a mean.

For a trader, the useful reading is practical:

Interval resultDefensible interpretationWhat it cannot prove
Entirely above 0Positive expectancy is compatible with the procedure and assumptionsThe edge will survive live
Crosses 0The sample does not separate positive expectancy cleanly from no edgeThe strategy is necessarily bad
NarrowThe estimate is relatively precise under the modelThe model and data are unbiased
WideThe history leaves substantial uncertaintyThe point estimate is false

Do not turn the lower bound into a forecast. It is a property of the sample and method, not a promised minimum return.

How bootstrap intervals work

The bootstrap estimates sampling uncertainty by repeatedly drawing observations from the available sample with replacement and recalculating the statistic. A trade can appear more than once in a resample, while another may not appear at all.

The NIST bootstrap guide describes the resulting collection of statistics as an estimate of the statistic's sampling distribution. For expectancy, each resample produces another mean trade outcome.

A basic percentile workflow is:

define one clean return series
resample it with replacement at the original sample length
calculate expectancy for each resample
sort the bootstrap expectancies
take the 2.5 and 97.5 percentiles for a 95% interval

The algorithm is simple. Choosing the observations is not.

If trades are plausibly independent and identically distributed, resampling individual trades may answer a useful question. If positions overlap, sizing changes, or losses cluster by regime, individual resampling breaks the dependence that generated the original risk. A block bootstrap instead resamples contiguous runs and preserves some local ordering.

This is where the recent discussion of autocorrelation in trading backtests becomes operational. If order contains information, the resampling method must not casually erase it.

Build the interval around the right unit

The analysis unit should match the decision being evaluated. Trade-level returns are natural for trade expectancy, but they can misrepresent account risk when positions overlap.

Daily portfolio returns may be more suitable when the real question concerns the account path, shared exposure, or prop-firm loss pressure. Strategy-level or regime-level blocks may be more defensible when many trades come from the same underlying event.

Before running the bootstrap:

  • Express outcomes in one consistent risk or return unit.
  • Include spread, commission, slippage, and swap where they apply.
  • Preserve losing trades, rejected signals, and inactive periods required by the chosen unit.
  • Separate design data from untouched validation data.
  • Decide the resampling unit before looking at which choice gives the prettiest lower bound.

The last point is easy to violate. Trying several block lengths, return definitions, and exclusions before publishing the best interval is another selection exercise. Uncertainty can be overfit too.

What can make the interval misleading

Bootstrap intervals reuse the empirical sample. They cannot invent a crash, spread shock, or market regime that the history never contained. Rare tail events are especially awkward because there may be too little tail information to resample credibly.

Non-stationarity is the deeper limit. If the trading process, execution, or market structure changes, old observations may not represent the same population as new ones. A precise interval can then answer yesterday's question very well.

Dependence also changes the result. Independent resampling usually treats each record as fresh information. Overlapping positions and clustered signals can make the effective sample much smaller than the row count. Block methods help only when the block design captures the relevant dependence.

Finally, the interval says nothing about how many strategies were tested before this one was selected. A survivor chosen from a large search needs a selection-aware check as well, such as the deflated Sharpe ratio.

A prop-firm reading of expectancy uncertainty

Prop rules care about the path, not merely the long-run mean. A strategy may have a positive expectancy interval and still cluster losses badly enough to breach a daily or total loss rule.

That is why expectancy uncertainty belongs beside drawdown, losing-streak, exposure, and time-to-target analysis. The funding mechanics page explains the account constraints; the interval only addresses uncertainty in a chosen statistic.

realbacktesting documents execution costs, data handling, and out-of-sample practice on its methodology page. Those controls make a result more inspectable. They do not convert a historical interval into a live guarantee.

Frequently asked

Should a trading expectancy interval exclude 0?

An interval entirely above 0 is stronger evidence of positive expectancy under the stated procedure than a positive point estimate whose interval crosses 0. It still depends on unbiased data, a suitable resampling unit, and a stable-enough process.

Is a bootstrap interval better than a normal interval?

Not automatically. A bootstrap can accommodate an awkward empirical distribution without assuming normal trade outcomes, but it inherits the sample's omissions and the resampling assumptions.

Should trades or days be resampled?

Use the unit that matches the question and preserves the important dependence. Trade resampling suits trade expectancy only when individual trades are credible sampling units; daily or block resampling may fit overlapping portfolio risk better.

Can a confidence interval predict live returns?

No. It quantifies sampling uncertainty under a model fitted to historical observations. Live performance also depends on future regimes, execution, costs, and implementation.

The stubborn takeaway: expectancy without an uncertainty range is a measurement reported without its tolerance.

Published Jul 27, 2026 · realbacktesting · Educational content and market commentary — not financial advice. Trading involves risk; past performance does not guarantee future results.