Background

Fama Macbeth procedure is proposed by Fama and Macbeth(1973). It is an alternative way to ran cross-section regression.

Procedure

There are three steps to obtain the Fama Macbeth regression estimates and test statistics: obtain betas with time-series regression for each firm, do cross-sectional regression for each date, and conduct newey-west adjustments for standard error. The following three subsection describe them, respetively.

Rolling Betas

Time-series regression to get betas[1]

Rit=a^i+β^itfit+ϵit R_{it} = \hat a_i+\hat\beta_{it}f_{it}+\epsilon_{it}

Where RitR_{it} refers to the stock return of firm ii at time tt. fitf_{it} represents a factor that affect RitR_{it} , and β^it\hat\beta_{it} is the estimated coefficient on factor fijtf_{ijt}.

Genernally, estimating the model involves using rolling regressions with historic data. For example,a dataset includes 50 stocks with each stock has 36-month observations with variables: stock return, factor 1, 2, 3. If we require the number of observations for estimating beta1,2,3 is 24. Then for each firm ii at month tt, the monthly observation used to estimate the beta is from t24t-24 to t1t-1.

Now, How do we achieve calculating So the input dataset looks like

gvkey date return factor1 factor2
000001 01/31/1963 0.0345 0.8 0.2
... ... ... ... ...
000001 10/31/2017 0.0345 0.7 0.3
000002 01/31/1963 0.0789 0.5 0.3
... ... ... ... ...
000002 12/31/1989 0.0121 0.4 0.6
... ... ... ... ...

Calculate Rolling Betas with SAS

a. Rolling beta estimation with Macro. In chapter 4 of Boehmer,Broussard, and Kallunki(2002)[2], they employ macro to achieve rolling regression and get betas. The first step is to construct a dataset called good data with additional variable n

data gooddata;
set msf8;
by gvkey;
n+1;
if first.gvkey then n =1;
run;
gvkey date return factor1 factor2 n
000001 01/31/2014 0.0345 0.8 0.2 1
... ... ... ... ... ...
000001 10/31/2017 0.0345 0.7 0.3 46
000002 01/31/1963 0.0789 0.5 0.3 1
... ... ... ... ... ...
000002 12/31/1989 0.0121 0.4 0.6 624
... ... ... ... ... ...
%MACRO estim; /* begin macro definition */
%do X = 50 %to 66;
DATA temp;
SET gooddata;
if &X - 49 <= N <= &X;
per = &x;
PROC REG DATA = temp NOPRINT OUTEST = results;
MODEL r = rm;
BY firm per;
quit;
PROC APPEND BASE = betas1 DATA = results;
%end;
%mend estim; /* end macro definition */
%estim; /* execute macro */

b. Rolling regressions without macros. André de Souza provides a approach to do rolling regression without invoke macros. The basic idea is to construct a dataset that can be used with proc reg directly. You click the link for more detail.

Calculate Rolling Betas with Python

Step2: Cross-sectional regressions

Cross-ection regression at each time period

Rit=α^i+λ^itβit+δit R_{it} = \hat\alpha_i+\hat\lambda_{it}\beta_{it}+\delta_{it}

How many firms are needed for cross sectional regression.

Averaging across time to get the final estimates λ^=1/Tt=1Tλ^t \hat\lambda = 1/T\sum^T_{t=1}\hat\lambda_{t} α^=1/Tt=1Tλ^t \hat\alpha = 1/T\sum^T_{t=1}\hat\lambda_{t}

Step3: Newey West Adjusted Standard Error

Reference

[1] This procedure part is constructed based on Johan Cochrane Teaching Notes.

[2]Boehmer, E., Broussard, J. P., & Kallunki, J. P. (2002). Using SAS in financial research. SAS Institute.

results matching ""

    No results matching ""