Page 3 of 11
Re: Fama-MacBeth regression
Posted: Wed May 07, 2014 9:57 am
by EViews Rebecca
You will need to make some minor code changes. Change the size of "subbhat" to hold the additional variable, and add it before the cross-sectional regressions are done. Also change the size of "subgamma" to hold the coefficient from the additional variable and the size of the "design" matrix in the fmb subroutine.
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 8:39 am
by quachhao
Hello,
I am new to this. I have tried to run the Fama-Macbeth add-in but it fails every time - I don't know why. I attach the sample used in here with factors including Rf,MK, F1..F3 and excess portfolio returns from P1...P18. Can anyone help instruct how to run the regression with this sample?
Thanks.
QH
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 8:52 am
by EViews Rebecca
If you look at your data you will see that series "p5" has NAs. The add-in will not work with NAs in series. One solution is to change the sample to exclude them.
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 9:01 am
by quachhao
Hi Rebecca,
Thank you. But even if I exclude the first two rows, the add-in still shows error message when running. Please could you help check?
Just to make sure: when we enter the data to the list of portfolio/asset returns, we simply list them like this: p1 p2 p3 p4...p9 and the same with list of factors i.e. rf mk f1 f2 f3?
Cheers,
QH
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 9:07 am
by EViews Rebecca
Works for me.
By the way, you can also enter the series as "p*" and " rf mk f*" (without the quotes).
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 9:21 am
by quachhao
He Rebecca,
Sorry for disturbing again but I cannot do it. Attached is what I did - correct me if I am wrong anywhere.
Do I need to change the coding or simply download the add-in from the site using Eviews's "Download add-ins" ?
Thanks,
QH
Re: Fama-MacBeth regression
Posted: Tue May 13, 2014 9:36 am
by EViews Rebecca
The Excel file you posted has 43 observations (including the NAs) but your example shows 50 observations. Where are your extra observations coming from?
Also, this isn't necessary to solve your problem, but I noticed you've dropped the date information going from Excel to EViews. Keeping this might help you organize your data.
Re: Fama-MacBeth regression
Posted: Sun May 18, 2014 10:59 am
by MeikeK
Dear all,
I am trying to estimate the risk premium for various estimates of stock illiquidity. I have generated 10 illiquidity portfolios and want to obtain the risk prima for both the market return and 3 estimates of illiquidity. I am trying to use the Fama-MacBeth add in to generate the respective (iliquidity) betas and gammas. I am having trouble with defining the input for the risk factors. I understand that for the market factor, I need to use the market return, but how do I include the three illiquidity betas? I defined the betas as following:
β^1i= (cov(r_t^i,r_t^M- E_(t-1) (r_t^M )))/(var(r_t^M- E_(t-1) (r_t^M )-{c_t^M-E_(t-1) (c_t^M )}))
β^2i=(cov(c_t^i-E_(t-1) (c_t^i ),c_t^M- E_(t-1) (c_t^M )))/(var(r_t^M- E_(t-1) (r_t^M )-{c_t^M-E_(t-1) (c_t^M )}))
β^3i=(cov(r_t^i,c_t^M- E_(t-1) (c_t^M )))/(var(r_t^M- E_(t-1) (r_t^M )-{c_t^M-E_(t-1) (c_t^M )}))
β^4i=(cov(c_t^i-E_(t-1) (c_t^i ),r_t^M- E_(t-1) (r_t^M )))/(var(r_t^M- E_(t-1) (r_t^M )-{c_t^M-E_(t-1) (c_t^M )}))
Where beta1 is the market beta, and 2,3 and 4 are the illiquidity betas.
I hope someone can help me, I cannot figure out a way to do it.
Kind regards,
MeikeK
Re: Fama-MacBeth regression
Posted: Mon May 19, 2014 10:49 am
by EViews Rebecca
I don't understand what you're asking. The add-in will calculate the betas for you from your risk factors.
Re: Fama-MacBeth regression
Posted: Tue May 20, 2014 7:26 am
by MeikeK
Dear Rebecca,
What I mean is that I am not sure how to create the risk factors that are used as independent variable. The risk factors as I am using them are namely the comovements of stock returns and illiquidity with the market return and illiquidity. I am not sure how I should construct a risk factor from these. Could you possibly help me?
Kind regards,
MeikeK
Re: Fama-MacBeth regression
Posted: Tue May 20, 2014 8:20 am
by EViews Rebecca
I can't help you with that. There are many possible risk factors and how you determine them is up to you.
Re: Fama-MacBeth regression
Posted: Tue May 20, 2014 9:42 am
by MeikeK
Thank you for your quick reply.
One more question: all risk factors that are used as independent variables in the Fama-MacBeth add in should be in the form of returns right? Or can they be other types of variables (such as market illiquidity)?
Kind regards,
MeikeK
Re: Fama-MacBeth regression
Posted: Sat Jun 14, 2014 1:47 am
by metrix
Dear Rebecca,
this Add-in can do Fama French (1992) approach like Fama and MacBeth (1973) it is based on a time series cross sections model, but Fama French (1993) use a factor based model in the context of a time series regression witch is run separately on each portofolio 'i'.
it would be kind of you if you add the method of the Fama French (1993) regression based in the context of a time series regression witch is run separately on each portofolio 'i' in this Add-in (improve this Add-in with additional method).
thank you for all your efforts, I'm really enjoy using this Add-in :D .
Kind regards. metrix
Re: Fama-MacBeth regression
Posted: Mon Jun 16, 2014 10:55 am
by EViews Rebecca
Thanks for your feedback, but I have no immediate plans to enhance the add-in. To get what you want you could extract the piece of the program that does the first step (the time series regressions) and then modify this to get your time series output.
Re: Fama-MacBeth regression
Posted: Tue Jun 17, 2014 9:46 am
by metrix
Dear Rebecca,
I'm not very expert in programming in eviews

,thank you for your response, but would you like to take this in consideration for Fama French (1993) to add it in the future.
Kind Regards metrix.