Lesson 4.12: Capstone: Building and Testing a Fama-French Model
This is your final exam for Module 4. We will act as quantitative analysts and use everything we've learned—from MLR and matrix form to t-tests and R²—to replicate one of the most famous models in modern finance: the Fama-French Three-Factor Model. This project bridges the gap from theory to practice.
Part 1: The Theory - Beyond CAPM
The Capital Asset Pricing Model (CAPM) from Lesson 4.0 was a good start, suggesting that a stock's excess return is explained by a single factor: the market's excess return.
However, researchers Eugene Fama and Kenneth French argued in their Nobel Prize-winning work that other factors also systematically explain stock returns. They proposed the **Fama-French Three-Factor Model**.
The Fama-French Three-Factor Model
The model is a Multiple Linear Regression that explains an asset's excess return using three factors:
- : The **dependent variable (Y)**. The excess return of our asset (e.g., Apple stock) on day .
- : The **Market Factor (MKT)**. The excess return of the overall market.
- : The **"Small Minus Big" Factor**. The return of a portfolio of small-cap stocks minus the return of a portfolio of large-cap stocks.
- : The **"High Minus Low" Factor**. The return of a portfolio of high book-to-market (value) stocks minus the return of a portfolio of low book-to-market (growth) stocks.
- : The **Alpha**. This is the most important coefficient. It measures the unexplained excess return of the asset after accounting for all three risk factors.
Part 2: The Project - Your Mission
Your mission is to estimate the Fama-French model for a real-world asset (e.g., Tesla stock, TSLA) and interpret the results like a professional quant.
- Gather the Data: Download monthly return data for TSLA and the Fama-French factors.
- Run the Regression: Perform a Multiple Linear Regression using OLS.
- Analyze the Output: Interpret the coefficients, R², t-statistics, and F-statistic.
- Write a Report: Conclude with a summary of your findings.
Part 3: Step-by-Step Execution Guide
The Fama-French factors are publicly available from Kenneth French's data library. Stock data can be downloaded from sources like Yahoo Finance.
Example Python Code
import pandas as pd
import yfinance as yf
import statsmodels.api as sm
# Download Fama-French 3 Factors (monthly)
# In a real scenario, you'd download this from their website and parse it.
# For this example, we'll use a placeholder.
ff_factors = pd.read_csv('fama_french_factors.csv', index_col='Date', parse_dates=True)
# Download Tesla (TSLA) monthly stock data
tsla = yf.download('TSLA', start='2011-01-01', end='2023-12-31', interval='1mo')
tsla['Return'] = tsla['Adj Close'].pct_change()
# Merge data and calculate excess returns
data = pd.merge(tsla[['Return']], ff_factors, left_index=True, right_index=True)
data.dropna(inplace=True)
data['TSLA_excess'] = data['Return'] - data['RF']
We define our Y and X variables and use a statistical library like \`statsmodels\` to run the regression. Remember to add a constant for the intercept!
Example Python Code
# Define variables
Y = data['TSLA_excess']
X = data[['Mkt-RF', 'SMB', 'HML']]
X = sm.add_constant(X) # Don't forget the intercept!
# Run the OLS model
model = sm.OLS(Y, X).fit()
# Print the summary
print(model.summary())
You will get a standard OLS output. Here is how to interpret each part using the tools from this module:
Reading the OLS Output
- Coefficients ():
- \`const\` (): This is your **Alpha**. Is it positive? This is the first sign of outperformance.
- \`Mkt-RF\` (): The **Market Beta**. A value > 1 means the stock is more volatile than the market.
- \`SMB\` (): The **Size Beta**. A positive value means the stock behaves more like a small-cap stock.
- \`HML\` (): The **Value Beta**. A positive value means the stock behaves more like a value stock; a negative value means it behaves like a growth stock.
- R-squared / Adj. R-squared: (Lesson 4.3) How much of TSLA's excess return variance is explained by these three factors? Use the Adjusted R² since this is an MLR.
- t-statistic / P<|t| (p-value): (Lesson 4.7) For each coefficient, is it statistically significant? The most important one is the p-value for the \`const\` (Alpha). A p-value < 0.05 for Alpha is the holy grail for a quant.
- F-statistic / Prob (F-statistic): (Lesson 4.8) This tests the overall model significance. Is the model as a whole useful? If the p-value for the F-test is low (< 0.05), you reject the null that all betas are zero.
- Durbin-Watson: (Lesson 4.11) Check for autocorrelation in the residuals. A value near 2 is good.
Module 4 Complete! Your Final Report
You have now completed the entire journey of Module 4. You've gone from the basic idea of a line to building and testing a Nobel Prize-winning financial model on real data.
**Your final task:** Based on your analysis of the regression output, write a one-paragraph conclusion for a portfolio manager. Is TSLA's alpha statistically significant? Is TSLA a value or growth stock? Is it a large or small-cap stock? Does the model do a good job of explaining its returns?
Completing this project means you have successfully transitioned from a student of theory to a practitioner of quantitative analysis.