Portfolio Variance

Definition · Updated November 4, 2025

Portfolio variance is a single-number measure of the total risk (volatility) of a portfolio’s returns. It combines the individual variances of each asset with the covariances (or correlations) between every pair of assets, weighted by the portfolio allocation to each asset. Portfolio variance quantifies how much the combined returns are expected to deviate from their mean; the portfolio standard deviation is the square root of that variance and is more commonly used because it is in the same units as returns.

Key takeaways

– Portfolio variance = weighted combination of individual variances and covariances between assets.
– Lower correlations (including negative correlations) among assets reduce portfolio variance and improve diversification.
– For n assets, portfolio variance = sum over all i and j of (wi * wj * Cov(i,j)). Unique covariance terms scale ~ n(n+1)/2, so calculations grow fast with many assets.
– Use variance for algebra and optimization; use standard deviation (sqrt(variance)) for interpretation.
(Source: Investopedia / Theresa Chiechi)

How portfolio variance measures risk

– Variance measures dispersion of returns around the mean; a higher variance means returns are spread out more (more volatile) and therefore riskier.
– Covariance (or correlation) captures how asset returns move together. Two volatile assets with low or negative correlation can produce a portfolio with lower variance than either asset alone.
– Portfolio variance explicitly accounts for both individual asset volatility and how asset returns interact.

Formula and process

1) Two-asset portfolio (common form)

Portfolio variance (σ_p^2) for assets 1 and 2:
σ_p^2 = w1^2 * σ1^2 + w2^2 * σ2^2 + 2 * w1 * w2 * Cov(1,2)
where Cov(1,2) = ρ12 * σ1 * σ2 (ρ12 is the correlation coefficient).

2) General n-asset form

σ_p^2 = Σ_i Σ_j w_i * w_j * Cov(i,j)
(Equivalently: σ_p^2 = w’ * Σ * w, where w is the weight vector and Σ is the covariance matrix.)

Practical steps to calculate portfolio variance (historical, step-by-step)

1. Choose frequency and time window for returns (daily, weekly, monthly; e.g., 3 years of monthly returns).
2. Collect price data for each asset and compute return series (prefer log or arithmetic returns consistently).
3. Compute the sample covariance matrix of the return series (Cov matrix). Also compute each asset’s variance and standard deviation.
4. Define portfolio weights w (they should sum to 1; use market values or target allocations).
5. Compute portfolio variance using matrix multiplication: σ_p^2 = w’ * Σ * w.
6. Compute portfolio standard deviation: σ_p = sqrt(σ_p^2).
7. (Optional) Annualize variance/standard deviation if using sub-annual returns (e.g., monthly variance * 12 for annual variance; for standard deviation multiply by sqrt(12)).

Excel and spreadsheet tips

– Covariance matrix: use COVARIANCE.P (or COVARIANCE.S for sample) across columns of returns.
– Portfolio variance (matrix form): =MMULT(TRANSPOSE(weights_range), MMULT(covariance_matrix_range, weights_range)). In older Excel versions this may be an array formula.
– Alternatively compute with SUMPRODUCT: =SUMPRODUCT(weights_range, MMULT(covariance_matrix_range, weights_range)) (may require dynamic arrays or array entry).
– To get standard deviation: =SQRT(portfolio_variance).

Python (pandas + numpy) example (outline)

1. Build a DataFrame df of returns with columns per asset.
2. cov = df.cov() # covariance matrix
3. w = np.array(weights)[:, None] # column vector
4. portfolio_variance = float(np.dot(w.T, np.dot(cov.values, w)))
5. portfolio_std = np.sqrt(portfolio_variance)

A practical two-asset example (step-by-step with numbers)

Assume:
– Stock A: value $50,000, standard deviation 20% (σA = 0.20).
– Stock B: value $100,000, standard deviation 10% (σB = 0.10).
– Correlation ρAB = 0.85.
– Portfolio weights: wA = 50k / 150k = 0.3333; wB = 100k / 150k = 0.6667.

Compute covariance:

Cov(A,B) = ρAB * σA * σB = 0.85 * 0.20 * 0.10 = 0.017

Compute variance terms:

