This .zip file contains the MATLAB replication codes for the models in Eichenbaum, Godinho de Matos, Lima, Rebelo and Trabandt  (2022), 'Expectations, Infections, and Economic Activity'.

All codes were written and run with Matlab 2021a. The following toolboxes are required to run the codes: optimization toolbox, statistics toolbox, parallel computing toolbox.

The codes contain a lot of comments that describe in detail how the codes are set up, how switches need to be set to either estimate and/or simulate the model etc. Please read the comments carefully.

The folder <1_baseline> contains the code for the baseline estimated model. Inspect and run young_old.m.  All other routines in the folder are called automatically.

The folder <2_no_learning> contains the code for the model without learning. Inspect young_old.m and simulate_model.m and run young_old.m.  All other routines in the folder are called automatically.

The folder <3_containment_only> contains the code for the model with containment only. Inspect and run young_old.m. All other routines in the folder are called automatically.

The folder <4_endemic_covid> contains the code for the model with endemic covid. Inspect and run steady_state_oldyoung.m. 

Martin Eichenbaum, Miguel Godinho de Matos, Francisco Lima, Sergio Rebelo and Mathias Trabandt (mathias.trabandt@gmail.com)

April 2022



