Exercise

Fama French Factor model

In this exercise, you are going focus on efficiently obtaining just the beta coefficients of the Fama French model. As you've seen in the video, those betas indicate how much of the portfolio's return changes if that particular factor's return changes.

Sometimes, all you want to do is to check whether the factor relates negatively, or positively to you portfolio returns. You can see this directly from the signs of the coefficients. Available again is the factor_returns data for you. Let's try!

Instructions

100 XP
  • Import the statsmodels package as sm.
  • Fit the linear model to the portfolio returns and Fama French factors, and obtain only the three beta coefficients by extracting the parameters.
  • Print the three betas.