Modeling the Economy During the Pandemic

07/29/2021, 7:00 PM7:30 PM UTC


Macroeconomic modeling during the COVID-19 pandemic, and the switch to a new monetary policy framework, has required rapid adjustments to the DSGE.jl package, made possible by Julia’s flexible typing and efficient matrix computations. We review the new features in DSGE.jl that allow users to model periods of large economic shifts and uncertainty. As an illustration, we also explain how the Federal Reserve Bank of New York solved and estimated a model with these features during the recession.


In this talk, we will discuss how the Federal Reserve Bank of New York (FRBNY) uses Julia for forecasting. We will focus on how the FRBNY adjusted its dynamic stochastic general equilibrium (DSGE) model for the rapid changes in economic conditions brought about by the COVID-19 pandemic. These changes, which are available publicly through DSGE.jl, include the ability to solve and estimate an economic model with multiple regimes (where regimes differ in the equations that describe the economy). Regime-switching allows the FRBNY DSGE to better capture the economic effects of COVID-19 as well as the switch to the new interest rate policy of average inflation targeting (AIT) announced by the Federal Reserve (Fed) in August 2020. In modeling the impact of this policy change it is assumed that the introduction of the new reaction function is only partially incorporated by the agents in forming expectations. Specifically, these are formed using a convex combination of forecasts obtained under the old and the new policy reaction functions. We write the code generically, so other forms of exogenous regime-switching and imperfect credibility about policy rules are accommodated.

In addition, we will demonstrate how this new model is estimated. New features in DSGE.jl, SMC.jl, and ModelConstructors.jl provide a user-friendly API for estimating parameters that change over time. We then show how to estimate this new model in an “online” manner that uses estimation results from an older model trained on data until before the pandemic. This method speeds up estimation times and can be applied even when the model has new COVID-specific parameters.

Throughout the talk, we will discuss how Julia’s functionalities and runtime performance enabled us to implement and use these changes quickly, which was crucial in forecasting during the rapidly-changing economic conditions over the last year.

These advances in DSGE.jl will be useful to any Julia users who are interested in flexibly modeling the economy, particularly in crisis situations as during the recession in 2020. It will also be useful to anyone who regularly conducts Bayesian estimation and is interested in re-using the results from an old estimation to efficiently estimate a new model or with new data.

Disclaimer: This talk reflects the experience of the authors 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.

Platinum sponsors

Julia Computing

Gold sponsors

Relational AI

Silver sponsors

Invenia LabsConningPumas AIQuEra Computing Inc.King Abdullah University of Science and TechnologyDataChef.coJeffrey Sarnoff

Media partners

Packt Publication

Fiscal Sponsor