Replication files for:
“Which Global Cycle? A Stochastic Factor Selection Approach for Global Macro-Financial Cycles”
by Berger and Hienzsch (2024)

Code tested in: Matlab R2021b on Windows 10 PC with Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz, 2304 MHz, 4 Cores, 8 Logical Processors

Run the MATLAB script replication_main.m to reproduce the key results from the paper.
Set the options to select which figure to reproduce. (Total runtime: approx. 6.6 hours)


If the option to run baseline model is set to one, the stochastic factor selection (SFS) approach is run for the baseline specification. To change the financial variable, choose variable_option in the run_GMCy.m script.
Code outputs are the posterior factor inclusion probabilities, plots of factors, their loadings and factor standard deviations. SFS can be turned on/off using model_option.
(Runtime: approx. 0.5 hours)

Replicate Figures from paper:

Figures 1 gives posterior distributions of the global factor standard deviations for model with credit and model with capital inflows.
(Runtime: approx. 1 hour)

Figure 2 gives estimates of the selected global factors.
Figure 3 compares the different estimates of GMFCy to the unconditional GBCy.
(Runtime: approx. 1.1 hours)


Figure 4 Robustness checks: Posterior distributions of the global factor standard deviations for models with outflows, hot inflows, and bank loans.
(Runtime: approx. 1.5 hours)
Figure 5 Robustness checks: Plots estimates of global factors using different financial variables (inflows, outflows, hot inflows, credit and bank loans).
(Runtime: approx. 2.5 hours)


We cannot be held responsible for any losses which may arise from errors in the code.

If you find errors, please get in touch with us.

If you use the code, please cite the paper.

Tino Berger
Sebastian Hienzsch

July 2024