Stata Codes  Uncertainty and Downside Risk using Rollwing Window Fama Macbeth Regressions
This project investigates the crosssectional risk premiums of uncertainty risk factors in addition to traditional risk factors. The project uses 25 portfolios formed on size and booktomarket as test assets. The risk factors include RMRF, SMB, HML, UMD, and economic policy uncertainty (EPU) indices from Baker, Bloom, and Davis (2016). The project examines the crosssectional relation between the risk factors and expected stock returns using twostep Fama and Macbeth (1973) regressions. In the first step, time series regressions are used to estimate factor betas and in the second step, the crosssectional regressions are used to estimate risk premiums. The estimation involves a 60month rolling window estimation. Further details are given below:
 Importing different files from Excel
 Reshaping the data to a long format
 Merging different datasets
 The test portfolios and risk factors are downloaded from the Fama and French library.
 For each test assets, betas are estimated using a 60month rolling window.

Descriptive statistics are reported for the estimated betas.
 Then crosssectional regressions are run in each period, using newey standard errors.
 Regression coefficients are then reported.
Our Stata Code
We have developed easy to use yet robust codes for the above steps. The codes need just a basic understanding of Stata. Further, our comments on each line of code will surely help you in running the code as well as in understanding the process more clearly. We normally share all Stata files, the raw data files, and Stata codes with comments. The purpose is to help researchers to learn and apply these codes on their own. We also try to answer questions that might arise at a later stage when the
researcher applies these codes.
Pricing
The code is available for $ $99 with some example data. The Fama and French factors are downloaded from Fama and French library. In case the Fama and French Factors need to be developed from scratch, there is an additional fee of $100.
For further details, please contact us at:
attaullah.shah@imsciences.edu.pk
Stata.Professor@gmail.com
See our full list of completed projects
Project tags: Fama MacBeth, rolling window, crosssectional regression, Fama and French, Stata , FinTechprofessor