insideout Get Pro

02 · Diversification

Free

Portfolio and Risk, lesson 2

Diversification

Why mixing assets lowers risk, and when it stops working.

Put money in two things that don't move in lockstep, and the pot swings less than its parts. This lesson works out by how much, where it stops helping, and how to keep the mix you chose. You need volatility from Risk and return, and correlation from Statistics: a number from −1 to +1 for how closely two things move together.

By the end, you can:

  1. Work out the return and volatility of a mix of two assets.
  2. Find the volatility of many stocks held equally, and the floor it can't go below.
  3. Rebalance a portfolio back to the weights you chose.

Part 1. Two assets in one pot

Work out the return and volatility of a mix of two assets.

Asset A averages 6% a year with 20% volatility. Asset B averages 9% with 30%. Their correlation is 0.3: they tend to move the same way, but loosely. Split your money half and half. Does the mix swing like the average of the two?

Example 1.1

Half in A, half in B

A: 6% average, 20% volatility. B: 9% average, 30% volatility. Correlation 0.3. Half your money goes in each. What are the mix's average return and volatility?

  1. Average the returns0.5 × 6% + 0.5 × 9% = 7.5%

    A mix's return is always the weighted average of its parts.

  2. Add the two variance terms0.5² × 0.20² + 0.5² × 0.30² = 0.0100 + 0.0225

    Each half carries its share squared times its variance.

  3. Add the cross term2 × 0.5 × 0.5 × 0.3 × 0.20 × 0.30 = 0.0090

    How the two move together: twice both shares, times the correlation, times both volatilities.

  4. Take the root√(0.0100 + 0.0225 + 0.0090) = √0.0415 = 20.4%

    The weighted average of the two volatilities would be 25%.

Answer7.5% a year with 20.4% volatility: the average return of the two, with about a fifth less swing.

The return averages out, but the volatility comes in under the average. When A has a bad year, B often has an ordinary one, so part of A's swing is cancelled by B, and the other way round. The lower the correlation, the smaller the cross term, and the more cancels.

10%20%30%0%25%50%75%100%share of the money in Aall in Ball in A25%20.4%correlation +10.3−1
Figure 1The volatility of every mix of A and B. At correlation +1, the dashed line, it's the weighted average. At 0.3 the curve sags below it. At −1 one mix, 60% in A, cancels every swing.

Diversification and covariance

Spreading money across assets that don't move in lockstep, so that part of their swings cancel, is diversification. In the cross term, ρσAσB is the covariance of A and B, with ρ, read "rho", the correlation. A table of every pair's covariance is the covariance matrix. With a share w in A:

σ² = w²σA² + (1 − w)²σB² + 2w(1 − w)ρσAσB

At a correlation of +1 the cross term is 0.0300, and the volatility comes to exactly 25%: nothing cancels. Below +1, diversification cuts the swing without touching the average return. Lower risk usually costs some return, which makes this the exception worth knowing.

Your turn

Two assets each have 20% volatility and a correlation of 0. You put half your money in each. What's the mix's volatility?

Each half carries a variance of 0.5² × 0.20² = 0.01, and with correlation 0 they add: 0.02. Its square root is 14.1%, which is 20% divided by √2.

Part 2. Many stocks, and the floor

Find the volatility of many stocks held equally, and the floor it can't go below.

Two assets help. What about twenty? Spread your money equally over N stocks. Each swings 30% a year, and every pair has a correlation of 0.2. Part of each stock's variance, ρσ², is shared with all the others. The rest, (1 − ρ)σ², is its own.

Example 2.1

Twenty stocks

Equal money in 20 stocks, each 30% volatile, every pair correlated 0.2. What's the portfolio's volatility? And how low can it go, however many stocks you add?

  1. The shared partρσ² = 0.2 × 0.30² = 0.018

    This part moves every stock together, so averaging them leaves it as it is.

  2. Each stock's own part(1 − ρ)σ² / N = 0.8 × 0.09 / 20 = 0.0036

    Own news is uncorrelated across stocks, so, like the standard error of an average, it shrinks as one over N.

  3. Add and take the root√(0.018 + 0.0036) = √0.0216 = 14.7%

    About half of one stock's 30%.

  4. Let N grow√0.018 = 30% × √0.2 = 13.4%

    The own part fades away. Twenty stocks already get within 1.3 points of this floor.

