Investments that offer higher expected returns usually expose investors to more risk. Variance measures dispersion around the mean, and the Sharpe ratio measures excess return over the risk-free rate per unit of volatility.
Expected return
The expected return is the probability-weighted average of all possible outcomes. If an asset has three scenarios with known probabilities and returns, multiply each return by its probability and sum.
Variance is the expected squared deviation from the mean. Standard deviation is its square root, in the same units as returns. A higher standard deviation means wider dispersion of outcomes.
The Sharpe ratio measures excess return per unit of total risk: (E[R] - r_f) / σ. A higher Sharpe means better risk-adjusted performance. The risk-free rate r_f is what you earn with zero risk (e.g., Treasury bills).
Scheme
; Sharpe ratio = (E[R] - r_f) / sigma; r_f = risk-free rate
(define (sharpe-ratio er rf sigma)
(/ (- er rf) sigma))
(define er 0.095) ; expected return 9.5%
(define rf 0.03) ; risk-free rate 3%
(define sigma 0.1375) ; std dev 13.75%
(define sr (sharpe-ratio er rf sigma))
(display "Sharpe ratio = ") (display sr) (newline)
; Compare two assets
(display "Asset A: ") (display (sharpe-ratio 0.120.030.20)) (newline)
(display "Asset B: ") (display (sharpe-ratio 0.080.030.10)) (newline)
(display "B is better risk-adjusted despite lower return")
Python
# Sharpe ratio = (E[R] - r_f) / sigmadef sharpe(er, rf, sigma):
return (er - rf) / sigma
er, rf, sigma = 0.095, 0.03, 0.1375print(f"Sharpe ratio = {sharpe(er, rf, sigma):.4f}")
# Compare two assetsprint(f"Asset A: {sharpe(0.12, 0.03, 0.20):.4f}")
print(f"Asset B: {sharpe(0.08, 0.03, 0.10):.4f}")
print("B is better risk-adjusted despite lower return")
Historical vs expected returns
Historical returns use past data with equal weights (sample mean). Expected returns use forward-looking scenario probabilities. Historical data informs expectations but doesn't determine them. The sample standard deviation divides by (n-1), not n.
importmath
returns = [0.12, -0.05, 0.18, 0.08, -0.02]
n = len(returns)
# Sample mean
mu = sum(returns) / n
print(f"Sample mean = {mu:.4f}")
# Sample variance (n-1 denominator)
var_s = sum((r - mu)**2for r in returns) / (n - 1)
print(f"Sample variance = {var_s:.6f}")
print(f"Sample std dev = {math.sqrt(var_s):.4f}")
# Geometric mean (compound growth rate)
product = 1for r in returns:
product *= (1 + r)
geo_mean = product ** (1/n) - 1print(f"Geometric mean = {geo_mean:.4f}")
Risk-return tradeoff
Assets with higher expected returns tend to have higher volatility. This is the fundamental tradeoff: you cannot earn equity-like returns with bond-like risk. The question is always whether the extra return compensates for the extra risk.
Scheme
; Compare asset classes by risk and return
(define (describe name er sigma rf)
(display name) (display ": ")
(display "E[R]=") (display (* er 100)) (display "%, ")
(display "sigma=") (display (* sigma 100)) (display "%, ")
(display "Sharpe=")
(display (/ (- er rf) sigma))
(newline))
(define rf 0.03)
(describe "T-Bills "0.0350.03 rf)
(describe "Bonds "0.060.08 rf)
(describe "Lg Stocks"0.100.20 rf)
(describe "Sm Stocks"0.130.30 rf)
(newline)
(display "Higher return always comes with higher sigma.")
(newline)
(display "Sharpe ratio reveals which tradeoff is best.")
Python
# Compare asset classes by risk and return
rf = 0.03
assets = [
("T-Bills ", 0.035, 0.03),
("Bonds ", 0.06, 0.08),
("Lg Stocks", 0.10, 0.20),
("Sm Stocks", 0.13, 0.30),
]
for name, er, sigma in assets:
sharpe = (er - rf) / sigma
print(f"{name}: E[R]={er*100:.1f}%, sigma={sigma*100:.1f}%, Sharpe={sharpe:.3f}")
print()
print("Higher return always comes with higher sigma.")
print("Sharpe ratio reveals which tradeoff is best.")
Neighbors
🎰 Probability — expected value and variance are probability concepts applied to prices
📊 Statistics — sample vs population statistics, hypothesis testing on returns