Modeling Time-Variation Over the Business Cycle (1960-2017): An International Perspective

Enrique Martinez-Garcia
Federal Reserve Bank of Dallas and SMU
emg.economics@gmail.com
Date: 10/1/2018



The replication of the results found in the paper can be achieved using the materials in this folder.

Figures 1, 2, and 3
-------------------------
The subfolder Figure1-3 contains the relevant codes.
The results are obtained implementing a number of Gauss codes/routines:
   ng_filt2.gss
   fcst.prc
   udatain.prc
   yulewalk.prc
The raw data on real GDP and the GDP deflator can be found in the excel file G8data.7.1.2018_GDP&Deflator.xlsx
The data is written in *.qa60 format to be used by Gauss and can be found inside a folder called Data
The README_FIRST.txt file included in this subfolder provides additional details on the implementation of the code.
The output after running the code is stored and plotted in the following excel files:
   Figure1.xlsx -- reports and plots the standard deviations of real GDP and the GDP deflator (Figure 1 of the paper)
   Figure2&3.xlsx -- reports the autoregressive coefficient estimates and uses them together with the raw 
                     data (G8data.7.1.2018_GDP&Deflator.xlsx) to compute a measure of persistence and a forecast
                     (which are then used to plot the persistence and forecasting accuracy graphs for real GDP
                     and the GDP deflator in Figures 2 and 3 of the paper)

Figure 4
-------------------------
The subfolder Figure4 contains the relevant excel file.
The raw data on real GDP and the GDP deflator can be also found in the excel file G8data.7.1.2018_GDP&Deflator.xlsx
The calculations, output, and plots behind Figure 4 can be found here:
   Figure4.xlsx

Table 2
-------------------------
The subfolder Table2 contains all the relevant codes and files.
The results are obtained implementing a number of Gauss codes/routines:
> Main matlab code for the computation of classical cycles:
	HPdatingRGDP_balanced.m
	HPdatingRGDP_unbalanced.m
> Supplementary matlab functions used for dating classical cycles together with HPdatingRGDP_balanced.m and 
  HPdatingRGDP_unbalanced.m:
	indicat.m
	isdate.m
	meanc.m
	rawall.m
	rows.m
	states.m
	sumc.m
> Input and output file (excel spreadsheets) where the original data on real GDP is stored and the classical cycles' 
  indicators are saved:
	RGDP_cycles.xlsx
The raw data on real GDP and the GDP deflator can be also found in the excel file G8data.7.1.2018_GDP&Deflator.xlsx
The README_FIRST.txt file included in this subfolder provides additional details on the implementation of the code.


Table 3 - Figures 5 and 6
-------------------------
The subfolder Table3_Figure5-6 contains all the relevant codes and files.
The results are obtained implementing a Stata codes and using a consistent dataset:
> Stata code for the computation of the results reported in Table 3:
	Table3_Regressions_FINAL.do
> All relevant data as well as the output (including the estimates in Table 3 and the combined scatter plot in Figure 6)
  can be found here:
	Table3_Figure6.xls
> All relevant data as well as the plot of Figure 5 can be found separately in:
	Figure5.xlsx


Figures 7 and 9
-------------------------
The subfolder Figure7&9 contains the relevant codes.
The results are obtained implementing a number of Gauss codes/routines:
   ng_filt2.gss
   fcst.prc
   udatain.prc
   yulewalk.prc
The raw data on real GDP by expenditures can be found in the excel file G8data.7.1.2018_GDP_By_Expenditure.xlsx
The data is written in *.qa60 format to be used by Gauss and can be found inside a folder called Data
The README_FIRST.txt file included in this subfolder provides additional details on the implementation of the code.
The output after running the code is stored and plotted in the following excel file:
   Figure7&9.xlsx -- reports and plots the standard deviations of real GDP by Enpenditure (Figure 7 and 9 of the paper)


Figures 8
-------------------------
The subfolder Figure8 contains the relevant codes.
The results are obtained implementing a number of Gauss codes/routines:
   ng_filt2.gss
   fcst.prc
   udatain.prc
   yulewalk.prc
The raw data on real GDP and the GDP deflator can be found in the excel file G8data.7.1.2018_GDP_By_Industry.xlsx
The data is written in *.qa60 format to be used by Gauss and can be found inside a folder called Data
The README_FIRST.txt file included in this subfolder provides additional details on the implementation of the code.
The output after running the code is stored and plotted in the following excel file:
   Figure8.xlsx -- reports and plots the standard deviations of real GDP by industry (Figure 8 of the paper)


Figure I.A and I.B
-------------------------
The subfolder FigureI contains the relevant codes.
The results are obtained implementing a matlab routine to compute the one-sided HP-filter:
   one_sided_hp_filter_kalman.m
The raw data on real GDP can be found self-contained in the excel file FigureI.xlsx.
The output after running the code is stored to estimate a reduced-form closed-economy Phillips curve and plotted in the following excel file:
   FigureI.xlsx -- reports and plots the estimates of the coefficient on domestic slack from the reduced-form Phillips curve (Figure I.A and I.B of the paper)


