If you are not yet familiar with asreg, here is a quick start. Implementing the Fama and MacBeth regression using asreg is super-fast and easy. Here are a few posts related to this implementation.
FMB regression – what, how and where
FMB regressions with 25-portfolios – An example
The Shanken Correction
In applying standard OLS formulas to a cross-sectional regression, we assume that the right-hand variables β are fixed. The β in the cross-sectional regressions are not fixed, of course, but are estimated in the time-series regression. Therefore, there might be a sampling error in the estimates of β. Shanken (1992) suggested a correction to the standard errors of the estimates.
How to do it?
Implementing the Shanken correction using the asreg
package is a fairly easy process, and can be done in three steps:
- Find the covariance matrix of the right-hand-side variables. In this example, the right-hand-side variables are
rm_rf
,smb
, andhml
. To find the covariance matrix, use the following command:
cor rm_rf smb hml, cov matrix S = r(C)
2. Find the first stage lambdas of the right-hand side (RHS) variables:
bys portfolios: asreg excess_returns rm_rf smb hml
* Drop unnecessary variables drop _Nobs _R2 _adjR2 _b_cons
3. In the final stage of the Fama and MacBeth regression, we would use the fmb
and shanken
options. The shanken
option requires the covariance matrix that we created in step 1.
asreg excess_returns _b_mmrf _b_smb _b_hml, fmb shanken(S)
Pricing
The asreg program is freeware and can be downloaded from the SSC website. The Shanken correction add-on is available for £89. If you need our data preparation service, it costs £50. This fee includes preparing your raw data for analysis using the asreg program and the Shanken correction add-on.
Once your payment is complete, please send an email to the following email address(es) with your confirmation details. We will send you the code within 24 hours.
attaullah.shah@imsciences.edu.pk
Stata.Professor@gmail.com
References
- Fama, E. F., & MacBeth, J. D. (1973). Risk, return, and equilibrium: Empirical tests. Journal of political economy, 81(3), 607-636.
- Shanken, J. (1992). On the estimation of beta-pricing models. The review of financial studies, 5(1), 1-33.
Could you please kindly upload the example data used here? Many Thanks
Sam
please note that the Shahnken plugin is a paid resource, available here. If you are interested in buying it, you shall get the example dataset and the plugin.