(S)VAR toolbox (work in progress)

Allows for lag selection and estimation of a VAR using OLS equation-by-equation. An SVAR can be identified using short-run, long-run or sign restrictions. Confidence intervals are estimated using bootstrapping [last update: April 2015].

Small-sample correction for local projections à la Herbst/Johannsen (2020 WP)

Function that creates the small-sample correction matrix in Equation (8) in Herbst and Johannsen (2020 FEDS WP) dependent on horizon H and periods T: gen_MTH.m

Notes and codes on Kalman filter

Description of algorithm, derivations, two examples -- estimating the likelihood of a small New Keynesian DSGE model and estimating time-varying Taylor rule coefficients for US data [last update: Sept. 2015]:

Codes on Bayesian VARs using the Gibbs sampler

Based on the outline in Andrew Blake and Haroon Mumtaz (BoE Technical Handbook 4, 2012). Comes with a note showing equivalence to their codes. [last update: June 2016]:

Notes and codes on a time-varying coefficient VAR

With stochastic volatility and contemporaneous relations as in Primiceri (2005), corrected as in Del Negro and Primiceri (2015). The procedure is explained in detail and my codes replicate their results.

Code for HP and bandpass (CF) filter

hpfilter_bk; bpfilter_bk

Code for conditional forecasts in a VAR

Conditional on a given course of up to two variables.


Minimal steady state file example

"A Truly Baseline DSGE Model"

Code implementing a stripped-down version of "A Baseline DSGE Model" by Jesús Fernández-Villaverde and Juan Rubio-Ramírez, allowing to switch on single features of their model (like sticky wages, capital utilisation, adjustment costs etc.) back on one by one. Comes with some notes.

Dynare code for Meeks, Nelson and Alessandri (BoE WP, 2014)

With a Matlab file re-creating some of the figures in the paper.

Dynare code for Justiniano and Preston (JAE, 2010)

In log-linear form (as in their paper) and in levels, plus a note on derivations of the latter.

Dynare code for Ellison and Tischbirek (JEDC, 2014)

Plus a short note and a Matlab file to get the steady states.

Dynare code for Gertler and Karadi (JME, 2011)

The file calculates the steady states and some calibrated parameters analytically and can thus be used for estimation. GK11.mod

(This file is a slightly reduced version of the model -- no capital utilisation and net investment, fewer equations: GK11reduced.mod)


Simple code to download data for a US Taylor rule from and save it to .ssv: get_US_TR_data.r

Larger code to download data from and ECB, detrend, plot and save it: getdata.r

Code to create harmonised ECB APP dataset. Comes with csv files and a note.

Libre Calc/MS Excel

Create quarterly date labels; average monthly to quarterly series

Libre Calc; MS Excel