DYNARE COURSE Amsterdam University. Motivation. Design of the macro-language. Dynare macro language and dynare++ k-order approximation

Size: px
Start display at page:

Download "DYNARE COURSE Amsterdam University. Motivation. Design of the macro-language. Dynare macro language and dynare++ k-order approximation"

Transcription

1 DYNARE COURSE Amsterdam University Dynare macro language and dynare++ k-order approximation Dynare macro language Michel Juillard October 23, 2008 Motivation Design of the macro-language The Dynare language used in MOD files) is well suited for describing economic models However, it lacks some useful features, such as: a loop mechanism for automatically repeating similar blocks of equations such as in multi-country models) an operator for indexed sums or products inside equations a mechanism for splitting large MOD-files in smaller modular files the possibility of conditionally including some equations or some runtime commands The Dynare Macro-language was specifically designed to address these issues Being flexible and fairly general, it can also be helpful in other situations The Dynare Macro-language provides a new set of macro-commands which can be inserted inside MOD-files Language features include: file inclusion loops conditional inclusion if/then/else structures) expression substitution The macro-processor transforms a MOD file with macro-commands into a MOD file without macro-commands doing text expansions/inclusions) and then feeds it to the Dynare parser The key point to understand is that the macro-processor only does text substitution like the C preprocessor or the PHP language)

2 Macro Directives Inclusion directive Directives begin with an at-sign followed by a pound and occupy exactly one line However, a directive can be continued on next line by adding two anti-slashes \\) at the end of the line to be continued A directive produces no output, but serves to give instructions to the macro processor This directive simply includes the content of another file at the place where it is inserted. "filename" "modelcomponent.mod" Note that it is possible to include a file from an included file nested includes). Variables The macro processor maintains its own list of variables distinct of model variables and of Matlab variables) Variables can be of four types: integer character string declared between double quotes) array of integers array of strings No boolean type: false is represented by integer zero true is any non-null integer Macro-expressions /2) It is possible to construct macro-expressions, using standard operators. Operators on integers arithmetic operators: +,-,*,/ comparison operators: <,>,<=,>=,==,!= logical operators: &&,,! integer ranges: :4 is equivalent to integer array [,2,3,4] Operators on character strings comparison operators: ==,!= concatenation: + extraction of substrings: if s is a string, then one can write s[3] or s[4:6]

3 Macro-expressions 2/2) Define directive Operators on arrays dereferencing: if v is an array, then v[2] is its 2 nd element concatenation: + difference -: returns the first operand from which the elements of the second operand have been removed extraction of sub-arrays: e.g. v[4:6] Macro-expressions can be used at two places: inside macro directives, directly in the body of the MOD-file, between an at-sign and curly braces the macro processor will substitute the expression with its value The value of a macro-variable can be defined with directive. variable_name = expression x = y = v = [, 2, 4 w = [ "foo", "bar" z = 3+v[2] Expression substitution Dummy example Before x = [ "B", "C" i = 2 A After macro-processing A = C; Loop directive variable_name in array_expr Example: before country in [ "home", "foreign" ] GDP_@{country} = K_@{country}^a * Example: after macro-processing GDP_home = K_home^a * L_home^-a); GDP_foreign = K_foreign^a * L_foreign^-a);

4 Conditional inclusion directive integer_expr body included if expr!= Example: alternative monetary policy linear_mon_pol linear_mon_pol i = w*i-) + -w)*i_ss + i = i-)^w * i_ss^-w) * Syntax integer_expr body included if expr!= body included if expr == Echo and error directives The echo directive will simply display a message on standard output The error directive will display the message and make Dynare stop only makes sense inside a conditional inclusion directive) string_expr "Information "Error message!" Saving the macro-expanded MOD file Modularization For debugging or learning purposes, it is possible to save the output of the macro-processor This output is a valid MOD-file, obtained after processing the macro-commands of the original MOD-file Just add the savemacro option on the Dynare command line after the name of your MOD-file) If MOD file is filename.mod, then the macro-expanded version will be saved in filename-macroexp.mod directive can be used to split MOD-files into several modular components Example setup: modeldesc.mod: contains variable declarations, model equations and shocks declarations simul.mod: includes modeldesc.mod, calibrates parameters and runs stochastic simulations estim.mod: includes modeldesc.mod, declares priors on parameters and runs bayesian estimation Dynare can be called on simul.mod and estim.mod but it makes no sense to run it on modeldesc.mod)

5 Indexed sums or products Example: moving average Multi-country models MOD-file skeleton example Before window = 2 var x MA_x; MA_x = i in -window:window ); After macro-processing var x MA_x; MA_x = /5* +x-2) +x-) +x0) +x) +x2) countries = [ "US", "EU", "AS", "JP", "RC" nth_co = co in countries var Y_@{co} K_@{co} L_@{co} i_@{co} E_@{co} ; parameters a_@{co} ; co in countries Y_@{co} = K_@{co}^a_@{co} * if co!= nth_co +i_@{co}) = +i_@{nth_co}) * E_@{co}+) / E_@{co}; // UIP else E_@{co} = Endogeneizing parameters /3) When doing the steady-state calibration of the model, it may be useful to consider a parameter as an endogenous and vice-versa) Example: y = ) α ξ l ξ + α) ξ k ξ ξ ξ lab_rat = wl py During simulation or estimation, the share parameter α is a parameter, and lab_rat is an endogenous variable But for steady-state calibration, we may want to impose an economically relevant value for lab_rat, and deduce the implied value for α during calibration, α is endogenous and lab_rat is a parameter Endogeneizing parameters 2/3) Create modeqs.mod with variable declarations and model equations For declaration of alpha and steady var alpha; parameter parameter alpha; var Create steady.mod: begins steady = then "modeqs.mod" initializes parameters including lab_rat, excluding alpha) computes steady state using hints for endogenous, including alpha) saves values of parameters and endogenous at steady-state to a file

