Regression Analysis for Financial Relationships › Factor Exposures and the CAPM Beta

Michael BrenndoerferDecember 11, 20258 min read
Quantitative FinanceAll chapters
Part 8 of 15Econometrics and Statistical Modeling
Chapter 43Regression Analysis for Financial Relationships › Factor Exposures and the CAPM Beta
Reading section 3 of 12 · Factor Exposures and the CAPM Beta · 8 minSection 3 of 12 · 8 min

Book contents

Section 3 of 12 · 8 min read

Regression Analysis for Financial Relationships › Factor Exposures and the CAPM BetaOne section · Sections in this chapter3 / 12 ↓

The single most important application of regression in finance is estimating how an asset responds to systematic risk factors. This relationship, called factor exposure or factor loading, tells us how much of an asset's return can be explained by common factors versus idiosyncratic risk. Understanding factor exposures is essential for portfolio construction, risk management, and performance evaluation. You cannot diversify away systematic risk, so these exposures determine how much of that risk a portfolio carries.

The Market Model

The simplest factor model relates individual stock returns to market returns. This approach, developed in the early days of modern finance, recognizes that stocks tend to move together because they are all affected by common economic forces. Broad market movements, driven by changes in interest rates, economic growth expectations, and investor sentiment, influence virtually all stocks to varying degrees.

ri,t=αi+βirm,t+εi,tr_{i,t} = \alpha_i + \beta_i r_{m,t} + \varepsilon_{i,t}

where:

  • ri,tr_{i,t}: return on stock ii at time tt
  • rm,tr_{m,t}: return on the market index
  • βi\beta_i: beta coefficient, measuring sensitivity to market movements
  • αi\alpha_i: alpha coefficient, measuring return unexplained by the market
  • εi,t\varepsilon_{i,t}: idiosyncratic error term

This is called the market model or single-index model. The coefficient βi\beta_i measures the stock's systematic risk, representing how much the stock moves when the market moves. A stock with β=1.2\beta = 1.2 rises 1.2% on average when the market rises 1%, and falls 1.2% when the market falls 1%. This amplification makes high-beta stocks more volatile than the market and more risky in a portfolio context. Conversely, a stock with β=0.7\beta = 0.7 is defensive: it dampens market movements rather than amplifying them.

The idiosyncratic error term εi,t\varepsilon_{i,t} captures firm-specific events: earnings surprises, management changes, product launches, and other news that affects only this particular company. Unlike systematic risk, idiosyncratic risk can be diversified away by holding many stocks, because positive surprises at some firms offset negative surprises at others.

Beta

The beta coefficient measures an asset's sensitivity to market movements. Mathematically, it equals the covariance of the asset's return with the market return, divided by the variance of the market return:

βi=Cov(ri,rm)Var(rm)\beta_i = \frac{\text{Cov}(r_i, r_m)}{\text{Var}(r_m)}

where:

  • βi\beta_i: beta coefficient for asset ii
  • Cov(ri,rm)\text{Cov}(r_i, r_m): covariance between asset and market returns
  • Var(rm)\text{Var}(r_m): variance of market returns

This formula has a clear interpretation. The numerator measures how the asset and market move together. The denominator normalizes by market volatility. A stock that moves perfectly with the market, with the same magnitude, has beta equal to one. The market portfolio itself always has a beta of exactly one.

Excess Returns and the CAPM

The Capital Asset Pricing Model, which we'll derive formally in Part IV, states that the expected excess return on any asset should be proportional to its beta. This fundamental result connects risk and return: assets with higher systematic risk must offer higher expected returns to compensate investors for bearing that risk. The CAPM gives the theoretical foundation for using beta as a measure of risk.

E[ri−rf]=βi⋅E[rm−rf]E[r_i - r_f] = \beta_i \cdot E[r_m - r_f]

where:

  • E[ri−rf]E[r_i - r_f]: expected excess return on asset ii
  • E[rm−rf]E[r_m - r_f]: expected market risk premium
  • rfr_f: risk-free interest rate
  • βi\beta_i: asset's beta

The left side represents the expected return above the risk-free rate, which is the premium investors demand for taking risk. The right side says this premium should equal beta times the market risk premium. An asset with beta of 1.5 should earn 1.5 times the market risk premium, because it carries 1.5 times the market's systematic risk.

To test this empirically, we regress excess returns:

ri,t−rf,t=αi+βi(rm,t−rf,t)+εi,tr_{i,t} - r_{f,t} = \alpha_i + \beta_i (r_{m,t} - r_{f,t}) + \varepsilon_{i,t}

where:

  • ri,t−rf,tr_{i,t} - r_{f,t}: excess return on asset ii
  • rm,t−rf,tr_{m,t} - r_{f,t}: excess return on the market portfolio
  • αi\alpha_i: Jensen's alpha measuring abnormal performance
  • βi\beta_i: systematic risk exposure
  • εi,t\varepsilon_{i,t}: idiosyncratic error term

