A crypto z-score measures how far a chosen observation sits from its reference mean in standard-deviation units. A negative price z-score can identify a candidate for mean-reversion research, but it does not give the probability of a bounce, a deadline for recovery or the chance of a profitable trade. Those are separate outcomes that require an explicit rule and evidence.
The distinction matters when a strategy buys because price looks unusually low. An extreme reading can become less extreme because price recovers, because the reference mean moves down, or because the measured dispersion expands. Only the first of those necessarily describes an upward price move.
Specify what is being standardized
For a rolling price score, write the calculation as:
z = (current close − reference mean) / reference standard deviation
The SciPy z-score documentation defines the score relative to a sample's mean and standard deviation and makes the degrees-of-freedom correction configurable. The calculation standardizes a value; applying it does not transform the underlying data into a normal distribution.
Before calculating, identify the venue, instrument, candle interval, price field and reference window. A spot close and a perpetual-contract close are different inputs. A score calculated from hourly prices answers a different question from one calculated from hourly returns. A price score locates the current level within a reference sample of levels; a return score locates one interval's change within a reference sample of changes. Neither interpretation can be transferred silently to the other.
The input may also be volume, funding or a constructed spread. Standardizing a drifting spread does not establish a stable economic relationship. For comparison, cumulative volume delta depends on trade-aggressor classification and venue coverage before any normalization is applied. A clean-looking z-score cannot repair an incomplete underlying measurement.
One close can produce two legitimate scores
This hypothetical arithmetic fixture uses five completed closes, in order: 98, 99, 100, 101 and 102 USDT. The next completed close is 96 USDT. The short window makes the calculation inspectable; it is not a recommended setting.
Define population standard deviation by dividing the sum of squared deviations by the observation count. The original five closes have mean 100 and variance (4 + 1 + 0 + 1 + 4) / 5 = 2, so their standard deviation is approximately 1.414214.
| Convention at the new 96 close | Reference closes | Mean | Standard deviation | Z-score |
|---|---|---|---|---|
| Prior five closes | 98, 99, 100, 101, 102 | 100.00 | 1.414214 | −2.828427 |
| Latest five, including 96 | 99, 100, 101, 102, 96 | 99.60 | 2.059126 | −1.748315 |
An experimental condition z ≤ −2 is true under the first convention and false under the second. The incoming observation changes both the mean and dispersion when it joins the reference. Both conventions can be causal if evaluated after the new candle completes. They express different comparisons and must be named in the research specification.
For the remaining example, use the prior-five-close convention: compare each new completed close with the five closes immediately before it. Do not confuse this choice with permission to trade at a known historical close before receiving it. The look-ahead bias audit covers that availability boundary.
Also record the variance divisor. Using the sample divisor of four for the original window gives standard deviation approximately 1.581139 and score approximately −2.529822. A threshold near either reading could change the decision even when the candles match.
A score moving toward zero need not mean recovery
Keep every subsequent close at 96. The reference gradually replaces the old, higher observations with the unchanged new price.
| Evaluation close | Current price | Prior-five mean | Prior-five standard deviation | Z-score |
|---|---|---|---|---|
| Sixth close | 96 | 100.0 | 1.414214 | −2.828427 |
| Seventh close | 96 | 99.6 | 2.059126 | −1.748315 |
| Tenth close | 96 | 97.2 | 2.400000 | −0.500000 |
| Eleventh close | 96 | 96.0 | 0.000000 | Undefined |
The score approaches zero without a single upward close. If a hypothetical long entered at 96 and later sold at 96, its gross price result would be zero; trading costs would make its net result negative. Reaching a score-based exit threshold is therefore different from recovering the entry price or earning a profit.
At the eleventh close, all five reference observations equal 96. Division by zero makes the score undefined. Assigning zero would invent a valid measurement and could falsely satisfy an exit condition. Preserve the invalid state and apply a separately specified position-management policy.
This reference effect also explains why a z-score is not interchangeable with Stochastic RSI. The latter normalizes RSI within its recent range. Both require a clear input and window, but they measure different quantities. The Bollinger Bands guide covers the related use of price dispersion in an envelope.
Why two standard deviations are not reversal odds
For a normally distributed population, 95.45% of observations fall within two population standard deviations of its mean. That is the distribution statement documented in the NIST normal-data handbook. It is not a statement that a price outside that range has a 95.45% chance of returning, rising next or producing a profitable trade.
Even a justified marginal distribution would not by itself describe the sequence of future prices conditional on an extreme observation. A reversal question needs a direction, target, time horizon and competing failure event. A profitable-trade question additionally needs executable prices and costs.
For example, “after the first completed close below −2, does price rise 1% within ten bars before falling 2%?” is a measurable research question. Those hypothetical thresholds are definitions, not recommendations. Specify how simultaneous target and failure touches are handled; a candle containing both may not reveal their order. Repeated below-threshold bars from one prolonged decline must not silently become independent reversal trials.
Freeze a worksheet before testing the threshold
| Field | Decision to record |
|---|---|
| Input identity | Venue, exact market, interval and close field |
| Reference construction | Prior or inclusive window, length, variance divisor and required history |
| Observation clock | Completed-candle receipt, freshness limit and earliest execution time |
| Entry event | First crossing or every qualifying close; treatment of an existing position |
| Claimed outcome | Price recovery, score normalization or net return, with a deadline |
| Failure and exits | Price invalidation, maximum holding time and open-position handling |
| Data exceptions | Missing candles, zero deviation and isolated suspect prints |
| Evaluation | Frozen costs, later test period and every alternative tried |
A persistent trend is the realistic failure case: the rolling mean follows price while a position continues losing. A large anomalous print can also distort the mean and denominator, making subsequent prices appear ordinary. Inspect the component values instead of relying on the score alone.
If a volatility-regime filter changes eligibility, freeze its rule too. Record it as an additional hypothesis rather than claiming it makes an extreme score safe. Use walk-forward testing for the complete procedure, retaining unsuccessful parameter choices and unfinished positions. No historical market performance was tested here; this AI-assisted educational worksheet follows the editorial policy. Its useful output is a reproducible distinction between distance, observed recovery and a cost-adjusted result.
