Variance & Standard Deviation
9 min read
Measure the dispersion of returns to understand risk, compare strategies, and set realistic performance expectations.
9 min read
Measure the dispersion of returns to understand risk, compare strategies, and set realistic performance expectations.
Variance is the average squared distance of your returns from their mean; standard deviation (σ) is its square root, expressed in the same units as the returns. Together they quantify how spread out a strategy's outcomes are — and therefore how much pain you will eat between you and your expected value.
Why your results will never come in a straight line — and how to survive randomness without losing your mind.
So, you've built a system with positive Expected Value (EV). Great — now comes the hard part:
Your average outcome and your real outcomes will rarely match in the short term.
Even the best strategies can:
That’s not failure. It’s variance — and every real trader must learn how to expect it, model it, and survive it.
Variance is the second central moment of your return distribution: Var(X) = E[(X − μ)²]. Plain English: it is the average of squared distances from the mean. Squared, because we want symmetric punishment for upside and downside deviations.
For a sample of n observations, use the unbiased estimator s² = Σ(xᵢ − x̄)² / (n − 1) (Bessel's correction). Standard deviation σ = √Var(X) — same units as the underlying variable, which is why traders quote σ, not variance.
Intuitively: variance is the natural spread in outcomes around your EV.
If your system has an EV of +0.5R per trade, that doesn’t mean:
You’ll gain exactly 0.5R every trade
It means:
Variance is the reality around the EV theory.
Standard deviation (σ) measures how far actual results deviate from the average.
In trading:
For example:
Both are profitable — but one is far harder to hold psychologically.
Take ten daily log returns: {+0.012, −0.008, +0.005, +0.001, −0.014, +0.009, +0.003, −0.002, +0.007, −0.001}. Mean x̄ = 0.0021. Sum of squared deviations Σ(xᵢ − x̄)² ≈ 0.000792. Sample variance s² = 0.000792 / 9 ≈ 0.0000880. Daily σ = √s² ≈ 0.0094 (about 0.94%). Annualized: σ_annual ≈ 0.0094 · √365 ≈ 18%. That is a moderate-vol crypto book; a 30%+ annualized σ is high vol.
If σ_d is the std-dev of daily log returns, σ_annual = σ_d · √k. Use k = 252 for equities (trading days/year) and k = 365 for crypto (24/7 markets). Always compute σ on log returns r_t = ln(P_t / P_{t−1}), not on prices — log returns are time-additive and closer to symmetric.
| Asset class | Periods/year | Annualization factor (√k) | Typical annualized σ |
|---|---|---|---|
| Equities (daily) | 252 | √252 ≈ 15.87 | 15–20% (SPX) |
| Crypto (daily) | 365 | √365 ≈ 19.10 | 40–80% (BTC) |
| FX majors (daily) | 252 | √252 ≈ 15.87 | 7–12% |
| Equities (hourly) | ~1,638 | √1638 ≈ 40.47 | matches daily after scaling |
| Crypto (hourly) | 8,760 | √8760 ≈ 93.59 | matches daily after scaling |
“It’s not working anymore...” → But you’ve only taken 15 trades. → And your system has a 35% win rate.
That’s normal variance — not failure.
Even with a great system, you’ll experience:
If your system has a 60% win rate, you’re still likely to hit 5–6 loss streaks over a 100-trade sample.
High variance systems require:
Most traders blow up because they size for the dream, not the distribution.
σ assumes a finite, well-behaved distribution. Real return distributions have fatter tails than Gaussian — what Gauss says is a 1-in-15,000 daily move (5σ) shows up a few times per decade in equities and several times a year in crypto. σ systematically underestimates tail risk. The next lesson — Skewness & Kurtosis — quantifies exactly how wrong it is.
Don't just model your average trade. Model your most extreme drawdown, and your biggest runup — both are coming.
Mandelbrot (1963, The Variation of Certain Speculative Prices) showed cotton prices follow stable distributions with effectively infinite variance; Taleb (The Black Swan, 2007) generalized this to all financial returns. If you take one thing from this lesson: variance is necessary, not sufficient.
Pseudocode in pandas:
import numpy as np
df['r'] = np.log(df['close']).diff()
sigma_annual = df['r'].std() * (365 ** 0.5) # crypto; use 252 for equities
Rules of thumb (annualized σ):
If your strategy's σ is materially below the underlying's σ, you have either real edge or hidden leverage assumptions — check both.
| Statistic | Formula | Robust to outliers? | Use when |
|---|---|---|---|
| Variance | E[(X−μ)²] | No | Theoretical work, Sharpe ratio |
| Std deviation | √Var | No | Reporting, annualization |
| MAD | E[|X−μ|] | Mildly | Quick & dirty |
| IQR | Q3 − Q1 | Yes | Fat-tailed / dirty data |
| Semi-deviation | √E[(X−μ)² · 1_{X<μ}] | No | Downside-only risk (Sortino input) |
Short answer: More than you think.
Sample-size bands for trusting a strategy.
| Number of Trades | Confidence Level |
|---|---|
| 10-20 | Statistically meaningless |
| 50 | Very early signal |
| 100 | Reliable enough to start trusting |
| 300+ | Strong evidence for performance |
And even at 100+, variance lives. The implicit math here is the Law of Large Numbers — your sample mean converges on the true mean, but only with enough trades.
σ treats +5% and −5% as equally "risky", it assumes the distribution is stable, and it dies on fat tails. Pair it with:
No serious risk system uses σ alone. Sortino & van der Meer (1991) introduced downside deviation; Artzner et al. (1999, Coherent Measures of Risk) proved σ is not a coherent risk measure. For a deeper dive on returns and their moments, López de Prado, Advances in Financial Machine Learning (2018), ch. 3.
Take log returns r_t = ln(P_t / P_(t−1)), compute the mean x̄, the deviations d_t = r_t − x̄, the sample variance s² = Σd_t² / (n − 1), then σ = √s². To annualize, multiply by √k where k = 252 for equities or 365 for crypto.
Use σ_annual = σ_period · √k. For daily log returns, k = 252 for equities (trading days per year) and k = 365 for crypto (which trades 24/7). Always annualize from log returns, not from prices, because log returns are time-additive.
10–20 trades are statistically meaningless, 50 is a very early signal, 100 is reliable enough to start trusting, and 300+ is strong evidence. Even at 100+ trades, variance still produces meaningful streaks and drawdowns.
Variance guarantees streaks. If your system has a 60% win rate, you are still likely to hit 5–6 consecutive losses over a 100-trade sample. That is normal variance — not a broken edge.
Expected value is your compass. Variance is the storm.
You need both:
Great systems don’t just win — they survive variance long enough to win big.
Next: σ assumes the bell curve. Real returns are skewed and fat-tailed. The next lesson — Skewness & Kurtosis — measures exactly how σ misleads you, and gives you the two extra moments every quant looks at before sizing a trade.