On This Page
Key Takeaways
- A z-score restates a raw value as its signed distance from the mean, measured in standard deviations.
- The formula is z = (x - mean) / standard deviation, so a positive z sits above the mean and a negative z sits below it.
- Standardizing turns any normal variable into the standard normal distribution with mean 0 and standard deviation 1, which makes unlike series comparable.
- Under a normal distribution, about 68 percent of values fall within one standard deviation and about 95 percent within two, so large z-scores are statistically uncommon.
- Use z-scores to rank distance from a reference mean, then combine the ranking with the trade’s entry, target and position structure.
What is a z-score?
A z-score is a standardized value that expresses an observation’s signed distance from a reference mean in standard-deviation units. Positive values sit above the mean, negative values below it and zero at the mean. Because every series shares that scale, traders use z-scores to compare unlike prices, returns or spreads and to flag unusually stretched readings.
Compute z = (x − mu) / sigma with a positive reference standard deviation. A zero divisor makes the score undefined.
Formula
z = (x − μ) / σ- x is the observed value, μ is the reference mean and σ is a positive reference standard deviation. The score is undefined when the divisor is zero.
- A z of +2 means the value is two standard deviations above the mean; a z of −2 is two below it.
- The mean and standard deviation are estimated from a chosen lookback window, so the same price can carry different z-scores under different windows.
Z-score example: a +2.5 price reading
A trader uses the preceding 20 closes as a fixed reference, with mean $50.00 and standard deviation $2.50. The current price is $56.25.
- z = ($56.25 − $50.00) / $2.50 = +2.5
- On a standard normal reference curve, z = +2.5 corresponds to the 99.38th percentile and a 0.62% upper tail.
- With the reference mean and standard deviation held fixed, a $50.00 price has z = 0.
The price is 2.5 reference standard deviations above $50.00. Use that common scale to rank the setup, then define the trade’s entry and target. Recalculate the score when the reference window changes.
Holding those reference values fixed, $50.00 maps to zero and $45.00 maps to −2. A rolling window recalculates the reference values as observations enter and leave.
How z-scores map to percentiles
Standardization and percentile calculation are separate operations. A standardized variable with finite positive variance has mean zero and variance one; a normal variable becomes standard normal.
On a normal reference curve, +2.5 is the 99.38th percentile. The upper-tail probability is 0.62%. At +2 the upper tail is 2.28%.
At +4, the normal upper tail holds 3.2 of every 100,000 outcomes, and the two tails outside ±4 hold 6.3 per 100,000. State which tail the calculation uses.
Scores from different distributions share a distance scale. Their percentiles come from those distributions or their empirical ranks. Estimating a mean and standard deviation from a sample does not by itself establish a standard normal predictive distribution.
Reference windows and composite z-score screens
Choose prices, returns, spreads or another metric and keep that choice consistent. Specify the window and standard-deviation divisor in the calculation. Using prior observations provides a reference available before the current observation.
For a composite screen, standardize each input and set its weight. Correlation between inputs affects the composite’s scale, so an average of z-scores is not automatically a standard normal variable.
How traders use z-scores for mean reversion
A mean-reversion rule can use distance thresholds for entry and a specified exit toward its reference. A trend rule can use the same scores to rank strength. Direction and execution come from the strategy definition.
Limitations of the z-score
- Convert a z-score to a probability only through a distribution that fits the data. The score gives distance; normal percentiles apply only when the data fits a normal curve, and fat-tailed series reach large scores more often than those percentiles imply.
- State the series, window and standard-deviation divisor with every score, because the same price can carry different z-scores under different choices.
- Check the trend before you fade a stretched reading. The reference mean and standard deviation are estimates that change over time, and in a trend a stretched reading can stay stretched instead of reverting.
- Set a minimum standard deviation for the screen. A very small one makes the score swing sharply, and a zero one leaves it undefined.
- Calibrate composite thresholds on their own. An average of correlated z-scores is not automatically a standard normal variable.
Bottom line
A z-score turns any observation into a distance from its mean in standard deviations, which makes stretched readings easy to spot and compare. State the series and window, convert scores to probabilities only through a distribution that fits the data, and let the strategy rules decide direction and exits.
Clear answers
Frequently Asked Questions
Sources and Further Reading
- OpenStax Introductory Statistics 2e: The Standard Normal Distribution
- NIST/SEMATECH e-Handbook of Statistical Methods: The Normal Distribution
How entries are sourced, calculated and updated: editorial methodology.