Volatility and standard deviation

Compute a sample standard deviation from five returns step by step, annualize it with the square root of time, and learn what volatility does not measure.

Part of the Statistics for Investors and Traders track on Agenticks. About 11 minutes, written for a intermediate reader.

Read first: Distributions and fat tails in stock returns.

Last reviewed .

Key takeaways

Volatility is how much an investment's returns bounce around. The usual way to put a number on it is the standard deviation of returns: a measure of how far, on average, each return sits from the mean return. A fund whose monthly returns always land within a whisker of 1% has low volatility. One that swings from +9% to -7% has high volatility, even if its average is also 1%. The calculation looks intimidating as a formula, so this lesson does it step by step with five numbers you can check on paper.

The formula in plain words

Sample standard deviation = square root of (sum of squared deviations from the mean / (n - 1)), where n is the number of returns. The value inside the square root is the variance. Dividing by n - 1 instead of n corrects for the fact that the mean itself was estimated from the same small sample.

Worked example: standard deviation of five daily returns

Five illustrative daily returns: +2%, -1%, +3%, 0% and +1%.

Mean ((2 - 1 + 3 + 0 + 1) / 5 = 5 / 5)1%
Deviations from the mean (each return minus 1)+1, -2, +2, -1, 0
Squared deviations (each deviation times itself)1, 4, 4, 1, 0
Sum of squares (1 + 4 + 4 + 1 + 0)10
Variance (10 / (5 - 1), in squared percent)2.5
Standard deviation (square root of 2.5 = 1.5811)1.58%
Daily standard deviationabout 1.58%

Illustrative returns. Squaring stops positive and negative deviations from cancelling out.

Deviations from the mean always add up to zero (+1 - 2 + 2 - 1 + 0 = 0), so you cannot simply average them. Squaring makes every deviation positive and gives big misses extra weight. Taking the square root at the end brings the answer back into the same units as the returns, percent, so you can compare it directly with them.

Put the steps for a sample standard deviation in the order you do them.

  1. Add the returns and divide by how many there are to get the mean
  2. Subtract the mean from each return
  3. Square each deviation
  4. Add up the squared deviations
  5. Divide by n - 1 to get the variance
  6. Take the square root

Volatility is usually quoted per year, so daily or monthly figures get scaled up. The rule is to multiply by the square root of the number of periods in a year, not by the number itself. With about 252 trading days in a year, a daily standard deviation becomes an annual one when multiplied by the square root of 252, about 15.87.

Worked example: annualizing the daily figure

Taking the 1.5811% daily standard deviation from above to a yearly figure.

Daily standard deviation1.5811%
Trading days in a year (a common convention, used here as an assumption)252
Square root of 25215.8745
Annual volatility (1.5811 x 15.8745)25.10%
If 1.5811% were a monthly figure instead (1.5811 x 3.4641, the square root of 12)5.48% a year
Annualized volatility from these daily returnsabout 25.1%

Why the square root? If each day's return is unrelated to the last, variances add up over time: 252 days carry 252 times the variance of one day. Standard deviation is the square root of variance, so it grows with the square root of time. That rule rests on two assumptions: each day's return is unrelated to the last, and the size of daily moves stays the same. Real markets bend both. Some returns drift or snap back, and volatility clusters, as the fat tails lesson described, so a daily figure measured in a calm month will understate a year that includes a storm. Treat the square root rule as a convenient approximation.

A standard deviation becomes easier to feel when you turn it into a range. If returns followed a normal bell curve, about two periods in three would land within one standard deviation of the average and about 19 in 20 within two. For the five returns above, with a mean of 1% and a standard deviation of about 1.58%, that would mean most days between -0.58% and +2.58%, and nearly all days between -2.16% and +4.16%. In a year with 25.1% annual volatility and, say, an assumed 6% average return, the one standard deviation band runs from -19.1% to +31.1%. That is a wide road for a single year, and it is only the ordinary part of it. Real returns have more quiet days and more extreme days than the bell curve, so treat these bands as a feel for the typical swing, never as a limit on the worst one.

Standard deviation is useful, and it is easy to over-read. It does measure how widely returns have spread around their own average, in both directions, and it gives a typical size of move for comparing assets and sizing positions. It does not measure: Direction. A stock rising fast and one falling fast can show similar volatility. Upside swings count as much as downside ones, which is why the Sortino ratio looks only at the downside. The worst case. Because real returns have fat tails, the largest losses are bigger than a simple multiple of the standard deviation suggests. The future. It is computed from past returns, and volatility can change suddenly. Permanent loss. A low-volatility holding can still fall and stay down. Volatility describes the ride, not where it ends. Indicators such as ATR and Bollinger Bands, covered in the volatility indicators lesson, are close cousins of this measure.

Volatility measures the size of the swings, not their direction

Two assets can have the same volatility while one climbs and the other falls. Read volatility as the width of the road, not the direction of travel.

Asset A's daily returns have a standard deviation of 1% and asset B's have 2%. Which statement is correct? B's returns have typically spread about twice as far from their average as A's That is exactly what a standard deviation twice as large describes.

You can compute and read volatility

You can now calculate a sample standard deviation by hand, annualize it with the square root of time, and say what volatility does and does not measure.

Check your understanding

What is the sample standard deviation of three returns: +3%, -1% and +1%?
2%. The mean is 1%. Deviations are +2, -2 and 0, squares 4, 4 and 0, sum 8. Divide by n - 1 = 2 to get 4, and the square root is 2%.
Using 252 trading days, a daily standard deviation of 1% is about what annual volatility?
About 15.9%. Multiply by the square root of 252, about 15.87, not by 252 itself.
Why does the sample formula divide by n - 1 rather than n?
Because the mean was estimated from the same data, which makes the raw spread around it slightly too small. Using n - 1 corrects that small downward bias, which matters most when the sample is short.
Which of these does standard deviation NOT tell you?
Whether the returns were mostly up or mostly down. Standard deviation measures spread around the average in both directions. A steady riser and a steady faller can have similar figures.

Common questions

How do you annualize daily volatility?
Multiply the daily standard deviation by the square root of the number of trading days in a year. With 252 trading days that is about 15.87, so a 1.58% daily figure becomes about 25.1% a year.
Is volatility the same as risk?
Not quite. Volatility measures how widely returns swing in both directions. It does not measure the chance of a permanent loss, and because real returns have fat tails, it understates the size of the worst days.

Terms defined in this lesson

Continue

Sources

Written and reviewed by the Agenticks Learn editorial team. How we write and check lessons.

Agenticks Learn is general education. It is not financial, investment, tax or legal advice, it does not take your situation into account, and nothing on it is a recommendation to buy, sell or hold any security or to open any account. Examples use illustrative numbers. Investing involves risk, including losing money you put in, and past performance does not predict future results. Tax rules and limits change; the official sources linked in each lesson are the final word.