### Fama-MacBeth regression

Posted:

**Thu Apr 18, 2013 9:03 am**This thread is about the Fama-MacBeth two-step regression add-in that performs Fama-MacBeth estimation of factor premia on a set of portfolio/asset returns and factors in EViews.

Page **1** of **11**

Posted: **Thu Apr 18, 2013 9:03 am**

This thread is about the Fama-MacBeth two-step regression add-in that performs Fama-MacBeth estimation of factor premia on a set of portfolio/asset returns and factors in EViews.

Posted: **Fri Jun 14, 2013 12:54 am**

Hello,

Could somebody explain me how this add-in works and the approach behind it ?

Thank you in advance

Could somebody explain me how this add-in works and the approach behind it ?

Thank you in advance

Posted: **Fri Jun 14, 2013 1:08 am**

First of all, make sure that you have EViews version 7.x or higher. Then, download the add-in and run the installation program (or simply unzip it). It will upload a documentation file into the related folder (C:\Users\...\Documents\EViews Addins\...), where you can find your answers.

Posted: **Sun Oct 27, 2013 10:56 am**

After filling in the pop up screen with my specifications and running the add in the attached error pops up. Afterwhich I do not get to see the results spool.

Can anybody help me out with this?

Can anybody help me out with this?

Posted: **Sun Oct 27, 2013 11:33 am**

You'll probably need to provide your workfile, and the specification you used.

Posted: **Sun Oct 27, 2013 12:04 pm**

See attachment for the workfile.

The dependent variables are the 25 portfolios named valsize_*_val_exrf with the factors being Mkt_value smb_value hml_value for the period between october 1989 and august 2013.

Thanks in advance!

The dependent variables are the 25 portfolios named valsize_*_val_exrf with the factors being Mkt_value smb_value hml_value for the period between october 1989 and august 2013.

Thanks in advance!

Posted: **Mon Oct 28, 2013 10:20 am**

There was a bug in the Fama-MacBeth code that didn't handle samples properly. There's a version 1.1 available now through automatic download and from the website.

When you run it again set your sample to 1989:10 2013:08 (i.e. no NAs).

When you run it again set your sample to 1989:10 2013:08 (i.e. no NAs).

Posted: **Mon Oct 28, 2013 11:09 am**

Thank you very much it works now!

One quick question regarding the methodology used in the add-in is this a static Fama-Macbeth in which the time series regression is over the entire period and the coefficients are then used for the cross sectional regression. Or are these rolling time series regression in which for the first x years coefficients are estimated and then used for the following year in cross sectional regressions and this process is then repeated troughout time to eventually have a time series of coefficients which are then averaged and used?

once again thanks for the help!

One quick question regarding the methodology used in the add-in is this a static Fama-Macbeth in which the time series regression is over the entire period and the coefficients are then used for the cross sectional regression. Or are these rolling time series regression in which for the first x years coefficients are estimated and then used for the following year in cross sectional regressions and this process is then repeated troughout time to eventually have a time series of coefficients which are then averaged and used?

once again thanks for the help!

Posted: **Mon Oct 28, 2013 11:19 am**

The time series regressions are done first over the whole time period. The coefficients are then used for the cross-sectional regressions.

Posted: **Tue Nov 05, 2013 6:34 am**

After running the Fama-Macbeth Add in one can see the resulting lamda's from the cross sectional regressions in a matrix called Gamma01. I was wondering how I can replicate one of these series best to see if the numbers I am seeing are correct and to ensure that I understand what is behind the add in. Could anybody help me out with this? Thanks in Advance!

Posted: **Tue Nov 05, 2013 7:44 am**

All Add-ins are open source. Just open up the program in your EViews Add-ins folder and take a look at the calculations.

Posted: **Tue Nov 05, 2013 8:14 am**

Thanks for the reply! Looked at the code, but to be honest I am not very familiar with the codes and have a bit of a hard time deciphering the code. So from what I am guessing is that the first time series regression is just OLS regression per asset/return. But could you tell me how the cross sectional regression is done? If I perform a simple cross sectional regression at each moment in time I come to different values then the ones in the gamma output in my workfile!

Would be great if you could help me out.

Would be great if you could help me out.

Posted: **Tue Nov 05, 2013 9:06 am**

Your cross-sectional regressions should look like equation (2) in the documentation.

Posted: **Tue Nov 05, 2013 10:20 am**

Thanks for the suggestion, I've had a look at the documents and tried to replicate the methodology used in the manual and unfortunately the results are still not the same. So to ensure that I am not wasting your time could you confirm if the following is correct: If i run a time series regression on my 25 portfolios and the regressors, then use the resulting beta coefficients in a cross sectional regression at each time period I should get the matrix as provided in the Gamma01 matrix by the fama macbeth add in? If so, this is what I have done and the resulting numbers are not the same. In the attachment I have added the workfile could you also have a look? the dependent variables are named Eqexrf* (e.g. eqexrf11) the independent variables are mkt smb hml.

Would be great if you could have a look at it. I tried to replicate the results for the first and second row in gamma so for time periods 1 and 2.

I hope that you find similar results for the replication and the add in, in that case we now that it is something I am doing wrong.

Would be great if you could have a look at it. I tried to replicate the results for the first and second row in gamma so for time periods 1 and 2.

I hope that you find similar results for the replication and the add in, in that case we now that it is something I am doing wrong.

Posted: **Tue Nov 05, 2013 10:40 am**

It would be more helpful if you posted the code you're using for your replication.