If the CAPM holds, the intercept αi\alpha_i should be zero. This is because all expected return should be explained by beta exposure to the market. A significantly positive alpha suggests the stock earns more than its risk-adjusted required return: it generates excess risk-adjusted performance. A negative alpha means the stock underperforms relative to its risk. This interpretation makes alpha regression one of the most scrutinized statistical tests in investment management. Every active manager claims to generate alpha, and every client wants evidence to support that claim.

Implementing Beta Estimation

Let's estimate the market beta for a stock using historical data. We'll use synthetic data that mimics realistic return characteristics.

In[2]:
Code
import numpy as np
import pandas as pd

# Set random seed for reproducibility
np.random.seed(42)

# Generate synthetic market returns (daily, 2 years)
n_days = 504
market_returns = np.random.normal(
    0.0004, 0.012, n_days
)  # ~10% annual return, 19% vol

# Generate stock returns with true beta = 1.3, alpha = 0.0002 (small positive)
true_beta = 1.3
true_alpha = 0.0002
idiosyncratic_vol = 0.015
stock_returns = (
    true_alpha
    + true_beta * market_returns
    + np.random.normal(0, idiosyncratic_vol, n_days)
)

# Create DataFrame
dates = pd.date_range(start="2022-01-01", periods=n_days, freq="B")
df = pd.DataFrame(
    {
        "date": dates,
        "market_return": market_returns,
        "stock_return": stock_returns,
    }
)

Now we estimate the regression using both manual calculation and statsmodels:

In[3]:
Code
# Manual OLS calculation
x_mean = df["market_return"].mean()
y_mean = df["stock_return"].mean()

# Calculate beta (covariance / variance)
covariance = (
    (df["market_return"] - x_mean) * (df["stock_return"] - y_mean)
).sum()
variance = ((df["market_return"] - x_mean) ** 2).sum()
beta_manual = covariance / variance

# Calculate alpha
alpha_manual = y_mean - beta_manual * x_mean

# Calculate fitted values and residuals
fitted_values = alpha_manual + beta_manual * df["market_return"]
residuals = df["stock_return"] - fitted_values
Out[4]:
Console
Manual OLS Estimation:
  Beta:  1.3698 (true: 1.3)
  Alpha: 0.000707 (true: 0.0002)

Residual standard deviation: 0.014560
True idiosyncratic vol: 0.015000

The manual estimates closely match the true parameters used to generate the data, confirming the accuracy of the OLS formulas.

Let's also use statsmodels for a complete regression output:

In[5]:
Code
import statsmodels.api as sm

# Add constant for intercept
X = sm.add_constant(df["market_return"])
y = df["stock_return"]

# Fit OLS regression
model = sm.OLS(y, X).fit()
Out[6]:
Console
                            OLS Regression Results                            
==============================================================================
Dep. Variable:           stock_return   R-squared:                       0.552
Model:                            OLS   Adj. R-squared:                  0.552
Method:                 Least Squares   F-statistic:                     619.7
Date:                Sun, 02 Aug 2026   Prob (F-statistic):           1.09e-89
Time:                        08:00:11   Log-Likelihood:                 1417.0
No. Observations:                 504   AIC:                            -2830.
Df Residuals:                     502   BIC:                            -2822.
Df Model:                           1                                         
Covariance Type:            nonrobust                                         
=================================================================================
                    coef    std err          t      P>|t|      [0.025      0.975]
---------------------------------------------------------------------------------
const             0.0007      0.001      1.088      0.277      -0.001       0.002
market_return     1.3698      0.055     24.894      0.000       1.262       1.478
==============================================================================
Omnibus:                        0.311   Durbin-Watson:                   1.998
Prob(Omnibus):                  0.856   Jarque-Bera (JB):                0.397
Skew:                           0.052   Prob(JB):                        0.820
Kurtosis:                       2.909   Cond. No.                         84.8
==============================================================================

Notes:
[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.

The regression output provides the coefficient estimates along with standard errors, t-statistics, and p-values. Let's visualize the relationship:

Out[7]:
Visualization
Scatter plot of 500 daily stock returns against market returns, with an upward-sloping OLS line labeled beta equals 1.37 and reference lines at zero on both axes.
Daily stock returns plotted against market returns with the estimated OLS regression line. The estimated slope of 1.37 is close to the simulated beta of 1.30 and indicates that the stock tends to amplify market movements.

The scatter plot shows that stock returns move in the same direction as market returns but with greater magnitude, consistent with a beta above 1. The stock amplifies market movements by approximately 30%.

To understand the economic meaning of different beta values, consider how stocks with varying market sensitivities respond to the same market movement:

Out[8]:
Visualization
Five lines through the origin show hypothetical stock responses for beta values 0.5, 0.8, 1.0, 1.3, and 1.8; higher beta produces a steeper slope.
Hypothetical stock return responses for beta values ranging from 0.5 to 1.8. Steeper slopes represent higher sensitivity to market movements, where high-beta stocks ($\beta > 1$) amplify market returns and low-beta stocks ($\beta < 1$) are defensive investments.