6 Endogeneizing parameters 3/3) Possible future developments Create simul.mod: begins steady = 0 then "modeqs.mod" loads values of parameters and endogenous at steady-state from file computes simulations Note: functions for saving and loading parameters and endogenous are not yet in Dynare distribution they should be soon, ask me if you re interested) Find a nicer syntax for indexed sums/products Implement other control structures: elsif, switch/case, while/until loops Implement macro-functions or templates), with a syntax QUADRATIC_COSTx, x_ss, phi) = phi/2*x/x_ss-) The general problem Stochastic case: E t {fy t+, y t, y t, u t )} = 0 Dynare++ and k-order approximation y : vector of endogenous variables u : vector of exogenous stochastic shocks u t = σǫ t Eǫ t ) = 0 [ ] E[ǫ t ] i [ǫ t ] i2 [ǫ t ] ik ) = Σ k) ǫ i i 2 i k Then, E[u t ] i [u t ] i2 [u t ] ik ) = σ k [ Σ k)] i i 2 i k

7 The solution function k order approximation of the structural model y t = g y t, u t,σ) and F y t, u t, u t+,σ) = f g g y t, u t,σ), u t+,σ), g y t, u t,σ), y t, u t ) or with s t = [ yt u t ] F s t, u t+,σ) = f g g s t,σ), u t+,σ), g s t,σ), s t ) E t {F i s, u,σ )} = = 0 F i s, 0, 0) + E t { p j= j! j k=0 m=k j ] [F is k u m kσj m [ŝ] α [ŝ] α k [ u ] β [ u ] β m k σ j m } α α k β β m k where s = s t, ŝ = s t s t and u = u t+. In tensor notation, the same index used first as subscript and then superscript of two tensors implies summation of the products: [A] αβ [B] α [C] β = A ij B i C j. i j Reduction of conditional expectation Perturbation approach For each j =,,p, find [g s j] E t {F i s t, u t+,σ )} = = 0 F i s, 0, 0) + p j= j! j k=0 m=k j ] [F is k u m kσj m [ŝ] α [ŝ] α k σ m k [Σ ǫ ] β β m k σ j m α α k β β m k such that [F is j ] and find such that j m=k α α j = 0 [g s k σ j k] [ F i s k u m k σ j m ] α α k [Σ ǫ ] β β m k = 0

8 Faà di Bruno formula Most of what follows depends on the kth order partial derivatives of the composite of two functions, given the partial derivatives of each function. If Fr) = fzr)), [F ir j ] α α j = j [f iz ]ββl l l= c M l,j l m= [z r cm ] β m αc m ) where M l,j is the set of all partitions of the set of j indices with l classes,. is the cardinality of a set, c m is m-th class of partition c, and αc m ) is a sequence of α s indexed by c m. Note that M,j = {{,, j}} and M j,j = {{}, {2},, {j}}. Example for the third partial derivatives [ ] [F i r ]αα2α3 = f i 3 z [z r 3] β α β α 2 α 3 + [f i z [z 2 r ] ]ββ2 β α [z r 2] β 2 α 2 α 3 ] [f i z 3 + [z r ] β α 2 [z r 2] β 2 α α 3 + [z r ] β α 3 [z r 2] β 2 α α 2 )+ β β 2 β 3 [z r ] β α [z r ] β 2 α 2 [z r ] β 3 α 3 A linear equation that is hard to solve efficiently Recovering g y j Applying twice the Faá di Bruno formula to F y t, u t, u t+,σ) = f g g y t, u t,σ), u t+,σ), g y t, u t,σ), y t, u t ) and grouping together all terms not involving g y j, one gets [ fy +] β [g y] β γ or, in matrix form [ ] γ gy j + [ [ β j f α α y +] gy j β j] γ γ j m= [g y ] γ m αm + [ ] [ ] β f y 0 gy j + [B] β α α α j α j = 0 f y +g y g y j + f y +g y j g y g y g y ) + f y 0g y j + B = 0 where the derivatives are unrolled along the rows of matrix g y j An asset pricing model AX + BXC C C = D dynare++ uses an efficient algorithm proposed by Ondra Kamenik Urban Jermann 998) Asset pricing in production economies Journal of Monetary Economics, 4, real business cycle model consumption habits investment adjustment costs compares return on several securities log linearizes RBC model + log normal formulas for asset pricing

9 Simple asset pricing formulas In a production economy: Euler equation: Uc t = E t {βuc t+ r t+ } Rate of return on firm s capital: Risk free rate: rf t = Expected risk premium: r t = A t k α t n α t { [E t β Uc }] t+ Uc t E t {r t+ } rf t = E t {r t+ } { [E t β Uc }] t+ Uc t Firms The representative firm maximizes its value: with Y t D t log A t E t t+k = A t Kt α X tn t ) α = Y t W t Nt I t K t = δ)k t + X t = ρ log A t + e t = + g)x t β k µ t+k µ t D t a ξ It K t ) x + a2 ) K t Households Interest rate The representative households maximizes current value of future utility: E t β k C t χc t ) τ τ k=0 subject to the following budget constraint: W t N t + D t = C t and with N t =. Good market equilibrium imposes Risk free interest rate: r f = } E t {βg τ µ t+ µ t where µ t is the utility of a marginal unit of consumption in period t. µ t = c t χc t /g) τ χβ gc t+ χc t ) τ Y t = C t + I t

10 Rate of return jermann98.mod Rate of return of firms { ) git ξ r t = E t a αz t+ g α kt α k t // //. Variable declaration // δ + a ξ + git+ a git+ k t k t ) ξ ) ξ + a 2 gi t+ k t )} var c, d, erp, i, k, m, r, rf, w, y, z, mu; varexo ez; suite suite // // 2. Parameter declaration and calibration // parameters alf, chihab, xi, delt, tau, g, rho, a, a2, betstar, bet; alf = 0.36; // capital share in production function chihab = 0.89; // habit formation parameter xi = /4.3; // capital adjustment cost parameter delt = 0.025; // quarterly deprecition rate g =.005; //quarterly growth rate note zero growth =>g=) tau = 5; // curvature parameter with respect to c rho = 0.95; // AR) parameter for technology shock a a2 betstar bet = g-+delt)^/xi); = g-+delt)-g-+delt)^/xi))/-/xi)))* g-+delt)^-/xi))); = g/.038; = betstar/g^-tau)); // // 3. Model declaration // g*k = -delt)*k-) + a/-/xi))*g*i/k-))^-/xi)+a2)*k-); d = y - w - i; w = -alf)*y; y = z*g^-alf)*k-)^alf; c = w + d; mu = c-chihab*c-)/g)^-tau)-chihab*bet*c+)*g-chihab*c)^-tau); mu = betstar/g)*mu+)*a*g*i/k-))^-/xi))*alf*z+)*g^-alf)* k^alf-))+-delt+a/-/xi))*g*i+)/k)^-/xi)+a2))/ a*g*i+)/k)^-/xi))-g*i+)/k); logz) = rho*logz-)) + ez;

