Code Monkey home page Code Monkey logo

ptv-var's Introduction

Replication material for: 'Vector Autoregressions with Parsimoniously Time-Varying Parameters and an Application to Monetary Policy'.

Laurent Callot and Johannes Tang Kristensen.

Link to the paper


Date 01/04/2015

This repository contains the material necessary to replicate the simulations results, the out from the empirical application, and the admissible region figure in: 'Vector Autoregressions with Parsimoniously Time-Varying Parameters and an Application to Monetary Policy'.

Required packages

The parsimonious package from the eponymous repository is required:

library('devtools')
install_github('lcallot/parsimonious')
library('parsimonious')

In addition the following packages should be installed : ggplot2, gridExtra, sandwich, quantmod, xts, parallel, and xtable, all available from CRAN.

/application

  • PTVApp.R estimates the model with two lags and produces the figures out.pdf and inf.pdf.
  • PTVApp_1lag.R estimates the two models with 1 lag and produces 1lag.pdf and ptv_rho.pdf.
  • FREDData.RData contains the data downloaded from the St. Louis Fed. If FREDData.RData is not found when running one of the two previous file the data is downloaded using FRED's API and automatically formatted. Use it if you want to automatically update the plots with more recent data.
  • Libs.R contains functions. The DeTrend1 function has been taken from the replication files for "Hansen, P. R., A. Lunde, and J. M. Nason (2011). The model confidence set. Econometrica 79(2), 453โ€“497" available here

/simulations

The simulations folder contains 4 sub-folders.

  • scripts contains 4 R scripts to replicate the 4 experiments presented in the paper. The script run Monte Carlo iterations in parallel using mclapply. The scripts are configures to perform 10000 replications on 16 cores, make sure to adjust these settings. A file containing the simulation output is saved in ../mcsaves/.
  • mcsaves an empty folder, the simulation script saves R objects with the simulation results. Those are not included because of their size.
  • knitr contains a series of .Rnw files to format the simulation output from mcsaves and generate the plots and tables. These knitr files are not meant to generate pretty PDFs, just useful tex code for the tables and save the figures in pdf.
  • subs contains functions.

/admissible

The file adm_region.R folder contains the code to generate Figure 1 in the paper using ggplot2.

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.