Answer14.7% with 20 stocks, and never below 13.4%.

Each stock's own news, a product launch or a lawsuit, is as likely to be good as bad, so across many stocks it cancels out. What they all share, such as the economy, interest rates and the mood of the market, moves every stock together. No amount of spreading removes it.

10%20%30%11020304050number of stocks, equal money in each1 stock: 30%10: 15.9%20: 14.7%floor 13.4%the shared part stayshowever many stocks you add
Figure 2Equal money spread over more and more stocks. The first ten do most of the work. After that the curve flattens onto the floor, the part every stock shares.

Systematic and idiosyncratic risk

The shared part that diversification can't remove is systematic risk, or market risk. Each stock's own part, which cancels across many stocks, is idiosyncratic risk, or specific risk. For N stocks with equal money:

σp = σ√(ρ + (1 − ρ) / N), floor σ√ρ

The same formula limits correlations. A variance can't be negative, so ρ + (1 − ρ) / N ≥ 0, which gives ρ ≥ −1 / (N − 1). Two assets can sit at −1, but three that share one correlation can't go below −½. Many assets can't all hedge each other.

Correlations aren't fixed, either. When stocks start to fall together, ρ rises, and the floor rises with it.

Your turn

In a sell-off, the correlation between stocks jumps from 0.2 to 0.6. Where's the floor now for a portfolio of many stocks, each 30% volatile?

30% × √0.6 = 23.2%. Diversification is only as good as the correlations behind it, and they aren't fixed.

Part 3. Keeping the mix

Rebalance a portfolio back to the weights you chose.

Everything so far assumed the weights stay put. They don't. Whatever rises grows into a bigger share of the pot, and the pot's risk drifts with it. Take a pot that starts 60% in a stock fund and 40% in a bond fund.

Example 3.1

A 60/40 pot after a good year for stocks

You put $6,000 in a stock fund and $4,000 in a bond fund. Over a year the stock fund gains 25% and the bond fund 2%. What did the pot return, what are its weights now, and how much do you move to get back to 60/40?

  1. Grow each part$6,000 × 1.25 = $7,500; $4,000 × 1.02 = $4,080

    Each fund grows by its own return.

  2. Return of the pot$11,580 / $10,000 − 1 = 15.8%

    The same as the weighted average, 0.6 × 25% + 0.4 × 2%.

  3. The weights now$7,500 / $11,580 = 64.8% in stocks

    Stocks grew faster, so they're now more than 60% of the pot.

  4. Find the target and the gap0.6 × $11,580 = $6,948; $7,500 − $6,948 = $552

    Sell $552 of the stock fund and buy $552 of the bond fund.

AnswerThe pot returned 15.8% and is now 64.8% stocks. Moving $552 from stocks to bonds puts it back at 60/40.

Rebalancing sells some of what rose and buys what lagged. It doesn't predict which will do better next. It keeps the risk where you chose it. Left alone, a pot drifts towards whatever rises most, and if that's the more volatile part, the pot's volatility creeps up without anyone deciding it should.

$6,00060%$4,00040%Start$10,000 in all$7,50064.8%$4,08035.2%A year later$11,580 in all$6,94860%$4,63240%Rebalanced$11,580 in allmove$552stock fundbond fund
Figure 3The pot at the start, after a year, and after rebalancing. Moving the $552 in orange restores 60% and 40% of the new total.

Rebalancing

Trading a portfolio back to its target weights is rebalancing. For each holding, the trade is its target share of the new total minus what it holds now. A positive number means buy, and a negative one means sell.

0.6 × $11,580 − $7,500 = −$552

Two traps. Moving the whole gain overshoots, because each dollar you move comes off one side and lands on the other. And every trade costs something, plus tax in a taxable account. So people rebalance on a schedule, say once a year, or when a weight drifts past a band, such as 5 points from its target.

Your turn

You start with $5,000 in a stock fund and $5,000 in a bond fund. A year later the stock fund holds $6,400 and the bond fund $5,200. How much do you move from stocks to bonds to get back to half and half?

The pot is $11,600, so half is $5,800 each. The stock fund holds $600 more than that, so move $600. Moving the $1,200 gap would just swap the two amounts.

Where you'll meet it

In interviews