11 suite continued m = betstar/g)*mu+)/mu; rf = /m; r = a*g*i/k-))^-/xi))*alf*z+)*g^-alf)*k^alf-))+ -delt+a/-/xi))*g*i+)/k)^-/xi)+a2)/ a*g*i+)/k)^-/xi))-g*i+)/k); erp = r - rf; initval; m = betstar/g; rf = /m); r = /m); erp = r-rf; z = ; k = g/betstar)--delt))/alf*g^-alf)))^/alf-)); y = g^-alf))*k^alf; w = -alf)*y; i = -/g)*-delt))*k; d = y - w - i; c = w + d; mu = c-chihab*c/g))^-tau))-chihab*bet*c*g-chihab*c)^-tau)); ez = 0; vcov = [0.000]; Running dynare++ Three different concepts dynare++ --order=2 jermann98.mod. deterministic) steady state 2. stochastic steady state 3. unconditional expectation

12 Deterministic steady state Nonlinear decision rule A linearized decision rule cuts the main diagonal at the deterministic steady state ). In general, the decision is shifted at the deterministic steady state: agents don t decide to stay at the deterministic steady state. K t K t B A A K t K t Nonlinear decision rule Stochastic steady state The stochastic steady state, s, describe the point where agents decide to stay in absence of shocks this period, but taking into account the distibution of shocks in the future. K t K t B s C A B A K t s K t

13 Unconditional expectation Further issues Because of Jensen inequality, the unconditional expectation, EK), is somewhere below the quadratic decision rule, but not on it. In absence of shocks, agents don t decide to go to the unconditional expectation. K t s B A C Impulse response functions depend of state at time of shocks and history of future shocks. For large shocks higher order approximation simulation may explode pruning algorithm Sims) truncate normal distribution Judd) s K t State dependent risk premium premium.m Compute expected risk premium at different state points Compute capital stocks between deterministic steady state plus/minus two standard error according to first order approximation) Warning: this generates unlikely state points as previous consumption remains at steady state value! v_k = dyn_vcov8,8); k_steadystate = dyn_steady_states8); kk = k_steadystate-2*sqrtv_k):0.5: k_steadystate+2*sqrtv_k); nk = sizekk,2); for i=:nk k = kki); start = dyn_steady_states; start8) = k; temp = dynare_simul jermann98,0,start); resultsi) = temp2); end figure; plotkk,results);

DYNARE SUMMER SCHOOL

DYNARE SUMMER SCHOOL DYNARE SUMMER SCHOOL Introduction to Dynare and local approximation. Michel Juillard June 12, 2017 Summer School website http://www.dynare.org/summerschool/2017 DYNARE 1. computes the solution of deterministic

More information

Approximation around the risky steady state

Approximation around the risky steady state Approximation around the risky steady state Centre for International Macroeconomic Studies Conference University of Surrey Michel Juillard, Bank of France September 14, 2012 The views expressed herein

More information

Stochastic simulations with DYNARE. A practical guide.

Stochastic simulations with DYNARE. A practical guide. Stochastic simulations with DYNARE. A practical guide. Fabrice Collard (GREMAQ, University of Toulouse) Adapted for Dynare 4.1 by Michel Juillard and Sébastien Villemot (CEPREMAP) First draft: February

More information

First order approximation of stochastic models

First order approximation of stochastic models First order approximation of stochastic models Shanghai Dynare Workshop Sébastien Villemot CEPREMAP October 27, 2013 Sébastien Villemot (CEPREMAP) First order approximation of stochastic models October

More information

Computing first and second order approximations of DSGE models with DYNARE

