DYNARE User Guide Tommaso Mancini Griffoli, 2007-2008 An introduction to the so

DYNARE User Guide Tommaso Mancini Griffoli, 2007-2008 An introduction to the solution & estimation of DSGE models Dynare v4 - User Guide Public beta version Tommaso Mancini Griffoli tommaso.mancini@stanfordalumni.org This draft: June 2010 iii Copyright c ⃝2007-2010 Tommaso Mancini Griffoli Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license can be found at: http://www.gnu.org/licenses/ fdl.txt Contents Contents iv List of Figures vii 1 Introduction 1 1.1 About this Guide - approach and structure . . . . . . . . . . . 1 1.2 What is Dynare? . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Additional sources of help . . . . . . . . . . . . . . . . . . . . . 4 1.4 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.5 v4, what’s new and backward compatibility . . . . . . . . . . . 5 2 Installing Dynare 7 2.1 Dynare versions . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 System requirements . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Installing Dynare . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4 MATLAB particularities . . . . . . . . . . . . . . . . . . . . . . 8 3 Solving DSGE models - basics 9 3.1 A fundamental distinction . . . . . . . . . . . . . . . . . . . . . 9 3.1.1 NOTE! Deterministic vs stochastic models . . . . . . . . 10 3.2 Introducing an example . . . . . . . . . . . . . . . . . . . . . . 11 3.3 Dynare .mod file structure . . . . . . . . . . . . . . . . . . . . . 15 3.4 Filling out the preamble . . . . . . . . . . . . . . . . . . . . . . 15 3.4.1 The deterministic case . . . . . . . . . . . . . . . . . . . 16 3.4.2 The stochastic case . . . . . . . . . . . . . . . . . . . . . 16 3.4.3 Comments on your first lines of Dynare code . . . . . . 17 3.5 Specifying the model . . . . . . . . . . . . . . . . . . . . . . . . 18 3.5.1 Model in Dynare notation . . . . . . . . . . . . . . . . . 18 3.5.2 General conventions . . . . . . . . . . . . . . . . . . . . 19 3.5.3 Notational conventions . . . . . . . . . . . . . . . . . . . 19 3.5.4 Timing conventions . . . . . . . . . . . . . . . . . . . . 19 3.5.5 Conventions specifying non-predetermined variables . . 20 3.5.6 Linear and log-linearized models . . . . . . . . . . . . . 20 3.6 Specifying steady states and/or initial values . . . . . . . . . . 21 iv CONTENTS v 3.6.1 Stochastic models and steady states . . . . . . . . . . . 21 3.6.2 Deterministic models and initial values . . . . . . . . . . 23 3.6.3 Finding a steady state . . . . . . . . . . . . . . . . . . . 23 3.6.4 Checking system stability . . . . . . . . . . . . . . . . . 24 3.7 Adding shocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.7.1 Deterministic models - temporary shocks . . . . . . . . 25 3.7.2 Deterministic models - permanent shocks . . . . . . . . 25 3.7.3 Stochastic models . . . . . . . . . . . . . . . . . . . . . 27 3.8 Selecting a computation . . . . . . . . . . . . . . . . . . . . . . 27 3.8.1 For deterministic models . . . . . . . . . . . . . . . . . . 28 3.8.2 For stochastic models . . . . . . . . . . . . . . . . . . . 28 3.9 The complete .mod file . . . . . . . . . . . . . . . . . . . . . . . 31 3.9.1 The stochastic model . . . . . . . . . . . . . . . . . . . . 31 3.9.2 The deterministic model (case of temporary shock) . . . 32 3.10 File execution and results . . . . . . . . . . . . . . . . . . . . . 33 3.10.1 Results - stochastic models . . . . . . . . . . . . . . . . 33 3.10.2 Results - deterministic models . . . . . . . . . . . . . . 34 4 Solving DSGE models - advanced topics 37 4.1 Dynare features and functionality . . . . . . . . . . . . . . . . . 37 4.1.1 Other examples . . . . . . . . . . . . . . . . . . . . . . . 37 4.1.2 Alternative, complete example . . . . . . . . . . . . . . 38 4.1.3 Finding, saving and viewing your output . . . . . . . . . 41 4.1.4 Referring to external files . . . . . . . . . . . . . . . . . 42 4.1.5 Infinite eigenvalues . . . . . . . . . . . . . . . . . . . . . 43 4.2 Files created by Dynare . . . . . . . . . . . . . . . . . . . . . . 43 4.3 Modeling tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3.1 Stationarizing your model . . . . . . . . . . . . . . . . . 44 4.3.2 Expectations taken in the past . . . . . . . . . . . . . . 44 4.3.3 Infinite sums . . . . . . . . . . . . . . . . . . . . . . . . 44 4.3.4 Infinite sums with changing timing of expectations . . . 46 5 Estimating DSGE models - basics 47 5.1 Introducing an example . . . . . . . . . . . . . . . . . . . . . . 47 5.2 Declaring variables and parameters . . . . . . . . . . . . . . . . 48 5.3 Declaring the model . . . . . . . . . . . . . . . . . . . . . . . . 48 5.4 Declaring observable variables . . . . . . . . . . . . . . . . . . . 49 5.5 Specifying the steady state . . . . . . . uploads/Litterature/ dynare-user-guide-an-introduction-to-the-solution-amp-estimation-of-dsge-models.pdf

  • 38
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager