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

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

1 The Basic RBC Model

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

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

Lecture 2 The Centralized Economy

Advanced Macroeconomics

Macroeconomic Theory and Analysis Suggested Solution for Midterm 1

4- Current Method of Explaining Business Cycles: DSGE Models. Basic Economic Models

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

Lecture 2 The Centralized Economy: Basic features

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

The Real Business Cycle Model

Macroeconomics Theory II

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

Real Business Cycle Model (RBC)

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

Competitive Equilibrium and the Welfare Theorems

Equilibrium in a Model with Overlapping Generations

Advanced Macroeconomics

1 Recursive Competitive Equilibrium

Dynamic Optimization: An Introduction

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

Permanent Income Hypothesis Intro to the Ramsey Model

Suggested Solutions to Problem Set 2

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

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

Macroeconomic Theory and Analysis V Suggested Solutions for the First Midterm. max

STATE UNIVERSITY OF NEW YORK AT ALBANY Department of Economics

Neoclassical Business Cycle Model

Macroeconomics I. University of Tokyo. Lecture 12. The Neo-Classical Growth Model: Prelude to LS Chapter 11.

Lecture 4 The Centralized Economy: Extensions

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

Neoclassical Growth Model: I

The Ramsey Model. (Lecture Note, Advanced Macroeconomics, Thomas Steger, SS 2013)

Neoclassical Growth Model / Cake Eating Problem

Productivity Losses from Financial Frictions: Can Self-financing Undo Capital Misallocation?

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

Markov Perfect Equilibria in the Ramsey Model

Advanced Macroeconomics

Stochastic simulations with DYNARE. A practical guide.

Economic Growth: Lecture 9, Neoclassical Endogenous Growth

Macroeconomics Qualifying Examination

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

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

ECON607 Fall 2010 University of Hawaii Professor Hui He TA: Xiaodong Sun Assignment 2

Macroeconomics I. University of Tokyo. Lecture 13

Problem 1 (30 points)

Small Open Economy RBC Model Uribe, Chapter 4

Part A: Answer question A1 (required), plus either question A2 or A3.

Equilibrium in a Production Economy

Uncertainty Per Krusell & D. Krueger Lecture Notes Chapter 6

Macroeconomics Theory II

Stagnation Traps. Gianluca Benigno and Luca Fornaro

1 Bewley Economies with Aggregate Uncertainty

Monetary Economics: Solutions Problem Set 1

Macroeconomics Qualifying Examination

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

Growth Theory: Review

Economic Growth: Lecture 8, Overlapping Generations

New Notes on the Solow Growth Model

First order approximation of stochastic models

Government The government faces an exogenous sequence {g t } t=0

Growth Theory: Review

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

Dynamic (Stochastic) General Equilibrium and Growth

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

1 Two elementary results on aggregation of technologies and preferences

Economic Growth: Lecture 7, Overlapping Generations

Macroeconomics Qualifying Examination

Homework 3 - Partial Answers

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

Endogenous Growth Theory

Slides II - Dynamic Programming

Toulouse School of Economics, M2 Macroeconomics 1 Professor Franck Portier. Exam Solution

Lecture 2. (1) Aggregation (2) Permanent Income Hypothesis. Erick Sager. September 14, 2015

TOBB-ETU - Econ 532 Practice Problems II (Solutions)

Structural change in a multi-sector model of the climate and the economy

ECON 581: Growth with Overlapping Generations. Instructor: Dmytro Hryshko

2. What is the fraction of aggregate savings due to the precautionary motive? (These two questions are analyzed in the paper by Ayiagari)

The full RBC model. Empirical evaluation

Lecture 2: Firms, Jobs and Policy

Lecture 3: Growth with Overlapping Generations (Acemoglu 2009, Chapter 9, adapted from Zilibotti)

Indeterminacy with No-Income-Effect Preferences and Sector-Specific Externalities

News Driven Business Cycles in Heterogenous Agents Economies

Lecture 5: Competitive Equilibrium in the Growth Model

Chapter 7. Endogenous Growth II: R&D and Technological Change

Business Failure and Labour Market Fluctuations

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

Dynamic stochastic general equilibrium models. December 4, 2007

Chapter 12 Ramsey Cass Koopmans model

ADVANCED MACROECONOMICS I

Lecture 2 Real Business Cycle Models

The New Keynesian Model: Introduction

FEDERAL RESERVE BANK of ATLANTA

ECON 5118 Macroeconomic Theory

Housing with overlapping generations

Macroeconomic Topics Homework 1

Dynamic Optimization Using Lagrange Multipliers

