Skip to content

Research notes

Crypto win-rate intervals: calculate the uncertainty

Eighteen wins in 30 completed positions gives 60% observed wins and a much wider uncertainty range. A worked ledger shows what the denominator includes.

Two ivory calipers surround differently sized bowls of ivory and lime pebbles against a black background.
Illustration for research notes; examples in this article are educational.

A crypto win-rate confidence interval describes uncertainty about a common win probability under a stated sampling model. For independent binary outcomes, a Wilson interval uses the number of wins and completed observations without collapsing to certainty after an all-win sample. It does not estimate average profit, repair correlated trades or guarantee the win rate of a future market regime.

A report showing 18 winners in 30 completed positions has an observed win rate of 60%. Under the independent, common-probability model used here, its two-sided 95% Wilson interval is approximately 42.32%–75.41%. The headline percentage is an observation. The interval adds a model-dependent account of its precision.

Define the binary outcome before calculating

For this article, one observation is one completed position, with all its entry fills, additions, exits and attributable costs reconciled. A win means strictly positive net P&L in the declared reporting currency. A negative or exactly zero net result is a non-win. These choices are conventions, not universal reporting standards.

Consider this original hypothetical ledger summary. It is not a KLINEO result or historical trading record.

Position status at the frozen cutoffCountBinary classification
Completed with positive net P&L18Win
Completed with negative net P&L9Non-win
Completed with exactly zero net P&L3Non-win
Still open4Outside the completed-position statistic
Total positions opened34Reconcile separately

The calculation is 18 / (18 + 9 + 3) = 60%. Excluding breakevens instead would report 18 / 27 = 66.67% among nonzero completed outcomes. That asks a different question. Save the denominator rule beside the number so another reader can reproduce it.

The four open positions still belong in marked portfolio equity. Excluding them from a completed-position count cannot erase their unrealized losses or gains. A strategy that closes small winners quickly and leaves losses open can show an attractive closed win fraction. The guide to open trades at a backtest cutoff explains how terminal treatment changes the evidence available for a completed-trade statistic.

Calculate the Wilson interval reproducibly

Let w be the integer number of wins, n the positive integer number of completed observations, and p̂ = w / n. The model assumes independent binary trials with the same win probability. For a two-sided 95% interval, use z = 1.959963984540054, approximately 1.96.

Compute these intermediate values:

D = 1 + z² / n
C = (p̂ + z² / (2n)) / D
V = p̂ × (1 − p̂) / n
V = V + z² / (4n²)
H = z × sqrt(V) / D
Lower bound = C − H
Upper bound = C + H

This is Wilson's score interval without continuity correction. NIST's binomial confidence-interval guidance provides the expression and explains its relationship to inversion of the score test.

For w = 18 and n = 30, the original calculation gives D ≈ 1.128048627, C ≈ 0.588648661 and H ≈ 0.165445058. Subtracting and adding produces [0.423203603, 0.754093719]. Multiply by 100 only when displaying percentages; do not supply 60 as a probability where the formula expects 0.60.

The center, about 58.86%, differs from the observed 60%. Wilson intervals need not be symmetric around the observed fraction.

For a software cross-check, SciPy's proportion interval documentation distinguishes wilson, wilsoncc and exact. Its default is exact, so requesting a confidence interval without specifying the method will not necessarily reproduce this article. With a compatible SciPy installation, the corresponding call is:

from scipy import stats

test = stats.binomtest(
    18, 30
)
ci = test.proportion_ci
interval = ci(
    0.95,
    method="wilson",
)

The figures below were recomputed directly from the displayed formula; this snippet is a reproduction option, not a claim that a particular Python environment was executed for the article.

Compare counts, including perfect records

Each row below is a separate hypothetical sample using the same two-sided 95% method and independent, common-probability assumptions. Rounded displays do not change the input counts.

