When an allocator asks whether a manager has skill, the first step is to strip out what the market did. A fund that returned 15 percent in a year when the market returned 20 percent, with twice the market's sensitivity, did not add value; it lost it. Beta measures that sensitivity, alpha measures what is left over, and regression is the tool that estimates both from a return history.
The same machinery runs through the rest of the buyside. Equity analysts estimate betas to compute a cost of equity in the capital asset pricing model (CAPM). Risk teams use betas to hedge a portfolio's market exposure with index futures. Hedge fund allocators run factor regressions to see how much of a manager's return is really exposure to the market, size, value or momentum.
This topic builds up from covariance and correlation to the regression line, then computes a full regression by hand on a deliberately small, made up set of six monthly returns for one stock and one market index. Six observations are far too few for a real estimate, which is part of the lesson: the final section shows how wide the uncertainty is.
Key takeaways
- Covariance measures how two return series move together; correlation rescales it to lie between minus 1 and plus 1.
- Beta is the covariance of the asset with the market divided by the variance of the market, which is exactly the slope of an ordinary least squares regression of asset returns on market returns.
- Alpha is the regression intercept: the average return not explained by market exposure. It is an estimate with a standard error, and is usually far less certain than beta.
- R squared is the share of the asset's variance explained by the market, and in a one factor regression equals the correlation squared.
- The CAPM turns beta into a required return: risk free rate plus beta times the equity risk premium.
Covariance and correlation
Covariance measures whether two series tend to be above their means at the same time. For each period, multiply the asset's deviation from its mean by the market's deviation from its mean; average those products (dividing by n minus 1 for a sample). A positive covariance means the two usually move in the same direction, a negative one means they usually move in opposite directions, and a value near zero means there is no linear relationship.
Covariance is hard to read on its own because its units are the product of the two series' units, percent squared for returns, and its size depends on how volatile each series is. Correlation fixes that by dividing the covariance by the product of the two standard deviations. The result is a pure number between minus 1 and plus 1. A correlation of 0.87 says the two series move together closely; it says nothing about how much one moves when the other does.
That last point is the most common confusion in this area. Correlation measures how tightly two series line up; beta measures how much one moves per unit move in the other. A small cap stock can have a correlation of 0.6 with the index and a beta of 1.5, while a utility can have a correlation of 0.6 and a beta of 0.5. The difference is volatility: beta equals correlation multiplied by the ratio of the asset's volatility to the market's.
- Si, Mi
- Asset (stock) and market returns in period i
- sS, sM
- Sample standard deviations of the asset and market returns
- n
- Number of paired observations
| Month | Market M | Stock S | M - mean M | S - mean S | Product | (M - mean M)^2 | (S - mean S)^2 |
|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 1 | 1.5 | 1.5 | 1 | 2.25 |
| 2 | -1 | -1 | -2 | -2.5 | 5.0 | 4 | 6.25 |
| 3 | 3 | 2 | 2 | 0.5 | 1.0 | 4 | 0.25 |
| 4 | -2 | -4 | -3 | -5.5 | 16.5 | 9 | 30.25 |
| 5 | 4 | 6 | 3 | 4.5 | 13.5 | 9 | 20.25 |
| 6 | 0 | 3 | -1 | 1.5 | -1.5 | 1 | 2.25 |
| Sum | 6 | 9 | 0 | 0 | 36.0 | 28 | 61.50 |
Covariance and correlation of S and M
- The sums in the table: sum of products 36.0, sum of squared market deviations 28, sum of squared stock deviations 61.5, n = 6.
- 1. Covariance36.0 / (6 - 1) = 7.27.2 (% squared)
- 2. Market variance and volatility28 / 5 = 5.6; sqrt(5.6) = 2.36642.37% per month
- 3. Stock variance and volatility61.5 / 5 = 12.3; sqrt(12.3) = 3.50713.51% per month
- 4. Correlation7.2 / (2.3664 x 3.5071) = 7.2 / 8.2993 = 0.86750.87
Stock S moves closely with the market (correlation 0.87) and is about one and a half times as volatile (3.51 against 2.37 percent a month).
Beta as a regression slope
Beta is the slope of the line that best fits the asset's returns plotted against the market's. 'Best' in ordinary least squares (OLS) means the line that minimises the sum of squared vertical distances between each observation and the line. Solving that minimisation gives a neat result: the slope is the covariance of the asset with the market divided by the variance of the market. So beta, as a risk concept, and the OLS slope, as a statistical one, are the same number.
A beta of 1 means the asset tends to move one for one with the market. A beta above 1 amplifies market moves, typical of cyclical, highly leveraged or small companies; a beta below 1 dampens them, typical of utilities and consumer staples. A beta of zero does not mean an asset is riskless, only that its risk is unrelated to the market. A market neutral hedge fund aims for a beta near zero precisely so that its returns reflect stock selection rather than market direction.
Practical beta estimates are sensitive to choices that have nothing to do with the company: the index used as the market, the return frequency (daily, weekly, monthly), and the window (commonly two years of weekly or five years of monthly data). Data vendors also publish 'adjusted' betas that shrink the raw estimate toward 1, commonly two thirds raw plus one third times 1, on the evidence that extreme betas tend to drift back toward the average over time.
- beta
- Slope: the expected change in the asset return per 1 point change in the market return
- alpha
- Intercept: the average asset return not explained by market exposure
- e
- Residual: the part of each period's return the line does not explain
Beta and alpha of stock S
- Covariance 7.2 and market variance 5.6 from the previous example. Mean S = 1.5 percent, mean M = 1.0 percent per month.
- 1. Beta from covariance7.2 / 5.6 = 1.28571.29
- 2. Same beta from the sums36 / 28 = 1.28571.29The n minus 1 terms cancel.
- 3. Same beta from correlation0.8675 x 3.5071 / 2.3664 = 1.28571.29
- 4. Alpha1.5 - 1.2857 x 1.0 = 0.21430.21% per month
- 5. Alpha, simple annualised0.2143% x 12 = 2.57%2.57% per year
- 6. Fitted lineS = 0.2143 + 1.2857 x MRegression equation
Stock S has a beta of 1.29: when the market rises 1 percent, S tends to rise about 1.29 percent. On this sample it also shows an alpha of about 0.21 percent a month, which the final section tests for significance.
Residuals, R squared and the split of risk
Once the line is fitted, each observation splits into the part the market explains (alpha plus beta times the market return) and a residual. R squared is one minus the ratio of the residual sum of squares to the total sum of squares of the asset's returns around their mean. It is the share of the asset's variance explained by the market, and in a regression with one explanatory variable it equals the correlation squared.
The same split applies to risk. Total variance equals systematic variance (beta squared times the market variance) plus idiosyncratic variance (the variance of the residuals). Systematic risk cannot be diversified away by holding more stocks, because every stock shares it; idiosyncratic risk largely can. That distinction is the foundation of the CAPM and of the portfolio construction topic that follows.
Single stocks typically have R squared values against a broad index somewhere between 0.2 and 0.6 on monthly data; diversified equity funds often exceed 0.9. The 0.75 in this example is high for a single stock, which is a feature of the small made up sample. For a hedge fund, a high R squared against an equity index says most of its returns are market exposure, which should be priced as cheap beta rather than expensive alpha.
- SSE
- Sum of squared residuals
- SST
- Total sum of squared deviations of the asset return from its mean
- var(e)
- Idiosyncratic variance: the variance of the residuals
| Month | Market M | Stock S | Fitted 0.2143 + 1.2857 x M | Residual | Residual squared |
|---|---|---|---|---|---|
| 1 | 2 | 3 | 2.7857 | 0.2143 | 0.0459 |
| 2 | -1 | -1 | -1.0714 | 0.0714 | 0.0051 |
| 3 | 3 | 2 | 4.0714 | -2.0714 | 4.2908 |
| 4 | -2 | -4 | -2.3571 | -1.6429 | 2.6990 |
| 5 | 4 | 6 | 5.3571 | 0.6429 | 0.4133 |
| 6 | 0 | 3 | 0.2143 | 2.7857 | 7.7602 |
| Sum | 0.0000 | 15.2143 |
R squared and the split of risk for stock S
- SSE = 15.2143 from the table. SST = 61.5 from the first table. Beta 1.2857, market variance 5.6, stock variance 12.3.
- 1. R squared from sums of squares1 - 15.2143 / 61.5 = 1 - 0.2474 = 0.75260.753
- 2. R squared from correlation0.8675^2 = 0.75260.753
- 3. Systematic variance1.2857^2 x 5.6 = 1.6531 x 5.6 = 9.25719.26
- 4. Idiosyncratic variance15.2143 / 5 = 3.04293.04Divided by n minus 1 to match the total variance.
- 5. Check the split9.2571 + 3.0429 = 12.30Equals the stock variance
About 75 percent of stock S's variance comes from the market and 25 percent is specific to the company, the part a diversified portfolio would largely shed.
The CAPM: from beta to required return
The capital asset pricing model says that in equilibrium investors are rewarded only for systematic risk, because idiosyncratic risk can be diversified away at no cost. The expected return on any asset is therefore the risk free rate plus its beta times the market's expected excess return, the equity risk premium (ERP). Plotted against beta, this relationship is a straight line called the security market line.
In practice the CAPM is used in two directions. Forward, it produces a cost of equity for a discounted cash flow valuation or a hurdle rate for an investment committee: plug in today's risk free rate, an estimate of the ERP and the asset's beta. Backward, it defines alpha: if a manager's realised return beats what the CAPM predicts for the beta taken, the excess is Jensen's alpha, which is the regression intercept when the regression is run on excess returns.
The model's empirical record is mixed. Low beta stocks have historically earned more than the CAPM predicts and high beta stocks less, and factors such as size, value and momentum explain returns that beta does not. Practitioners therefore treat the CAPM as a disciplined starting point for a cost of equity rather than a precise forecast, and use multi factor regressions when evaluating managers.
- E(Ri)
- Expected (required) return on asset i
- Rf
- Risk free rate
- beta_i
- Beta of asset i against the market portfolio
- E(Rm) - Rf
- Equity risk premium
Cost of equity for stock S
- Illustrative inputs: risk free rate 4.0 percent, equity risk premium 5.0 percent, beta 1.2857 from the regression above.
- 1. Risk premium for S1.2857 x 5.0% = 6.43%6.43%
- 2. Required return4.0% + 6.43% = 10.43%10.43%
- 3. With a beta of 1.0 instead4.0% + 1.0 x 5.0% = 9.0%9.0%The extra 1.43 points is the price of S's higher market sensitivity.
On these inputs the CAPM requires 10.43 percent a year from stock S. Every 0.1 of beta moves the required return by half a point, so the beta estimate deserves as much scrutiny as the ERP.
How much to trust the estimate
Regression output always comes with standard errors, and they are not optional reading. The standard error of beta is the residual standard deviation divided by the square root of the sum of squared market deviations. The standard error of alpha is larger relative to its size, because alpha is a small number estimated from noisy data. The t statistic, the estimate divided by its standard error, says how many standard errors the estimate sits away from zero.
For stock S, beta has a t statistic of about 3.5, which with four degrees of freedom (six observations minus two estimated parameters) clears the 5 percent critical value of 2.776. Alpha has a t statistic of about 0.24, indistinguishable from zero. The six months tell us, weakly, that S has market exposure. They tell us nothing at all about whether S outperforms.
This asymmetry holds for real managers too. Betas can be estimated reasonably well from a few years of data; alphas generally cannot. A manager with a true alpha of 2 percent a year and 8 percent of residual volatility needs, by the same arithmetic, many years of data before the alpha is statistically distinguishable from luck. That is why serious allocators combine the regression with a qualitative view of the process that generates the returns.
- s_e
- Residual standard error
- Sxx
- Sum of squared deviations of the market return from its mean
- n - 2
- Degrees of freedom: observations minus the two estimated parameters
Is the beta of S significant? Is the alpha?
- SSE = 15.2143, Sxx = 28, n = 6, mean M = 1.0. Beta 1.2857, alpha 0.2143.
- 1. Residual standard errorsqrt(15.2143 / 4) = sqrt(3.8036) = 1.95031.95%
- 2. Standard error of beta1.9503 / sqrt(28) = 1.9503 / 5.2915 = 0.36860.37
- 3. t statistic of beta1.2857 / 0.3686 = 3.493.49
- 4. Standard error of alpha1.9503 x sqrt(1/6 + 1/28) = 1.9503 x sqrt(0.2024) = 0.87740.88%
- 5. t statistic of alpha0.2143 / 0.8774 = 0.240.24
Beta is significant at the 5 percent level (3.49 against a critical value of 2.776); alpha is not (0.24). The apparent 2.6 percent a year of alpha is noise on this sample.
import numpy as np
# Illustrative monthly returns, as decimals
m = np.array([2, -1, 3, -2, 4, 0]) / 100
s = np.array([3, -1, 2, -4, 6, 3]) / 100
beta = np.cov(s, m)[0, 1] / np.var(m, ddof=1)
alpha = s.mean() - beta * m.mean()
corr = np.corrcoef(s, m)[0, 1]
print(f"beta {beta:.4f}")
print(f"alpha {alpha:.4%} per month")
print(f"correlation {corr:.4f}")
print(f"R squared {corr ** 2:.4f}")beta 1.2857 alpha 0.2143% per month correlation 0.8675 R squared 0.7526
Templates for this lesson
Included with a Premieur membership.
- NotebookFactor regression notebookA fund's excess returns on market, size, value and momentum: betas, alpha, t statistics, R squared and the attribution.Download