Quant Investing · Lesson 1 of 3

CAPM and Beta

Why some risk is rewarded and some isn't · 16 min

Before this lesson

Builds on diversification (Investing Fundamentals, Lesson 5) and standard deviation. Comfortable with basic algebra — the regression math is explained, not assumed.

The Capital Asset Pricing Model

William Sharpe published CAPM in 1964, and depending who you ask in finance, it's either the most important model ever built or the most overrated one. Probably both. It's trying to answer a hard question: if investors can diversify away company-specific risk for free (Lesson 5 of Investing Fundamentals covers why), what risk is left over that actually deserves to be paid for?

CAPM's answer: only market risk — the risk you're stuck with no matter how diversified you are — gets compensated. Everything else is just noise you can eliminate by holding more stocks. The formula for expected return on any asset is:

E[R_i] = R_f + β_i × (E[R_m] − R_f)

Breaking that down:

  • R_f is the risk-free rate — think 3-month T-bills, currently around 5.25%
  • E[R_m] is what the market's expected to return, historically close to 10% a year for the S&P 500
  • E[R_m] − R_f is the equity risk premium, the extra return you're paid for taking on stock risk instead of just holding T-bills — usually 5–6%
  • β_i is beta, how sensitive this particular stock is to the market's swings
Try the sandbox below

Drag beta up past 1.0 and watch the expected return climb faster than the market premium alone would suggest — that's the whole point of CAPM: risk you can't diversify away has to be paid for.

Beta: Market Sensitivity

Beta answers one question: for every 1% the market moves, how much does this stock move?

β = Cov(R_i, R_m) / Var(R_m)
  • β = 1.0: moves in lockstep with the market — the profile of an average S&P 500 stock
  • β > 1.0: amplifies the market. Tech stocks often sit at 1.3–1.8, so a 10% market rally turns into roughly a 15% move for the stock — and the same amplification applies on the way down
  • β < 1.0: a defensive stock, one that barely flinches when the market does. Utilities and consumer staples often run 0.4–0.7
  • β < 0: moves opposite the market entirely — gold and some volatility products behave this way, but it's rare for an actual stock

You can estimate beta yourself by regressing a stock's returns against the market's returns over a few years of daily or weekly data. That's just ordinary least squares regression under the hood — the slope you get out is beta, and the intercept is something else worth knowing about: alpha.

Alpha: The Holy Grail

Look at that same regression written out in full:

R_i = α + β × R_m + ε

Alpha (α) is the intercept — whatever return is left over once you've accounted for the stock's market exposure. In a perfectly efficient market, CAPM says alpha should be zero: every dollar of excess return is just payment for beta, nothing more. In practice, this is what every active investor is hunting for — a persistent edge that beta alone can't explain.

Alpha that's rare and sustainable is much harder to find than most performance charts suggest. A fund that beats the S&P 500 for three years running usually isn't holding some hidden edge — it's more likely riding a factor tilt (small-cap, value), catching a lucky streak, or benefiting from how fees get reported. Research on this keeps landing in the same place: persistent alpha exists for a small slice of managers, and there's no reliable way to spot who they are in advance.

Limitations of CAPM

CAPM only works if you accept some fairly heroic assumptions: every investor shares the same beliefs, everyone can borrow at the risk-free rate, everyone holds a fully diversified portfolio, and nobody cares about anything except mean and variance. None of that describes real markets. Sure enough, decades of empirical testing have poked real holes in it:

  • Low-beta stocks have quietly outperformed what CAPM predicts they should — the so-called "low-volatility anomaly"
  • Cheap stocks (low price-to-book) and small-cap stocks both earn more than CAPM accounts for — this is where the Fama-French factors come from
  • Momentum — stocks that have gone up keep going up for another 3 to 12 months — shows up persistently and CAPM has no explanation for it

These cracks are exactly what pushed researchers toward multi-factor models — Fama-French's 3-factor and 5-factor versions, Carhart's 4-factor model — that bolt more explanatory power onto CAPM's skeleton. Even so, CAPM stays the starting point every finance student learns first, because the core idea underneath it (only undiversifiable risk gets paid) is still basically right.

Practical Uses of Beta

  • Portfolio construction: Load up on high-beta stocks and you amplify whatever the market does — a great trait in a bull run, a brutal one in a bear market. Knowing your portfolio's overall beta gives you a rough preview of how bad a downturn could get.
  • Hedging: Want less market exposure without selling anything? Short S&P 500 futures in an amount equal to your portfolio's dollar beta and you've largely neutralized it.
  • Cost of capital: Companies lean on CAPM to estimate their cost of equity when deciding whether a new project is worth funding.
Coding ExercisePython · runs in browser
+100 XP
Implement `compute_beta` (from return series) and `expected_return_capm`.
Write your solution, then run