dynare userguide

Download Dynare Userguide

Post on 03-Oct-2014

463 views

Category:

Documents

2 download

Embed Size (px)

TRANSCRIPT

DYNAREUser GuideTommaso Mancini Griffoli, 2007-2008An introduction to the solution & estimation of DSGE modelsDynare v4 - User GuidePublic beta versionTommaso Mancini Griolitommaso.mancini@stanfordalumni.orgThis draft: June 2010iiiCopyright c 2007-2010 Tommaso Mancini GrioliPermission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.3 or anylater version published by the Free Software Foundation; with no InvariantSections, no Front-Cover Texts, and no Back-Cover Texts.A copy of the license can be found at: http://www.gnu.org/licenses/fdl.txtContentsContents ivList of Figures vii1 Introduction 11.1 About this Guide - approach and structure . . . . . . . . . . . 11.2 What is Dynare? . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Additional sources of help . . . . . . . . . . . . . . . . . . . . . 41.4 Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.5 v4, whats new and backward compatibility . . . . . . . . . . . 52 Installing Dynare 72.1 Dynare versions . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2 System requirements . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Installing Dynare . . . . . . . . . . . . . . . . . . . . . . . . . . 72.4 MATLAB particularities . . . . . . . . . . . . . . . . . . . . . . 83 Solving DSGE models - basics 93.1 A fundamental distinction . . . . . . . . . . . . . . . . . . . . . 93.1.1 NOTE! Deterministic vs stochastic models . . . . . . . . 103.2 Introducing an example . . . . . . . . . . . . . . . . . . . . . . 113.3 Dynare .mod le structure . . . . . . . . . . . . . . . . . . . . . 153.4 Filling out the preamble . . . . . . . . . . . . . . . . . . . . . . 153.4.1 The deterministic case . . . . . . . . . . . . . . . . . . . 163.4.2 The stochastic case . . . . . . . . . . . . . . . . . . . . . 163.4.3 Comments on your rst lines of Dynare code . . . . . . 173.5 Specifying the model . . . . . . . . . . . . . . . . . . . . . . . . 183.5.1 Model in Dynare notation . . . . . . . . . . . . . . . . . 183.5.2 General conventions . . . . . . . . . . . . . . . . . . . . 193.5.3 Notational conventions . . . . . . . . . . . . . . . . . . . 193.5.4 Timing conventions . . . . . . . . . . . . . . . . . . . . 193.5.5 Conventions specifying non-predetermined variables . . 203.5.6 Linear and log-linearized models . . . . . . . . . . . . . 203.6 Specifying steady states and/or initial values . . . . . . . . . . 21ivCONTENTS v3.6.1 Stochastic models and steady states . . . . . . . . . . . 213.6.2 Deterministic models and initial values . . . . . . . . . . 233.6.3 Finding a steady state . . . . . . . . . . . . . . . . . . . 233.6.4 Checking system stability . . . . . . . . . . . . . . . . . 243.7 Adding shocks . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.7.1 Deterministic models - temporary shocks . . . . . . . . 253.7.2 Deterministic models - permanent shocks . . . . . . . . 253.7.3 Stochastic models . . . . . . . . . . . . . . . . . . . . . 273.8 Selecting a computation . . . . . . . . . . . . . . . . . . . . . . 273.8.1 For deterministic models . . . . . . . . . . . . . . . . . . 283.8.2 For stochastic models . . . . . . . . . . . . . . . . . . . 283.9 The complete .mod le . . . . . . . . . . . . . . . . . . . . . . . 313.9.1 The stochastic model . . . . . . . . . . . . . . . . . . . . 313.9.2 The deterministic model (case of temporary shock) . . . 323.10 File execution and results . . . . . . . . . . . . . . . . . . . . . 333.10.1 Results - stochastic models . . . . . . . . . . . . . . . . 333.10.2 Results - deterministic models . . . . . . . . . . . . . . 344 Solving DSGE models - advanced topics 374.1 Dynare features and functionality . . . . . . . . . . . . . . . . . 374.1.1 Other examples . . . . . . . . . . . . . . . . . . . . . . . 374.1.2 Alternative, complete example . . . . . . . . . . . . . . 384.1.3 Finding, saving and viewing your output . . . . . . . . . 414.1.4 Referring to external les . . . . . . . . . . . . . . . . . 424.1.5 Innite eigenvalues . . . . . . . . . . . . . . . . . . . . . 434.2 Files created by Dynare . . . . . . . . . . . . . . . . . . . . . . 434.3 Modeling tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.3.1 Stationarizing your model . . . . . . . . . . . . . . . . . 444.3.2 Expectations taken in the past . . . . . . . . . . . . . . 444.3.3 Innite sums . . . . . . . . . . . . . . . . . . . . . . . . 444.3.4 Innite sums with changing timing of expectations . . . 465 Estimating DSGE models - basics 475.1 Introducing an example . . . . . . . . . . . . . . . . . . . . . . 475.2 Declaring variables and parameters . . . . . . . . . . . . . . . . 485.3 Declaring the model . . . . . . . . . . . . . . . . . . . . . . . . 485.4 Declaring observable variables . . . . . . . . . . . . . . . . . . . 495.5 Specifying the steady state . . . . . . . . . . . . . . . . . . . . 495.6 Declaring priors . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.7 Launching the estimation . . . . . . . . . . . . . . . . . . . . . 525.8 The complete .mod le . . . . . . . . . . . . . . . . . . . . . . . 555.9 Interpreting output . . . . . . . . . . . . . . . . . . . . . . . . . 575.9.1 Tabular results . . . . . . . . . . . . . . . . . . . . . . . 575.9.2 Graphical results . . . . . . . . . . . . . . . . . . . . . . 576 Estimating DSGE models - advanced topics 616.1 Alternative and non-stationary example . . . . . . . . . . . . . 616.1.1 Introducing the example . . . . . . . . . . . . . . . . . . 616.1.2 Declaring variables and parameters . . . . . . . . . . . . 666.1.3 The origin of non-stationarity . . . . . . . . . . . . . . . 666.1.4 Stationarizing variables . . . . . . . . . . . . . . . . . . 676.1.5 Linking stationary variables to the data . . . . . . . . . 686.1.6 The resulting model block of the .mod le . . . . . . . . 686.1.7 Declaring observable variables . . . . . . . . . . . . . . . 696.1.8 Declaring trends in observable variables . . . . . . . . . 696.1.9 Declaring unit roots in observable variables . . . . . . . 706.1.10 Specifying the steady state . . . . . . . . . . . . . . . . 716.1.11 Declaring priors . . . . . . . . . . . . . . . . . . . . . . 716.1.12 Launching the estimation . . . . . . . . . . . . . . . . . 716.1.13 The complete .mod le . . . . . . . . . . . . . . . . . . . 726.1.14 Summing it up . . . . . . . . . . . . . . . . . . . . . . . 746.2 Comparing models based on their posterior distributions . . . . 746.3 Where

Recommended

View more >