FamaMacBeth regression
Moderators: EViews Gareth, EViews Moderator, EViews Esther

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
FamaMacBeth regression
This thread is about the FamaMacBeth twostep regression addin that performs FamaMacBeth estimation of factor premia on a set of portfolio/asset returns and factors in EViews.
Re: FamaMacBeth regression
Hello,
Could somebody explain me how this addin works and the approach behind it ?
Thank you in advance
Could somebody explain me how this addin works and the approach behind it ?
Thank you in advance
Re: FamaMacBeth regression
First of all, make sure that you have EViews version 7.x or higher. Then, download the addin 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: FamaMacBeth regression
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?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12316
 Joined: Tue Sep 16, 2008 5:38 pm
Re: FamaMacBeth regression
You'll probably need to provide your workfile, and the specification you used.
Follow us on Twitter @IHSEViews
Re: FamaMacBeth regression
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!

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
There was a bug in the FamaMacBeth 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).
Re: FamaMacBeth regression
Thank you very much it works now!
One quick question regarding the methodology used in the addin is this a static FamaMacbeth 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 addin is this a static FamaMacbeth 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!

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
The time series regressions are done first over the whole time period. The coefficients are then used for the crosssectional regressions.
Re: FamaMacBeth regression
After running the FamaMacbeth 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!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12316
 Joined: Tue Sep 16, 2008 5:38 pm
Re: FamaMacBeth regression
All Addins are open source. Just open up the program in your EViews Addins folder and take a look at the calculations.
Follow us on Twitter @IHSEViews
Re: FamaMacBeth regression
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.

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
Your crosssectional regressions should look like equation (2) in the documentation.
Re: FamaMacBeth regression
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.

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
It would be more helpful if you posted the code you're using for your replication.
Who is online
Users browsing this forum: No registered users and 3 guests