Page 1 of 11

Fama-MacBeth regression

Posted: Thu Apr 18, 2013 9:03 am
by EViews Rebecca
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.

Re: Fama-MacBeth regression

Posted: Fri Jun 14, 2013 12:54 am
by Belgium11
Hello,
Could somebody explain me how this add-in works and the approach behind it ?

Thank you in advance

Re: Fama-MacBeth regression

Posted: Fri Jun 14, 2013 1:08 am
by trubador
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.

Re: Fama-MacBeth regression

Posted: Sun Oct 27, 2013 10:56 am
by WhutWhut
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?

Re: Fama-MacBeth regression

Posted: Sun Oct 27, 2013 11:33 am
by EViews Gareth
You'll probably need to provide your workfile, and the specification you used.

Re: Fama-MacBeth regression

Posted: Sun Oct 27, 2013 12:04 pm
by WhutWhut
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!

Re: Fama-MacBeth regression

Posted: Mon Oct 28, 2013 10:20 am
by EViews Rebecca
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).

Re: Fama-MacBeth regression

Posted: Mon Oct 28, 2013 11:09 am
by WhutWhut
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!

Re: Fama-MacBeth regression

Posted: Mon Oct 28, 2013 11:19 am
by EViews Rebecca
The time series regressions are done first over the whole time period. The coefficients are then used for the cross-sectional regressions.

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 6:34 am
by WhutWhut
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!

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 7:44 am
by EViews Gareth
All Add-ins are open source. Just open up the program in your EViews Add-ins folder and take a look at the calculations.

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 8:14 am
by WhutWhut
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.

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 9:06 am
by EViews Rebecca
Your cross-sectional regressions should look like equation (2) in the documentation.

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 10:20 am
by WhutWhut
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.

Re: Fama-MacBeth regression

Posted: Tue Nov 05, 2013 10:40 am
by EViews Rebecca
It would be more helpful if you posted the code you're using for your replication.