JuliaCon 2020 (times are in UTC)

JuliaCon 2020 (times are in UTC)

Estimation of Macroeconomic Models
2020-07-29 , Green Track

Macroeconomic models require efficient estimation methods when used in policy analysis. Recent additions to DSGE.jl expand its toolkit with state-of-the-art routines for constructing and analyzing Dynamic Stochastic General Equilibrium (DSGE) models. Additions include DSGE-Vector Autoregressions (DSGEVAR), Hamiltonian Monte Carlo (HMC), and potentially a “double-parallel” Bayesian algorithm.


I will present on new features of DSGE.jl. Tentatively, they will be DSGEVARs and HMC.

Dynamic Stochastic General Equilibrium (DSGE) models are workhorse tools at central banks. DSGEVAR methods allow economists to assess misspecification of DSGEs by comparing them to atheoretic vector autoregressions (VAR). The idea is to use DSGEs as priors for VARs in a Bayesian framework. These priors can be implemented by creating pseudo-data from a DSGE. The weight on the prior is determined by a hyperparameter. Larger values of the hyperparameter imply stronger belief that the DSGE explains the data. By finding the hyperparameter which maximizes the marginal data density of a DSGEVAR, we can evaluate misspecification relative to VARs. We build a simple user interface for DSGEVARs on top of DSGE.jl’s modeling approach, allowing users to easily estimate DSGEVARs and apply them in economic analysis.

Hamiltonian Monte Carlo (HMC) improves sampling efficiency during estimation of DSGEs because DSGEs have large sets of parameters. MCMC methods face a trade-off between exploring the parameter space and sampling from high-probability regions. This trade-off worsens in high dimensions. By using information from the gradient of the likelihood, HMC handles this trade-off better than other algorithms like Metropolis-Hastings. Applying HMC to DSGEs is difficult, however, because DSGEs have complex likelihood functions. Autodifferentiation is not immediately possible since calls to LAPACK are made during the likelihood calculation. We use the implicit function theorem to avoid calling LAPACK, which allows us to apply ForwardDiff.jl’s autodifferentiation for fast, accurate, and user-friendly gradient computation. We then write wrappers for the likelihood function and gradient to make it compatible with DynamicHMC.jl’s interface.

Depending on research progress, I may also discuss tools to estimate nonlinear models. Unless Monte Carlo methods like particle filters are applied, it is difficult to compute the likelihoods of nonlinear models. Parallelization is required to effectively use these methods, but for most computing environments, this restriction forces users to use sequential Bayesian estimation algorithms, which are slow. In Julia, however, we can run nested parallel for loops. We combine SMC.jl’s Sequential Monte Carlo estimation algorithm with StateSpaceRoutines.jl’s Tempered Particle Filter to perform a “double-parallel” estimation of nonlinear economic models.

William Chen is a senior Research Analyst at the Federal Reserve Bank of New York (FRBNY) and works on the DSGE team of the Macroeconomics and Monetary Studies Function in the Research and Statistics Group. His research interest are in macroeconomics and financial theory. Chen is a graduate of Williams College with a B.A. in Economics and a B.A. in Mathematics.