StdDev Node
Standard Deviation - Statistical Volatility
Overview
Standard Deviation (StdDev) is a foundational statistical measure of price dispersion from the mean (SMA). It quantifies how much price typically deviates from its moving average, providing the most mathematically rigorous volatility measurement.
Higher StdDev indicates prices are spread far from the average (high volatility). Lower StdDev indicates prices cluster near the average (low volatility). StdDev is the core component in Bollinger Bands and is essential for portfolio risk management and volatility-based derivatives pricing.
Formula
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 20 | Lookback period for deviation calculation |
Common Use Cases
1. Bollinger Bands Foundation
StdDev forms the basis for Bollinger Bands. Upper/lower bands = SMA ± (StdDev × 2).
2. Volatility Charts
Chart StdDev directly as a volatility oscillator. Rising = expanding volatility, falling = contracting.
3. Statistical Analysis
Use for probability analysis. In normal distribution, prices stay within ±1 StdDev 68% of time.
4. Portfolio Risk
Essential metric for calculating portfolio volatility and determining position sizing for risk control.
Advantages & Limitations
Advantages
- •Mathematically rigorous
- •Foundation for Bollinger Bands
- •Perfect for analytical calculations
- •Probability-based interpretation
Limitations
- •Lagging indicator
- •Assumes normal distribution (often violated)
- •Can be skewed by outliers
Tips & Best Practices
📊 Use with Bollinger Bands
Monitor StdDev directly for volatility changes before Bollinger Bands expand/contract.
⚡ Compare to Historical Levels
High StdDev relative to history = expanding volatility. Low = contracting volatility.
💰 Probability Framework
Use 68-95-99.7 rule: 68% stay within ±1 StdDev, 95% within ±2, 99.7% within ±3.
⚠️ Beware of Regime Changes
Volatility regime changes (crisis, earnings) can violate normal distribution assumptions.
Example Application
Using StdDev for position sizing:
1. Calculate StdDev
Get current StdDev(20) and compare to 100-bar average
2. Volatility Ratio
Vol Ratio = Current StdDev / Average StdDev
3. Adjust Sizing
Position Size = Base Size / Vol Ratio. Higher vol = smaller size, maintains risk
4. Result
Risk stays constant across volatile and quiet markets
Related Indicators
Bollinger Bands
Uses StdDev for band width calculation
ATR
Alternative volatility measure using true range
Historical Volatility
Statistical volatility over longer periods
SMA
Center line from which deviation is measured