wA^2 * σA^2 = (0.3333^2) * (0.2^2) ≈ 0.004444
wB^2 * σB^2 = (0.6667^2) * (0.1^2) ≈ 0.004444
2 * wA * wB * Cov(A,B) = 2 * 0.3333 * 0.6667 * 0.017 ≈ 0.007556

Sum:

σ_p^2 ≈ 0.004444 + 0.004444 + 0.007556 = 0.016444 (or 1.6444%)

Portfolio standard deviation:

σ_p = sqrt(0.016444) ≈ 0.1282 → 12.82%

Note: variance here is in squared return units; standard deviation is easier to interpret as percent volatility.

How Modern Portfolio Theory (MPT) influences portfolio variance

– MPT (Harry Markowitz) uses expected returns, variances, and covariances to find portfolios that maximize expected return for a given level of risk or minimize risk for a given level of return.
– The efficient frontier plots portfolios by expected return (y-axis) and standard deviation (x-axis). Portfolio variance (and standard deviation) is the x-axis measure of risk.
– MPT’s key insight: combining assets with low or negative correlations can reduce portfolio variance and move you closer to the efficient frontier.

Where standard deviation fits in

– Standard deviation = sqrt(variance). It measures volatility in the same units as returns (e.g., percent).
– Practitioners and clients usually prefer standard deviation because it’s directly interpretable (expected annual volatility, etc.).
– Variance is used in math, optimization, and matrix algebra because it combines linearly via covariance matrices.

Important limitations and practical considerations

– Estimation error: historical variances, covariances, and correlations are noisy and can change over time. Small changes in inputs can materially change optimized portfolios.
– Correlations are not stable: assets that were uncorrelated in calm markets can become highly correlated in stress.
– Variance treats upside and downside the same—investors may care more about downside risk. Consider downside risk measures (semi-variance, Value-at-Risk, CVaR) if needed.
– Non-normal returns: many assets have fat tails or skewness; variance may understate tail risk.
– Transaction costs, taxes, constraints and implementation shortfalls are not captured by variance alone.
– For large portfolios, build and use software (Excel with matrix functions, Python, R, or portfolio-optimization tools) to handle the covariance matrix and optimization.

Practical steps to lower portfolio variance

1. Re-assess allocations: reduce weight to high-volatility assets if overall volatility is too high.
2. Increase diversification: add assets with low or negative correlations to existing holdings (e.g., bonds, alternative strategies).
3. Use hedges: options, futures or diversifying exposures to offset downside risk (but consider costs).
4. Regularly rebalance: drift can change weights and increase variance; rebalancing restores target risk profile.
5. Stress-test: simulate periods of market stress to see how correlations and variance change.
6. Use robust estimation techniques: shrinkage estimators for covariance matrices, factor models, or Bayesian approaches can produce more stable inputs.

The bottom line

Portfolio variance is the mathematically correct way to combine individual asset risk and co-movement into a single measure of portfolio risk. In practice, investors prefer standard deviation (the square root of variance) to interpret volatility. Modern portfolio theory uses these inputs to construct efficient portfolios, but practical limitations—unstable correlation estimates, non-normal returns, and implementation frictions—mean that judgment, stress testing, and robust estimation methods remain essential.

Source

– Investopedia, “Portfolio Variance” by Theresa Chiechi. https://www.investopedia.com/terms/p/portfolio-variance.asp

(Continuation — expanded article with additional sections, examples, practical steps, and a conclusion)

Practical steps to compute portfolio variance (step-by-step)

1. Gather return data
– Choose the return frequency (daily, weekly, monthly). Consistency matters.
– Collect historical returns for each asset in the portfolio over the chosen period.

2. Compute individual asset statistics

– Calculate each asset’s sample mean return (optional for variance computation) and sample standard deviation (σi).
– Convert standard deviations to variances: variance_i = σi^2.

3. Compute covariances (or correlations)

– Compute the covariance matrix Σ where Σij = cov(return_i, return_j).
– Alternatively compute the correlation matrix and convert to covariances via Σij = ρij · σi · σj.

4. Choose portfolio weights

– Decide weights vector w = [w1, w2, …, wn] (weights sum to 1 if using proportion of total portfolio value).

