Trends/Statistics and risk

Z-score

How many standard deviations today's close is from its 20-bar average.

Statistics and riskBest on 3M, 6M, 1YAlso called standard score
Z-score diagramIllustration of the Z-score shape. It is a sketch, not real price data.Z-score
Illustration of the Z-score shape. It is a sketch, not real price data.

What it shows

A z-score = (close − average) ÷ standard deviation. A z of +2 means the close is 2 standard deviations above its average. A z of 0 means it equals the average.

It is the same measurement used in the Bollinger bands, shown as a single number.

How we find it

The same code that draws it on your chart follows these steps, with the same result every time.

  1. Compute the 20-bar SMA and standard deviation.
  2. z = (close − SMA) ÷ standard deviation.
  3. Plot under the price.
  4. Mark ±2.

Starting values: Length 20; Lines ±2. These are proposed and will be tuned on real price data before launch.

How to read it

  • The panel shows the z-score.
  • Dashed lines mark +2 and −2.
  • Zero is the average.

Status labels you may see

LabelWhat it means
Above +2z above 2.
Within ±2z between −2 and 2.
Below −2z below −2.

What cancels it

Nothing cancels it.

What traders check next

  • How long it stays beyond ±2.
  • Trend.
  • Bollinger bands.

Limits

  • Prices are not bell-shaped.
  • Beyond ±2 happens often in trends.
  • Window is a choice.

Try it in forecastviz

  • Open any ticker and choose Statistics and risk → Z-score in the left menu.
  • Switch between 3M, 6M, 1Y to see how the picture changes.
  • Compare with Bollinger %B and Bollinger bands on the same chart.

Questions

Same as Bollinger %B?

Related. %B is position in the band, z is in deviations.

How rare is +2?

Under a bell curve about 2.3%. Real prices stray more.

Related trends

Further reading

  • Kaufman, Trading Systems and Methods
  • Achelis, Technical Analysis from A to Z
  • Mandelbrot, The (Mis)Behavior of Markets
  • Sharpe, Mutual Fund Performance

Educational only. Not financial advice, and not a price forecast. Charts are drawn by code from past price data, which may be delayed.