Fama-MacBeth regression
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Re: Fama-MacBeth regression
Don't use code, I simply open a system of the 25 dependent variables and fill in c mkt smb hml in the equation specific equations and then estimate using ols. This yields the beta's, which i then use in a new file where I take the 25 returns of the portfolio's at the time t and use the beta's i have estimated per regression as independent variables in the cross sectional regression, which yields risk premia per time period t. This can be done for any one time period, I chose to do this for the first month and the second month to check the add in since the outcomes of the check should be similar as the data in the gamma01 matrix of the add in.
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
Without knowing exactly what you're doing it's impossible to know what's going wrong. However, you say your replication uses 25 portfolios. Earlier you said you use eqexrf* as your portfolios in the add-in. In the workfile you posted this gives 75 portfolios. This may be the source of your difference.
Re: Fama-MacBeth regression
I am trying to replicate Fama-MacBeth regression for the example in the Add in, but I don’t know the code to run OLS corrected for heteroskedasticity and autocorrelation, that is, using Newey-West (HAC) standard errors correction.
Could anybody help me with this?
Thanks in advance.
Could anybody help me with this?
Thanks in advance.
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
Code: Select all
ls(cov=hac) (depvar) (indepvars)
Re: Fama-MacBeth regression
This add-in performs the first step regressions for the whole period instead of rolling periods. Can anyone help me in modifying the code so that we can specify the rolling period for calculating the betas in the first step time series regressions? Thanks a lot in advance for any help
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
The code for the EViews rolling regression add-in should help you modify the Fama-MacBeth code to do what you want.
Re: Fama-MacBeth regression
Hey I have download the fama-macbeth add-in but I still have trouble to do the test for 6 Portfolios Formed on Size and Book-to-Market (2 x 3) from Europe. Data is from Kenenth R. French website.
I have uploaded the portfolios pr1, p2.. pr6 + SMB, RF, MKT_RF, MKT and HML to eviews from excel spreadsheet. Questions:
1. How do I run all factors (MKT_RF, SMB, HML) together against all portfolio returns? I have named the portfolios pr1, pr2... so list of portfolios returns is pr*. Do I have to run separately each factor against the portfolios?
2. I am not familiar with term gamma in regression model. Is it the regression coefficient that is used to calculate the risk premium? For example gamma0 median is 1.567 and -0.234 for gamma1 when MKT_RF is only factor.T-Stat are 5.37 and -3.
I have uploaded the portfolios pr1, p2.. pr6 + SMB, RF, MKT_RF, MKT and HML to eviews from excel spreadsheet. Questions:
1. How do I run all factors (MKT_RF, SMB, HML) together against all portfolio returns? I have named the portfolios pr1, pr2... so list of portfolios returns is pr*. Do I have to run separately each factor against the portfolios?
2. I am not familiar with term gamma in regression model. Is it the regression coefficient that is used to calculate the risk premium? For example gamma0 median is 1.567 and -0.234 for gamma1 when MKT_RF is only factor.T-Stat are 5.37 and -3.
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
The Fama-MacBeth documentation will answer your questions.
1. See section 2 ("GUI") on how to enter portfolio returns and factors.
2. See equation 2 and surrounding text for the definition and use of gamma.
1. See section 2 ("GUI") on how to enter portfolio returns and factors.
2. See equation 2 and surrounding text for the definition and use of gamma.
Re: Fama-MacBeth regression
Okey when I regress factors against portfolios pr* I get four gammas for the factors. Are the gammas weighted averages from all portfolios? When I try to regress for example portfolio 1 against factors it says "Near singular matrix.." and it does not show results. What am I doing wrong here? How can I get the results of gammas for each portfolio separately.
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
There's no such thing as "gamma," as defined in the add-in, for individual portfolios. gamma is a measure of the premium you get from exposure to a certain risk factor. That's why there's one for each factor (plus the constant).
I strongly suggest you read the documentation so you understand what gamma is.
I strongly suggest you read the documentation so you understand what gamma is.
Re: Fama-MacBeth regression
Ok yes thx that's clear now. Two more stupid question: First, when testing the joint null hypothesis in CS average regression one with F-statistics, whats the critical value used in the test? Is it 5 %? Hence, the critical value of the F-distribution is 2.60 with three betas? Second, is the F-statistics heteroscedasticity robust as we use HAC standard errors?
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
1. EViews simply reports the F-statistic. It's up to you to decide what significance level you want.
2. Since the cross-sectional average regression uses robust standard errors, use the robust F-statistic (Wald F-statistic).
2. Since the cross-sectional average regression uses robust standard errors, use the robust F-statistic (Wald F-statistic).
Re: Fama-MacBeth regression
Ok thx that's clear now. One more question: how do I get the betas from the first step time-series regression?
Do I have to run basic OLS regression for each portfolio separately like PR*=C(1)+C(2)*MKT_RF+C(3)*SMB+C(4)*HML ?
Do I have to run basic OLS regression for each portfolio separately like PR*=C(1)+C(2)*MKT_RF+C(3)*SMB+C(4)*HML ?
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Fama-MacBeth regression
See Equation 1 in the documentation.
-
- Posts: 3
- Joined: Wed May 07, 2014 2:15 am
Re: Fama-MacBeth regression
Hi,
I searched the forum but couldn't find any answer concerning how to run a Fama Macbeth, adding an additional factor in the second step in eviews. Any help on this would be great.
I have about 2000 stocks with monthly data from 1992 till 2012, so running regressions manually is too extensive. First I want to calculate betas using FF three factor model time series approach. Then I want to make the cross sectional regression with the found betas using an additional variable to evaluate the effect of this variable on the returns.
Does a code exist to run this? or does anyone know how to ammend the existing program code so I can do this?
Thanks!
Frank
I searched the forum but couldn't find any answer concerning how to run a Fama Macbeth, adding an additional factor in the second step in eviews. Any help on this would be great.
I have about 2000 stocks with monthly data from 1992 till 2012, so running regressions manually is too extensive. First I want to calculate betas using FF three factor model time series approach. Then I want to make the cross sectional regression with the found betas using an additional variable to evaluate the effect of this variable on the returns.
Does a code exist to run this? or does anyone know how to ammend the existing program code so I can do this?
Thanks!
Frank
Who is online
Users browsing this forum: No registered users and 24 guests