5. Compute portfolio variance

– Matrix form (recommended for n>2): portfolio variance = w′ Σ w (where w′ is the transpose of w).
– For small n you can use the expanded formula:
– Two assets: σp^2 = w1^2σ1^2 + w2^2σ2^2 + 2w1w2cov12.
– Three assets extends with all pairwise covariances.

6. Get portfolio standard deviation

– σp = sqrt(portfolio variance). This is the volatility measure most commonly used.

7. Interpret and act

– Compare σp to your risk tolerance and target return.
– Consider rebalancing, introducing less correlated assets, or changing weights if variance is too high.

Worked example — two-asset portfolio (numeric)

– Portfolio: Stock A ($50,000), Stock B ($100,000).
– Weights: wA = 50,000 / 150,000 = 0.3333; wB = 0.6667.
– Asset SDs: σA = 20% = 0.20; σB = 10% = 0.10. VarA = 0.04, VarB = 0.01.
– Correlation: ρAB = 0.85 → covAB = ρAB·σA·σB = 0.85·0.20·0.10 = 0.017.
– Portfolio variance:
σp^2 = wA^2·VarA + wB^2·VarB + 2·wA·wB·covAB
= (1/3)^2·0.04 + (2/3)^2·0.01 + 2·(1/3)·(2/3)·0.017
= 0.0044444 + 0.0044444 + 0.0075556 ≈ 0.0164444 (or 1.644%).
– Portfolio standard deviation:
σp = sqrt(0.0164444) ≈ 0.1282 = 12.82%.

Interpretation: The combined portfolio volatility (12.82%) is lower than Stock A alone (20%) because diversification reduces risk, even though both assets are positively correlated.

Three-asset example (matrix approach)

– Let w = [w1, w2, w3]′ and Σ be the 3×3 covariance matrix:
Σ = [[σ1^2, cov12, cov13],
[cov12, σ2^2, cov23],
[cov13, cov23, σ3^2]]
– Compute σp^2 = w′ Σ w. Use spreadsheet matrix functions or numpy in Python for computation.
– This matrix approach scales naturally as n grows; it avoids manually enumerating O(n^2) terms.

Excel how-to (practical)

1. Put historical returns in columns (one asset per column).
2. Use =COVARIANCE.P(range1,range2) to build covariance matrix (or =CORREL for correlation).
3. Put weights in a column.
4. Use MMULT and TRANSPOSE:
– Compute temp = MMULT(TRANSPOSE(weights), covariance_matrix) — yields a 1×n row.
– Then variance = MMULT(temp, weights) → gives a single cell (w′ Σ w).
5. Take the square root for standard deviation.

Python (numpy) snippet

– Conceptual code:
import numpy as np
returns = np.array([…]) # shape: periods × assets
cov = np.cov(returns, rowvar=False, ddof=0) # population covariance
w = np.array([w1, w2, …, wn])
variance = w.T @ cov @ w
stdev = np.sqrt(variance)

Portfolio variance decomposition and marginal contributions

– Marginal contribution to standard deviation (MCSD) or variance:
– The marginal contribution of asset i to portfolio variance = (Σ w)_i, where Σ w is the vector product of the covariance matrix and weights.
– The absolute contribution (component contribution) of asset i = wi · (Σ w)_i.
– Percent contribution = [wi · (Σ w)_i] / (w′ Σ w).
– Use this decomposition to see which holdings are driving overall risk, not just which have the highest individual volatility.

How variance informs portfolio construction

– Minimum-variance portfolio: find weights that minimize σp^2 subject to constraints (e.g., sum of weights=1). This is a quadratic programming problem solved analytically or numerically.
– Efficient frontier (MPT): for each target return, choose weights that minimize variance; the set of these portfolios forms the efficient frontier.
– Risk parity: allocate so each asset contributes equally to total portfolio risk (common in multi-asset funds).
– Factor models: instead of estimating full Σ for many assets, model returns as exposures to a few factors (e.g., market, size, value). Factor covariance matrices are smaller and often more stable.

Limitations and practical cautions