Computing first and second order approximations of DSGE models with DYNARE Computing first and second order approximations of DSGE models with DYNARE Michel Juillard CEPREMAP Computing first and second order approximations of DSGE models with DYNARE p. 1/33 DSGE models E t {f(y

More information

Problem Set 4. Graduate Macro II, Spring 2011 The University of Notre Dame Professor Sims

Problem Set 4. Graduate Macro II, Spring 2011 The University of Notre Dame Professor Sims Problem Set 4 Graduate Macro II, Spring 2011 The University of Notre Dame Professor Sims Instructions: You may consult with other members of the class, but please make sure to turn in your own work. Where

More information

Dynare Class on Heathcote-Perri JME 2002

Dynare Class on Heathcote-Perri JME 2002 Dynare Class on Heathcote-Perri JME 2002 Tim Uy University of Cambridge March 10, 2015 Introduction Solving DSGE models used to be very time consuming due to log-linearization required Dynare is a collection

More information

DSGE-Models. Calibration and Introduction to Dynare. Institute of Econometrics and Economic Statistics

DSGE-Models. Calibration and Introduction to Dynare. Institute of Econometrics and Economic Statistics DSGE-Models Calibration and Introduction to Dynare Dr. Andrea Beccarini Willi Mutschler, M.Sc. Institute of Econometrics and Economic Statistics willi.mutschler@uni-muenster.de Summer 2012 Willi Mutschler

More information

Lecture 15. Dynamic Stochastic General Equilibrium Model. Randall Romero Aguilar, PhD I Semestre 2017 Last updated: July 3, 2017

Lecture 15. Dynamic Stochastic General Equilibrium Model. Randall Romero Aguilar, PhD I Semestre 2017 Last updated: July 3, 2017 Lecture 15 Dynamic Stochastic General Equilibrium Model Randall Romero Aguilar, PhD I Semestre 2017 Last updated: July 3, 2017 Universidad de Costa Rica EC3201 - Teoría Macroeconómica 2 Table of contents

More information

Asset pricing in DSGE models comparison of different approximation methods

Asset pricing in DSGE models comparison of different approximation methods Asset pricing in DSGE models comparison of different approximation methods 1 Introduction Jan Acedański 1 Abstract. There are many numerical methods suitable for approximating solutions of DSGE models.

More information

1 The Basic RBC Model

1 The Basic RBC Model IHS 2016, Macroeconomics III Michael Reiter Ch. 1: Notes on RBC Model 1 1 The Basic RBC Model 1.1 Description of Model Variables y z k L c I w r output level of technology (exogenous) capital at end of

More information

Deterministic Models

Deterministic Models Deterministic Models Perfect foreight, nonlinearities and occasionally binding constraints Sébastien Villemot CEPREMAP June 10, 2014 Sébastien Villemot (CEPREMAP) Deterministic Models June 10, 2014 1 /

More information

Session 2 Working with Dynare

Session 2 Working with Dynare Session 2 Working with Dynare Seminar: Macroeconomics and International Economics Philipp Wegmüller UniBern Spring 2015 Philipp Wegmüller (UniBern) Session 2 Working with Dynare Spring 2015 1 / 20 Dynare

More information

A simple macro dynamic model with endogenous saving rate: the representative agent model

A simple macro dynamic model with endogenous saving rate: the representative agent model A simple macro dynamic model with endogenous saving rate: the representative agent model Virginia Sánchez-Marcos Macroeconomics, MIE-UNICAN Macroeconomics (MIE-UNICAN) A simple macro dynamic model with

More information

Introduction to Coding DSGE Models with Dynare

Introduction to Coding DSGE Models with Dynare Introduction to Coding DSGE Models with Macroeconomic Theory (MA1213) Juha Kilponen Bank of Finland Additional Material for Lecture 3, January 23, 2013 is preprocessor and a collection of Matlab (and GNU

More information

News-Shock Subroutine for Prof. Uhlig s Toolkit

News-Shock Subroutine for Prof. Uhlig s Toolkit News-Shock Subroutine for Prof. Uhlig s Toolkit KENGO NUTAHARA Graduate School of Economics, University of Tokyo, and the JSPS Research Fellow ee67003@mail.ecc.u-tokyo.ac.jp Revised: October 23, 2007 (Fisrt

More information

Dynare. Wouter J. Den Haan London School of Economics. c by Wouter J. Den Haan

Dynare. Wouter J. Den Haan London School of Economics. c by Wouter J. Den Haan Dynare Wouter J. Den Haan London School of Economics c by Wouter J. Den Haan Introduction What is the objective of perturbation? Peculiarities of Dynare & some examples Incorporating Dynare in other Matlab

More information

Small Open Economy RBC Model Uribe, Chapter 4

Small Open Economy RBC Model Uribe, Chapter 4 Small Open Economy RBC Model Uribe, Chapter 4 1 Basic Model 1.1 Uzawa Utility E 0 t=0 θ t U (c t, h t ) θ 0 = 1 θ t+1 = β (c t, h t ) θ t ; β c < 0; β h > 0. Time-varying discount factor With a constant

More information

Monetary Economics: Solutions Problem Set 1

Monetary Economics: Solutions Problem Set 1 Monetary Economics: Solutions Problem Set 1 December 14, 2006 Exercise 1 A Households Households maximise their intertemporal utility function by optimally choosing consumption, savings, and the mix of

More information

... Solving Dynamic General Equilibrium Models Using Log Linear Approximation

... Solving Dynamic General Equilibrium Models Using Log Linear Approximation ... Solving Dynamic General Equilibrium Models Using Log Linear Approximation 1 Log-linearization strategy Example #1: A Simple RBC Model. Define a Model Solution Motivate the Need to Somehow Approximate

More information

Solving Deterministic Models

Solving Deterministic Models Solving Deterministic Models Shanghai Dynare Workshop Sébastien Villemot CEPREMAP October 27, 2013 Sébastien Villemot (CEPREMAP) Solving Deterministic Models October 27, 2013 1 / 42 Introduction Deterministic

More information

0 β t u(c t ), 0 <β<1,

0 β t u(c t ), 0 <β<1, Part 2 1. Certainty-Equivalence Solution Methods Consider the model we dealt with previously, but now the production function is y t = f(k t,z t ), where z t is a stochastic exogenous variable. For example,

More information

Dynamic Macroeconomic Theory Notes. David L. Kelly. Department of Economics University of Miami Box Coral Gables, FL

Dynamic Macroeconomic Theory Notes. David L. Kelly. Department of Economics University of Miami Box Coral Gables, FL Dynamic Macroeconomic Theory Notes David L. Kelly Department of Economics University of Miami Box 248126 Coral Gables, FL 33134 dkelly@miami.edu Current Version: Fall 2013/Spring 2013 I Introduction A

More information

problem. max Both k (0) and h (0) are given at time 0. (a) Write down the Hamilton-Jacobi-Bellman (HJB) Equation in the dynamic programming

problem. max Both k (0) and h (0) are given at time 0. (a) Write down the Hamilton-Jacobi-Bellman (HJB) Equation in the dynamic programming 1. Endogenous Growth with Human Capital Consider the following endogenous growth model with both physical capital (k (t)) and human capital (h (t)) in continuous time. The representative household solves

More information

Macroeconomics Theory II

Macroeconomics Theory II Macroeconomics Theory II Francesco Franco FEUNL February 2016 Francesco Franco (FEUNL) Macroeconomics Theory II February 2016 1 / 18 Road Map Research question: we want to understand businesses cycles.

More information

Advanced Econometrics III, Lecture 5, Dynamic General Equilibrium Models Example 1: A simple RBC model... 2

Advanced Econometrics III, Lecture 5, Dynamic General Equilibrium Models Example 1: A simple RBC model... 2 Advanced Econometrics III, Lecture 5, 2017 1 Contents 1 Dynamic General Equilibrium Models 2 1.1 Example 1: A simple RBC model.................... 2 1.2 Approximation Method Based on Linearization.............

More information

(a) Write down the Hamilton-Jacobi-Bellman (HJB) Equation in the dynamic programming

(a) Write down the Hamilton-Jacobi-Bellman (HJB) Equation in the dynamic programming 1. Government Purchases and Endogenous Growth Consider the following endogenous growth model with government purchases (G) in continuous time. Government purchases enhance production, and the production

More information

Neoclassical Business Cycle Model

Neoclassical Business Cycle Model Neoclassical Business Cycle Model Prof. Eric Sims University of Notre Dame Fall 2015 1 / 36 Production Economy Last time: studied equilibrium in an endowment economy Now: study equilibrium in an economy

More information

The Basic RBC model with Dynare

The Basic RBC model with Dynare The Basic RBC model with Dynare Petros Varthalitis December 200 Abstract This paper brie y describes the basic RBC model without steady-state growth.it uses dynare software to simulate the model under

More information

1. Using the model and notations covered in class, the expected returns are:

1. Using the model and notations covered in class, the expected returns are: Econ 510a second half Yale University Fall 2006 Prof. Tony Smith HOMEWORK #5 This homework assignment is due at 5PM on Friday, December 8 in Marnix Amand s mailbox. Solution 1. a In the Mehra-Prescott

More information

Resolving the Missing Deflation Puzzle. June 7, 2018

Resolving the Missing Deflation Puzzle. June 7, 2018 Resolving the Missing Deflation Puzzle Jesper Lindé Sveriges Riksbank Mathias Trabandt Freie Universität Berlin June 7, 218 Motivation Key observations during the Great Recession: Extraordinary contraction

More information

Public Economics The Macroeconomic Perspective Chapter 2: The Ramsey Model. Burkhard Heer University of Augsburg, Germany

Public Economics The Macroeconomic Perspective Chapter 2: The Ramsey Model. Burkhard Heer University of Augsburg, Germany Public Economics The Macroeconomic Perspective Chapter 2: The Ramsey Model Burkhard Heer University of Augsburg, Germany October 3, 2018 Contents I 1 Central Planner 2 3 B. Heer c Public Economics: Chapter

More information

The full RBC model. Empirical evaluation

The full RBC model. Empirical evaluation The full RBC model. Empirical evaluation Lecture 13 (updated version), ECON 4310 Tord Krogh October 24, 2012 Tord Krogh () ECON 4310 October 24, 2012 1 / 49 Today s lecture Add labor to the stochastic

More information

Advanced Macroeconomics

Advanced Macroeconomics Advanced Macroeconomics The Ramsey Model Marcin Kolasa Warsaw School of Economics Marcin Kolasa (WSE) Ad. Macro - Ramsey model 1 / 30 Introduction Authors: Frank Ramsey (1928), David Cass (1965) and Tjalling

More information

Graduate Macroeconomics - Econ 551

Graduate Macroeconomics - Econ 551 Graduate Macroeconomics - Econ 551 Tack Yun Indiana University Seoul National University Spring Semester January 2013 T. Yun (SNU) Macroeconomics 1/07/2013 1 / 32 Business Cycle Models for Emerging-Market

More information

1 Bewley Economies with Aggregate Uncertainty

1 Bewley Economies with Aggregate Uncertainty 1 Bewley Economies with Aggregate Uncertainty Sofarwehaveassumedawayaggregatefluctuations (i.e., business cycles) in our description of the incomplete-markets economies with uninsurable idiosyncratic risk

More information

Bayesian Estimation of DSGE Models: Lessons from Second-order Approximations

Bayesian Estimation of DSGE Models: Lessons from Second-order Approximations Bayesian Estimation of DSGE Models: Lessons from Second-order Approximations Sungbae An Singapore Management University Bank Indonesia/BIS Workshop: STRUCTURAL DYNAMIC MACROECONOMIC MODELS IN ASIA-PACIFIC

More information

Macroeconomic Theory and Analysis Suggested Solution for Midterm 1

Macroeconomic Theory and Analysis Suggested Solution for Midterm 1 Macroeconomic Theory and Analysis Suggested Solution for Midterm February 25, 2007 Problem : Pareto Optimality The planner solves the following problem: u(c ) + u(c 2 ) + v(l ) + v(l 2 ) () {c,c 2,l,l

More information

Suggested Solutions to Homework #6 Econ 511b (Part I), Spring 2004

Suggested Solutions to Homework #6 Econ 511b (Part I), Spring 2004 Suggested Solutions to Homework #6 Econ 511b (Part I), Spring 2004 1. (a) Find the planner s optimal decision rule in the stochastic one-sector growth model without valued leisure by linearizing the Euler

More information

Foundation of (virtually) all DSGE models (e.g., RBC model) is Solow growth model

Foundation of (virtually) all DSGE models (e.g., RBC model) is Solow growth model THE BASELINE RBC MODEL: THEORY AND COMPUTATION FEBRUARY, 202 STYLIZED MACRO FACTS Foundation of (virtually all DSGE models (e.g., RBC model is Solow growth model So want/need/desire business-cycle models

More information

Comprehensive Exam. Macro Spring 2014 Retake. August 22, 2014

Comprehensive Exam. Macro Spring 2014 Retake. August 22, 2014 Comprehensive Exam Macro Spring 2014 Retake August 22, 2014 You have a total of 180 minutes to complete the exam. If a question seems ambiguous, state why, sharpen it up and answer the sharpened-up question.

More information

Ramsey Cass Koopmans Model (1): Setup of the Model and Competitive Equilibrium Path

Ramsey Cass Koopmans Model (1): Setup of the Model and Competitive Equilibrium Path Ramsey Cass Koopmans Model (1): Setup of the Model and Competitive Equilibrium Path Ryoji Ohdoi Dept. of Industrial Engineering and Economics, Tokyo Tech This lecture note is mainly based on Ch. 8 of Acemoglu

More information

Y t = log (employment t )

Y t = log (employment t ) Advanced Macroeconomics, Christiano Econ 416 Homework #7 Due: November 21 1. Consider the linearized equilibrium conditions of the New Keynesian model, on the slide, The Equilibrium Conditions in the handout,

More information

Competitive Equilibrium and the Welfare Theorems

Competitive Equilibrium and the Welfare Theorems Competitive Equilibrium and the Welfare Theorems Craig Burnside Duke University September 2010 Craig Burnside (Duke University) Competitive Equilibrium September 2010 1 / 32 Competitive Equilibrium and

More information

Equilibrium in a Production Economy

Equilibrium in a Production Economy Equilibrium in a Production Economy Prof. Eric Sims University of Notre Dame Fall 2012 Sims (ND) Equilibrium in a Production Economy Fall 2012 1 / 23 Production Economy Last time: studied equilibrium in

More information

Solving LQ-Gaussian Robustness Problems in Dynare

Solving LQ-Gaussian Robustness Problems in Dynare Solving LQ-Gaussian Robustness Problems in Dynare July 2008 1 / 20 Overview Why Robustness? Ellsberg s Paradox. Gambling Example. Knightian Uncertainty: there is a difference between Risk and Uncertainty.

More information

HOMEWORK #3 This homework assignment is due at NOON on Friday, November 17 in Marnix Amand s mailbox.

HOMEWORK #3 This homework assignment is due at NOON on Friday, November 17 in Marnix Amand s mailbox. Econ 50a second half) Yale University Fall 2006 Prof. Tony Smith HOMEWORK #3 This homework assignment is due at NOON on Friday, November 7 in Marnix Amand s mailbox.. This problem introduces wealth inequality

More information

Solution for Problem Set 3

Solution for Problem Set 3 Solution for Problem Set 3 Q. Heterogeneous Expectations. Consider following dynamic IS-LM economy in Lecture Notes 8: IS curve: y t = ar t + u t (.) where y t is output, r t is the real interest rate,

More information

Lecture 7: Linear-Quadratic Dynamic Programming Real Business Cycle Models

Lecture 7: Linear-Quadratic Dynamic Programming Real Business Cycle Models Lecture 7: Linear-Quadratic Dynamic Programming Real Business Cycle Models Shinichi Nishiyama Graduate School of Economics Kyoto University January 10, 2019 Abstract In this lecture, we solve and simulate

More information

Graduate Macro Theory II: Notes on Quantitative Analysis in DSGE Models

Graduate Macro Theory II: Notes on Quantitative Analysis in DSGE Models Graduate Macro Theory II: Notes on Quantitative Analysis in DSGE Models Eric Sims University of Notre Dame Spring 2011 This note describes very briefly how to conduct quantitative analysis on a linearized

More information

Decentralised economies I

Decentralised economies I Decentralised economies I Martin Ellison 1 Motivation In the first two lectures on dynamic programming and the stochastic growth model, we solved the maximisation problem of the representative agent. More

More information

Macroeconomics Qualifying Examination

Macroeconomics Qualifying Examination Macroeconomics Qualifying Examination August 2015 Department of Economics UNC Chapel Hill Instructions: This examination consists of 4 questions. Answer all questions. If you believe a question is ambiguously

More information

Technical appendices: Business cycle accounting for the Japanese economy using the parameterized expectations algorithm

Technical appendices: Business cycle accounting for the Japanese economy using the parameterized expectations algorithm Technical appendices: Business cycle accounting for the Japanese economy using the parameterized expectations algorithm Masaru Inaba November 26, 2007 Introduction. Inaba (2007a) apply the parameterized

More information

Equilibrium Conditions and Algorithm for Numerical Solution of Kaplan, Moll and Violante (2017) HANK Model.

Equilibrium Conditions and Algorithm for Numerical Solution of Kaplan, Moll and Violante (2017) HANK Model. Equilibrium Conditions and Algorithm for Numerical Solution of Kaplan, Moll and Violante (2017) HANK Model. January 8, 2018 1 Introduction This document describes the equilibrium conditions of Kaplan,

More information

Topic 2. Consumption/Saving and Productivity shocks

Topic 2. Consumption/Saving and Productivity shocks 14.452. Topic 2. Consumption/Saving and Productivity shocks Olivier Blanchard April 2006 Nr. 1 1. What starting point? Want to start with a model with at least two ingredients: Shocks, so uncertainty.

More information

Solving Heterogeneous Agent Models with Dynare

Solving Heterogeneous Agent Models with Dynare Solving Heterogeneous Agent Models with Dynare Wouter J. Den Haan University of Amsterdam March 12, 2009 Individual agent Subject to employment, i.e., labor supply shocks: e i,t = ρ e e i,t 1 + ε i,t ε

More information

Lecture 6: Discrete-Time Dynamic Optimization

Lecture 6: Discrete-Time Dynamic Optimization Lecture 6: Discrete-Time Dynamic Optimization Yulei Luo Economics, HKU November 13, 2017 Luo, Y. (Economics, HKU) ECON0703: ME November 13, 2017 1 / 43 The Nature of Optimal Control In static optimization,

More information

Macroeconomics Qualifying Examination

Macroeconomics Qualifying Examination Macroeconomics Qualifying Examination January 2016 Department of Economics UNC Chapel Hill Instructions: This examination consists of 3 questions. Answer all questions. If you believe a question is ambiguously

More information

1. Constant-elasticity-of-substitution (CES) or Dixit-Stiglitz aggregators. Consider the following function J: J(x) = a(j)x(j) ρ dj

1. Constant-elasticity-of-substitution (CES) or Dixit-Stiglitz aggregators. Consider the following function J: J(x) = a(j)x(j) ρ dj Macro II (UC3M, MA/PhD Econ) Professor: Matthias Kredler Problem Set 1 Due: 29 April 216 You are encouraged to work in groups; however, every student has to hand in his/her own version of the solution.

More information

Lecture VI. Linearization Methods

Lecture VI. Linearization Methods Lecture VI Linearization Methods Gianluca Violante New York University Quantitative Macroeconomics G. Violante, Perturbation Methods p. 1 /40 Local Approximations DSGE models are characterized by a set

More information

Economics 210B Due: September 16, Problem Set 10. s.t. k t+1 = R(k t c t ) for all t 0, and k 0 given, lim. and

Economics 210B Due: September 16, Problem Set 10. s.t. k t+1 = R(k t c t ) for all t 0, and k 0 given, lim. and Economics 210B Due: September 16, 2010 Problem 1: Constant returns to saving Consider the following problem. c0,k1,c1,k2,... β t Problem Set 10 1 α c1 α t s.t. k t+1 = R(k t c t ) for all t 0, and k 0

More information

Macroeconomics Theory II

Macroeconomics Theory II Macroeconomics Theory II Francesco Franco FEUNL February 2011 Francesco Franco Macroeconomics Theory II 1/34 The log-linear plain vanilla RBC and ν(σ n )= ĉ t = Y C ẑt +(1 α) Y C ˆn t + K βc ˆk t 1 + K

More information

Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework

Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework Solving a Dynamic (Stochastic) General Equilibrium Model under the Discrete Time Framework Dongpeng Liu Nanjing University Sept 2016 D. Liu (NJU) Solving D(S)GE 09/16 1 / 63 Introduction Targets of the

More information

The welfare cost of energy insecurity

The welfare cost of energy insecurity The welfare cost of energy insecurity Baltasar Manzano (Universidade de Vigo) Luis Rey (bc3) IEW 2013 1 INTRODUCTION The 1973-1974 oil crisis revealed the vulnerability of developed economies to oil price

More information

Markov Perfect Equilibria in the Ramsey Model

Markov Perfect Equilibria in the Ramsey Model Markov Perfect Equilibria in the Ramsey Model Paul Pichler and Gerhard Sorger This Version: February 2006 Abstract We study the Ramsey (1928) model under the assumption that households act strategically.

More information

MA Advanced Macroeconomics: Solving Models with Rational Expectations

MA Advanced Macroeconomics: Solving Models with Rational Expectations MA Advanced Macroeconomics: Solving Models with Rational Expectations Karl Whelan School of Economics, UCD February 6, 2009 Karl Whelan (UCD) Models with Rational Expectations February 6, 2009 1 / 32 Moving

More information

Learning, Expectations, and Endogenous Business Cycles

Learning, Expectations, and Endogenous Business Cycles Learning, Expectations, and Endogenous Business Cycles I.S.E.O. Summer School June 19, 2013 Introduction A simple model Simulations Stability Monetary Policy What s next Who we are Two students writing

More information

Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011

Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011 Department of Economics University of Maryland Economics 701 Advanced Macroeconomics I Project 1 Professor Sanjay Chugh Fall 2011 Objective As a stepping stone to learning how to work with and computationally

More information

Advanced Macroeconomics

Advanced Macroeconomics Advanced Macroeconomics Endogenous Growth Marcin Kolasa Warsaw School of Economics Marcin Kolasa (WSE) Ad. Macro - Endogenous growth 1 / 18 Introduction The Solow and Ramsey models are exogenous growth

More information

UNIVERSITY OF WISCONSIN DEPARTMENT OF ECONOMICS MACROECONOMICS THEORY Preliminary Exam August 1, :00 am - 2:00 pm

UNIVERSITY OF WISCONSIN DEPARTMENT OF ECONOMICS MACROECONOMICS THEORY Preliminary Exam August 1, :00 am - 2:00 pm UNIVERSITY OF WISCONSIN DEPARTMENT OF ECONOMICS MACROECONOMICS THEORY Preliminary Exam August 1, 2017 9:00 am - 2:00 pm INSTRUCTIONS Please place a completed label (from the label sheet provided) on the

More information

Modelling Czech and Slovak labour markets: A DSGE model with labour frictions

Modelling Czech and Slovak labour markets: A DSGE model with labour frictions Modelling Czech and Slovak labour markets: A DSGE model with labour frictions Daniel Němec Faculty of Economics and Administrations Masaryk University Brno, Czech Republic nemecd@econ.muni.cz ESF MU (Brno)

More information

Perturbation Methods I: Basic Results

Perturbation Methods I: Basic Results Perturbation Methods I: Basic Results (Lectures on Solution Methods for Economists V) Jesús Fernández-Villaverde 1 and Pablo Guerrón 2 March 19, 2018 1 University of Pennsylvania 2 Boston College Introduction

More information

Solving Models with Heterogeneous Agents Xpa algorithm

Solving Models with Heterogeneous Agents Xpa algorithm Solving Models with Heterogeneous Agents Xpa algorithm Wouter J. Den Haan London School of Economics c by Wouter J. Den Haan Individual agent Subject to employment shocks ε i,t {0, 1} or ε i,t {u, e} Incomplete

More information

Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models

Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models Graduate Macro Theory II: Notes on Solving Linearized Rational Expectations Models Eric Sims University of Notre Dame Spring 2017 1 Introduction The solution of many discrete time dynamic economic models

More information

Lecture 2 The Centralized Economy

Lecture 2 The Centralized Economy Lecture 2 The Centralized Economy Economics 5118 Macroeconomic Theory Kam Yu Winter 2013 Outline 1 Introduction 2 The Basic DGE Closed Economy 3 Golden Rule Solution 4 Optimal Solution The Euler Equation

More information

An Introduction to Perturbation Methods in Macroeconomics. Jesús Fernández-Villaverde University of Pennsylvania

An Introduction to Perturbation Methods in Macroeconomics. Jesús Fernández-Villaverde University of Pennsylvania An Introduction to Perturbation Methods in Macroeconomics Jesús Fernández-Villaverde University of Pennsylvania 1 Introduction Numerous problems in macroeconomics involve functional equations of the form:

More information

Graduate Macro Theory II: Business Cycle Accounting and Wedges

Graduate Macro Theory II: Business Cycle Accounting and Wedges Graduate Macro Theory II: Business Cycle Accounting and Wedges Eric Sims University of Notre Dame Spring 2017 1 Introduction Most modern dynamic macro models have at their core a prototypical real business

More information

High-dimensional Problems in Finance and Economics. Thomas M. Mertens

High-dimensional Problems in Finance and Economics. Thomas M. Mertens High-dimensional Problems in Finance and Economics Thomas M. Mertens NYU Stern Risk Economics Lab April 17, 2012 1 / 78 Motivation Many problems in finance and economics are high dimensional. Dynamic Optimization:

More information

Solution Methods. Jesús Fernández-Villaverde. University of Pennsylvania. March 16, 2016

Solution Methods. Jesús Fernández-Villaverde. University of Pennsylvania. March 16, 2016 Solution Methods Jesús Fernández-Villaverde University of Pennsylvania March 16, 2016 Jesús Fernández-Villaverde (PENN) Solution Methods March 16, 2016 1 / 36 Functional equations A large class of problems

More information

Problem 1 (30 points)

Problem 1 (30 points) Problem (30 points) Prof. Robert King Consider an economy in which there is one period and there are many, identical households. Each household derives utility from consumption (c), leisure (l) and a public

More information

Dynare Summer School - Accuracy Tests

Dynare Summer School - Accuracy Tests Dynare Summer School - Accuracy Tests Wouter J. Den Haan University of Amsterdam July 4, 2008 outer J. Den Haan (University of Amsterdam)Dynare Summer School - Accuracy Tests July 4, 2008 1 / 35 Accuracy

More information

Global Value Chain Participation and Current Account Imbalances

Global Value Chain Participation and Current Account Imbalances Global Value Chain Participation and Current Account Imbalances Johannes Brumm University of Zurich Georgios Georgiadis European Central Bank Johannes Gräb European Central Bank Fabian Trottner Princeton

More information

The economy is populated by a unit mass of infinitely lived households with preferences given by. β t u(c Mt, c Ht ) t=0

The economy is populated by a unit mass of infinitely lived households with preferences given by. β t u(c Mt, c Ht ) t=0 Review Questions: Two Sector Models Econ720. Fall 207. Prof. Lutz Hendricks A Planning Problem The economy is populated by a unit mass of infinitely lived households with preferences given by β t uc Mt,

More information

Neoclassical Growth Model: I

Neoclassical Growth Model: I Neoclassical Growth Model: I Mark Huggett 2 2 Georgetown October, 2017 Growth Model: Introduction Neoclassical Growth Model is the workhorse model in macroeconomics. It comes in two main varieties: infinitely-lived

More information

Dynamic Optimization Using Lagrange Multipliers

Dynamic Optimization Using Lagrange Multipliers Dynamic Optimization Using Lagrange Multipliers Barbara Annicchiarico barbara.annicchiarico@uniroma2.it Università degli Studi di Roma "Tor Vergata" Presentation #2 Deterministic Infinite-Horizon Ramsey

More information

MONFISPOL FP7 project SSH Report on computing optimal policy

MONFISPOL FP7 project SSH Report on computing optimal policy MONFISPOL FP7 project SSH-225149 Deliverable 1.1.1 Report on computing optimal policy November 2010 Michel Juillard 1 1 CEPREMAP Introduction This report describes the algorithm used by Dynare to compute

More information

MA Advanced Macroeconomics: 7. The Real Business Cycle Model

MA Advanced Macroeconomics: 7. The Real Business Cycle Model MA Advanced Macroeconomics: 7. The Real Business Cycle Model Karl Whelan School of Economics, UCD Spring 2016 Karl Whelan (UCD) Real Business Cycles Spring 2016 1 / 38 Working Through A DSGE Model We have

More information

The Real Business Cycle Model

The Real Business Cycle Model The Real Business Cycle Model Macroeconomics II 2 The real business cycle model. Introduction This model explains the comovements in the fluctuations of aggregate economic variables around their trend.

More information

Asset Pricing. Chapter IX. The Consumption Capital Asset Pricing Model. June 20, 2006

Asset Pricing. Chapter IX. The Consumption Capital Asset Pricing Model. June 20, 2006 Chapter IX. The Consumption Capital Model June 20, 2006 The Representative Agent Hypothesis and its Notion of Equilibrium 9.2.1 An infinitely lived Representative Agent Avoid terminal period problem Equivalence

More information

Combining Macroeconomic Models for Prediction

Combining Macroeconomic Models for Prediction Combining Macroeconomic Models for Prediction John Geweke University of Technology Sydney 15th Australasian Macro Workshop April 8, 2010 Outline 1 Optimal prediction pools 2 Models and data 3 Optimal pools

More information

ADVANCED MACROECONOMICS I

ADVANCED MACROECONOMICS I Name: Students ID: ADVANCED MACROECONOMICS I I. Short Questions (21/2 points each) Mark the following statements as True (T) or False (F) and give a brief explanation of your answer in each case. 1. 2.

More information

Endogenous Growth: AK Model

Endogenous Growth: AK Model Endogenous Growth: AK Model Prof. Lutz Hendricks Econ720 October 24, 2017 1 / 35 Endogenous Growth Why do countries grow? A question with large welfare consequences. We need models where growth is endogenous.

More information

Macro I - Practice Problems - Growth Models

Macro I - Practice Problems - Growth Models Macro I - Practice Problems - Growth Models. Consider the infinitely-lived agent version of the growth model with valued leisure. Suppose that the government uses proportional taxes (τ c, τ n, τ k ) on

More information

Dynamic Macroeconomics: Problem Set 4

Dynamic Macroeconomics: Problem Set 4 Dynamic Macroeconomics: Problem Set 4 Universität Siegen Dynamic Macroeconomics 1 / 28 1 Computing growth rates 2 Golden rule saving rate 3 Simulation of the Solow Model 4 Growth accounting Dynamic Macroeconomics

More information

Permanent Income Hypothesis Intro to the Ramsey Model

Permanent Income Hypothesis Intro to the Ramsey Model Consumption and Savings Permanent Income Hypothesis Intro to the Ramsey Model Lecture 10 Topics in Macroeconomics November 6, 2007 Lecture 10 1/18 Topics in Macroeconomics Consumption and Savings Outline

More information

The New Keynesian Model: Introduction

The New Keynesian Model: Introduction The New Keynesian Model: Introduction Vivaldo M. Mendes ISCTE Lisbon University Institute 13 November 2017 (Vivaldo M. Mendes) The New Keynesian Model: Introduction 13 November 2013 1 / 39 Summary 1 What

More information

Lecture 4 The Centralized Economy: Extensions

Lecture 4 The Centralized Economy: Extensions Lecture 4 The Centralized Economy: Extensions Leopold von Thadden University of Mainz and ECB (on leave) Advanced Macroeconomics, Winter Term 2013 1 / 36 I Motivation This Lecture considers some applications

More information

Solutions Methods in DSGE (Open) models

Solutions Methods in DSGE (Open) models Solutions Methods in DSGE (Open) models 1. With few exceptions, there are not exact analytical solutions for DSGE models, either open or closed economy. This is due to a combination of nonlinearity and

More information

Information Choice in Macroeconomics and Finance.

Information Choice in Macroeconomics and Finance. Information Choice in Macroeconomics and Finance. Laura Veldkamp New York University, Stern School of Business, CEPR and NBER Spring 2009 1 Veldkamp What information consumes is rather obvious: It consumes

More information

Simple New Keynesian Model without Capital

Simple New Keynesian Model without Capital Simple New Keynesian Model without Capital Lawrence J. Christiano January 5, 2018 Objective Review the foundations of the basic New Keynesian model without capital. Clarify the role of money supply/demand.

More information