"Two assets with 20% and 30% volatility and a correlation of 0.3: what's the volatility of a 50/50 mix?" is a standard warm-up. So is the lowest correlation N assets can all share, −1 / (N − 1), which tests whether you know a covariance matrix can't hold just any numbers.

On the job

Risk teams estimate correlations from recent data, then ask what happens if they change, because correlations measured in a calm period are estimates, not promises. Stress tests, later in this module, push them up on purpose. And a fund that promises a fixed mix, such as 60% stocks and 40% bonds, has to rebalance to keep that promise.

Two assets, many stocks and a rebalance, in Python
import numpy as np

# Half in A (20% volatility) and half in B (30%), correlation 0.3
w, s1, s2, rho = 0.5, 0.20, 0.30, 0.3
var = w**2 * s1**2 + (1 - w)**2 * s2**2 + 2 * w * (1 - w) * rho * s1 * s2
print(f"two assets: {np.sqrt(var):.1%}, against a weighted average of {w * s1 + (1 - w) * s2:.0%}")

# Equal money in n stocks, each 30% volatile, every pair correlated 0.2
rng = np.random.default_rng(2)
sigma, rho, years = 0.30, 0.2, 20_000
for n in [1, 10, 20, 100]:
    common = rng.standard_normal((years, 1))   # the part every stock shares
    own = rng.standard_normal((years, n))      # each stock's own news
    stocks = sigma * (np.sqrt(rho) * common + np.sqrt(1 - rho) * own)
    formula = sigma * np.sqrt(rho + (1 - rho) / n)
    print(f"n = {n:>3}: simulated {stocks.mean(axis=1).std():.1%}, formula {formula:.1%}")

# Back to 60/40 after a year: target share of the new total, minus what each fund holds
held = np.array([7500, 4080])
trade = np.array([0.6, 0.4]) * held.sum() - held
print(f"stock fund {trade[0]:+,.0f}, bond fund {trade[1]:+,.0f}")

# Output:
# two assets: 20.4%, against a weighted average of 25%
# n =   1: simulated 29.9%, formula 30.0%
# n =  10: simulated 15.9%, formula 15.9%
# n =  20: simulated 14.7%, formula 14.7%
# n = 100: simulated 13.6%, formula 13.7%
# stock fund -552, bond fund +552

Check yourself

Four questions from across the lesson. Try each one before you look back.

1

Five assets all share the same correlation with each other. What's the lowest that correlation can be?

Picture equal money in each, all scaled to the same volatility. The variance is then proportional to ρ + (1 − ρ) / 5, which can't be negative, so ρ ≥ −1 / (5 − 1) = −0.25. Only two assets can sit at −1.

2

Asset A has 10% volatility and asset B 30%. Their correlation is +1. You put half your money in each. What's the mix's volatility?

At +1 nothing cancels: 0.0025 + 0.0225 + 2 × 0.5 × 0.5 × 0.10 × 0.30 = 0.04, and √0.04 = 20%, the weighted average. 15.8% leaves out the cross term, the answer for a correlation of 0. 22.4% averages the two variances without squaring the shares.

3

You hold equal money in 500 stocks instead of 5. Which risk have you mostly removed?

Own news cancels across many stocks, shrinking as one over N. The part all stocks share, systematic risk, is the floor that no number of stocks removes.

4

You rebalance a 60/40 stock and bond pot once a year. What is it for?

Rebalancing doesn't forecast anything. It undoes the drift towards whatever rose most, which would otherwise change the pot's risk without anyone choosing it.

What to remember

  1. 1Two assets in one pot

    A mix's return is the weighted average of its parts, but its volatility is less unless the correlation is +1: half in A (20%) and half in B (30%) at 0.3 gives 20.4%, not 25%.

  2. 2Many stocks, and the floor

    Equal money in N stocks has volatility σ√(ρ + (1 − ρ) / N), which falls to a floor of σ√ρ: 30% × √0.2 = 13.4%.

  3. 2Many stocks, and the floor

    A correlation that N assets all share can't go below −1 / (N − 1), and correlations rise when stocks fall together.

  4. 3Keeping the mix

    Rebalancing trades back to the target weights: a 60/40 pot that grew to $7,500 and $4,080 moves $552 from stocks to bonds.

Portfolio and Risk overviewSpotted a mistake? Tell us.