– Estimation error: sample covariances and variances are noisy, especially with short data windows or many assets. This can lead to unstable optimized portfolios.
– Nonstationarity: correlations change through time — often increase in market stress (“correlation breakdown”).
– Dimensionality: Σ has n(n+1)/2 unique elements. When n is large, estimation and inversion (for optimization) can be unstable.
– Outliers and non-normal returns: variance assumes squared deviations capture risk; it treats upside and downside equally and may understate tail risk.
– Transaction costs, taxes, liquidity constraints: a theoretically low-variance portfolio may be impractical.

Techniques to improve estimation

– Shrinkage estimators (e.g., Ledoit-Wolf) blend sample covariance with a structured estimator (identity, single factor) to reduce estimation error.
– Factor models (e.g., Fama-French) reduce dimensionality and improve stability.
– Regularization and robust optimization include penalties to avoid extreme weights.
– Bayesian approaches and bootstrapping for more conservative estimates.

Stress testing and alternative risk measures

– Complement variance with scenario analysis and stress testing (shock asset returns, change correlations).
– Consider downside risk metrics like downside deviation, Value at Risk (VaR), Conditional VaR (CVaR), or expected shortfall for investors focused on losses rather than total volatility.

Practical portfolio management steps using variance

1. Define objectives and constraints (target return, max volatility, liquidity needs).
2. Select asset universe and collect data (long enough history but mindful of regime changes).
3. Estimate returns, variances, and covariances (and consider shrinkage/factor methods).
4. Optimize (min-variance, mean-variance, risk parity, etc.) respecting real-world constraints.
5. Decompose variance to identify major risk contributors.
6. Backtest and stress test the proposed portfolio across different market conditions.
7. Implement with attention to transaction costs, taxes, and turnover limits.
8. Monitor and rebalance periodically; update covariance estimates as conditions evolve.

Example — using covariance shrinkage vs. sample covariance

– Suppose you have 100 assets but only 60 months of returns. The sample covariance will be poorly estimated (matrix possibly ill-conditioned).
– Ledoit-Wolf shrinkage mixes the sample covariance with a structured target (e.g., average correlation × variances) to produce a more stable Σhat.
– Result: optimized portfolios are less extreme (fewer tiny/huge weights) and often perform better out-of-sample.

When variance is not the right single metric

– For many investors, downside risk matters more than total variance; consider downside-focused measures.
– For tail-conscious investors (pension funds, insurers), use CVaR or stress scenarios.
– For portfolios with asymmetric payoffs (options, alternatives), variance can misrepresent true exposure.

Additional examples and quick calculations

– Low/negative correlation benefit: Two assets with identical variances σ^2 and correlation ρ:
– σp^2 = σ^2 (w1^2 + w2^2 + 2w1w2ρ) = σ^2(1 + 2w1w2(ρ−1)).
– As ρ decreases, σp^2 falls; if ρ < 1, diversification benefit exists. If ρ = −1 and weights are properly chosen, you can eliminate variance entirely.
– Equal-weighted large portfolio: as n increases with independent assets of identical variance, portfolio variance declines proportionally to 1/n. Correlations and common factors slow this diversification benefit in practice.

Concluding summary

Portfolio variance is a fundamental building block of modern portfolio risk measurement. It quantifies how the volatilities of individual assets and their pairwise relationships (covariances/correlations) combine to determine total portfolio risk. Practical computation uses the covariance matrix and the weight vector via σp^2 = w′ Σ w, with the square root giving portfolio standard deviation.

In practice:

– Variance (and its square root, standard deviation) is useful for diversification decisions and optimization.
– Estimation error and time-varying correlations require careful treatment (shrinkage, factor models, stress testing).
– Complement variance with downside and tail-risk measures for a fuller risk picture.
– Use decomposition and marginal contributions to target risk sources and build portfolios aligned with objectives.

References and further reading

– Markowitz, H. (1952). Portfolio Selection. Journal of Finance. (Foundation of modern portfolio theory.)
– Ledoit, O., & Wolf, M. (2004). A well-conditioned estimator for large-dimensional covariance matrices. Journal of Multivariate Analysis.
– Investopedia: Portfolio Variance (source provided by user): https://www.investopedia.com/terms/p/portfolio-variance.asp

[[END]]

Related Terms

Further Reading