Tutorials › VEE Accounting and Finance › Deriving Beta As The Regression Slope

VEE Accounting and Finance · Systematic Risk and Beta · Tutorial 552 of 996

Deriving Beta As The Regression Slope

Learn to derive and calculate a return regression slope from paired observations or summary statistics, and recognize when the formula does not apply.

Intermediate 10 min read

What You'll Learn

  • Set up an ordinary least-squares regression of asset returns on matched market returns.
  • Derive the fitted slope from the least-squares objective and its normal equations.
  • Relate the slope to covariance and market-return variance using consistent sample conventions.
  • Calculate a slope and fitted intercept from raw returns or summary statistics.
  • Identify how omitting the intercept or using zero market variance changes the problem.
  • Check a fitted line using the mean-point and residual conditions.

Why Derive the Regression Slope?

Beta describes how an asset’s returns vary with market returns. The earlier material on beta from covariance and market variance gives a direct calculation. Regression provides a useful explanation of why that calculation works: when a straight line with an intercept is fitted by ordinary least squares, its slope is the asset–market covariance divided by the market-return variance.

This result depends on the regression setup. The observations must be paired by period, the fitted line must include an intercept, and the market returns must vary. The slope is a least-squares summary of the observed pairs; the algebra alone does not establish that the relationship is causal or that it will persist.

Definition: Let \(x_t\) be the market return and \(y_t\) the matched asset return in observation \(t\), for \(t=1,\ldots,n\). The ordinary least-squares regression with an intercept chooses \(a\) and \(b\) to minimize the sum of squared residuals \(\sum_{t=1}^{n}(y_t-a-bx_t)^2\). The fitted intercept is \(a\), the fitted slope is \(b\), and the residual for observation \(t\) is \(e_t=y_t-a-bx_t\).

For beta regression, the fitted slope \(b\) is the regression estimate of beta. The intercept allows the fitted line to pass through a level other than zero when the market return is zero. Including that intercept is essential to the covariance-over-variance result.

Deriving the Least-Squares Slope

The derivation starts with the objective being minimized, rather than assuming a slope formula. Define the sample means as \(\bar{x}=\frac{1}{n}\sum_{t=1}^{n}x_t\) and \(\bar{y}=\frac{1}{n}\sum_{t=1}^{n}y_t\). Assume \(n\geq 2\) and that the market observations are not all equal, so \(\sum_{t=1}^{n}(x_t-\bar{x})^2>0\). The objective is a quadratic function of \(a\) and \(b\).

$$ Q(a,b)=\sum_{t=1}^{n}(y_t-a-bx_t)^2 $$

At the least-squares minimum, the partial derivatives with respect to both fitted coefficients are zero. These equations are called the least-squares normal equations.

$$ \frac{\partial Q}{\partial a}=-2\sum_{t=1}^{n}(y_t-a-bx_t)=0 \qquad\text{and}\qquad \frac{\partial Q}{\partial b}=-2\sum_{t=1}^{n}x_t(y_t-a-bx_t)=0 $$

The first equation says that the residuals sum to zero. Rearranging it gives the fitted intercept in terms of the slope. Substituting this intercept into the second normal equation centers both variables at their sample means.

1
Use the intercept equation.
From \(\sum(y_t-a-bx_t)=0\), obtain \(a=\bar{y}-b\bar{x}\). Thus the fitted line passes through the point \((\bar{x},\bar{y})\).
2
Substitute into the slope equation.
With \(a=\bar{y}-b\bar{x}\), the fitted value is \(a+bx_t=\bar{y}+b(x_t-\bar{x})\). The residual is therefore \((y_t-\bar{y})-b(x_t-\bar{x})\).
3
Solve for the slope.
The slope normal equation becomes \(\sum(x_t-\bar{x})(y_t-\bar{y})-b\sum(x_t-\bar{x})^2=0\). Since the denominator is positive under the stated condition, divide by it to isolate \(b\).
$$ b= \frac{\sum_{t=1}^{n}(x_t-\bar{x})(y_t-\bar{y})} {\sum_{t=1}^{n}(x_t-\bar{x})^2} $$

To express this result as covariance divided by variance, use the same denominator convention in both quantities. If sample covariance and sample variance both use \(n-1\), then

