The following file describes code used in "Economic Policy and the Great Depression in a Small Open Economy" by Jonathan Payne and Lawrence Uren. 

A combination of matlab and R are used to construct the results of the paper. 

To construct Table 1, run the Table1.R. It uses soe.csv which contains data from the Angus Maddison database. 

To construct Table 2, run Table2.R. It uses the following data:
worldgy.csv which contains a series for foreign govt spending and foreign income. 
Butlin_rar.csv contains data from Butlin (1977). 
exchangedata.csv contains exchange rate AUS-Sterling. 
tot.csv contains terms of trade data. 


Figure 1 simulates the impulse response associated with an increase in government spending. This is implemented using the following code: 

a) irf_gm_gov_fixed.m solves for an impulse response function with a fixed exchange rate using baseline parameters stored in parameters_gmg2.m. 

b) Run masterflex_gm.m in "baseline" mode. This solves the model with a flexible exchange rate and baseline parameters (parameters_gmg2.m) by calling gali_monacelli_gov.m. Then run irf_gm_gov.m which creates the impulse response function. 

c) Run Figure1.R. This produces Figure 1.  

Figure 2 simulates the model with a fixed exchange rate and compares this to the observed data. This is implemented by running masterfile_gm.m in "baseline" mode. Then run Figure2.R to produce the figure 2. 

Figure 3 conducts a counterfactual examining the importance of each shock. The code for Figure 2 produces these results. They are graphed in Figure3.R.

Table 3 summary statistics are calculated when Figure 2 is produced by running the "baseline" setting of master file_gm.m.

Figure 4. To simulate the model under alternative exchange rate system run masterfile_gm.m under case "erdecompose". Then run Figure4.R

Figure 5. To simulate the model with zero govt spending shocks run masterfile_gm.m under case zerog. To simulate the model with zero govt spending shocks and a large govt sector, use case largeg. Finally, Figure5.R produces the Figure. 

Figure 6. Run masterfile_gm.m under case "thetal". Run masterflex_gm.m under case thetal. Complete by run Figure6.R. 

Notes:
The matlab code calls Bennett McCallum's matlab code to solve Rational Expectations systems. Details and code available at the following website:
http://www.tepper.cmu.edu/faculty-research/faculty-directory/bennett-mccallum/matlab-files-for-re-calculations/index.aspx 

The figures are constructed in R and they require the "Monash package for R" which is available from the following website: 
http://robjhyndman.com/software/monash/
