Beta
Beta is the slope of a stock's returns against the market's returns. A beta of 1.5 means the stock tends to move 1.5% for every 1% the market moves.
01The formula
- how much the stock moves, on average, for each 1% move in the market
- the stock's return
- the market's return
- the intercept: the stock's return on a day the market is flat
- the stock's own noise, unrelated to the market
02See it move
03Where it is used
- Portfolio managerAdds up the betas of all holdings to know how much the portfolio will move with the market, and hedges with index futures.
- Quant researcherStrips beta out of a strategy's returns to see whether any return is left that the market does not explain.
- Options deskUses beta to convert single-stock deltas into index-equivalent exposure for hedging.
04Why traders use it
Most of a stock's daily move is the market moving. Beta tells you how much of your risk is just market risk, which you can hedge cheaply, and how much is specific to the stock.
05Worked example
With a true beta of 1.20 and 120 days of data, the fitted line in this sample has slope 1.396. The stock's correlation with the market is 0.697, so the market explains 48.5% of its variance.
06How it is built
- Collect daily returns of the stock and the market over the same days.
- Fit the straight line by least squares.
- The least-squares slope is .
- Equivalently : correlation times the ratio of volatilities.
07The common mistake
Treating beta as fixed. It is an estimate with error, and it changes over time and between calm and stressed markets. A beta from six months of daily data can easily be off by a few tenths.
08In Python and LaTeX
import numpy as np rng = np.random.default_rng(7) beta, idio, n = 1.2, 0.015, 120 m = 0.01 * rng.standard_normal(n) s = beta * m + idio * rng.standard_normal(n) b_hat = np.cov(m, s)[0, 1] / np.var(m, ddof=1) print(round(b_hat, 3)) # a different sample from the page's
\beta = \frac{\operatorname{Cov}(R_s, R_m)}{\operatorname{Var}(R_m)}, \qquad R_s = \alpha + \beta R_m + \varepsilon09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.