Portfolio and Risk, lesson 1
Risk and return
Measuring both, and why they come together.
Every investment comes down to two numbers: what it earns on average, and how much it swings around that. This lesson measures both, shows what the swings cost, and puts the two together in one ratio. You need averages and standard deviations from Statistics.
By the end, you can:
Part 1. Two numbers for every investment
Measure an investment's average return and volatility, and read the range they give.
Two funds can both average 6% a year. One moves between +4% and +8%. The other lurches from −20% to +30%. The average can't tell them apart, so you need a second number: how far the returns swing around it.
Example 1.1
Five years of fund B
Fund B returned +20%, −12%, +8%, +2% and +12% in five years. What are its average return and its volatility, the standard deviation of those returns? Where do about two years in three land?
- Average the years(20 − 12 + 8 + 2 + 12) / 5 = 6%
The average return, written μ and read "mu".
- Measure each year from the average+14, −18, +2, −4, +6
Each return minus 6%. Squared, they add to 196 + 324 + 4 + 16 + 36 = 576.
- Divide by n − 1 and take the root√(576 / 4) = √144 = 12%
The sample standard deviation from Statistics. For returns it's the volatility, written σ and read "sigma".
- Read the range6% − 12% to 6% + 12%
If yearly returns are roughly bell-shaped, about two years in three land within one volatility of the average.
AnswerAn average of 6% a year and a volatility of 12%. About two years in three land between −6% and +18%.
The average says where the returns centre, and the volatility says how wide they spread. A bell curve is set by exactly those two numbers: about two thirds of it lies within one volatility of the average, and about 95% within two.
Return and volatility
A return is the gain over a period as a share of what you started with: $100 growing to $106 is 6%. The average return is the mean of many periods' returns. Volatility is their standard deviation, the typical size of a swing around the average. Both are usually quoted per year.
μ = 6%, σ = √(576 / 4) = 12%
Across the four funds, the averages rise with the swings. Why hold the bumpier fund? Only if it pays more on average. People want to be paid for sitting through bad years, so riskier assets tend to be priced to earn more, and return and risk come together. CAPM and beta, later in this module, sharpens which risk gets paid.
Your turn
Fund D averages 15% a year with 50% volatility. If its yearly returns are roughly bell-shaped, where do about two years in three land?
Part 2. From a month to a year
Scale monthly or daily numbers to a year with the square root of time.
Returns usually arrive monthly or daily, but people quote them per year. The average and the volatility scale differently, and mixing the two up is a classic slip.
Example 2.1
A year from monthly returns
A fund's monthly returns average 0.5%, with a standard deviation of 4%. Months are independent. What are its yearly average return and volatility?
- Scale the average12 × 0.5% = 6%
Twelve months of returns add up. Compounding makes the true figure a little higher, but 12 times is the usual convention.
- Scale the variance12 × 0.04² = 0.0192
For independent months, variances add, so a year carries 12 times the variance of a month.
- Back to a volatility√0.0192 = 13.9%
That's 4% × √12. Multiplying by 12 would give 48%.
Answer6% a year on average, with a volatility of 13.9%.
Why only √12? In a year of independent months, good months and bad months partly cancel. The swings don't all point the same way, so they don't stack up twelve deep. Variances add, and volatility, the square root of variance, grows with the square root of time.
The square-root-of-time rule
If periods are independent, the volatility over T periods is the volatility of one period times √T. A year holds about 252 trading days, so daily volatility times √252, about 15.9, gives yearly volatility. The average scales by T itself.
σ year = σ month × √12 = σ day × √252
The rule needs independent periods. If good days tend to follow good days, the swings stack up, and the true yearly volatility is bigger than √252 suggests. It also describes the typical swing, not the worst one: a single bad day can be several volatilities deep.
Your turn
A strategy's daily returns have a standard deviation of 0.5%. About what is its yearly volatility?
Part 3. Why swings cost growth
Tell the average outcome from the typical one, and estimate typical growth.
A fund's average return describes the average investor. When the swings are big, that investor isn't the one you're likely to be. A bet from quant interviews shows the gap at its starkest.
Example 3.1
Double or halve, ten times
A bet doubles your money or halves it, with equal chances. You bet everything, ten times in a row. What's your expected wealth? What does the typical player end with? What share of players end ahead?
- Average one round½ × 2 + ½ × 0.5 = 1.25
On average each round multiplies your money by 1.25: a 25% average return.
- Average ten rounds1.25¹⁰ = 9.31
Rounds are independent, so their averages multiply.
- Follow the typical player2⁵ × 0.5⁵ = 1
The middle result is five wins and five losses. Each double cancels a halve, so they end where they started.
- Count who ends ahead210 + 120 + 45 + 10 + 1 = 386
Six or more wins out of ten, counted with C(10, k) from Probability. That's 386 of 2¹⁰ = 1,024, or 37.7%.
AnswerOn average a player ends with 9.31 times their money. The typical player ends with what they started with, and only 37.7% end ahead.
One player in 1,024 wins all ten rounds and ends with 1,024 times their money. A few results like that pull the average far above what most players see. Losses also need bigger gains to undo them: lose 20% and you need 25% back, lose 50% and you need 100%.
Volatility drag
The rate at which the typical investor's money grows is the compound growth rate. Its gap below the average return, about half the variance, is volatility drag. For yearly returns with average μ and volatility σ, as a rule of thumb:
typical growth ≈ μ − σ² / 2
Fund C averages 9% with 20% volatility: 9% − 0.20² / 2 = 7% a year. Fund D averages 15% with 50%: 15% − 12.5% = 2.5%. Over ten years, C's typical investor about doubles their money, and D's ends near ×1.3. The rule is rough for swings as wild as the bet's, but close for most funds.
Your turn
Two funds both average 10% a year. One has 10% volatility, the other 40%. About what does each typically grow at?
Part 4. Return for the risk
Compare investments by their Sharpe ratio, and scale it to a year.
Cash earns something too, with no swings at all. Say it pays 2% a year. What a fund adds is its return above cash, and the fair question is how much swing it took to earn that. Divide one by the other.
Example 4.1
Four funds, per unit of risk
Cash pays 2%. Fund A averages 3% with 5% volatility, B 6% with 12%, C 9% with 20%, and D 15% with 50%. Which earns the most above cash for each unit of volatility?
- Fund A(3% − 2%) / 5% = 0.20
The calmest fund earns little above cash.
- Fund B(6% − 2%) / 12% = 0.33
Four points above cash for twelve points of swing.
- Fund C(9% − 2%) / 20% = 0.35
The best of the four.
- Fund D(15% − 2%) / 50% = 0.26
The highest return, but not the most return per unit of risk.
AnswerC, at 0.35. D earns the most, but takes far more swing to do it.
Excess return and Sharpe ratio
Return above the cash rate is excess return. Excess return divided by volatility is the Sharpe ratio, the return per unit of risk. With r the cash rate:
Sharpe = (μ − r) / σ = (9% − 2%) / 20% = 0.35
A Sharpe ratio has a period. The average grows with time and the volatility with its square root, so the ratio grows with √T. A strategy earning 1% a month above cash, with 4% monthly volatility, has a monthly Sharpe ratio of 0.25. A year gives 12% / 13.9% = 0.87, which is 0.25 × √12.
Your turn
Cash pays 2%. Fund X averages 8% with 15% volatility. Fund Y averages 5% with 6%. Which has the higher Sharpe ratio?
Where you'll meet it
Annualising a volatility or a Sharpe ratio, volatility drag and the double-or-halve bet all come up in quant trading and research interviews. The usual trap is to answer with the average when the question is about the typical outcome. Say which one you're computing before you start.
William Sharpe introduced his ratio in 1966, to compare mutual funds, and called it the reward-to-variability ratio. In a 1994 article he noted that the ratio depends on the period it's measured over, and that annualising the data first makes ratios comparable. Before you compare two, check they use the same period and the same cash rate.
import numpy as np
from math import comb
rng = np.random.default_rng(1)
cash = 0.02
funds = {"A": (0.03, 0.05), "B": (0.06, 0.12), "C": (0.09, 0.20), "D": (0.15, 0.50)}
luck = rng.standard_normal((100_000, 120)) # 100,000 investors, 120 months each
for name, (mu, sigma) in funds.items():
months = mu / 12 + sigma / np.sqrt(12) * luck
end = np.prod(1 + months, axis=1) # what $1 grows to in ten years
rule = np.exp(10 * (mu - sigma**2 / 2))
sharpe = (mu - cash) / sigma
print(f"{name}: Sharpe {sharpe:.2f}, average x{end.mean():.2f}, "
f"typical x{np.median(end):.2f}, rule x{rule:.2f}")
ahead = sum(comb(10, k) for k in range(6, 11)) / 2**10
print(f"double or halve: average x{1.25**10:.2f}, typical x{2**5 * 0.5**5:.0f}, ahead {ahead:.1%}")
# Output:
# A: Sharpe 0.20, average x1.35, typical x1.34, rule x1.33
# B: Sharpe 0.33, average x1.82, typical x1.70, rule x1.70
# C: Sharpe 0.35, average x2.46, typical x2.03, rule x2.01
# D: Sharpe 0.26, average x4.44, typical x1.30, rule x1.28
# double or halve: average x9.31, typical x1, ahead 37.7%Every fund gets the same 100,000 simulated investors. The average investor beats the typical one in every fund, and by far the most in D. The rule of thumb, μ − σ² / 2 a year, lands close to the simulated typical result.
Check yourself
Four questions from across the lesson. Try each one before you look back.
1
A stock's daily volatility is 2%, and its days are independent. About what is its volatility over 25 trading days?
2
A fund averages 12% a year with 30% volatility. About what rate does a typical investor's money grow at?
3
A strategy's monthly Sharpe ratio is 0.2. About what is its yearly Sharpe ratio?
4
10,000 simulated investors hold a fund for ten years. The average one ends with ×3.2 and the median one with ×1.4. What explains the gap?
What to remember
1Two numbers for every investment
Describe an investment by its average return and volatility: +20, −12, +8, +2 and +12 give μ = 6% and σ = 12%, so about two years in three land between −6% and +18%.
2From a month to a year
Volatility grows with the square root of time: 4% a month is 4% × √12 = 13.9% a year, and daily volatility times √252 is yearly.
3Why swings cost growth
Swings drag the typical investor below the average: typical growth ≈ μ − σ² / 2, so 15% with 50% volatility grows at about 2.5% a year.
4Return for the risk
The Sharpe ratio is excess return over volatility, (9% − 2%) / 20% = 0.35, and it grows with √T: a monthly 0.25 is 0.87 a year.
Portfolio and Risk overviewSpotted a mistake? Tell us.