“Online” Estimation of Macroeconomic Models
2019-07-24, 15:00–15:30, Room 349

Medium-large Dynamic Stochastic General Equilibrium models such as those used for forecasting and policy analysis by central banks take a substantial amount of time to estimate using standard approaches such as Random Walk Metropolis Hastings. Our new Sequential Monte Carlo sampler in DSGE.jl makes it possible to estimate DSGE models in parallel, reducing computational time, and “online,” that is efficiently including new data in the estimation as they become available.

In this talk, I will present DSGE.jl’s new Sequential Monte Carlo (SMC) sampler. SMC is a method of generating draws from a posterior distribution when direct sampling is not possible. In the past, modern macroeconomists have used Random Walk Metropolis Hastings for this purpose, however as our models have become more complex, Metropolis Hastings’ shortcomings have become more apparent: the algorithm produces serially correlated draws, has difficulties characterizing multimodal distributions, is slow and unable to be parallelized, and interfaces poorly with new data arrivals.

SMC resolves these problems. Instead of starting from scratch with every new piece of information, we initialize the sampling algorithm at the entire posterior distribution of an older estimation. This “online estimation” allows frequent re-estimation of our models as new data become available rather than waiting months for enough new data to justify a full re-estimation. The algorithm is fast and parallelizable, reducing runtimes from days to just hours. These massive speedups make possible estimation of a new class of heterogenous agent models (which are simply infeasible to estimate using Metropolis Hastings) and allow more rigorous forecast evaluations (by allowing us to estimate a larger suite of comparison models on different data).

I will discuss lessons learned regarding parallelization and improvements we’ve made to the algorithm including parameter blocking, utilization of the Chandrasekhar recursions for likelihood evaluation, and fully-adaptive hyper-parameter tuning (allowing the algorithm to flexibly accommodate the business cycle: it spends more time exploring the distribution when economic conditions are novel than when conditions are similar to those in the past). Our SMC methods may prove useful to any Julia users who conduct Bayesian estimation, and many of our developments can also be easily applied to alternative applications. Finally, I will present comparative performance benchmarks of the algorithm in Matlab, FORTRAN, and Julia and discuss approaches we’ve taken to optimize code performance.

Disclaimer: This talk reflects the experience of the author and does not represent an endorsement by the Federal Reserve Bank of New York or the Federal Reserve System of any particular product or service. The views expressed in this talk are those of the authors and do not necessarily reflect the position of the Federal Reserve Bank of New York or the Federal Reserve System. Any errors or omissions are the responsibility of the authors.