$$ s_{xy}=\frac{\sum_{t=1}^{n}(x_t-\bar{x})(y_t-\bar{y})}{n-1}, \qquad s_x^2=\frac{\sum_{t=1}^{n}(x_t-\bar{x})^2}{n-1}, \qquad b=\frac{s_{xy}}{s_x^2}. $$

The factors \(n-1\) cancel. If both covariance and variance are instead defined with denominator \(n\), they still cancel and give the same slope. Mixing conventions is unnecessary and can cause confusion, even though the common denominator cancels when applied consistently.

Theorem: In a simple ordinary least-squares regression of \(y_t\) on \(x_t\) with a fitted intercept, if the market observations \(x_t\) are not all equal, then the fitted slope is the sample covariance of the paired observations divided by the sample variance of the market observations. The derivation is algebraic and does not require the returns to be normally distributed.

Worked Calculations

Worked Example: Deriving the Slope From Paired Returns

A hypothetical asset and a market index have the following four matched quarterly returns, stated in percentage points. Find the least-squares slope and intercept. Check that the fitted line satisfies the normal-equation conditions.

QuarterMarket return \(x_t\)Asset return \(y_t\)
1-2-3
201
322
446

Method. Compute the centered cross-products and squared market deviations, then use the least-squares slope formula. The means are \(\bar{x}=(-2+0+2+4)/4=1\) and \(\bar{y}=(-3+1+2+6)/4=6/4=1.5\) percentage points.

The market deviations are \(-3,-1,1,3\), and the asset deviations are \(-4.5,-0.5,0.5,4.5\). The centered cross-products are \(13.5,0.5,0.5,13.5\), with sum \(28\). The squared market deviations are \(9,1,1,9\), with sum \(20\). Therefore \(b=28/20=1.4\).

The intercept is \(a=\bar{y}-b\bar{x}=1.5-(1.4)(1)=0.1\) percentage points. The fitted line is \(y=0.1+1.4x\), with returns measured in percentage points.

Check. At the four market returns, the fitted values are \(-2.7,0.1,2.9,5.7\). Subtracting these from the observed asset returns gives residuals \(-0.3,0.9,-0.9,0.3\), which sum to zero. Their products with the market deviations sum to \((-3)(-0.3)+(-1)(0.9)+(1)(-0.9)+(3)(0.3)=0\), as required by the slope normal equation.

Common mistake avoided. Do not calculate the intercept as the asset mean alone. The fitted intercept is \(\bar{y}-b\bar{x}\), not \(\bar{y}\); here it is \(0.1\), not \(1.5\), because the market mean is not zero.

Worked Example: Using Summary Covariance and Variance

For a hypothetical matched set of monthly returns, the sample mean market return is \(0.04\), the sample mean asset return is \(0.07\), the sample covariance is \(0.0018\), and the sample market-return variance is \(0.0012\). Returns and covariance are expressed in decimal-return units. Find the fitted slope and intercept.

Method. Apply the covariance-over-variance formula. The sample covariance and variance use the same denominator, so that denominator has already canceled in their ratio: \(b=0.0018/0.0012=1.5\).

Use the mean-point condition for the intercept: \(a=\bar{y}-b\bar{x}=0.07-(1.5)(0.04)=0.07-0.06=0.01\). The fitted regression is \(y=0.01+1.5x\), with decimal returns.

As a check, at the mean market return \(x=0.04\), the fitted value is \(0.01+1.5(0.04)=0.07\), exactly the mean asset return. The slope is dimensionless because it is a ratio of two return-squared quantities; the intercept has return units.

Common mistake avoided. A covariance is not the slope by itself. Dividing \(0.0018\) by the market variance \(0.0012\) is necessary; reporting \(0.0018\) as beta omits the scaling by market variation.

Worked Example: Why the Intercept Condition Matters

A hypothetical asset has matched market returns \(0,1,2\) percentage points and asset returns \(1,2,5\) percentage points. Calculate the ordinary least-squares slope with an intercept, then compare it with the slope obtained if the line is incorrectly forced through the origin.

Method. First use the means and centered sums for the regression that includes an intercept. The means are \(\bar{x}=(0+1+2)/3=1\) and \(\bar{y}=(1+2+5)/3=8/3\). The market deviations are \(-1,0,1\); the asset deviations are \(-5/3,-2/3,7/3\). The centered cross-products sum to \(5/3+0+7/3=4\), while the squared market deviations sum to \(1+0+1=2\). Thus the slope is \(b=4/2=2\).

