TradeLabs AILearn

Variance and Standard Deviation

Variance and standard deviation measure how spread out values are. Learn the formulas, sample vs population, annualising volatility and their role in trading risk.

Intermediate3 min readUpdated 3 Oct 2026
Markdown
Lesson 8 of 46

Variance and standard deviation measure how spread out a set of values is around its average. In trading, they are the most common measures of risk and volatility: a stock whose daily returns swing widely has a high standard deviation; one that barely moves has a low one. Standard deviation underpins historical volatility, the Sharpe ratio, position sizing by volatility, Bollinger Bands and option pricing.

The formulas#

population variance σ² = Σ (x - μ)² / N
sample variance s² = Σ (x - x̄)² / (n - 1)
standard deviation = √variance
  • μ or x̄: the mean
  • N or n: number of values

The sample formula divides by n minus 1 (Bessel's correction) to avoid underestimating variance when using a sample. In trading, you almost always use the sample version.

Variance is in squared units; standard deviation is in the original units, such as percent returns, which makes it easier to interpret.

Worked example#

Annualising volatility#

If daily returns are roughly independent, variance scales with time, so standard deviation scales with the square root of time:

annual volatility ≈ daily standard deviation × √252
monthly volatility ≈ annual volatility / √12

A daily standard deviation of 1.35% implies annual volatility of about 1.35% × 15.87 ≈ 21.4%. See Historical and Realized Volatility.

Interpreting standard deviation#

For roughly normal data:

RangeShare of values (approx.)
Within 1 standard deviation of the mean68%
Within 2 standard deviations95%
Within 3 standard deviations99.7%

Real market returns have fatter tails than the normal distribution, so moves of 3 or more standard deviations happen more often than these numbers suggest. See Normal Distribution and Fat Tails.

Where standard deviation appears in trading#

UseLesson
Historical volatilityHistorical and Realized Volatility
Implied volatility (options)Implied Volatility (IV)
Sharpe ratio (return per unit of volatility)Sharpe Ratio
Volatility based position sizingVolatility and ATR-Based Sizing
Bollinger BandsBollinger Bands
Z scoresPercentiles, Quantiles and Z-Scores
Portfolio riskPortfolio Construction

Limits of standard deviation as risk#

  • Treats upside and downside equally: a big gain counts as "risk". The Sortino ratio uses only downside deviation. See Sortino Ratio.
  • Misses tail risk: strategies that sell options can show low standard deviation until a crash. See Theta Harvesting.
  • Changes over time: volatility clusters. See GARCH.
  • Depends on the window used to calculate it.

Variance of a portfolio#

Portfolio variance depends on each asset's variance and how they move together:

σ²_p = w1² σ1² + w2² σ2² + 2 w1 w2 ρ σ1 σ2

Combining assets with low or negative correlation reduces portfolio risk. See Covariance and Correlation and Diversification.

Downside deviation and semivariance#

Because traders care more about losses than gains, some measures only count returns below a target, often zero or the risk free rate. Downside deviation is the square root of the average squared shortfall below the target. It powers the Sortino ratio and gives a clearer picture of risk for strategies with skewed returns. See Sortino Ratio and Skewness and Kurtosis.

Variance in position sizing#

Many traders size positions so that each one contributes a similar amount of volatility to the portfolio. If one asset is twice as volatile as another, it gets roughly half the position size. This inverse volatility approach keeps a single volatile position from dominating results. See Volatility and ATR-Based Sizing and Risk Budgeting and Risk Parity.

Frequently asked questions#

What is standard deviation in trading?#

A measure of how much returns vary around their average, commonly used as a measure of volatility and risk.

What is the difference between variance and standard deviation?#

Variance is the average squared deviation from the mean; standard deviation is its square root, expressed in the same units as the data.

How do you annualise daily volatility?#

Multiply the daily standard deviation by the square root of the number of trading days in a year, usually √252.

Next, learn to measure how unusual a value is in Percentiles, Quantiles and Z-Scores.

Check your understanding

3 quick questions on this lesson. Get them all right to finish it.

Turn on JavaScript to take the quiz.

Finished this lesson?Sign in to save your progress across devices.
Next lessonPercentiles, Quantiles and Z-ScoresA z score shows how many standard deviations a value is from its mean. Learn the formula, its uses in mean reversion and pairs trading, and the pitfalls.

Mentioned in