Back to Blog
finance2026-07-105 min

Portfolio Volatility Calculator: Diversification and Risk

Calculate portfolio volatility using variance-covariance matrices, correlation coefficients, and diversification benefits. Learn minimum variance portfolio optimization.


Portfolio Volatility Calculator: Diversification and Risk

Portfolio volatility measurement is a cornerstone of Modern Portfolio Theory and risk management. Understanding how individual asset volatilities combine to create portfolio-level risk enables investors to construct diversified portfolios that optimize risk-adjusted returns.

A colleague of mine, Natalie, once showed me two portfolios on her screen. Same expected return. One had a portfolio standard deviation of 18%, the other just 11%. The difference? The low-volatility portfolio had a mix of assets with correlations closer to zero. Same destination, different roller coaster. Most people pick the smoother ride.


stock market candlestick chart on dark screen

Photo by Maxim Hopman on Unsplash

Mathematical Foundation

Portfolio volatility is fundamentally different from the sum of individual asset volatilities due to correlation effects. The portfolio variance formula captures these relationships:

Portfolio Variance: σ²_p = w'Σw

Where:

  • w = Vector of portfolio weights (allocation percentages)

  • Σ = Covariance matrix of asset returns

  • w' = Transpose of the weight vector


For a two-asset portfolio, this simplifies to:

σ²_p = w₁²σ₁² + w₂²σ₂² + 2w₁w₂ρ₁₂σ₁σ₂

Where ρ₁₂ represents the correlation coefficient between assets 1 and 2.

Understanding Correlation

Correlation (ρ) measures the linear relationship between two assets' returns, ranging from -1.0 to +1.0:

Positive Correlation (0 to +1): Assets tend to move in the same direction. A correlation of +1.0 means perfect co-movement, providing no diversification benefit.

Negative Correlation (0 to -1): Assets tend to move in opposite directions. A correlation of -1.0 provides maximum diversification benefit.

Zero Correlation (0): Assets show no linear relationship in their movements.

Historical correlations between major asset classes:

  • US Stocks / International Stocks: 0.70-0.85

  • US Stocks / US Bonds: -0.10 to 0.30 (varies by time period)

  • Stocks / Gold: -0.05 to 0.20

  • Real Estate / Stocks: 0.50-0.70


The Diversification Benefit

Diversification reduces portfolio volatility below the weighted average of individual volatilities:

Weighted Average Volatility = Σ(w_i × σ_i)

Actual Portfolio Volatility < Weighted Average Volatility (when correlations < 1.0)

The difference between weighted average volatility and actual portfolio volatility represents the diversification benefit.

Example:
Asset A: 15% volatility, 60% weight
Asset B: 20% volatility, 40% weight
Correlation: 0.3

Weighted Average = (0.6 × 0.15) + (0.4 × 0.20) = 0.17 or 17%

Portfolio Variance = (0.36 × 0.0225) + (0.16 × 0.04) + (2 × 0.6 × 0.4 × 0.3 × 0.15 × 0.20)
= 0.0081 + 0.0064 + 0.00432 = 0.01882

Portfolio Volatility = √0.01882 = 0.1372 or 13.72%

Diversification benefit: 17% - 13.72% = 3.28% volatility reduction

Minimum Variance Portfolio

The minimum variance portfolio represents the allocation that produces the lowest possible portfolio volatility. Finding this optimal allocation requires matrix algebra:

w_min = Σ⁻¹ × 1 / (1' × Σ⁻¹ × 1)

Where Σ⁻¹ is the inverse of the covariance matrix and 1 is a vector of ones.

For a two-asset case:
w₁_min = (σ₂² - ρσ₁σ₂) / (σ₁² + σ₂² - 2ρσ₁σ₂)

The minimum variance portfolio often allocates heavily toward lower-volatility assets and may not maximize returns—it only minimizes risk.

Practical Calculation Steps

Step 1: Collect Historical Returns
Gather monthly or daily returns for each asset over a consistent time period (typically 3-5 years).

Step 2: Calculate Covariances
Compute the covariance between each pair of assets using:
Cov(A,B) = Σ[(R_A - Mean_A)(R_B - Mean_B)] / (n-1)

Step 3: Construct Covariance Matrix
Arrange covariances in a square matrix with variances on the diagonal.

Step 4: Apply Portfolio Variance Formula
Multiply the weight vector, covariance matrix, and transposed weight vector.

Step 5: Calculate Portfolio Volatility
Take the square root of portfolio variance.

Time-Varying Volatility

Portfolio volatility is not static. Several approaches account for time-varying volatility:

Rolling Window: Calculate volatility over a trailing period (e.g., 60 days), updating daily.

Exponential Moving Average (GARCH): Weight recent observations more heavily, capturing volatility clustering.

Implied Volatility: Use options market prices to estimate forward-looking volatility expectations.

Risk Budgeting

Portfolio volatility enables risk budgeting—allocating risk capital across strategies or asset classes:

Risk Contribution = w_i × (Σw)_i / σ_p

Where (Σw)_i is the ith element of the product of the covariance matrix and weight vector.

Risk budgeting ensures that each position's contribution to total portfolio risk aligns with investment conviction and risk appetite.

Limitations of Volatility as Risk

While portfolio volatility is widely used, it has limitations:

  • Normal Distribution Assumption: Returns may exhibit fat tails and skewness not captured by variance.

  • Symmetric Risk: Volatility treats upside and downside equally, while most investors care primarily about downside risk.

  • Historical Dependence: Past volatility may not predict future volatility accurately.

  • Non-Stationarity: Market regimes change, altering historical correlations.
  • Conclusion

    Portfolio volatility calculation provides essential insight into diversification benefits and risk characteristics. By understanding the mathematical foundations of variance-covariance analysis, correlation effects, and minimum variance optimization, investors can construct portfolios that better align with their risk tolerance and investment objectives.