Page 4 of 11
Re: Fama-MacBeth regression
Posted: Fri Jun 27, 2014 7:54 am
by jeric
Hello,
Is it possible to get the coefficient values from the first step (time-series regression) of Fama-Macbeth regression?
Thanks in advance.
Re: Fama-MacBeth regression
Posted: Mon Jun 30, 2014 1:34 pm
by EViews Rebecca
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.
Re: Fama-MacBeth regression
Posted: Tue Jul 01, 2014 7:56 am
by metrix
Dear Rebecca,
thank you for the update, i hope that the next version of update can do Fama French (1993) regression?
Nice day.
Re: Fama-MacBeth regression
Posted: Tue Jul 01, 2014 8:56 am
by EViews Rebecca
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.
Re: Fama-MacBeth regression
Posted: Tue Jul 01, 2014 9:00 am
by metrix
the bhat containing the coeficients
, Now I understood.
thank you.
Re: Fama-MacBeth regression
Posted: Mon Jul 07, 2014 8:43 am
by mmc23
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 Sdr-error and t-stat.....
and very useful add-in. Thanks for sharing.
Kind Regards.
Re: Fama-MacBeth regression
Posted: Mon Jul 07, 2014 2:25 pm
by EViews Rebecca
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}
Re: Fama-MacBeth regression
Posted: Mon Jul 07, 2014 4:36 pm
by mmc23
thanks for your help, thanks a lot.
Re: Fama-MacBeth regression
Posted: Thu Jul 17, 2014 6:35 am
by ecofin
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
Re: Fama-MacBeth regression
Posted: Thu Jul 17, 2014 9:10 am
by EViews Rebecca
Dialogs in EViews generally don't allow you to set samples, so I would suggest simply using the workfile sample.
Re: Fama-MacBeth regression
Posted: Fri Jul 18, 2014 8:51 am
by ecofin
thanks for your response.
Re: Fama-MacBeth regression
Posted: Sun Jul 27, 2014 2:23 pm
by metrix
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
Re: Fama-MacBeth regression
Posted: Sun Jul 27, 2014 4:05 pm
by EViews Gareth
It would be easier for you to modify the code to change the estimation method yourself
Re: Fama-MacBeth regression
Posted: Sun Jul 27, 2014 4:35 pm
by metrix
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.
Re: Fama-MacBeth regression
Posted: Mon Jul 28, 2014 8:38 am
by EViews Gareth
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.