Quant with Vahab
Quant Systems Lab · Control Systems for Quantitative Finance

Linear Regression (OLS) in Factor Models

Estimate factor loadings (betas) by regressing asset returns on one or more risk factors.

Explanation

In a simple factor model r_t = α + β f_t + ε_t, β measures how sensitive the asset is to the factor.

Ordinary least squares (OLS) estimates α and β by minimising the sum of squared residuals between model and observed returns.

In practice, sampling noise, limited history, and correlated factors all affect how stable estimated betas and R² appear.


regressionbetafactor modelols
Interactive visualisation

This scatter plot shows a single-factor model rₜ = α + β fₜ + εₜ. The blue line is the OLS fit; the amber line is the true factor relation. Noise and sample size determine how close the estimated beta is to the true beta.

β̂ ≈ 0.794 · R² ≈ 0.398n = 80 · corr(f, r) ≈ 0.631
Factor return fₜAsset return rₜ-5.0%-2.5%0.0%2.5%5.0%-6.6%-3.7%-0.7%2.2%5.1%observed (fₜ, rₜ)OLS fit α̂ + β̂ ftrue relation α + β fβ̂ fluctuates around β; noise and n drive stability.
Numbers
True β = 1.000 · estimated β̂ ≈ 0.794
α̂ ≈ 0.0009 (true α = 0)
corr(f, r) ≈ 0.631 · R² ≈ 0.398
Relative beta error ≈ -20.6%
Interpretation

The amber dashed line is the true factor relation rₜ = α + β fₜ. The blue solid line is the OLS regression fit α̂ + β̂ fₜ to the simulated points.

When idiosyncratic volatility is small and n is large, β̂ tracks β closely and R² is high. With more noise or fewer observations, the cloud thickens, β̂ wanders, and R² falls. The core idea: in a factor model, regression is the mechanism that turns a noisy scatter of (fₜ, rₜ) into an estimated beta and a measure of how much of the asset’s variation the factor actually explains.