================================================================================================== README file for replication of “Protectionism and Inequality" by Zhe (Jasmine) Jiang and Zinan Wang ================================================================================================== EMPIRICAL RESULTS ================================================================================================== Software requirements ================================================================================================== - The code was run on RStudio (Version 2024.09.1+394) with R (Version 4.2.3), and MATLAB R2022a. Excel (Version 16.89.1) was also used in generating Figure 1. ================================================================================================== Memory and runtime requirements ================================================================================================== The code was run on a MacBook Air with the following specifications: - operation system: macOS Monterey Version (12.7.6) - processor: 2.2 GHz Dual-Core Intel Core i7 - memory: 8 GB 1600 MHz DDR3 All computations and figure generation are finished within 3 minutes. ================================================================================================== Instructions ================================================================================================== Figure 1 is generated using RStudio and Excel. Download the ”Global antidumping measures.zip” from the World Bank’s Temporary Trade Barriers Database (https://www.worldbank.org/en/data/interactive/2021/03/02/temporary-trade-barriers-database). Select the GAD-USA.xls as our dataset for antidumping initiatives. AD.R converts the GAD-USA.xls into csv files at monthly and quarterly frequency — “AD_monthly.csv” and “AD_quarterly.csv”. Figure 1 is plotted using the AD_quarterly.xlsm, which can also be viewed in the Excel file. ——————————————————————————————————————————— Figure 2 to 5 are generated using MATLAB. ——————————————————————————————————————————— Figure 2: Run run_var_monthly.m. It loads “Monthly.xlsx”, generates Figure 2 and save it as "Fig2.png". In VARIrband.m line #23, the seed of the random number generator is set to 123 and the algorithm to Mersenne Twister — “rng(123,"twister");” Notes: “DATA_LMK.xlsx” transforms the labor market data in nominal terms (tab “SA_data_IRIS_csv”) into real terms (tab “data_transformations”) and computes the 5-month backward MA (tab “computing backward MA”). The tab “DATASET” contains the labor market variables in the “Monthly.xlsx” file. The online appendix specifies the process we follow to obtain the labor market data. “Monthly.xlsx” is the dataset that includes all the monthly variables. ——————————————————————————————————————————— Figure 3: Run run_quarterly_main.m. It loads "Quarterly.xlsx", generates Figure 3 and save it as "Fig3.png". In VARIrband.m line #23, the seed of the random number generator is set to 123 and the algorithm to Mersenne Twister — “rng(123,"twister");” ——————————————————————————————————————————— Figure 4: Run run_quarterly_other.m. By setting fig4_nx (line #11), fig4_ip (line #12), fig4_pi (line #13), fig4_ffr (line #14) to 1 one at a time, it loads "Quarterly.xlsx" and produces NX.fig, IP.fig, Inflation.fig, and FFR.fig individually. Then run Fig4.m. It uses NX.fig, IP.fig, Inflation.fig and FFR.fig to generate Figure 4 and save it as "Fig4.png". In VARIrband.m line #23, the seed of the random number generator is set to 123 and the algorithm to Mersenne Twister — “rng(123,"twister");” ——————————————————————————————————————————— Figure 5: Run run_var_panel.m. It loads "Panel.xlsx", generates Figure 5 and save it as "Fig5.png". In run_var_panel.m line #67, the seed of the random number generator is set to 1234 and the algorithm to Mersenne Twister — “rng(1234,"twister");" ================================================================================================== NUMERICAL RESULTS ================================================================================================== Software requirements ================================================================================================== - The code was run on Dynare (Version 6.4) and Matlab R2022a. ================================================================================================== Memory and runtime requirements ================================================================================================== The code was run on a MacBook Air with the following specifications: - operation system: macOS Monterey Version (12.7.6) - processor: 2.2 GHz Dual-Core Intel Core i7 - memory: 8 GB 1600 MHz DDR3 All computations and figure generation are finished within 2 minutes. ================================================================================================== Description of programs ================================================================================================== The folder “numerical results” contains the scripts to reproduce figures 6-13 in the main text of the paper. It consists of the following major files: - JiangWangCalibration.m: This is the main file which calibrates the model, simulates impulse response functions under various scenarios, generates and saves all results used to plot the figures. It calls the functions "JiangWangCalibrationSolve.m" and "JiangWangCalibrationSolveX.m", and the Dynare mod file "JiangWang_sim.mod". - JiangWangFigures.m: This file plots figures 6-13 in the main text of the paper using results generated by "JiangWangCalibration.m". - JiangWang_sim.mod: This is the Dynare mod file which simulates impulse response functions. It calls the function "set_parameters_from_file.m". ================================================================================================== Instructions ================================================================================================== - To reproduce figures 6-13, first run “JiangWangCalibration.m”, and then run “JiangWangFigures.m”. - It will create the subfolder “figures” and save the figures in it. ================================================================================================== List of figures ================================================================================================== Figure number Output file name Figure 6             w10_bnchm.eps Figure 7             w10_rela_all.eps Figure 8             w1_spm_4scens.eps Figure 9             w2_varphi.eps Figure 10            w2_tt1.eps Figure 11            w2_Fl.eps Figure 12            w10_rela_noprodcr.eps Figure 13            w2_varphi_noprodcr.eps ==================================================================================================