Standard Deviation

Parameters: period = 20 (5–50)

Overview

Standard Deviation in technical analysis measures the degree of price variability relative to a moving average, providing traders with a quantitative assessment of market volatility. The calculation involves finding the square root of variance, which is computed by squaring the differences between each price and the mean, then averaging these squared deviations. In a normal distribution, 68% of observations fall within one standard deviation, 95% within two, and 99.7% within three, though financial markets often exhibit fat-tailed distributions that deviate from this pattern.

As a volatility indicator, Standard Deviation serves multiple purposes in trading systems. High values indicate unstable, volatile markets with wide price swings, while low values suggest stable conditions with prices clustering near the average. This indicator is particularly valuable as a component of other technical tools - most notably Bollinger Bands, which use standard deviation to set dynamic support and resistance levels. Traders also use it to adjust position sizing, set stop-loss distances, and calibrate trading system parameters based on current market volatility.

Interpretation & Trading Signals

Volatility Analysis:

  • High Standard Deviation: Market is volatile, expect wider price swings
  • Low Standard Deviation: Market is calm, prices near average
  • Rising Values: Volatility expanding, potential breakout coming
  • Falling Values: Volatility contracting, consolidation phase

Trading Applications:

  • Stop-Loss Placement: Wider stops in high volatility, tighter in low
  • Position Sizing: Reduce size when volatility increases
  • Breakout Trading: Extremely low readings often precede breakouts
  • Trend Confirmation: Uptrends show lower volatility than downtrends

Risk Management:

  • 1 SD Move: Above-average strength or weakness (32% probability)
  • 2 SD Move: Significant price movement (5% probability)
  • 3 SD Move: Extreme market event (0.3% probability)
  • System Adjustment: Adapt indicators to current volatility regime

Example Usage

Code examples will be available once the Rust implementation is complete.

Performance Analysis

Related Indicators