ECOM 009 Macroeconomics B. Lecture 2

Endogenous Growth. Lecture 17 & 18. Topics in Macroeconomics. December 8 & 9, 2008

Transcription:

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 1. Introduction 2. Households 3. Firms 4. The competitive equilibrium 5. The central planning equilibrium 6. The steady state 7. IRIS

Introduction

Dynamic Stochastic General Equilibrium (DSGE) models DSGE models have become the fundamental tool in current macroeconomic analysis They are in common use in academia and in central banks. Useful to analyze how economic agents respond to changes in their environment, in a dynamic general equilibrium micro-founded theoretical setting in which all endogenous variables are determined simultaneously. Static models and partial equilibrium models have limited value to study how the economy responds to a particular shock. 1

DSGE: microfoundations + rational expectations Modern macro analysis is increasingly concerned with the construction, calibration and/or estimation, and simulation of DSGE models. DSGE models start from micro-foundations, taking special consideration of the rational expectation forward-looking economic behavior of agents. 2

Households

General assumptions about consumers There is a representative agent. Who is an optimizer: she maximizes a given objective function. She lives forever: infinite horizon Her happiness depends on consumption C and leisure O. The maximization of her objective function is subject to a resource restriction: the budget constraint. 3

Instant utility The instant utility function is u(c, O) She prefers more consumption and more leisure to less: u C > 0 u O > 0 Higher consumption (and leisure) implies greater utility but at a decreasing rate: u CC < 0 u OO < 0 4

Expected utility function The consumer s happiness depends on the entire path of consumption and leisure that she expects to enjoy: U(C 0, C 1,..., C, O 0, O 1,..., O ) She s impatient: she discounts future utility by β. Her utility is time separable. Therefore, her expected utility is E 0 β t u(c t, O t ) t=0 5

Resource ownership To define a budget constraint we must introduce property rights. Here,we assume that the consumer is the owner of production factors: capital K and L labor. L comes from the available endowment of time, which we normalize to 1. Because time cannot be accumulated, labor decisions will be static. K is accumulated through investment, which in turn depends on savings. Consumer also owns the firm. 6

The budget constraint Household income comes from renting both productive factors to the production sector, at given rental prices. Household can do two things with these earnings: expend it in consumption or save it. Then, the budget constraint is where P t (C t + S t ) W t L t + R t K t + Π t P t = price of consumption good R t = user cost of capital S t = savings W t = wage Π t = firm s profits (= dividends) Since there is no money, we normalize P t = 1 t. 7

Resource constraints Since time is spent either working or in leisure: O t + L t = 1 t Given this constraint, in what follows we write the instant utility function as: u(c, 1 L) Because capital deteriorates over time, its accumulation is subject to depreciation rate δ: K t+1 = (1 δ)k t + I t 8

The financial sector To keep things simple, we assume that there is a competitive sector that transforms savings directly into investment without any cost. Thus S t = I t Combining this assumption with the budget constraint and the capital accumulation equation, the consumer is constraint by C t W t L t + R t K t + Π t S t W t L t + R t K t + Π t I t W t L t + R t K t + Π t + (1 δ)k t K t+1 W t L t + Π t + (1 + R t δ)k t K t+1 9

The consumer problem The consumer problem is to maximize her lifetime utility E 0 β t u(c t, 1 L t ) t=0 subject to the budget constraint * C t = W t L t + Π t + (1 + R t δ)k t K t+1 t = 0, 1,... where K 0 is predetermined. * We impose equality because u C > 0. 10

The consumer problem: dynamic programming The consumer problem is recursive, so we can represent it by a Bellman equation. Current capital is the state variable, next capital and labor are the policy variables. Then we write { V (K) = max u(c, 1 L) + β E V (K ) } K,L subject to the budget constraint C = W L + Π + (1 + R δ)k K 11

The consumer problem: solution The FOCs are: u O = W u C u C = β E V (K ) (wrt labor) (wrt capital) The envelope condition is V (K) = (1 + R δ) u C Therefore, the Euler equation is u C = β E [ (1 + R ] δ)u C 12

Consumer optimization: In summary For the numerical solution of the model, we assume that u (C t, 1 L t ) = γ ln C t + (1 γ) ln(1 L t ) Therefore, the solution of the consumer problem requires [ 1 = β E (1 + R t+1 δ) C ] t C t = γ 1 γ W (1 L t) K t+1 = (1 δ)k t + I t C t+1 13

Firms

The firms Firms produce goods and services the households will consume of save. To do this, they transform capital K and labor L into final output. They rent these factors from households. 14

