You can download here a zip file that contains the code necessary to replicate the results in Speculative Beta. You need, however, to download all the datasets necessary to construct the beta portfolios and the main time-series used in the analysis (stock return data from CRSP, dispersion of analyst forecasts from IBES, etc.). The zip file contains a readme.pdf file that explains precisely how to do this and how to run the code.

We also provide the two following STATA datasets in this zip file. These two dataset contains the equal-weighted and value-weighted beta-sorted portfolios used in our analysis, as well the main time-series variables used as controls.  Used in conjunction with the tables.do and figures.do do-files in the above zip file (speculativebetas.zip), they should allow to replicate the main results of our analysis.

If you have any question/comments about these programs and datasets, please contact David Sraer at sraer@berkeley.edu