Standard deviation measures how widely the closes of the last N candles spread around their average.
| Category | Volatility |
|---|---|
| Formula | SD = square root of (sum of (close – mean)^2 / N), using the population version over the last N closes. |
| Default settings | 20 periods |
| What it is used for | A volatility gauge in price units, and the building block of Bollinger Bands. |
| Limits | It is based on closes only and ignores intra-candle moves, unlike ATR. |
| Our own tests | Volatility clusters: after volatile days the next 10 days were wider on all three instruments (correlation 0.38 to 0.71). It forecast no better than a plain average of recent daily ranges on any of the three, so for sizing stops you can use whichever is simpler. Standard deviation says how big recent moves were, not which direction comes next. |
What our own test found
Volatility clusters: after volatile days the next 10 days were wider on all three instruments (correlation 0.38 to 0.71). It forecast no better than a plain average of recent daily ranges on any of the three, so for sizing stops you can use whichever is simpler. Standard deviation says how big recent moves were, not which direction comes next.
How we tested it
Standard deviation is not a buy or sell rule, so we tested what it is for: forecasting. On each day we took the 20-day standard deviation of daily returns and compared it with the average daily high-to-low range over the next 10 days. The table shows the rank correlation (1.00 would be a perfect forecast), the same figure for a plain ‘average range of the last 10 days’ as a yardstick, and the average next-10-day range after the calmest third and the most volatile third of days. Daily candles: Gold (XAU/USD) May 2021 to Oct 2026; EUR/USD May 2021 to Oct 2026; Bitcoin (BTC/USD) Dec 2022 to Oct 2026.
| Instrument | Rank correlation, 20-day standard deviation | Rank correlation, plain 10-day average range | Next 10 days after the calmest third | Next 10 days after the most volatile third |
|---|---|---|---|---|
| Gold (XAU/USD) | 0.52 | 0.62 | 1.32% | 2.04% |
| EUR/USD | 0.71 | 0.76 | 0.53% | 0.87% |
| Bitcoin (BTC/USD) | 0.38 | 0.45 | 3.04% | 3.90% |
Before relying on any indicator rule, test it with costs and a baseline: How to test a strategy. Other indicators with full lessons and real-data tests are in the indicator reference.
Related indicators
Frequently asked questions
Standard deviation or ATR?
ATR includes highs, lows and gaps; standard deviation uses closes. Both measure size and not direction.
Definitions are the standard published ones. The test results above come from our own data with the protocol stated; they describe the past and are not a forecast.
Educational content only, not financial advice. Trading involves substantial risk of loss. Read the full risk disclaimer.