Production function Technology is described by the aggregate production function Y t = A t F (K t, L t ) where Y t is aggregate output and A t is total factor productivity (TFP). Production increases with inputs F K > 0 F L > 0 but marginal productivity of each factor is decreasing : F KK < 0 F LL < 0 15

Production function (cont n) We assume that Production has constant returns to scale: A t F (λk t, λl t ) = λy t Both factors are indispensable for production A t F (0, L t ) = 0 A t F (K t, 0) = 0 Production satisfies the Inada conditions lim K 0 F K = lim F K = 0 K lim F L = L 0 lim F L = 0 L 16

The firm s problem: static optimization Firms maximize profits, subject to the technological constraint. or simply max K t,l t Π t = Y t W t L t R t K t s.t. Y t = A t F (K t, L t ) max K t,l t A t F (K t, L t ) W t L t R t K t 17

The firm s problem: solution The FOCs are: W t = A t F L (K t, L t ) R t = A t F K (K t, L t ) (wrt labor) (wrt capital) that is, the relative price of productive factors equals their marginal productivity. 18

Side note: Euler s theorem Let f(x) be a C 1 homogeneous function of degree k on R n +. Then, for all x, x 1 f x 1 (x) + x 2 f x 2 (x) + + x n f x n (x) = kf(x) 19

The firm s profits Since F is homogeneous of degree one (constant returns to scale), Euler s theorem implies [A t F K (K t, L t )] K t + [A t F L (K t, L t )] L t = Y t Substitute FOCs from firms problem: R t K t + W t L t = Y t and therefore optimal profits will equal zero: Π t = Y t R t K t W t L t = 0 20

The total factor productivity The TFP A t follows a first-order autorregresive process: ln A t = (1 ρ) ln Ā + ρ ln A t 1 + ϵ t where the productivity shock ϵ t is a Gaussian white noise process: ϵ t N(0, σ 2 ) This assumption led to the birth of the Real Business Cycle (RBC) literature. 21

The total factor productivity (cont n) The TFP process can also be written In equilibrium, A t = Ā. ln A t ln Ā = ρ ( ln A t 1 ln Ā) + ϵ t Productivity shocks cause persistent deviations in productivity from its equilibrium value: as long as ρ > 0. ( ln A t+s ln Ā) ϵ t = ρ s 1 > 0 Although persistent, the effect of a shock is not permanent ( ln A t+s ln lim Ā) = ρ s 1 = 0 s ϵ t 22

Firm optimization: In summary For the numerical solution of the model, we assume that A t F (K t, L t ) = A t K α t L 1 α t and Ā = 1 Therefore, the solution of the firm problem requires ( ) α Kt W t = (1 α)a t = (1 α) Y t L t ( ) 1 α Lt R t = αa t = α Y t K t K t Y t = A t K α t L 1 α t ln A t = ρ ln A t 1 + ϵ t L t 23

The competitive equilibrium

Putting the agents together The equilibrium of this models depends on the interaction of consumers and firms. Households decide how much to consume C t, to invest (save) I t = S t, and to work L t, with the objective of maximizing their happiness, taking as given the prices of inputs. Firms decide how much to produce Y t, by hiring capital K t and labor L t, given the prices of production factors. Since both agents take all prices as given, this is a competitive equilibrium. 24

The competitive equilibrium The competitive equilibrium for this economy consists of 1. A pricing system for W and R 2. A set of values assigned to Y, C, I, L and K. such that 1. given prices, the consumer optimization problem is satisfied; 2. given prices, the firm maximizes its profits; and 3. all markets clear at those prices. 25

The competitive equilibrium (cont n) The competitive equilibrium for this economy consists of prices W t and R t, and quantities A t, Y t, C t, I t, L t and K t+1 such that: [ 1 = β E (1 + R t+1 δ) C t C t = γ 1 γ W (1 L t) K t+1 = (1 δ)k t + I t W t = (1 α) Y t L t R t = α Y t K t Y t = A t K α t L 1 α t ln A t = ρ ln A t 1 + ϵ t Y t = C t + I t C t+1 ] First 3 equations characterize solution of consumer problem Next 3 equations characterize solution of firm problem Next equation governs dynamic of TFP Last equation implies equilibrium in goods markets Equilibrium in factor markets is implicit: we use same K, L in consumer and firm problems Later, we use these 8 equations in IRIS to solve and simulate the model. 26

Welfare theorems If there are no distortions such as (distortionary) taxes or externalities, then 1 st Welfare Theorem The competitive equilibrium characterized in last slide is Pareto optimal 2 nd Welfare Theorem For any Pareto optimum a price system W t, R t exists which makes it a competitive equilibrium 27

