Fama-MacBeth regression

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

jeric
Posts: 1
Joined: Fri Jun 27, 2014 6:42 am

Re: Fama-MacBeth regression

Postby jeric » Fri Jun 27, 2014 7:54 am

Hello,

Is it possible to get the coefficient values from the first step (time-series regression) of Fama-Macbeth regression?

Thanks in advance.

EViews Rebecca
EViews Developer
Posts: 94
Joined: Thu Apr 18, 2013 8:37 am

Re: Fama-MacBeth regression

Postby EViews Rebecca » Mon Jun 30, 2014 1:34 pm

I've added a line to the Fama-MacBeth add-in to produce the coefficients from the timeseries regressions. The updated program is now available for download and more details are in the documentation.

metrix
Posts: 57
Joined: Sun Dec 08, 2013 9:15 am

Re: Fama-MacBeth regression

Postby metrix » Tue Jul 01, 2014 7:56 am

Dear Rebecca,
thank you for the update, i hope that the next version of update can do Fama French (1993) regression? :)

Nice day.

EViews Rebecca
EViews Developer
Posts: 94
Joined: Thu Apr 18, 2013 8:37 am

Re: Fama-MacBeth regression

Postby EViews Rebecca » Tue Jul 01, 2014 8:56 am

Don't wait for another update. Now that the add-in is producing the time series coefficients, it should be easier for you to follow Fama-French 1993 methodology.

metrix
Posts: 57
Joined: Sun Dec 08, 2013 9:15 am

Re: Fama-MacBeth regression

Postby metrix » Tue Jul 01, 2014 9:00 am

the bhat containing the coeficients :oops: , Now I understood.
thank you.

mmc23
Posts: 21
Joined: Sat Jan 11, 2014 9:44 am

Re: Fama-MacBeth regression

Postby mmc23 » Mon Jul 07, 2014 8:43 am

hi Rebecca
I have a simple suggestion :roll: :
can you show the regression output of the first step in equation object in the spool object results, just to show Sdr-error and t-stat.....
and very useful add-in. Thanks for sharing.
Kind Regards.

EViews Rebecca
EViews Developer
Posts: 94
Joined: Thu Apr 18, 2013 8:37 am

Re: Fama-MacBeth regression

Postby EViews Rebecca » Mon Jul 07, 2014 2:25 pm

It should be very simple for you to modify the add-in to put the ts regression output into a spool. For example, in the add-in code replace the fragment beginning with "' calculate betas from ts regressions of portfolio/asset returns on market returns" with:

Code: Select all

' calculate betas from ts regressions of portfolio/asset returns on market returns
%subbeta_summary = @getnextname("beta_summary")
spool {%subbeta_summary}
matrix(!num_p, !num_f) {%subbhat}
for !i=1 to !num_p
   equation {%subbetaeq}.ls {%subrets}(!i) c {%subfacs}
   for !j=1 to !num_f
      {%subbhat}(!i, !j) = @coefs(!j + 1)   
   next
   {%subbeta_summary}.append {%subbetaeq}   
   close {%subbetaeq}
next
delete {%subbetaeq}

mmc23
Posts: 21
Joined: Sat Jan 11, 2014 9:44 am

Re: Fama-MacBeth regression

Postby mmc23 » Mon Jul 07, 2014 4:36 pm

thanks for your help, thanks a lot.

ecofin
Posts: 180
Joined: Fri May 10, 2013 11:24 am

Re: Fama-MacBeth regression

Postby ecofin » Thu Jul 17, 2014 6:35 am

hi Rebecca
it's very useful and quick to add a 'Sample dialog' to this Add-in, would you like to help me for the code.

best regards

EViews Rebecca
EViews Developer
Posts: 94
Joined: Thu Apr 18, 2013 8:37 am

Re: Fama-MacBeth regression

Postby EViews Rebecca » Thu Jul 17, 2014 9:10 am

Dialogs in EViews generally don't allow you to set samples, so I would suggest simply using the workfile sample.

ecofin
Posts: 180
Joined: Fri May 10, 2013 11:24 am

Re: Fama-MacBeth regression

Postby ecofin » Fri Jul 18, 2014 8:51 am

thanks for your response.

metrix
Posts: 57
Joined: Sun Dec 08, 2013 9:15 am

Re: Fama-MacBeth regression

Postby metrix » Sun Jul 27, 2014 2:23 pm

Dear Rebecca,
This Add-in use OLS for cross-sectional average regression, '' In applying standard OLS formulas to a cross-sectional regression, we assume that the right-hand variables beta are fixed. The beta in the cross-sectional regression are not fixed, of course, but are estimated in the time-series regression. This turns out to matter, even asymptotically...'' (John H. Cochrane, ASSET PRICING, chapter 12 pp 239-240).
How can use others methods for the estimation like GMM or EGLS for the cross sectional regression out put of Fama-MacBeth methodologie. can you add two methods EGLS and GMM with the OLS in the Add-in (to make the choice with the three methods OLS or GMM and EGLS for estimating).
the reference: John H. Cochrane, ASSET PRICING, Revised edition, Princeton University Press, Chapter 12 pp 229-252.

it's just that the add-in must take all special cases.

nice day for you.
Kind Regards. Metrix
Attachments
Chapter 12_pp 229-252.pdf
(172.82 KiB) Downloaded 209 times

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

Re: Fama-MacBeth regression

Postby EViews Gareth » Sun Jul 27, 2014 4:05 pm

It would be easier for you to modify the code to change the estimation method yourself
Follow us on Twitter @IHSEViews

metrix
Posts: 57
Joined: Sun Dec 08, 2013 9:15 am

Re: Fama-MacBeth regression

Postby metrix » Sun Jul 27, 2014 4:35 pm

I am a beginner, I'm not an expert in programming like you Mr Gareth, would you like to help me to have some ideas about the code.

thanks in advance.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11848
Joined: Tue Sep 16, 2008 5:38 pm

Re: Fama-MacBeth regression

Postby EViews Gareth » Mon Jul 28, 2014 8:38 am

Looks like the subroutine FMB is the part that does the calculations. The line:

Code: Select all

   rowplace(g, @transpose(@inverse(@transpose(design) * design) * @transpose(design) * retvec), j)

is the one that performs OLS and puts the row of coefficients into the matrix g. Just change that line to do whatever calculation you want, instead of OLS.
Follow us on Twitter @IHSEViews


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 3 guests