Giter Site home page Giter Site logo

warecucff / replication-hasenzagl-et-al-2020 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fipelle/replication-hasenzagl-et-al-2020

0.0 0.0 0.0 5.96 MB

Replication code for "A Model of the Fed's View on Inflation".

Home Page: https://arxiv.org/abs/2006.14110

License: BSD 3-Clause "New" or "Revised" License

Jupyter Notebook 71.71% Julia 28.29%

replication-hasenzagl-et-al-2020's Introduction

A Model of the Fed's View on Inflation

This repository contains the source code for replicating the results in the paper:

Hasenzagl, T., Pellegrino, F., Reichlin, L., & Ricco, G. (2020). A Model of the Fed's View on Inflation.

If you have any questions, comments, or suggestions please create a new issue or email the authors.

Code structure

The main directory is organized as follows:

  • annex_global_data: Contains a directory with the data files, 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.
  • code_main: Contains all of the Julia code necessary for replication.
    • The Metropolis-Within-Gibbs subdirectory contains the code for the Metropolis-Within-Gibbs algorithm.
  • csv_output: Used for storing the .csv output files.
  • data: Contains the data used in the estimation. The data is saved in .csv and .xlsx files.
  • docs: Contains the paper and online appendix.
  • img: Used for storing the output figures.

The code is written in Julia 1.0.5 (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")

Running the code

The main file is user_main.jl. This script runs the following exercises:

  • The in-sample estimation is run by setting run_type=1 in user_main.jl.
  • The conditional forecasting exercise is run by setting 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.
  • The out-of-sample forecasting exercise is run by setting 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")

Figures and Tables

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.

Citation

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}
}

replication-hasenzagl-et-al-2020's People

Contributors

thasenzagl avatar fipelle avatar gricco avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.