Solution Methods for DSGE Models and Applications using Linearization Lawrence J. Christiano
Overall Outline• Perturbation and Projection Methods for DSGE Models: an Overview• Simple New Keynesian model – Formulation and log‐linear solution. – Ramsey‐optimal policy. – Using Dynare to solve the model by log‐linearization: • Taylor principle, implications of working capital, News shocks, monetary policy with the long rate.• Financial Frictions as in BGG – Risk shocks and the CKM critique of intertemporal shocks. – Dynare exercise.• Ramsey Optimal Policy, Time Consistency, Timeless Perspective.
Perturbation and Projection Methods for Solving DSGE Models Lawrence J. Christiano
Outline• A Simple Example to Illustrate the basic ideas. – Functional form characterization of model solution. – Use of Projections and Perturbations.• Neoclassical model. – Projection methods – Perturbation methods • Make sense of the proposition, ‘to a first order approximation, can replace equilibrium conditions with linear expansion about nonstochastic steady state and solve the resulting system using certainty equivalence’
Simple Example• Suppose that x is some exogenous variable and that the following equation implicitly defines y: hx, y 0, for all x ∈ X• Let the solution be defined by the ‘policy rule’, g: y gx ‘Error function’• satisfying Rx; g ≡ hx, gx 0• for all x ∈ X
The Need to Approximate• Finding the policy rule, g, is a big problem outside special cases – ‘Infinite number of unknowns (i.e., one value of g for each possible x) in an infinite number of equations (i.e., one equation for each possible x).’• Two approaches: – projection and perturbation
Projection ĝx; • Find a parametric function, , where is a vector of parameters chosen so that it imitates Rx; g 0 the property of the exact solution, i.e., for all x ∈ X , as well as possible. • Choose values for so that ̂ Rx; hx, ĝx; x∈X• is close to zero for .• The method is defined by how ‘close to zero’ is ĝx; defined and by the parametric function, , that is used.
Projection, continued• Spectral and finite element approximations ĝx; – Spectral functions: functions, , in which ĝx; x∈X each parameter in influences for all example: n 1ĝx; ∑ i Hi x, i0 n H i x x i ~ordinary polynominal (not computationaly efficient) H i x T i x, T i z : −1, 1 → −1, 1, i th order Chebyshev polynomial : X → −1, 1
Projection, continued ĝx; – Finite element approximations: functions, , ĝx; in which each parameter in influences over only a subinterval of x ∈ Xĝx; 1 2 3 4 5 6 7 4 2 X
Projection, continued • ‘Close to zero’: collocation and Galerkin x : x1 , x2 , . . . , xn ∈ X• Collocation, for n values of 1 n choose n elements of so that ̂ Rx i ; hx i , ĝx i ; 0, i 1, . . . , n – how you choose the grid of x’s matters…• Galerkin, for m>n values of x : x1 , x2 , . . . , xm ∈ X choose the n elements of 1 n m ∑ wij hxj , ĝxj ; 0, i 1, . . . , n j1
Perturbation• Projection uses the ‘global’ behavior of the functional equation to approximate solution. – Problem: requires finding zeros of non‐linear equations. Iterative methods for doing this are a pain. – Advantage: can easily adapt to situations the policy rule is not continuous or simply non‐differentiable (e.g., occasionally binding zero lower bound on interest rate).• Perturbation method uses local properties of functional equation and Implicit Function/Taylor’s theorem to approximate solution. – Advantage: can implement it using non‐iterative methods. – Possible disadvantages: • may require enormously high derivatives to achieve a decent global approximation. • Does not work when there are important non‐differentiabilities (e.g., occasionally binding zero lower bound on interest rate).
Perturbation, cnt’d x∗ ∈ X• Suppose there is a point, , where we know the value taken on by the function, g, that we wish to approximate: gx ∗ g ∗ , some x ∗• Use the implicit function theorem to approximate g in a neighborhood of x ∗• Note: Rx; g 0 for all x ∈ X → j R x; g ≡ d j Rx; g 0 for all j, all x ∈ X. dx j
Perturbation, cnt’d• Differentiate R with respect to and evaluate x x∗ the result at :R 1 x ∗ d hx, gx|xx ∗ h 1 x ∗ , g ∗ h 2 x ∗ , g ∗ g ′ x ∗ 0 dx ′ ∗ h 1 x ∗ , g ∗ → g x − h 2 x ∗ , g ∗ • Do it again! 2R x ∗ d 2 hx, gx| ∗ h x ∗ , g ∗ 2h x ∗ , g ∗ g ′ x ∗ xx 11 12 dx 2 h 22 x ∗ , g ∗ g ′ x ∗ 2 h 2 x ∗ , g ∗ g ′′ x ∗ . → Solve this linearly for g ′′ x ∗ .
Perturbation, cnt’d• Preceding calculations deliver (assuming enough differentiability, appropriate invertibility, a high tolerance for painful notation!), recursively: g ′ x ∗ , g ′′ x ∗ , . . . , g n x ∗ • Then, have the following Taylor’s series approximation: gx ≈ ĝx ĝx g ∗ g ′ x ∗ x − x ∗ 1 g ′′ x ∗ x − x ∗ 2 . . . 1 g n x ∗ x − x ∗ n 2 n!
Perturbation, cnt’d• Check….• Study the graph of Rx; ĝ x∈X – over to verify that it is everywhere close to zero (or, at least in the region of interest).
Example of Implicit Function Theorem y hx, y 1 x 2 y 2 − 8 0 2 4 gx ≃ g∗ x ∗ x − x ∗ − ∗ g ‐4 4 x ‐4 h 1 x ∗ , g ∗ x ∗ h 2 had better not be zero!g′ ∗ x − − ∗ ∗ ∗ h 2 x , g g
Neoclassical Growth Model• Objective: 1− c −1 E 0 ∑ t uc t , uc t t 1− t0• Constraints: c t expk t1 ≤ fk t , a t , t 0, 1, 2, . . . . a t a t−1 t . fk t , a t expk t expa t 1 − expk t .
Efficiency Condition ct1E t u ′ fk t , a t − expk t1 ct1 period t1 marginal product of capital − u ′ fk t1 , a t t1 − expk t2 f K k t1 , a t t1 0. • Here, k t , a t ~given numbers t1 ~ iid, mean zero variance V time t choice variable, k t1 • Convenient to suppose the model is the limit →1 of a sequence of models, , indexed by t1 ~ 2 V , 1.
Solution • A policy rule, k t1 gk t , a t , . • With the property: ctRk t , a t , ; g ≡ E t u ′ fk t , a t − expgk t , a t , ct1 k t1 a t1 k t1 a t1 − u ′ f gk t , a t , , a t t1 − exp g gk t , a t , , a t t1 , k t1 a t1 fK gk t , a t , , a t t1 0, • for all a t , k t and 1.
Projection Methods• Let ĝk t , a t , ; – be a function with finite parameters (could be either spectral or finite element, as before). • Choose parameters, , to make Rk t , a t , ; ĝ – as close to zero as possible, over a range of values of the state. – use Galerkin or Collocation.
Occasionally Binding Constraints• Suppose we add the non‐negativity constraint on investment: expgk t , a t , − 1 − expk t ≥ 0• Express problem in Lagrangian form and optimum is characterized in terms of equality conditions with a multiplier and with a complementary slackness condition associated with the constraint.• Conceptually straightforward to apply preceding method. For details, see Christiano‐Fisher, ‘Algorithms for Solving Dynamic Models with Occasionally Binding Constraints’, 2000, Journal of Economic Dynamics and Control. – This paper describes alternative strategies, based on parameterizing the expectation function, that may be easier, when constraints are occasionally binding constraints.
Perturbation Approach• Straightforward application of the perturbation approach, as in the simple example, requires knowing the value taken on by the policy rule at a point.• The overwhelming majority of models used in macro do have this property. – In these models, can compute non‐stochastic steady state without any knowledge of the policy rule, g. k∗ – Non‐stochastic steady state is such that a0 (nonstochastic steady state in no uncertainty case) 0 (no uncertainty)∗ ∗ k g k , 0 , 0 1 – and 1− k∗ log . 1 − 1 −
Perturbation • Error function: ctRk t , a t , ; g ≡ E t u ′ fk t , a t − expgk t , a t , ct1 − u ′ fgk t , a t , , a t t1 − expggk t , a t , , a t t1 , f K gk t , a t , , a t t1 0, k t , a t , . – for all values of • So, all order derivatives of R with respect to its arguments are zero (assuming they exist!).
Four (Easy to Show) Results About Perturbations • Taylor series expansion of policy rule: linear component of policy rulegk t , a t , ≃ k g k k t − k g a a t g second and higher order terms 1 g kk k t − k 2 g aa a 2 g 2 g ka k t − ka t g k k t − k g a a t . . . t 2 – g 0 : to a first order approximation, ‘certainty equivalence’ – All terms found by solving linear equations, except coefficient on past gk endogenous variable, ,which requires solving for eigenvalues – To second order approximation: slope terms certainty equivalent – g k g a 0 – Quadratic, higher order terms computed recursively.
First Order Perturbation • Working out the following derivatives and evaluating at k t k ∗ , a t 0 R k k t , a t , ; g R a k t , a t , ; g R k t , a t , ; g 0 ‘problematic term’ Source of certainty equivalence • Implies: In linear approximationR k u ′′ f k − e g g k − u ′ f Kk g k − u ′′ f k g k − e g g 2 f K 0 kR a u ′′ f a − e g g a − u ′ f Kk g a f Ka − u ′′ f k g a f a − e g g k g a g a f K 0R −u ′ e g u ′′ f k − e g g k f K g 0
Technical notes for following slide u ′′ f k − e g g k − u ′ f Kk g k − u ′′ f k g k − e g g 2 f K k 0 1 f − e g g − u ′ f Kk g − f g − e g g 2 f K 0 k k u ′′ k k k k 1 f − 1 e g u ′ f Kk f f K g e g g 2 f K 0 k u ′′ k k k 1 fk − 1 u ′ f Kk f k g g 2 0 k eg fK f K u ′′ e g f K eg k 1 − 1 1 u ′ f Kk gk g2 0 k u ′′ e g f K• Simplify this further using: f K K−1 expa 1 − , K ≡ expk exp − 1k a 1 − f k expk a 1 − expk f K e g f Kk − 1 exp − 1k a f KK − 1K−2 expa − 1 exp − 2k a f Kk e −g• to obtain polynomial on next slide.
First Order, cont’d Rk 0• Rewriting term: 1 − 1 1 u ′ f KK gk g2 0 k u ′′ f K 0 g k 1, g k 1• There are two solutions, – Theory (see Stokey‐Lucas) tells us to pick the smaller one. – In general, could be more than one eigenvalue less than unity: multiple solutions. gk ga• Conditional on solution to , solved for Ra 0 linearly using equation.• These results all generalize to multidimensional case
Numerical Example• Parameters taken from Prescott (1986): 2 20, 0. 36, 0. 02, 0. 95, Ve 0. 01 2• Second order approximation: 3.88 0.98 0.996 0.06 0.07 0 ĝk t , a t−1 , t , k ∗ gk k t − k ∗ ga at g 0.014 0.00017 0.067 0.079 0.000024 0.00068 1 1 g kk k t − k g aa 2 a2 t g 2 2 −0.035 −0.028 0 0 g ka k t − ka t g k k t − k g a a t
Conclusion• For modest US‐sized fluctuations and for aggregate quantities, it is reasonable to work with first order perturbations.• First order perturbation: linearize (or, log‐ linearize) equilibrium conditions around non‐ stochastic steady state and solve the resulting system. – This approach assumes ‘certainty equivalence’. Ok, as a first order approximation.
List of endogenous variables determined at t Solution by Linearization • (log) Linearized Equilibrium Conditions: E t 0 z t1 1 z t 2 z t−1 0 s t1 1 s t 0 • Posit Linear Solution: s t − Ps t−1 − t 0. z t Az t−1 Bs t Exogenous shocks • To satisfy equil conditions, A and B must: 0 A2 1 A 2 I 0, F 0 0 BP 1 0 A 1 B 0 • If there is exactly one A with eigenvalues less than unity in absolute value, that’s the solution. Otherwise, multiple solutions. • Conditional on A, solve linear system for B.