Z-Score
period
= 20 (2–200) Overview
The Z-Score indicator is a statistical measure that quantifies the distance between a current price and its historical mean, expressed in terms of standard deviations. By normalizing price movements, the Z-Score provides a standardized way to identify when prices have deviated significantly from their typical range, making it particularly valuable for mean reversion strategies and identifying statistical extremes.
The indicator calculates the difference between the current price and a moving average (typically 20-period), then divides by the standard deviation over the same period. This creates an oscillator that fluctuates around zero, with positive values indicating prices above the mean and negative values below. Values beyond ±2 standard deviations are statistically significant, occurring only about 5% of the time under normal conditions.
Interpretation & Trading Signals
Statistical Levels:
- Z-Score = 0: Price at its average (mean)
- Z-Score > +2: Overbought (price 2+ standard deviations above mean)
- Z-Score < -2: Oversold (price 2+ standard deviations below mean)
- ±3 Levels: Extreme conditions (99% confidence level)
Mean Reversion Signals:
- Buy Signal: Z-Score crosses below -2 (extreme oversold)
- Sell Signal: Z-Score crosses above +2 (extreme overbought)
- Exit Long: Z-Score returns above 0 from negative territory
- Exit Short: Z-Score returns below 0 from positive territory
Probability Zones:
- ±1 SD (68%): Normal price fluctuations
- ±2 SD (95%): Significant deviations, potential reversal zones
- ±3 SD (99%): Extreme deviations, high probability of mean reversion
Example Usage
Code examples will be available once the Rust implementation is complete.