WinsCompleted observationsObserved win rateWilson lower boundWilson upper bound
183060.00%42.32%75.41%
18030060.00%54.36%65.38%
273090.00%74.38%96.54%
3030100.00%88.65%100.00%
0300.00%0.00%11.35%

The first two rows hold the observed fraction fixed while changing the count. More independent observations make this interval narrower. They do not establish that the sampled period represents every later liquidity condition or strategy revision.

The all-win row is useful when reviewing a perfect-looking record: 30 successes do not justify treating the underlying win probability as certainly 100%. The familiar symmetric calculation p̂ ± z × sqrt(p̂ × (1 − p̂) / n) has zero estimated width when p̂ is 0 or 1. Wilson avoids that collapse. Tiny floating-point excursions at the boundary should be handled as numerical precision, with displayed bounds constrained to the probability range.

If n = 0, report “not estimable: no completed observations.” Do not divide by zero, publish 0% as though it were an observed failure rate, or manufacture a 0%–100% Wilson calculation. Reject negative counts, fractional counts and w > n before computing.

Interpret 95% as a procedure's property

A frequentist confidence level describes the interval procedure across repeated samples under its assumptions. It does not assign a 95% posterior probability to this particular interval containing the fixed parameter. NIST explains this interpretation in its confidence-interval guidance. Wilson is an approximate procedure; a nominal 95% label does not promise exactly 95% coverage at every possible combination of probability and count.

Neither interpretation means a 95% chance that the next trade wins. In the 18-of-30 example, the parameter being estimated is a common win probability for the modeled observation process, not the outcome of an individual future position.

Also retain the evaluation boundary. Choosing the best win rate from many parameter variants, then presenting its ordinary interval as if the strategy had been fixed beforehand, leaves the selection process unaccounted for. Keep the backtest trial history with the interval report.

Know when the binary model is the wrong tool

Ten simultaneous positions opened by one signal may share the same market shock. Repeated partial exits from a single position are also poor candidates for ten independent position outcomes. A narrow interval computed from those rows can communicate precision the observation process does not support.

Do not solve that problem by replacing the integer denominator with an unexplained “effective trade count.” Dependence needs a defensible model and a method appropriate to the target statistic. The trade-count and independent-evidence guide explores that separate question; this article's table assumes independence throughout.

A win-probability interval also discards payoff magnitude. Two strategies can have identical win counts while one loses far more money on each losing position. Compare profit factor with payoff ratio to inspect gross totals and average outcome sizes, and use the expectancy guide for net average outcomes. An interval whose lower bound exceeds 50% is still not a profitability certificate.

If the question is uncertainty about mean net return, use a method aimed at that mean and its sampling structure. The bootstrap confidence-interval guide addresses resampling return observations. A binomial win interval and a bootstrap mean-return interval estimate different quantities and should keep different labels.

Attach an interval receipt to the report

Receipt fieldEntry for the worked exampleReason to retain it
Reporting unit and win ruleCompleted position; net P&L strictly above zeroFixes what the binary outcome means
Counts and exclusions18 wins, 12 non-wins; 4 open positions separateMakes the denominator auditable
Interval specificationTwo-sided 95% Wilson, no continuity correctionPrevents method mismatches
Model statementIndependent outcomes, common win probabilityIdentifies assumptions behind precision
Cutoff and strategy revisionFrozen before reviewing outcomesKeeps the evaluation boundary explicit
Next unresolved questionDependence, open exposure and payoff sizesDirects further review beyond win frequency

Method and limits

This article is AI-assisted educational synthesis of the linked primary statistical documentation. The ledger, interval comparisons and receipt are original hypothetical teaching examples. Counts, intermediate values and rounded bounds were checked with a direct JavaScript implementation of the displayed formula. No historical exchange ledger, future win forecast, dependence adjustment or strategy profitability test was performed.

Keep the context with the example.

Each worked example is illustrative, with its sources and assumptions in the article. Read our editorial standards for authorship, verification and corrections.