140 likes | 465 Views
Common Empirical Methods and Stata Jared DeLisle. Topics We Will Cover. Regression (OLS), adjustment of standard errors, and output Sorting firms by characteristic(s) Portfolio returns based on a strategy Matching firms by characteristic(s) Calendar-time portfolios
E N D
Topics We Will Cover • Regression (OLS), adjustment of standard errors, and output • Sorting firms by characteristic(s) • Portfolio returns based on a strategy • Matching firms by characteristic(s) • Calendar-time portfolios • Fama-MacBeth (1973) regressions
Resources • Stata links http://www.personal.psu.edu/fpv/sourcecode.htm http://www.eszter.com/stata.html http://www.ats.ucla.edu/stat/stata/ http://personal.anderson.ucla.edu/judson.caskey/data.html http://dss.princeton.edu/online_help/stats_packages/stata/ http://people.su.se/~mkuda/stata.html http://ideas.repec.org/s/boc/bocode.html http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/se_programming.htm • SAS Links http://www.ats.ucla.edu/stat/sas/ http://dss.princeton.edu/online_help/stats_packages/sas/ Boehmer, Broussard, & Kallunki, Using SAS in Financial Research • Remember, Google is your friend!
Stata 11 (current version) • Stata is a statistical package which runs on Windows, Macintosh and Unix platforms. • Just like SAS, it is powerful, however, IMHO, much easier to use than SAS. • For a comparison of programs, visit: http://www.ats.ucla.edu/stat/technicalreports/number1_editedFeb_2_2007/ucla_ATSstat_tr1_1.1_0207.pdf
Stata 11 • Review Window • All entered commands are listed for easy recall • Variables Window • Lists variables (and labels) contained in dataset • Command Window • Commands are entered here one line at a time • Output Window • Results, and errors, show up here
Stata 11 • Data can be accessed and analyzed using the command line prompt • Review pane makes debugging and recall easy • Commands can also be input via a “do-file” • “Do-files” are text files with the .do file extension • Allows Stata to run through a series of commands easily and maintains reproducibility of analysis
Regression • OLS • regress depvarindepvars • OLS with White (or robust) standard errors • regress depvarindepvars, r • regress depvarindepvars, cluster(var) • OLS with fixed effects • aregdepvarindepvars, absorb(var) (use r or cluster() for robust se’s) • Probit (Logit, Tobit) regression • probit (logit) depvarindepvars (use ,r or cluster() for robust se’s) • 2-D Clustered standard errors (Petersen [2009]) • cluster2 depvarindepvars, tcluster(time) fcluster(firm) • probit2, logit2, tobit2
Sorting • “xtile” (or, alternatively, “xtileJ” [J. Caskey]) sorts sample into the number of groups you specify by the variable you specify • xtilenewvar = var, nquantiles(#) • xtileJnewvar = var, nquantiles(#) by(byvar)
Portfolio Returns • Given a strategy, a researcher wishes to learn if the strategy produces abnormal returns. • In order to do this, the researcher can only use information that an investor would have at the time of portfolio formation, and then examine the portfolio returns in the next period. • Typically involves a “long-short” or “zero-cost” portfolio • Let’s do an example with momentum returns…
Calendar Time Portfolios • Typically for long-run studies, when the researcher wishes to form a portfolio of firms where an event triggers the firm’s entrance into the portfolio and the firm stays in portfolio for a certain amount of time (12 months, 36 months, etc.). Fama (1998) recommends this method over buy-and-hold abnormal returns. • Let’s look at how we might create a dataset with calendar time portfolio returns and analyze such a dataset…
Exercise – Matching firms • There are various methods (ranging from simple to sophisticated to ridiculous) of matching a firm in a sample to a firm out-of-sample. • Let’s think about how we could set up a simple match between our in and out-of-sample firms based on Fama and French (1997) 48-industries, size, and 12-month momentum.
Fama-MacBeth (1973) Regressions • Very common in asset pricing • First, time series regressions on each group’s returns to estimate factor betas • Followed by cross-sectional regressions each time period to estimate risk premiums on the factor betas • The estimated risk premiums are averaged over all time periods, and se’s are calculated • xtfmb, xtfmbJ (J. Caskey), fmtest (R. Tharyan)
Some things we didn’t cover • Event studies (for those without access to Eventus, see http://dss.princeton.edu/online_help/stats_packages/stata/eventstudy.html) • GMM, Heckman, Simultaneous equations, IV regression • Time-Series analysis • VAR, VECM, ARIMA, GARCH, Unit-root and cointegration tests, etc. • Survey analysis • Hazard analysis • Maximum Likelihood Estimation (Non-linear, FIML, LIML, etc.) • Other stuff we can’t possibly cover in 1 hour • Good news! Stata (& SAS) can do most of these analyses! • Again, Google is your friend!... And so am I! j.delisle@wsu.edu