%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % readme.txt: % % This file describes how to run the replication files for % "Fiscal Commitment and Sovereign Default Risk" % by Siming Liu and Hewei Shen % % Authors: Siming Liu (corresponding author) and Hewei Shen % Email: simliu86@gmail.com, hewei.shen@outlook.com %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1. General Information %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1.1 Software and operating system used: 1.1.1 Two-period model:To solve the two period model results, we used MATLAB R2020a on windows 10 operating system to execute the matlab files (.m files). To execute the Fortran files (.f90 files), we used the Intel Fortran compiler that comes with the Intel Parallel Studio XE 2019 Update 5 Composer Edition for Fortran and C++ Windows. The fortran code also requires the IMSL Fortran Numerical library 2018.0.2. 1.1.2 Full model: When testing the Fortran files (.f90 files) on our windows 10 machine, we used the Intel Fortran compiler and Intel MPI library that come with the Intel Parallel Studio XE 2019 Update 5 Composer Edition for Fortran and C++ Windows and the Intel MPI library 2019 update 4. The full model was eventually solved on Karst, which is Indiana University's high-throughput computing cluster. We used the Intel compiler and Openmpi 2.1.0 to compile and parallelize our program when executing it on Karst. We also used MATLAB R2020a to generate all the graphs. 1.2 The order in which the programs need to run: 1.2.1 Two-period model: All the results and figures from the two-period model can be replicated in the following way: a. The Fortran program is only used to compute case 3. First, solve case 3 under the baseline parameter setting In the folder "replication_files\two_period", compile all the .f90 files in the order of: mod_data.f90 main.f90 Execute the program and wait for it to complete. b. Second, solve case 3 for a continuum of "sigma(y)". In the folder "replication_files\two_period\robust_matlab_trade_off", open the "main_beta_std_p.f90" program and set integer variable "ind_excercise" as 1. compile all the .f90 filesin the order of: mod_data.f90 main_beta_std_p.f90 Execute the program and wait for it to complete. c. Lastly, execute the matlab file "main.m"", which does the following: solve case 1 under baseline parameter setting solve case 2 under baseline parameter setting load result of case 3 from the Fortran solve case 1 & 2 for a continuum of "sigma(y)". load result of case 3 for a continuum of "sigma(y)" from the Fortran generate all the figures and display information in the table in the two-period section 1.2.2 Full model: All the results and figures from the full models can be replicated in the following way: a. First, in the file main.f90, set the five logical variables load_case1 (line 20), load_case2 (line 21), load_case3 (line 22), calc_enforcement_cost (line 24), and calc_welfare (line 25) to be ".false.". compile all the .f90 files in the order of: mod_matlab.f90 mod_data.f90 mod_discreteAR1.f90 mod_interp.f90 mod_param.f90 mod_global.f90 mod_funcs.f90 mod_save_results.f90 mod_mpi.f90 mod_root1dim.f90 simulation_case1.f90 simulation_case2.f90 simulation_case3.f90 solve_case1.f90 solve_case2.f90 solve_case3.f90 sub_event_analysis.f90 sub_case2_construct_tax.f90 sub_case3_construct_tax.f90 welfare_gain.f90 short_simlation.f90 main.f90. Execute the program and wait for it to complete. b. Second, set the five logical variables to be ".true.", compile all the .f90 files and excute the program. Wait for the program to complete. This step generates all the simulation results and welfare implications in the paper. c. Lastly, execute the matlab file "plot_all_full_model_results.m", which generates all the figures in the quantitative analysis section in the paper. 1.3 Expected computation time: 1.3.1 Two-period model: a. Step a above takes less than 1 minutes when running on windows PC with Intel i7-9750H CPU @ 2.60GHz b. Step b above takes less than 10 minutes when on windows PC with Intel i7-9750H CPU @ 2.60GHz c. Step c above takes 4 minutes when running on windows PC with Intel i7-9750H CPU @ 2.60GHz 1.3.2 Full model: a. Step a above takes about 106 hours when running with 20 nodes (320 processes) on Karst. b. Step a above takes about 24 hours when running with 8 nodes (128 processes) on Karst. c. Step c above takes about 15 minutes to finish on windows PC with Intel Core i7-7700 CPU @3.60GHz. 1.4 Random numbers: Random numbers are used in simulations. The seeds are already specified in the Fortran files so that the users do not need to manually fix the seeds when executing the programs. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2. List of Files and Description %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% replication_files\two_period (contains all the computer programs that can replicate the results from the section "Two-Period Model" in the paper ) case3_results: folder that stores case 3 result under the baseline parameter setting main.m: main matlab program that uses all other numerical functions parameters.m: initialize parameter values for the two-period model solve_case1.m: matlab program that solves case 1 under baseline parameters solve_case2.m: matlab program that solves case 2 under baseline parameters main.f90: Fortran program that solves case 3 under baseline parameters load_case3.m: matlab program that loads case 3 result from Fortran two_period.mat matlab .mat file that stores result from baseline simulation paper_graph.m: plot graphs d_case2.m ev2_case1.m ev2_case2.m q_case1.m q_case2.m subplot_tight.m taud_case1.m taur_case1.m v1_case1.m v1_case2.m v2_case1.m v2_case2.m v2d_case1.m v2d_case2.m v2r_case1.m v2r_case2.m y_thre_case2.m: auxiliary matlab functions mod_data.f90: auxiliary Fortran function ./robust_matlab_trade_off: folder that contains program files for sensitivity analysis ./robust_matlab_trade_off/case3_results_all_std: folder that stores case 3 result under different values of sigma(y) ./robust_matlab_trade_off/parameters_robust.m: matlab program that initializes parameters for sensitivity analysis ./robust_matlab_trade_off/ls_solve_case1.m: matlab program that solves case 1 under alternative parameter values ./robust_matlab_trade_off/ls_solve_case12.m: matlab program that solves case 2 under alternative parameter values ./robust_matlab_trade_off/main_beta_std_p.f90: Fortran program that solves case 3 under alternative parameter values ./robust_matlab_trade_off/main_stdy.m: matlab program that solves case 1 & 2 for different values of sigma(y) ./robust_matlab_trade_off/load_case3_all_std.m: matlab program that loads result of case 3 for different values of sigma(y), and plot graph of sensitity analysis replication_files\full_model (contains all the computer programs that can replicate the results from the section "Quantitative Analysis" in the paper ) case1_results: folder that stores all the numerical resutls from solving the case of discretionary fiscal policies. case2_results: folder that stores all the numerical resutls from solving the case of non-contingent tax commitment. case3_results: folder that stores all the numerical resutls from solving the case of contingent tax commitment. event_analysis: folder that stores the numerical results from our event analysis short_run_simulation: folder that sotres the numerical results from our simulation paths common_results: folder that stores all the other numerical results main.f90: the main program, it uses all the other files in the same folder mod_param.f90: the module that contains all parameter values solve_case1.f90, solve_case2.f90, solve_case3.f90: the subroutines to solve the three cases and calculate the enforcement costs in our paper simulation_case1.f90, simulation_case2.f90, simulation_case3.f90: the subroutines to simulate the three cases in our paper welfare_gain.f90: the subroutine to calculate the welfare implications sub_event_analysis.f90: the subroutine to conduct the event analysis short_simlation.f90: the subroutine to generate the simulation path sub_case2_construct_tax.f90, sub_case3_construct_tax.f90: the subroutines to construct the next-period tax schedules for the non-contingent and contingent tax commitment in figure 6 mod_data.f90, mod_discreteAR1.f90, mod_funcs.f90, mod_global.f90, mod_interp.f90, mod_matlab.f90, mod_mpi.f90, mod_root1dim.f90, mod_save_results.f90: the auxiliary modules run_results1.txt, run_results2.txt: the outputs from the steps a and b in part 1.2.2 plot_all_full_model_results.m, subplot_tight.m: the MATLAB files to generate all the graphs replication_files\data (contains all the data files) The .xlsx and .xls files contain all the data that we used in the paper. The names of the files have been changed to reflect their content.