Volatility & bands

Standard Deviation · SD

The statistical spread of price around its average — the raw ingredient of Bollinger Bands.

Works in most conditionsEngine-computed on a fixed sample series
14512096Rising = expanding, falling = fading
SD 8.43How to read SD on the chart — the callouts mark what to look for.

The formula

Find the average close over N bars, measure each bar's distance from it, square those distances, average them, and take the square root. The result is in price units and rises when prices scatter, falls when they cluster.

σ = √( Σ(Pᵢ − mean)² ÷ N )
Worked example
CloseDeviation from mean (14)Squared
10−416
12−24
1400
16+24
18+416
Sum40

σ = √(40 ÷ 5) = √8 = 2.83

What standard deviation measures

Standard deviation is a fundamental statistical measure of how spread out prices have been around their own average — the raw ingredient of volatility and the mathematical backbone of Bollinger Bands. It answers a simple question: over my lookback window, how far, on average, has price strayed from its mean? A high standard deviation means prices have been widely dispersed and volatile; a low one means they have clustered tightly in a quiet, coiled market. Critically, it measures magnitude only — the size of the moves — and says nothing about direction, so a large standard deviation tells you moves are big without telling you whether they are up or down. For a beginner, think of it as a single number that captures how jumpy or how calm the market has been, regardless of which way it is going.

How standard deviation is calculated

Over the lookback window, first find the mean — the simple moving average of the closes. Then, for each close, measure its distance from that mean and square it, which makes every deviation positive and penalizes large departures more heavily. Average those squared distances to get the variance, and take the square root of the variance to return to the original price units — that square root is the standard deviation. A common window is 20 periods, matching the default of Bollinger Bands. Because the deviations are squared before averaging, a single outlier bar has an outsized effect on the result, and as that outlier eventually rolls out of the window the reading can drop sharply. The output is expressed in the same units as price, so it can be added to and subtracted from the mean directly.

Reading standard deviation, step by step

Standard deviation is read relative to its own recent range rather than as an absolute number. A reading high compared with its recent history means a wide, volatile distribution — big moves, stretched conditions — while a low reading means a quiet, compressed market that is coiling. Because it is a pure magnitude measure, it tells you nothing about direction: a large value simply says the moves are big, whether the market is soaring or crashing. Rising standard deviation means volatility is expanding; falling means it is contracting. Traders often watch for extremes — unusually low standard deviation frequently precedes a volatility expansion, and unusually high readings tend to subside — treating volatility itself as mean-reverting. The number is most useful as a gauge of whether the market is stretched or compressed.

Best timeframes

  • Scalping1m – 5mperiod ~10–20
  • Day trading5m – 15mperiod 20
  • Swing1H – daily
  • PositionDaily – weekly

Read standard deviation relative to its own recent range — it is usually consumed inside other tools rather than traded on its own.

Standard deviation vs other volatility gauges

Std DevATRHistorical Vol
MeasuresSpread around meanBar rangeReturn volatility
Uses gapsNo (closes)YesDepends
UnitsPricePrice% (annualized)
DirectionNoNoNo

Common price-action setups

How the signal typically plays out on the chart.

Volatility squeeze

Standard deviation drops to a multi-week low — the market is coiled. Wait for it to turn sharply up, then trade the breakout in the direction price actually moves.

Watch the coil
Breakout brewing
Expansion breakout

Standard deviation turns sharply up as price clears a level — the move has real dispersion behind it. Enter with the break, stopping back inside the prior range.

Buy the breakout
Real move confirmed
Low-volatility range

Standard deviation sits low and flat — price mean-reverts. Fade the range edges back toward the average, with tight stops just beyond each edge.

Fade the range
Mean reversion

Best timeframes and settings

