Get startedGet started for free

The Fama French 3-factor model

The Fama-French model famously adds two additional factors to the CAPM model to describe asset returns:

$$ R_{P} = RF + \beta_{M}(R_{M}-RF)+b_{SMB} \cdot SMB + b_{HML} \cdot HML + \alpha $$

  • SMB: The small minus big factor
  • \(b_{SMB}\): Exposure to the SMB factor
  • HML: The high minus low factor
  • \(b_{HML}\): Exposure to the HML factor
  • \(\alpha \): Performance which is unexplained by any other factors
  • \(\beta_{M}\): Beta to the broad market portfolio B

The FamaFrenchData DataFrame is available in your workspace and contains the HML and SMB factors as columns for this exercise.

This exercise is part of the course

Introduction to Portfolio Risk Management in Python

View Course

Exercise instructions

  • Define a regression model that explains Portfolio_Excess as a function of Market_Excess, SMB, and HML.
  • Extract the adjusted r-squared value from FamaFrench_fit.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Import statsmodels.formula.api
import statsmodels.formula.api as smf 

# Define the regression formula
FamaFrench_model = smf.ols(formula='____', data=FamaFrenchData)

# Fit the regression
FamaFrench_fit = FamaFrench_model.fit()

# Extract the adjusted r-squared
regression_adj_rsq = ____
print(regression_adj_rsq)
Edit and Run Code