The central planning equilibrium

The central planner An alternative setting to a competitive market environment is to consider a centrally planned economy The central planner makes all decisions in the economy. Objective: the joint maximization of social welfare Prices have no role in this setting. 28

The central planner problem The central planner problem is to maximize social welfare E 0 β t u(c t, 1 L t ) t=0 subject to the constraints t = 0, 1,... C t + I t = Y t Y t = A t F (K t, L t ) K t+1 = (1 δ)k t + I t (resource constraint) (technology constraint) (capital accumulation) where K 0 is predetermined. The three constraints can be combined into C t + K t+1 = A t F (K t, L t ) + (1 δ)k t 29

The central planner problem: dynamic programming The central planner problem is recursive too, so we can represent it by a Bellman equation. Current capital is the state variable, next capital and labor are the policy variables. Then we write { V (K) = max u(c, 1 L) + β E V (K ) } K,L subject to the constraint C = AF (K, L) + (1 δ)k K 30

The central planner problem: solution The FOCs are: u O = u C AF L (K, L) u C = β E V (K ) (wrt labor) (wrt capital) The envelope condition is V (K) = [AF K (K, L) + 1 δ] u C Therefore, the Euler equation is u C = β E {[ AF K (K, L ) + 1 δ ] } u C 31

Central planner optimization: In summary For the numerical solution of the model, we assume again that u (C t, 1 L t ) = γ ln C t + (1 γ) ln(1 L t ) F (K t, L t ) = K α t L 1 α t Therefore, the solution of the central planner problem requires [( 1 = β E α Y ) ] t+1 Ct + 1 δ K t+1 C t = γ 1 γ (1 α) Y t L t (1 L t ) K t+1 = (1 δ)k t + I t C t+1 32

The central planning equilibrium The central planning equilibrium for this economy consists quantities A t, Y t, C t, I t, L t and K t+1 such that: [( 1 = β E α Y ) ] t+1 Ct + 1 δ K t+1 C t+1 C t = γ 1 L t 1 γ (1 α) Y t L t K t+1 = (1 δ)k t + I t Y t = A t K α t L 1 α t These equations characterize solution of the social planner problem There are no market equilibrium conditions, because there are no markets There are no prices ln A t = ρ ln A t 1 + ϵ t Y t = C t + I t Last equation is a feasibility constraint 33

Central planner vs. competitive market equilibria The solution under a centrally planned economy is exactly the same as under a competitive market. This is because there are no distortions in our model that alters the agents decisions regarding the efficient outcome. Only difference: In central planner setting there are no markets for production factors, and therefore no price for factors either. 34

The steady state

The steady state The steady state refers to a situation in which, in the absence of random shocks, the variables are constant from period to period. Since there is no growth in our model, it is stationary, and therefore it has a steady state. We can think of the stead state as the long term equilibrium of the model. To calculate the steady state, we set all shocks to zero and drop time indices in all variables. 35

Computing the steady state for the competitive equilibrium In this case, the steady state consists of prices W and R, and quantities Ā, Ȳ, C, Ī, L and K such that: 1 = β(1 + R δ) C = γ 1 γ W (1 L) Ī = δ K R = α Ȳ K Ā = 1 W = (1 α) Ȳ L α Ȳ = Ā K L1 α Ȳ = C + Ī 36

IRIS

IRIS IRIS is a free, open-source toolbox for macroeconomic modeling and forecasting in Matlab, developed by the IRIS Solutions Team since 2001. In a user-friendly command-oriented environment, IRIS integrates core modeling functions (flexible model file language, tools for simulation, estimation, forecasting and model diagnostics) with supporting infrastructure (time series analysis, data management, or reporting). It can be downloaded from Github. 37

Solving the model with IRIS To solve the model, one creates two files.model Here we describe the model: declare its variables, parameters, and equations.m this is a regular MATLAB file. Here we load the model, solve it, and analyze it. The code presented here is based on Torres (2015, pp.51-52), which was written to be used with DYNARE instead of IRIS. 38

The.model file: Define variables The.model file is a text file, where we declare (usually) four sections:!transition_variables!transition_shocks!parameters!transition_equations Although not required, using 'labels' greatly improves readability.! t r a n s i t i o n _ v a r i a b l e s Income Y Consumption C Investment I C a p i t a l K Labour L Wage W Real i n t e r e s t rate R P r o d u c t i v i t y A! t r a n s i t i o n _ s h o c k s P r o d u c t i v i t y shock e 39