Standard deviation applies on every timeframe, and the choice of lookback window governs its behavior — a 20-period window is the common default, matching Bollinger Bands. A shorter window makes the reading more responsive and jumpier, reacting fast to new volatility but swinging hard as single bars enter and leave; a longer window smooths it into a slower, more stable measure. Because squared deviations amplify outliers, short windows are especially sensitive to a single large bar. Swing and position traders use longer windows for a stable volatility read, while intraday traders use shorter ones. The trade-off is the usual one — responsiveness versus stability — and because standard deviation feeds so many other tools, its window is often chosen to match whatever indicator consumes it.

When and where to use it

Standard deviation is useful in any regime as a volatility gauge, but it is most often consumed inside other tools rather than traded on its own. It helps you judge whether volatility is stretched or compressed before sizing a position or anticipating a breakout — low readings warn a quiet market may be about to expand, high readings that a violent one may calm. It is asset-agnostic, applying to any instrument with a price series. Where it should not be used is as a directional signal, since it says nothing about which way price will move. It is also distorted on gappy or thin instruments where a single outlier can dominate the window. Its natural home is as an input — to Bollinger Bands, to volatility-scaled stops, to position sizing — rather than as a standalone entry tool.

Strategies that use standard deviation

The primary use is volatility-based position sizing — allocating less capital when standard deviation is high and more when it is low — so that risk per trade stays roughly constant regardless of how wild the market is. A volatility-breakout strategy watches for standard deviation compressing to an extreme low, signaling a coiled market, and prepares to trade the expansion when it comes, often in conjunction with a price breakout. A stop-placement strategy scales stop distance to standard deviation, widening stops in volatile conditions to avoid being shaken out and tightening them when the market is calm. In practice these are less about trading the standard-deviation line directly and more about using its reading to calibrate the size, timing, and risk of trades taken on other signals.

Combining standard deviation with other indicators

Standard deviation is the engine inside Bollinger Bands, which plot it as bands a set number of standard deviations above and below a moving average, so the two are intimately linked. It pairs with the Average True Range as a complementary volatility measure — ATR captures range including gaps, standard deviation captures dispersion of closes — and comparing them can be informative. Historical volatility is essentially annualized standard deviation of returns, so they tell related stories on different scales. It combines with any directional tool by supplying the volatility context that tool lacks: a breakout signal is more trustworthy when standard deviation was compressed beforehand. It is a supporting measure that makes other signals smarter rather than a signal itself.

Where standard deviation fails

Standard deviation's key limitation is that it assumes a roughly normal distribution of price changes, yet markets have fat tails — extreme moves happen far more often than the normal model implies — so it systematically understates the odds of a large shock. A single outlier bar can swing the reading sharply as it enters the window and again when it leaves, creating artificial jumps. Read as a directional tool it is useless, since it measures only magnitude. Traders who treat a low reading as a guarantee of calm, or a high reading as a signal to fade, misunderstand that volatility can stay elevated or compressed longer than expected. The safeguards are to read it relative to its own history, to respect fat tails when sizing risk, and to use it as a volatility input rather than a directional or predictive signal.

A worked example

Suppose a trader computes a 20-day standard deviation on a stock and finds it has fallen to 0.80, near the low end of its range over the past year, while the price has been drifting in a narrow band around 40. This compressed reading tells the trader the market is coiled and a volatility expansion may be near, though it gives no hint of direction. Rather than trade the standard deviation itself, the trader uses it two ways: first, to size the position larger than usual because the low volatility means a normal-sized stop risks fewer dollars per share, and second, to prepare for a breakout by marking the edges of the 40 range. When price soon breaks out above the range on expanding volatility, the 20-day standard deviation jumps from 0.80 toward 1.60, confirming the expansion, and the trader's stop, scaled to the now-higher volatility, is set wide enough to avoid the normal noise of the new, more volatile regime. The standard deviation shaped the sizing, timing, and risk — but the entry came from price.

Common mistakes

  • Reading standard deviation as directional — it reports magnitude only.
  • Assuming a normal distribution when markets have fat tails, so extremes hit more often than it implies.
  • Letting a single outlier bar swing the whole window as it enters or leaves.
  • Comparing raw standard deviation across different-priced assets.
  • Relying on one lookback in isolation, when short and long windows can disagree.