What is volatility? How it is measured
By Oalgo · Last reviewed
Volatility is how much price moves, and how fast. A calm market changes little from candle to candle, and a volatile one changes a lot. It measures the size of the moves, not their direction: a price that rises steadily and one that falls steadily can have the same volatility.
How is volatility measured?
#| Measure | What it measures | Usual setting |
|---|---|---|
| Candle range | The high minus the low of one candle. | – |
| ATR | The average true range: the size of a candle's move including any gap from the candle before, averaged over N candles. | ATR, period 14 |
| Standard deviation | How far the last N closes spread around their own average. | StdDev, period 20 |
| Bollinger Bands | Bands a set number of standard deviations around a moving average, so they widen when volatility rises. | Bollinger, period 20, 2 standard deviations |
| Keltner Channels | Bands a set number of ATRs around a moving average. | Keltner, period 20, multiplier 2.0 |
What does a worked example look like?
#Two made-up series of six closes both start at 100 and end at 101, a net change of 1%. Their volatility is very different.
| Calm series | Wide series | |
|---|---|---|
| Closes | 100, 101, 100, 101, 100, 101 | 100, 106, 98, 107, 97, 101 |
| Net change, first to last close | 1.0% | 1.0% |
| Average size of a move from one close to the next, ignoring direction | 1.0% | 7.2% |
| Highest close minus lowest close | 1 | 10 |
| Standard deviation of the six closes (n − 1, as the StdDev block uses) | 0.55 | 4.14 |
The net change cannot tell the two series apart. The other three rows show the wide series moving about seven to ten times as much.
How do people use volatility in rules?
#- A filter: enter only when ATR is above its own average over the last 50 candles, or only when it is below.
- A stop or a trailing distance set as a multiple of ATR, so that it widens when price moves more.
- A smaller position when volatility is high, so that a stop of the same ATR multiple risks the same amount.
- A band that squeezes: Bollinger Bands narrowing to their narrowest width of the last N candles.
What can volatility not tell you?
#Volatility does not say which way price will go. It is measured on past prices, and the next candles can be calmer or wilder. Different measures give different numbers: ATR counts the gap from the candle before, while the standard deviation of closes does not, and both change with the timeframe. This page covers volatility measured from past prices only.
In Oalgo you can tell Oalgo AI your volatility rule, such as “only when ATR is above its 50-candle average”, in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
Read next
- What is ATR? Average True Range explainedATR measures how far price typically moves in one candle. Learn how it is calculated, how to read it, and how to use it in your own rules.
- Standard Deviation indicator explained: how to read itStandard Deviation measures how far recent closes are spread around their average. Learn how it is calculated, how to read it, and how to test StdDev rules.