Hi all,
As some of you may know (from JuliaCon or otherwise), we at the Federal Reserve Bank of New York (FRBNY) have been developing the package DSGE.jl
to solve and estimate Dynamic Stochastic General Equilibrium macroeconomic models for use in forecasting and research (see here for our introductory blog post and here for some more technical comments). We take a Bayesian approach to estimation, so characterizing the entire posterior distribution of a model’s parameters is of great interest to us. Because this posterior is analytically intractible in most modern DSGE models, it is customary to use the Metropolis Hastings MCMC algorithm to sample from it. As our models have grown in complexity, however, the shortcomings of Metropolis Hastings (e.g. serial correlation between draws, a resistance to parallelization, and a tendency to get stuck in local modes) have become more burdensome. To address this issue, we have begun to implement sequential Monte Carlo (SMC) sampling as described in Ed Herbst and Frank Schorfheide’s paper Sequential Monte Carlo Sampling for DSGE Models.
SMC’s strengths lie in evaluating difficult integrals efficiently, and as such it has been used to filter non-linear or non-Gaussian processes and approximate complex posterior distributions. The SMC class of algorithms as applied to DSGE models is described in depth in Herbst and Schorfheide’s paper. In brief, we start with a large number of draws (or “particles”) from a tractable and easy-to-sample initial distribution, and then iteratively constructing a series of “bridge” distributions. At each stage the particles are mutated using Metropolis Hastings, reweighted using an importance sampler, and potentially resampled to eliminate degenerate particles. Repeated iteration produces a final distribution that approximates the posterior of our model. This procedure is both more efficient than our standard approach and easily parallelizable, yielding substantial performance improvements.
For now, SMC works primarily on the small-scale New Keynesian model presented in Sungbae An and Frank Schorfheide’s Bayesian Analysis of DSGE Models. In the future, we hope to implement additional features (such as blocked parameter sampling) and add the capability to estimate the medium-scale DSGE models commonly used at FRBNY. Our code can be found on the smc
branch of our main package. Development is ongoing, and we welcome any suggestions or comments the community may have!
Abhi Gupta, Pearl Li, and Erica Moszkowski