Replication code for "A Model of the Fed's View on Inflation".
This repository contains the source code for replicating the results in the paper:
If you have any questions, comments, or suggestions please create a new issue or email the authors.
The main directory is organized as follows:
tc_mwg.jl
, and iis_charts.ipynb
for the model with global variables. To estimate this model use these files instead of the files with the same names in the data and code directories. The dataset for the global model includes the Baltic Dry Index (BDI) which is available here: https://www.balticexchange.com/en/index.html. The code is written in Julia 1.6.4 (https://julialang.org/).
The code uses a number of Julia packages. All necessary packages can be installed using the import_packages.jl
script. To do so, start Julia and use the following command at the Julia REPL prompt:
julia> include("import_packages.jl")
The main file is user_main.jl
. This script runs the following exercises:
run_type=1
in user_main.jl
.run_type=2
and specifying the start date of the forecasting exercise, and the conditioning variables and time periods. Note that the paper does not include a conditional forecasting exercise.run_type=3
and specifying the start date of the forecasting exercise.After choosing the run_type
run the script by starting Julia and using the following command at the Julia REPL prompt:
julia> include("user_main.jl")
The figures and tables are created in two Jupyter (https://jupyter.org/) notebooks:
iis_charts.ipynb
: creates all figures relating to the in-sample estimation.oos_charts.ipynb
: creates all figures relating to the out-of-sample forecasting exercise and the RMSE of the trend-cycle model relative to the RMSE of a random walk with drift.If you are using any part of the code for academic work (including, but not limited to, conference and peer-reviewed papers), please cite using the following bibtex code:
@misc{hasenzagl2020inflation,
title={A Model of the Fed's View on Inflation},
author={Hasenzagl, Thomas and Pellegrino, Filippo and Reichlin, Lucrezia and Ricco, Giovanni},
year={2020},
eprint={2006.14110},
archivePrefix={arXiv},
primaryClass={econ.EM}
}