Diversification and Portfolio Risk Explained
Clear, practical guide to diversification and portfolio risk: formulas, correlation, and a worked two-asset example you can follow step-by-step.
Why diversification matters: portfolio risk basics
Diversification is often said to be the only "free lunch" in investing. That phrase captures an important truth: by combining assets whose returns don't move exactly the same way, an investor can reduce portfolio volatility without necessarily lowering expected return. But how does diversification work in practice? This article unpacks the mechanics, shows the math, and walks through a concrete, worked example.
Key concepts you will learn:
- How portfolio variance is computed
- The role of covariance and the correlation between assets
- How diversification reduces risk, quantitatively
This is educational content only — not investment advice or a guarantee of future performance.
Portfolio risk basics: variance, standard deviation, covariance
- Variance (σ^2) measures the spread of returns around the mean. Standard deviation (σ) is the square root of variance and is often used as a volatility measure.
- Covariance measures how two assets move together. Positive covariance means they tend to move in the same direction; negative covariance means they tend to move opposite.
- Correlation (ρ) standardizes covariance to the range [-1, 1]:
Cov(X, Y) = ρ_{X,Y} σ_X σ_Y
Correlation is often more intuitive than covariance because it is dimensionless and bounded.
Two-asset portfolio variance: the formula
For a portfolio with two assets A and B with weights w_A and w_B (w_A + w_B = 1), the portfolio variance is:
σ_p^2 = w_A^2 σ_A^2 + w_B^2 σ_B^2 + 2 w_A w_B * Cov(A, B)
Substituting covariance in terms of correlation:
σ_p^2 = w_A^2 σ_A^2 + w_B^2 σ_B^2 + 2 w_A w_B ρ_{A,B} σ_A * σ_B
The portfolio standard deviation is σ_p = sqrt(σ_p^2).
This formula shows why correlation matters: if ρ_{A,B} < 1, the cross-term reduces variance relative to a single asset weighted average. If ρ_{A,B} = 1, no diversification benefit exists; if ρ_{A,B} < 0, the reduction can be substantial.
Worked example: two assets, step-by-step
Assume two hypothetical assets, A and B, with the following estimated annualized metrics (illustrative numbers only):
- Expected return: not used in variance calculation but assume 8% for A, 6% for B (for context)
- Standard deviation: σ_A = 18% (0.18), σ_B = 12% (0.12)
- Correlation between assets: ρ_{A,B} = 0.4
- Portfolio weights: w_A = 60% (0.6), w_B = 40% (0.4)
Step 1 — compute individual squared terms:
- w_A^2 σ_A^2 = (0.6)^2 (0.18)^2 = 0.36 * 0.0324 = 0.011664
- w_B^2 σ_B^2 = (0.4)^2 (0.12)^2 = 0.16 * 0.0144 = 0.002304
Step 2 — compute covariance term:
- σ_A σ_B = 0.18 0.12 = 0.0216
- Cov(A,B) = ρ_{A,B} σ_A σ_B = 0.4 * 0.0216 = 0.00864
- Cross-term = 2 w_A w_B Cov(A,B) = 2 0.6 0.4 0.00864 = 0.8 * 0.00864 = 0.006912
Step 3 — sum to get portfolio variance:
- σ_p^2 = 0.011664 + 0.002304 + 0.006912 = 0.02088
Step 4 — portfolio standard deviation:
- σ_p = sqrt(0.02088) ≈ 0.1446 or 14.46%
Interpretation: a 60/40 split of these two assets yields an estimated portfolio volatility of ~14.5%, lower than asset A (18%) and somewhat higher than asset B (12%). The reduction from 18% to 14.5% comes from diversification because ρ = 0.4 < 1.
If correlation were higher (say 0.9), the covariance term would be larger and the diversification benefit smaller. If correlation were negative (say -0.2), σ_p would fall even more.
Generalizing: multi-asset portfolios and the covariance matrix
For n assets, portfolio variance is:
σ_p^2 = w^T Σ w
where w is the column vector of weights and Σ is the n×n covariance matrix (diagonal = variances, off-diagonals = covariances). Calculating σ_p this way allows you to incorporate all pairwise relationships.
Practical notes:
- Estimation error: historical estimates of σ and ρ can be noisy. Small-sample correlation estimates can be misleading, especially during market stress when correlations often rise.
- Diversification across truly independent risk drivers (e.g., stocks, bonds, commodities, long/short strategies) gives stronger benefits than adding many similar stocks.
- Rebalancing: maintaining target weights requires periodic rebalancing. Rebalancing enforces buy-low/sell-high discipline but can incur transaction costs and tax events.
How to use this in portfolio construction (step-by-step)
- Choose a target objective (e.g., target volatility, target expected return, risk budget per asset).
- Estimate expected returns, volatilities, and correlations using an appropriate lookback window (be mindful of regime changes).
- Build a covariance matrix and compute candidate portfolio variances for different weight sets using σ_p^2 = w^T Σ w.
- Optimize weights against constraints (e.g., no shorting, max weight) if desired — simple mean-variance optimization is common but sensitive to input errors.
- Test via backtesting and scenario analysis (stress correlations up to 1 during crises to see worst-case volatility).
- Implement and rebalance with a rules-based schedule.
What correlation between assets really means in practice
Correlation quantifies linear co-movement, but it's not static. In calm markets, correlations may be low; in crises, they often converge higher. Always stress-test assumptions and consider tail-dependence measures for extreme-event risk.
You can put these steps into practice without risking capital — try building and rebalancing simulated portfolios in a sandbox. For example, AIYUG's free paper-trading race (https://aiyug.trading/race) is one place to practice constructing diversified portfolios with virtual money and real market data.
Final cautions
Diversification reduces certain types of risk (idiosyncratic risk) but cannot eliminate market (systematic) risk. Estimation errors in returns, volatilities, and correlations can materially affect outcomes. This article explains mechanics and provides a reproducible example — use it for learning and testing, not as a substitute for your own analysis.
FAQ
How does correlation between assets affect diversification?
Correlation determines how much two assets move together. Lower or negative correlation reduces portfolio variance via the covariance term in the variance formula. If correlation is 1, no diversification benefit exists; if it is less than 1, combining assets can lower overall volatility.
Can diversification eliminate all risk?
No. Diversification primarily reduces idiosyncratic (asset-specific) risk. Systematic market risk cannot be fully eliminated by diversification across public assets. During crises, correlations often rise, reducing diversification benefits.
Which inputs are most important when calculating portfolio risk?
The most important inputs are asset volatilities (standard deviations) and the covariance or correlation matrix. Expected returns matter for optimization but do not affect variance directly. Be aware that historical estimates can be noisy and should be stress-tested.
How Crypto Trading Differs From Stock Trading
A practical guide comparing mechanics, risk, and strategy — with formulas and a worked example for crypto volatility trading and bitcoin trading basics.
How Forex Trading Works for Beginners
A practical guide to currency trading basics, forex pairs explained, pip math, position sizing and a worked example to start learning responsibly.
Order Types Explained: Market, Limit, Stop Orders
Clear explanations and a worked example of market, limit, stop and stop-limit orders, how they execute, and when retail traders might use each.