This directory contains programs that can be used to compute optimal policies and industry equilibrium firm densities.

To compute the firm policy and corresponding industry equilibrium firm density at calibrated baseline parameters of Section 4.2 of the paper, start matlab and run program 'MainProgram.m'. The program solves and draws the optimal firm policy, and computes various statistics of the industry equilibrium.


In order to run a demonstration calibration excercise, run the following programs in sequence:


1. CreatePolicies.m. This program creates optimal firm policies with parameters given in the file, and for a list of values for parameter 'c' given in vector 'costvector' (c = fixed cost per period)

2. CreateDensities.m. This program creates industry equilibrium firm densities for all combinations of 'cost' and 'phi' parameters given in the vectors 'costvector' and 'phivector'. (phi = entry cost)

3. AnalyzeResults.m. This program draws optimal policies, and draws various industry equilibrium statistics for all 'c' and 'phi' combinations specified above. The program also draws contour plots for calibration targets in (c,phi)-space.

Note: to perform calibration properly, one should use a denser grid for parameters 'c' and 'phi', i.e. add more
values to 'costvector' and 'phivector' in 'CreatePolicies.m', 'CreateDensities.m', and 'AnalyzeResults.m'. Also, the grid for the optimal firm policy should be finer. This is done by increasing parameter 'iterfine' in 'CreatePolicies.m'. The current coarse grids are used only for demonstration.


-----------------------------------

Files in the directory:
MainProgram.m
CreatePolicies.m
makegridsalternative.m
liquidrun.m
liquidgbm.m
CreateDensities.m
MakeTransAllowTail.m
FindDensity.m
ComputeUnc.m
AnalyzeResults.m

The directory must also contain folders with apperopriate names for the result files (in the current version, 'densities', 'policies', and 'summarydata').

For more details, see commenting in the program files.

-----------------------------------