Stefan Niemann and Paul Pichler "Optimal fiscal policy and sovereign debt crises" February 2020 Approx 3 hrs total CPU time using *Microsoft Surface Pro, Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz, 2496 Mhz, 2 Core(s), 4 Logical Processor(s) *MATLAB R2017b *Microsoft Windows 10 Pro %%%%%%%%%%%%%%%%%%%%%%%%%%%% Replication Instructions %%%%%%%%%%%%%%%%%%%%%%%%%%%% I) Extract all files in the ZIP-folder NPRED_CodesData.zip and add folder NPRED_CodesData (with subfolders) to MATLAB path II) Run NPRED_MAIN.m to reproduce ALL quantitative results (Table 3 and figures) %%%%%%%%%%%%%%%%%%%%%%%% Further information %%%%%%%%%%%%%%%%%%%%%%%% NPRED_MAIN.m calls the following sub-routines: *) NPRED_BusinessCycleStatistics.m * Calls Model_solution.m and Model_simulation.m * Solves and simulates the model for different calibrations and computes the business cycle statistics in Table 3 * Displays results in MATLAB and writes statistics into NiemannPichler_RED.xls * Saves model solutions in SOLUTION_1.mat, SOLUTION_2.mat, etc. *) NPRED_plot_zones.m * Plots crisis and default zones under optimal fiscal policy (Figure 1) *) NPRED_debt_policy_plots.m * Plots bond pricing and debt policy functions (Figure 2) * NPRED_plot_sim.m * Plots public debt, crisis and default thresholds for varying discount factors (Figure 3) * Uses hand-selected simulation sequences stored in Plot_Sim_1-Plot_Sim_4 * NPRED_plots_entry.m * Plots fiscal policy when entering the crisis zone (Figure 4) and period utility (Figure 5) * Uses INTRO_MATERIAL_2.MAT to plot counterfactual policies * NPRED_plots_exit.m * Plots fiscal policy when leaving the crisis zone (Figure 6) *NPRED_crisis_narrative_matlabplots.m * Plots macroeconomic dynamics during Mexican debt crisis (Figure 7) * NPRED_APPENDIX_debt_policy_plots * Plots debt policy functions for different TFP levels (Fig 8, Appendix) The Mexican data statistics in Table 3 (together with the raw data from which they are constructed) are contained in DATASET_MEXICO_1980_2018.xls The algorithms use parts of the CompEcon toolbox provided with the textbook 'Applied Computational Economics and Finance' by Mario J. Miranda & Paul L. Fackler, 2002, MIT Press; https://pfackler.wordpress.ncsu.edu/compecon/