Differentiable Statespace Models and Hamiltonian Monte Carlo Estimation

Working Paper: NBER ID: w30573

Authors: David Childers; Jess Fernández-Villaverde; Jesse Perla; Christopher Rackauckas; Peifan Wu

Abstract: We propose a methodology to take dynamic stochastic general equilibrium (DSGE) models to the data based on the combination of differentiable state-space models and the Hamiltonian Monte Carlo (HMC) sampler. First, we introduce a method for implicit automatic differentiation of perturbation solutions of DSGE models with respect to the model's parameters. We can use the resulting output for various tasks requiring gradients, such as building an HMC sampler, to estimate first- and second-order approximations of DSGE models. The availability of derivatives also enables a general filter-free method to estimate nonlinear, non-Gaussian DSGE models by sampling the joint likelihood of parameters and latent states. We show that the gradient-based joint likelihood sampling approach is superior in efficiency and robustness to standard Metropolis-Hastings samplers by estimating a canonical real business cycle model, a real small open economy model, and a medium-scale New Keynesian DSGE model.

Keywords: DSGE models; Hamiltonian Monte Carlo; differentiable programming; Bayesian estimation

JEL Codes: C01; C10; C11; E0


Causal Claims Network Graph

Edges that are evidenced by causal inference methods are in orange, and the rest are in light blue.


Causal Claims

CauseEffect
Hamiltonian Monte Carlo (HMC) (C11)efficiency of sampling (C83)
Random Walk Metropolis-Hastings (RWMH) (C59)efficiency of sampling (C83)
Hamiltonian Monte Carlo (HMC) (C11)quality of posterior estimates (C51)
gradient-based joint likelihood sampling approach (C51)robustness (L15)
complexity of DSGE models (E13)performance advantage of HMC (D29)

Back to index