Model calibration For the model to be completely computationally operational, a value must be assigned to the parameters. Parameter Definition Value α Marginal product of capital 0.35 β Discount factor 0.97 γ Preference parameter 0.40 δ Depreciation rate 0.06 ρ TFP autoregresive parameter 0.95 σ TFP standard deviation 0.01 40

The.model file: Define and calibrate parameters! parameters Income share of c a p i t a l alpha = 0. 3 5 Discount f a c t o r beta = 0. 9 7 Preferences parameter gamma = 0. 40 Depreciation rate delta = 0. 06 A u t o r r e g r e s i v e parameter rho = 0. 9 5 In the!parameters section, we declare all parameters (so we can use them later in the equations) Optionally, we can calibrate them here, (otherwise we do it in the.m file) 41

The.model file: Specify the model equations! t r a n s i t i o n _ e q u a t i o n s Consumption vs. l e i s u r e choice C = (gamma/(1 gamma) ) *(1 L ) *(1 alpha ) *Y/L ; Euler equation 1 = beta * ( ( C/C { + 1 } ) * ( R { + 1 } + (1 delta ) ) ) ; Production function Y = A * ( K{ 1}^ alpha ) * ( L^(1 alpha ) ) ; C a p i t a l accumulation K = I + ( 1 delta ) * K { 1 } ; Investment equals savings I = Y C ; Labor demand W = (1 alpha ) * A * ( K{ 1} / L ) ^alpha ; C a p i t a l demand R = alpha * A * ( L / K { 1}) ^(1 alpha ) ; P r o d u c t i v i t y AR ( 1 ) process log ( A ) = rho * log ( A { 1}) + e ; Equations are separated by semicolon Lags are indicated by {-n}, leads by {+n} Equations are easier to identify with 'labels' 42

The.m file: Working with the model The.m file is a Matlab file, where we work with the model To work with IRIS, we need to add it to the path using addpath It is recommended to start with a clean session We read the model using model c l e a r a l l close a l l c l c addpath C : \ I R I S i r i s s t a r t u p ( ) m = model ( torres chapter2. model ) ; 43

The.m file: Finding the steady state IRIS uses the sstate command to look for the steady state To use it, we have to guess initial values, which we assign to the model, starting with the ititial params in get(m,'params') P = get (m, params ) ; P. Y = 1 ; P. C = 0. 8 ; P. L = 0. 3 ; P. K = 3. 5 ; P. I = 0. 2 ; P.W = (1 P. alpha ) *P. Y/P. L ; P. R = P. alpha * P. Y/P. K ; P. A = 1 ; m = assign (m, P ) ; m = s s t a t e (m, blocks =, true ) ; chksstate (m) get (m, s s t a t e ) 44

Steady states: results We find that the steady state is given by Variable Definition Value Ratio to Ȳ Ȳ Output 0.7447 1.000 C Consumption 0.5727 0.769 Ī Investment 0.1720 0.231 K Capital 2.8665 3.849 L Labor 0.3604 - R Capital rental price 0.0909 - W Real Wage 1.3431 - Ā TFP 1.0000-45

The.m file: Solving and simulating the model IRIS uses the solve and simulate commands to get the solution and run simulations of the model. Here, we simulate the impact of an unanticipated 10% increase in total factor productivity: ln A t = 0.95 ln A t 1 + ϵ t Notice how persistent the shock is. m = solve (m) ; t t = 10: 50; %time range tshock = 0 ; % shock date d = sstatedb (m, t t ) ; d. e ( 0 ) = 0. 1 0 ; s = simulate (m, d, t t, A n t i c i p a t e =, f a l s e ) ; 1.12 1.1 1.08 1.06 1.04 1.02 A 1-10 0 10 20 30 40 50 46

Responses of endogenous variables to productivity shock 0.15 Y, @-1 0.1 C, @-1 0.08 0.1 0.06 0.05 0.04 0.02 0 0 20 40 0 0 20 40 0.4 I, @-1 0.15 K, @-1 0.3 0.1 0.2 0.1 0.05 0 0 20 40 0 0 20 40 Relative deviations respect to pre-shock values 47

Responses of endogenous variables to productivity shock 0.06 L, @-1 0.1 W, @-1 0.04 0.08 0.02 0.06 0.04 0 0.02-0.02 0 20 40 0 0 20 40 0.15 K, @-1 0.15 R, @-1 0.1 0.1 0.05 0.05 0 0 0 20 40-0.05 0 20 40 Relative deviations respect to pre-shock values 48

References Torres, Jose L. (2015). Introduction to Dynamic Macroeconomic General Equilibrium Models. 2nd ed. Vernon Press. isbn: 1622730240. 49