This .zip file contains the MATLAB/DYNARE replication codes for Eichenbaum, 
Rebelo and Trabandt (2020), 'The Macroeconomics of Testing and Quarantining'.


Link to paper and code: 
https://www.mathiastrabandt.com/research



All codes were written and run with Matlab 2016b and DYNARE 4.6.1 The nonlinear
model is solved and simulated with Dynare's nonlinear deterministic solver.

//////////////////////////////////////////////////////////////////
//IMPORTANT: You must use DYNARE 4.6.1 to run this code kit.  //// 
/////////////////////////////////////////////////////////////////

The codes contain a lot of comments that describe in detail how the codes are set up. Please read the comments carefully.

The folders starting with <unknown....> contain the code for the various specifications of the model with unknown health status. Inspect and run ert_testing.mod using Dynare 4.6.1. All other routines in the folder are called automatically.

All other folders in the .zip file contain the same code as in the folders <unknown....>, 
yet with different parameter settings and/or initial seeds etc. Please always inspect and run ert_testing.mod using Dynare 4.6.1. For example, the folders <testing_quarantines....> set switches so that testing and quarantines are implemented with various specifications. In all cases, please inspect the respective file ert_testing.mod for the details.

Similarly, the folders <reinfections....> contain the model code in which the reinfections parameter pis is changed from 0 to 1/104. The folders <reinfections_testing_quaranties....> set switches such that testing and quarantines are implemented in the model with reinfections and various other specifications.

Finally, the files in this .zip file that are named fig1_....m, fig2_....m, fig3_....m etc are the MATLAB .m files that reproduce all the figures provided in the paper. 

Martin Eichenbaum, Sergio Rebelo and Mathias Trabandt (mathias.trabandt@gmail.com)

April 2021