The intercept is \(a=8/3-(2)(1)=2/3\) percentage points. The fitted line is \(y=2/3+2x\). It passes through the sample mean point: at \(x=1\), its fitted value is \(2/3+2=8/3\).

If the line is instead forced through the origin, its least-squares slope is \(\sum x_ty_t/\sum x_t^2\). Here \(\sum x_ty_t=(0)(1)+(1)(2)+(2)(5)=12\), and \(\sum x_t^2=0+1+4=5\), giving \(12/5=2.4\). This is not the slope of the regression with an intercept.

Common mistake avoided. Applying the through-origin formula to a regression that includes an intercept changes the fitted model and the answer. The correct slope for the stated ordinary least-squares regression is \(2\), not \(2.4\).

Interpretation, Conditions, and Calculation Checks

The slope measures the fitted change in asset return associated with a one-unit change in market return. If both returns are recorded in percentage points, a slope of \(1.4\) means that the fitted asset return changes by \(1.4\) percentage points for a one-percentage-point change in the market return. If both are recorded as decimals, the numerical slope is unchanged. The intercept’s numerical representation does depend on the return scale.

The covariance-over-variance formula requires market-return variation. If all market observations are identical, then \(\sum(x_t-\bar{x})^2=0\). The denominator is zero, so the slope cannot be determined by this formula; there is no variation in the predictor from which to estimate a fitted change. With nonconstant market observations, the denominator is positive and the least-squares slope is uniquely determined.

The formula is for an ordinary least-squares line with an intercept and equally weighted observations. It is not automatically the right formula for a line forced through zero, weighted regression, or a different estimation method. Nor does the formula require a normal-return assumption: normality is not part of this algebraic derivation.

A practical calculation can be checked in two ways. First, the fitted line must pass through \((\bar{x},\bar{y})\), so its intercept must equal \(\bar{y}-b\bar{x}\). Second, the residuals must sum to zero and have zero sum of products with the market observations. These checks often reveal a missed intercept, mismatched observations, or an arithmetic error.

Key takeaway: For a simple least-squares regression of asset returns on market returns with an intercept, the slope is \(\operatorname{Cov}(R_A,R_M)/\operatorname{Var}(R_M)\), using consistent sample conventions. The intercept is then determined by the requirement that the fitted line passes through the sample means.

Check Your Understanding

For each problem, use the regression with an intercept unless the question explicitly says otherwise. Returns are stated in percentage points where indicated.

  1. A hypothetical asset has returns \(0,3,5\) when the matched market returns are \(-1,1,3\), respectively. Find the least-squares slope and intercept. Check that the fitted line passes through the sample means. (Answer: slope \(1.25\); intercept \(17/12\) percentage points.)
  2. For a hypothetical sample, the mean market return is \(0.03\), the mean asset return is \(0.06\), the sample covariance is \(0.0009\), and the sample market variance is \(0.0006\), all in decimal-return units. Find the slope and intercept. (Answer: slope \(1.5\); intercept \(0.015\).)
  3. A hypothetical asset’s returns are \(1,3,4\) when market returns are \(0,2,4\), respectively, all in percentage points. Calculate the slope and intercept from centered sums, then state the fitted return at a market return of \(2\) percentage points. (Answer: slope \(0.75\); intercept \(7/6\) percentage points; fitted return at \(2\) is \(8/3\) percentage points.)
  4. For market returns \(1,2,3\) and asset returns \(4,5,8\), all in percentage points, calculate the fitted slope and intercept. Then verify that the three residuals sum to zero and that their products with the centered market returns sum to zero. (Answer: slope \(2\); intercept \(5/3\) percentage points; residuals \(1/3,-2/3,1/3\) percentage points.)
  5. A hypothetical market series has returns \(2,2,2\) percentage points, while the matched asset returns are \(1,3,4\) percentage points. Calculate the centered market sum of squares and explain whether the least-squares slope with an intercept is identifiable. (Answer: centered market sum of squares \(0\); the slope is not identifiable because the market return has no variation.)
Clinical Biostats