FamaMacBeth regression
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Re: FamaMacBeth regression
Hello,
Is it possible to get the coefficient values from the first step (timeseries regression) of FamaMacbeth regression?
Thanks in advance.
Is it possible to get the coefficient values from the first step (timeseries regression) of FamaMacbeth regression?
Thanks in advance.

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
I've added a line to the FamaMacBeth addin to produce the coefficients from the timeseries regressions. The updated program is now available for download and more details are in the documentation.
Re: FamaMacBeth regression
Dear Rebecca,
thank you for the update, i hope that the next version of update can do Fama French (1993) regression?
Nice day.
thank you for the update, i hope that the next version of update can do Fama French (1993) regression?
Nice day.

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
Don't wait for another update. Now that the addin is producing the time series coefficients, it should be easier for you to follow FamaFrench 1993 methodology.
Re: FamaMacBeth regression
the bhat containing the coeficients , Now I understood.
thank you.
thank you.
Re: FamaMacBeth regression
hi Rebecca
I have a simple suggestion :
can you show the regression output of the first step in equation object in the spool object results, just to show Sdrerror and tstat.....
and very useful addin. Thanks for sharing.
Kind Regards.
I have a simple suggestion :
can you show the regression output of the first step in equation object in the spool object results, just to show Sdrerror and tstat.....
and very useful addin. Thanks for sharing.
Kind Regards.

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
It should be very simple for you to modify the addin to put the ts regression output into a spool. For example, in the addin 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}
Re: FamaMacBeth regression
thanks for your help, thanks a lot.
Re: FamaMacBeth regression
hi Rebecca
it's very useful and quick to add a 'Sample dialog' to this Addin, would you like to help me for the code.
best regards
it's very useful and quick to add a 'Sample dialog' to this Addin, would you like to help me for the code.
best regards

 EViews Developer
 Posts: 96
 Joined: Thu Apr 18, 2013 8:37 am
Re: FamaMacBeth regression
Dialogs in EViews generally don't allow you to set samples, so I would suggest simply using the workfile sample.
Re: FamaMacBeth regression
thanks for your response.
Re: FamaMacBeth regression
Dear Rebecca,
This Addin use OLS for crosssectional average regression, '' In applying standard OLS formulas to a crosssectional regression, we assume that the righthand variables beta are fixed. The beta in the crosssectional regression are not fixed, of course, but are estimated in the timeseries regression. This turns out to matter, even asymptotically...'' (John H. Cochrane, ASSET PRICING, chapter 12 pp 239240).
How can use others methods for the estimation like GMM or EGLS for the cross sectional regression out put of FamaMacBeth methodologie. can you add two methods EGLS and GMM with the OLS in the Addin (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 229252.
it's just that the addin must take all special cases.
nice day for you.
Kind Regards. Metrix
This Addin use OLS for crosssectional average regression, '' In applying standard OLS formulas to a crosssectional regression, we assume that the righthand variables beta are fixed. The beta in the crosssectional regression are not fixed, of course, but are estimated in the timeseries regression. This turns out to matter, even asymptotically...'' (John H. Cochrane, ASSET PRICING, chapter 12 pp 239240).
How can use others methods for the estimation like GMM or EGLS for the cross sectional regression out put of FamaMacBeth methodologie. can you add two methods EGLS and GMM with the OLS in the Addin (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 229252.
it's just that the addin must take all special cases.
nice day for you.
Kind Regards. Metrix
 Attachments

 Chapter 12_pp 229252.pdf
 (172.82 KiB) Downloaded 275 times

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12316
 Joined: Tue Sep 16, 2008 5:38 pm
Re: FamaMacBeth regression
It would be easier for you to modify the code to change the estimation method yourself
Follow us on Twitter @IHSEViews
Re: FamaMacBeth regression
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.
thanks in advance.

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12316
 Joined: Tue Sep 16, 2008 5:38 pm
Re: FamaMacBeth regression
Looks like the subroutine FMB is the part that does the calculations. The line:
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.
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
Who is online
Users browsing this forum: No registered users and 2 guests