Standard Deviation (StdDev)
Standard Deviation (StdDev)
What is Standard Deviation?
Standard Deviation (StdDev) is a fundamental statistical measure of volatility that quantifies the dispersion of price data around its mean. In trading, it measures how much closing prices deviate from their average over a given period. Higher StdDev values indicate greater volatility (wider price swings), while lower values indicate calmer markets.
How it works
Standard Deviation is calculated as the square root of the variance of closing prices:
Mean = Sum(Close[i], i=1..N) / N
StdDev = sqrt(Sum((Close[i] - Mean)^2, i=1..N) / N)
Where N is the period (default 20). The result is in the same units as the price (e.g., dollars for stocks, USDT for crypto).
Key features
- Raw volatility measure — Expressed in price units, shows absolute deviation from mean
- Building block — Used internally by Bollinger Bands and other indicators
- No upper bound — Can increase without limit during extreme volatility
- Mean-reverting — High StdDev periods tend to be followed by low periods and vice versa
- Not normalized — Cannot directly compare across different assets without adjustment
Trading signals
Buy signals
- StdDev drops to historically low levels (squeeze — expect a breakout)
- StdDev starts expanding while price moves up (healthy trend)
- After a volatility spike, StdDev declines (panic subsiding, potential bottom)
Sell signals
- StdDev spikes to extreme levels (climactic move, often near reversals)
- StdDev is very high and starts contracting (trend exhaustion)
- Rising StdDev with falling price (increasing panic selling)
Parameters
| Parameter | Default | Description | |-----------|---------|-------------| | Period | 20 | Number of candles for calculation |
Example conditions
| Condition | Description |
|-----------|-------------|
| STDDEV(20) > 100 | High volatility (StdDev above 100 price units) |
| STDDEV(20) < 20 | Low volatility (squeeze condition) |
| STDDEV(20) cross_over 50 | Volatility expanding |
| STDDEV(20) cross_under 50 | Volatility contracting |
Tips
- StdDev thresholds are asset-specific — $100 StdDev is different for a $50K crypto vs. a $50 stock
- Use percentage-based measures (like HV or BB_BANDWIDTH) for cross-asset comparison
- StdDev is the building block of Bollinger Bands — understanding it improves BB analysis
- Low StdDev periods are ideal for identifying potential breakout trades
- Combine with directional indicators to determine which way the breakout might go
- Consider using a moving average of StdDev to smooth out noise

