famamacb20171101101843.html

# famamacb20171101101843.html - Factor Models Fama-MacBeth...

• Notes
• 5

This preview shows pages 1–3. Sign up to view the full content.

Factor Models Fama-MacBeth regressions One factor model Test the CAPM Several factors model Fama-MacBeth regressions One factor model Here we introduce only one factor: market excess return. 1)Estimate over the sample 1962:1 2014:6 the CAPM for the 25 FF portfolios and plot the Securities Market Line # 1962:1 2014:6 returns <- as.matrix(subset(dataff, select = PR11:PR55, date >= 1962 & date <=2014 + 5/12 + 0.01)) rf <- as.matrix(subset(dataff, select = RF, date >= 1962 & date <=2014 + 5/12 + 0.01)) ex_returns <- returns - rep(rf, ncol(returns)) factors <- as.matrix(subset(dataff, select = exret_mkt, date >= 1962 & date <=2014 + 5/12 + 0.01)) # the first step X <- cbind(matrix(1, nrow(ex_returns), 1), factors) Y <- ex_returns beta <- solve(t(X) %*% X) %*% t(X) %*% Y # same as lm(returns ~ factors) #plotting the security market line mean_exret <- apply(X = ex_returns, 2, mean) beta1=beta[2,] df1=data.frame(mean_exret,beta1) plot(df1\$beta1,df1\$mean_exret, main="Security Market line", xlab="betas",ylab="mean exc ret") abline(reg = lm(df1\$mean_exret ~ df1\$beta1), col = "red")

This preview has intentionally blurred sections. Sign up to view the full version.

# second step: aggregating data, estimating + Heteroskedasticity robust vcov matrix
This is the end of the preview. Sign up to access the rest of the document.
• Spring '10
• C.Favero

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern