Solution and Estimation Methods for Dsge Models
Total Page:16
File Type:pdf, Size:1020Kb
NBER WORKING PAPER SERIES SOLUTION AND ESTIMATION METHODS FOR DSGE MODELS Jesús Fernández-Villaverde Juan F. Rubio Ramírez Frank Schorfheide Working Paper 21862 http://www.nber.org/papers/w21862 NATIONAL BUREAU OF ECONOMIC RESEARCH 1050 Massachusetts Avenue Cambridge, MA 02138 January 2016 Fernández-Villaverde and Rubio-Ramírez gratefully acknowledges financial support from the National Science Foundation under Grant SES 1223271. Schorfheide gratefully acknowledges financial support from the National Science Foundation under Grant SES 1424843. Minsu Chang, Eugenio Rojas, and Jacob Warren provided excellent research assistance. We thank our discussant Serguei Maliar, the editors John Taylor and Harald Uhlig, John Cochrane, and the participants at the Handbook Conference hosted by the Hoover Institution for helpful comments and suggestions. The views expressed herein are those of the authors and do not necessarily reflect the views of the National Bureau of Economic Research. NBER working papers are circulated for discussion and comment purposes. They have not been peer- reviewed or been subject to the review by the NBER Board of Directors that accompanies official NBER publications. © 2016 by Jesús Fernández-Villaverde, Juan F. Rubio Ramírez, and Frank Schorfheide. All rights reserved. Short sections of text, not to exceed two paragraphs, may be quoted without explicit permission provided that full credit, including © notice, is given to the source. Solution and Estimation Methods for DSGE Models Jesús Fernández-Villaverde, Juan F. Rubio Ramírez, and Frank Schorfheide NBER Working Paper No. 21862 January 2016 JEL No. C11,C13,C32,C52,C61,C63,E32,E52 ABSTRACT This paper provides an overview of solution and estimation techniques for dynamic stochastic general equilibrium (DSGE) models. We cover the foundations of numerical approximation techniques as well as statistical inference and survey the latest developments in the field. Jesús Fernández-Villaverde Frank Schorfheide University of Pennsylvania University of Pennsylvania 160 McNeil Building Department of Economics 3718 Locust Walk 3718 Locust Walk Philadelphia, PA 19104 Philadelphia, PA 19104-6297 and NBER and NBER [email protected] [email protected] Juan F. Rubio Ramírez Emory University Rich Memorial Building Atlanta, GA 30322-2240 and Atlanta Federal Reserve Bank and Fulcrum Asset Management [email protected] Fern´andez-Villaverde, Rubio-Ram´ırez,Schorfheide: This Version December 30, 2015 i Contents 1 Introduction 1 I Solving DSGE Models 3 2 Solution Methods for DSGE Models 3 3 A General Framework 6 3.1 The Stochastic Neoclassical Growth Model . .7 3.2 A Value Function . .8 3.3 Euler Equation . .9 3.4 Conditional Expectations . 10 3.5 The Way Forward . 12 4 Perturbation 13 4.1 The Framework . 14 4.2 The General Case . 16 4.3 A Worked-Out Example . 36 4.4 Pruning . 44 4.5 Change of Variables . 46 4.6 Perturbing the Value Function . 52 Fern´andez-Villaverde, Rubio-Ram´ırez,Schorfheide: This Version December 30, 2015 ii 5 Projection 56 5.1 A Basic Projection Algorithm . 57 5.2 Choice of Basis and Metric Functions . 62 5.3 Spectral Bases . 63 5.4 Finite Elements . 79 5.5 Objective Functions . 85 5.6 A Worked-Out Example . 90 5.7 Smolyak's Algorithm . 93 6 Comparison of Perturbation and Projection Methods 102 7 Error Analysis 104 7.1 A χ2 Accuracy Test . 106 7.2 Euler Equation Errors . 107 7.3 Improving the Error . 111 II Estimating DSGE Models 113 8 Confronting DSGE Models with Data 113 8.1 A Stylized DSGE Model . 114 8.2 Model Implications . 121 8.3 Empirical Analogs . 131 8.4 Dealing with Trends . 139 9 Statistical Inference 140 9.1 Identification . 142 9.2 Frequentist Inference . 146 9.3 Bayesian Inference . 149 Fern´andez-Villaverde, Rubio-Ram´ırez,Schorfheide: This Version December 30, 2015 iii 10 The Likelihood Function 153 10.1 A Generic Filter . 154 10.2 Likelihood Function for a Linearized DSGE Model . 155 10.3 Likelihood Function for Non-linear DSGE Models . 158 11 Frequentist Estimation Techniques 166 11.1 Likelihood-Based Estimation . 166 11.2 (Simulated) Minimum Distance Estimation . 173 11.3 Impulse Response Function Matching . 181 11.4 GMM Estimation . 189 12 Bayesian Estimation Techniques 190 12.1 Prior Distributions . 191 12.2 Metropolis-Hastings Algorithm . 194 12.3 SMC Methods . 203 12.4 Model Diagnostics . 208 12.5 Limited Information Bayesian Inference . 210 13 Conclusion 214 References 215 Fern´andez-Villaverde, Rubio-Ram´ırez,Schorfheide: This Version December 30, 2015 1 1 Introduction The goal of this chapter is to provide an illustrative overview of the state-of-the-art solution and estimation methods for dynamic stochastic general equilibrium (DSGE) models. DSGE models use modern macroeconomic theory to explain and predict comovements of aggregate time series over the business cycle. The term DSGE model encompasses a broad class of macroeconomic models that spans the standard neoclassical growth model discussed in King, Plosser, and Rebelo (1988) as well as New Keynesian monetary models with numerous real and nominal frictions along the lines of Christiano, Eichenbaum, and Evans (2005) and Smets and Wouters (2003). A common feature of these models is that decision rules of economic agents are derived from assumptions about preferences, technologies, information, and the prevailing fiscal and monetary policy regime by solving intertemporal optimization problems. As a consequence, the DSGE model paradigm delivers empirical models with a strong degree of theoretical coherence that are attractive as a laboratory for policy experiments. Modern DSGE models are flexible enough to accurately track and forecast macroeconomic time series fairly. They have become one of the workhorses of monetary policy analysis in central banks. The combination of solution and estimation methods in a single chapter reflects our view of the central role of the tight integration of theory and data in macroeconomics. Numerical solution methods allow us to handle the rich DSGE models that are needed for business cycle analysis, policy analysis, and forecasting. Estimation methods enable us to take these models to the data in a rigorous manner. DSGE model solution and estimation techniques are the two pillars that form the basis for understanding the behavior of aggregate variables such as GDP, employment, inflation, and interest rates, using the tools of modern macroeconomics. Unfortunately for PhD students and fortunately for those who have worked with DSGE models for a long time, the barriers to entry into the DSGE literature are quite high. The solution of DSGE models demands familiarity with numerical approximation techniques and the estimation of the models is nonstandard for a variety of reasons, including a state-space representation that requires the use of sophisticated filtering techniques to evaluate the like- lihood function, a likelihood function that depends in a complicated way on the underlying model parameters, and potential model misspecification that renders traditional economet- ric techniques based on the \axiom of correct specification” inappropriate. The goal of this chapter is to lower the barriers to entry into this field by providing an overview of what Fern´andez-Villaverde, Rubio-Ram´ırez,Schorfheide: This Version December 30, 2015 2 have become the \standard" methods of solving and estimating DSGE models in the past decade and by surveying the most recent technical developments. The chapter focuses on methods more than substantive applications, though we provide detailed numerical illustra- tions as well as references to applied research. The material is grouped into two parts. Part I (Sections 2 to 7) is devoted to solution techniques, which are divided into perturbation and projection techniques. Part II (Sections 8 to 12) focuses on estimation. We cover both Bayesian and frequentist estimation and inference techniques. 3 Part I Solving DSGE Models 2 Solution Methods for DSGE Models DSGE models do not admit, except in a few cases, a closed-form solution to their equilibrium dynamics that we can derive with \paper and pencil." Instead, we have to resort to numerical methods and a computer to find an approximated solution. However, numerical analysis and computer programming are not a part of the standard curriculum for economists at either the undergraduate or the graduate level. This educational gap has created three problems. The first problem is that many macroeconomists have been reluctant to accept the limits imposed by analytic results. The cavalier assumptions that are sometimes taken to allow for closed-form solutions may confuse more than clarify. While there is an important role for analytic results for building intuition, for understanding economic mechanisms, and for testing numerical approximations, many of the questions that DSGE models are designed to address require a quantitative answer that only numerical methods can provide. Think, for example, about the optimal response of monetary policy to a negative supply shock. Suggesting that the monetary authority should lower the nominal interest rate to smooth output is not enough for real-world advice. We need to gauge the magnitude and the duration of such an interest rate reduction. Similarly, showing that an increase in government spending raises output does not provide enough information to design an effective countercyclical fiscal package. The second problem is that the lack of familiarity with numerical analysis has led to the slow diffusion of best practices in solution methods and little interest in issues such as the assessment of numerical errors. Unfortunately, the consequences of poor approxima- tions can be severe. Kim and Kim (2003) document how inaccurate solutions may cause spurious welfare reversals. Similarly, the identification of parameter values may depend on the approximated solution. For instance, van Binsbergen, Fern´andez-Villaverde, Koijen, and Rubio-Ram´ırez(2012) show that a DSGE model with recursive preferences needs to be solved with higher-order approximations for all parameters of interest to be identified. Although much progress in the quality of computational work has been made in the last few 4 years, there is still room for improvement.