The 5-factor model
In 2015, Fama and French extended their previous 3-factor model, adding two additional factors:
- RMW: Profitability
- CMA: Investment
The RMW factor represents the returns of companies with high operating profitability versus those with low operating profitability, and the CMA factor represents the returns of companies with aggressive investments versus those who are more conservative.
The FamaFrenchData
object is available in your workspace and contains the RMW
and CMA
factors in addition to the previous factors.
This exercise is part of the course
Introduction to Portfolio Risk Management in Python
Exercise instructions
- Use what you've learned from the previous exercises to define the
FamaFrench5_model
regression model forPortfolio_Excess
against the original 3 Fama-French factors (Market_Excess
,SMB
,HML
) in addition to the two new factors (RMW
,CMA
). - Fit the regression model and store the results in
FamaFrench5_fit
. - Extract the adjusted r-squared value and assign it to
regression_adj_rsq
.
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
FamaFrench5_model = smf.ols(formula='Portfolio_Excess ~ Market_Excess + SMB + HML ____ ', data=FamaFrenchData)
# Fit the regression
FamaFrench5_fit = ____
# Extract the adjusted r-squared
regression_adj_rsq = ____
print(regression_adj_rsq)