read_me.txt
Read me file for the Matlab programs accompanying 
AER Manuscript number:  2014_1558
Title: The Twin Ds: Optimal Default and Devaluation
Authors: Na, Schmitt-Groh, Uribe, and Yue
Date: December 2017

We also provide execution times for a desktop running Matlab 2017a on a Windows 10 computer, with an Intel Xeon 3.5 GHz CPU, and 256GB RAM. 

Replication of figure 3: A Typical Default Episode Under Optimal Exchange-Rate Policy
-----------------------------------------------------------------------------------
Step 1: Run vfi_opt.m. This creates the file vfi_opt.mat. 
vfi_opt.m takes 62 seconds to run.

Step 2: Run simu_opt.m. This creates the file simu_opt.mat. 
simu_opt.m takes 11 seconds to run.

Step 3: Run typical_default_episode_opt.m 
typical_default_episode_opt.m takes 10 seconds to run.


Replication of figure 5: A Typical Default Episode Under A Currency Peg
-----------------------------------------------------------------------------------
Step 1: Run vfi_peg.m. This creates the file vfi_peg.mat. 
vfi_peg.m takes 189,650 seconds (i.e., 53 hours) to run.

Step 2: Run simu_peg.m. This creates the file simu_peg.mat. 
simu_peg.m takes 19 seconds to run.

Step 3: Run typical_default_episode_opt_peg.m 
typical_default_episode_opt_peg.m takes 9 seconds to run.


Replication of figure 7: Distribution of External Debt
-----------------------------------------------------------------------------------
Run smooth_lad.m. This file reads simu_opt.mat and simu_peg.mat, which are produced as described above. 
smooth_lad.m takes 1 second to run.

