Skip to content

lcallot/ptv-var

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages