
**********************************************************************************
READ ME: MATLAB CODE FOR "THE COSTS AND BELIEFS IMPLIED BY DIRECT STOCK OWNERSHIP"
**********************************************************************************

The Matlab code takes the cleaned data that is produced in Stata, called:
wealth_and_wage_activeowner_20160418.csv
and produces all results and figures in the paper beginning in Section 3.

The file "main_annual.m" is the main Matlab file; it executes the code to solve
the model and estimate the values of the structural parameters. There are numerous
.m files that are called by main_annual.m, many of which have .m files contained
within them as well. However, after updating the file paths, main_annual.m should
run and produce the results of the paper.

Note: if you run this code, you may get slightly different answers than what show
up in the paper due to simulation differences; I don't set a seed anywhere, but
have run the model many, many times to insure the parameter values are stable.
If you run this code, you should get estimates *very* similar to those reported in
the paper.

Note: read_in_stata_data.m loads the data created in Stata into Matlab. You will
need to change the path. Currently, the path points to:
data=dlmread('YourFilePath/wealth_and_wage_activeowner_20160418.csv',',',1,0);
change the "YourFilePath" part to the folder path where the .csv file is saved

Note: The file "make_all_figures.m" will produce the entire set of figures found
in the paper, but some of the .m  files must be run after the optimal parameters
and confidence intervals are calculated.