RDP 2024-10: How Do Global Shocks Affect Australia? Read me file

This ‘read me’ file contains details of the code and data used in the RDP 2024-10.

Data

Not all of the source data are provided due to sharing restrictions of full data series from various providers (Bloomberg, Reuters Refinitiv, etc). However, full details of the global data panel are given in Section 3.1.2 and Table A1 of the RDP. The details, and partial, transformed data where the data sources are St Louis FRED and IMF IFS are also available in ‘favar_data_description.xlsx’, provided with these files. Data for the whole panel are sourced from St Louis FRED, the IMF IFS database, Bloomberg, Reuters Refinitiv, CEIC and the Wind Financial Terminal. Australian data are obtained from the ABS, RBA, Bloomberg and Corelogic, and these data are also described in the data description spreadsheet.

These replication files assume the use of five csv files in order to reproduce the figures and tables in the RDP:

  • ‘df_graph_stationary.csv’ which contains the data for the global FAVAR panel;
  • ‘df_aus_stationary.csv’ which contains the Australian data;
  • ‘df_small_scale.csv’ which contains the US data;
  • ‘df_fmg_stationary.csv’ which contains the Australian banking and financial data; and
  • ‘china_gdp.xlsx’ which contains the alternative China GDP data from Barcelona et al (2022).

Each file should have a date column and the data should already be quarterly and transformed by differences or log-differences.

Code

We use R version 4.4.0 to run the code. Use the file ‘ext_main.r’ as the starting point. The file sets up the file structure and loads relevant packages before running the following files:

  • ‘prep_data.R’ which loads and segments the relevant data for further exercises;
  • ‘em_algorithm.R’ which applies the expectations maximisation algorithm to the FAVAR panel;
  • ‘estimate_dfm.R’ which includes the principal component calculations and the exercise described in Section 4.1.3;
  • ‘bootstrap_fev.R’ which are the calculations to construct bootstrapped error bands from the forecast error variance decompositions;
  • ‘estimate_var.R’ which estimate the FAVAR models and construct forecast error variance decompositions and impulse response functions.

Reference

Barcelona WL, D Cascaldi-Garcia, JJ Hoek and E Van Leemput (2022), ‘What Happens in China Does Not Stay in China’, Board of Governors of the Federal Reserve System International Finance Discussion Paper No 1360.

11 December 2024

Back to abstract