A Toolkit for Analyzing Nonlinear Dynamic Stochastic Models Easily Harald Uhlig* CentER, University of Tilburg, and CEPR ABSTRACT Often, researchers wish to analyze nonlinear dynamic discrete-time stochastic models. This chapter provides a toolkit for solving such models easily, building on log-linearizing the necessary equations characterizing the equilibrium and solving for the recursive equilibrium law of motion with the method of undetermined coefficients. This chapter contains nothing substantially new. Instead, the chapter simplifies and unifies existing approaches to make them accessible for a wide audience, showing how to log-linearizing the nonlinear equations without the need for explicit differentiation, how to use the method of undetermined coefficients for models with a vector of endogenous state variables, to provide a general solution by characterizing the solution with a matrix quadratic equation and solving it, and to provide frequency-domain techniques to calculate the second order properties of the model in its HP-filtered version without resorting to simulations. Since the method is an Euler-equation based approach rather than an approach based on solving a social planners problem, models with externalities or distortionary taxation do not pose additional problems. MATLAB programs to carry out the calculations in this chapter are made available. This chapter should be useful for researchers and Ph.D. students alike. Corresponding address: CentER for Economic Research, Tilburg University, Postbus 90153, 5000 LE Tilburg, The Netherlands, e-mail: uhlig@kub.nl *I am grateful to Michael Binder, Toni Braun, Jan Magnus, Ellen McGrattan and Yexiao Xu for helpful comments. I am grateful to Andrew Atkeson for pointing out to me a significant improvement of subsection 6.3. This chapter was completed while visiting the Institute for Empirical Macroeconomics at the Federal Reserve Bank of Minneapolis: I am grateful for its hospitality. Any views expressed here are those of the authors and not necessarily those of the Federal Reserve Bank of Minneapolis or the Federal Reserve System. This version is an updated version of the Discussion Paper 101 at the Institute for Empirical Macroeconomics and of the CentER DP 9597. 1 1 Introduction Often, researchers wish to analyze nonlinear dynamic discrete-time stochastic models. This chapter provides a toolkit for solving such models easily, building on log-linearizing the necessary equations characterizing the equilibrium and solving for the recursive equilibrium law of motion with the method of undetermined coefficients1 This chapter contains nothing substantially new. Instead, the point of this chapter is to simplify and unify existing methods in order to make them accessible to a large audience of researchers, who may have always been interested in analyzing, say, real business cycle models on their own, but hesitated to make the step of learning the numerical tools involved. This chapter reduces the pain from taking that step. The methods here can be used to analyze most of the models studied in the literature. We discuss how to log-linearizing the nonlinear equations without the need for explicit differentiation and how to use the method of undetermined coefficients for models with a vector of endogenous state variables. The methods explained here follow directly from McCallum (1983), King, Plosser and Rebelo (1987) and Campbell (1994), among others2. We provide a general solution built on solving matrix-quadratic equations, see also Binder and Pesaran (1996), and provide frequency-domain techniques, building on results in King and Rebelo (1993), to calculate the second-order moments of the model in its HP-filtered version without resorting to simulations. Since the method is an Euler-equation based approach rather than an approach based on solving a social planners problem, solving models with externalities or distortionary taxation does not pose additional problems. Since the (nonlinear) Euler equations usually need to be calculated in any case in order to find the steady state, applying the method described in this chapter requires little in terms of additional manipulations by hand, given some preprogrammed routines to carry out the matrix calculations of section 6. MATLAB programs to carry out these calculations, given the log-linearized system, are available at my home page3. The method in this chapter therefore allows to solve nonlinear dynamic stochastic models easily. Numerical solution methods for solving nonlinear stochastic dynamic models have been studied extensively in the literature, see in particular Kydland and Prescott (1982), 1Note that the nonlinear model is thus replaced by a linearized approximate model. "Essential" nonlinearities like chaotic systems are unlikely to be handled well by the methods in this chapter. 2Campbell even touts the approach followed in his paper as "analytical", but note that in his case as well as in our case, one needs to linearize equations and solve quadratic equations. Campbell presumably attaches the attribute "analytical" to this numerical procedure, since it is rather straightforward indeed and carrying it out by hand is actually feasible in many cases. Otherwise, every numerical calculation anywhere could be called "analytical", since it could in principle be carried out and analyzed by hand - it would just take very long. 3http://cwis.kub.nl/~few5/center/STAFF/uhlig/toolkit.dir/toolkit.htm is the address of the web site for the programs. 2 the comparison by Taylor and Uhlig (1990) and the methods proposed by various authors in the same issue, Judd (1991), Hansen and Prescott (1995) and Danthine and Donaldson (1995). The literature on solving linear-quadratic dynamic stochastic models or linear stochastic difference equations is even larger. The key paper here is Blanchard and Kahn (1980). Furthermore, there are the textbook treatment in Sargent (1987), Chapters IX and XI, as well as, say, Muth (1961), McGrattan (1994) or Hansen, McGrattan and Sargent (1994), to name a random few. Subject to applicability, all the methods relying on a log-linear approximation to the steady state have in common that they will find the same recursive equilibrium law of motion as the method described in this chapter, since the linear space approximating a nonlinear differentiable function is unique and "immune" to differentiable transformations of the parameter space. But while McGrattan (1994) and Hansen, McGrattan and Sargent (1994) focus on solving models via maximizing a quadratic objective function, and while Blanchard and Kahn (1980) solve linear systems by searching for the stable manifold in the entire system of necessary equations describing the equilibrium relationships, this chapter by contrast solves directly for the desired recursive equilibrium law of motion. This approach is very natural. The stability condition is imposed at the point, where a certain matrix quadratic equation is solved. It is shown how this matrix quadratic equation can be reduced to a standard eigenvalue problem of another matrix with twice as many dimensions. Three related contributions are McCallum (1983), which is the key reference for the method of undetermined coefficients, Ceria and Rios-Rull (1992) and Binder and Pesaran (1996). These contributions also derive the recursive equilibrium law of motion. McCallum (1983) reduces the coefficient-finding problem to a problem solvable with the methods in Blanchard and Kahn (1980), whereas Ceria and Rios-Rull (1992) reduce the problem to one of solving a matrix-quadratic equation as do we, but do not reduce the matrix-quadratic equation problem to a standard eigenvalue problem. Binder and Pesaran (1996) finally may be most closely related in that they reduce the matrix quadratic equation characterizing the solution to an eigenvalue problem as we do. These three contributions, however, for most parts do not distinguish between endogenous variables which have to be part of the state vector, and other endogenous variables. Thus applying these models in somewhat larger system can either result in unnecessary large and computationally demanding eigenvalue problems in which "bubble solutions" have to be removed in a painstaking fashion, or one is always forced to reduce the system beforehand to make it fit their description4. But all these technical differences to the existing literature are not in any way furthermore, McCallum (1983) uses eigenvalue methods also to solve some other equations in his method, which are solved here by a simple linear-equation-solution techniques, compare his solution for equation (A.6) in his paper to equation (6.14). 3 essential. It shall be stressed again that the main purpose and merit of this chapter is to make solving nonlinear dynamic stochastic models easy. In fact, this chapter describes the entire method as a "cookbook recipe", which should be of great practical use to Ph.D. students and researchers alike. Since the focus here is entirely on the computational aspect of studying these models, some issues are left aside entirely. In particular, the issue of existence or multiplicity of equilibria as well as the reasons for concentrating on stable solutions is not discussed. The methods in this chapter should therefore not be applied blindly, but only in light of, say, McCallum (1983), Stokey, Lucas with Prescott (1989) and the related literature. The outline of the chapter will be evident from the description of the general procedure in the next section. In particular, section 4 shows, how to do everything by hand in the stochastic neoclassical growth model. 2 The general procedure The general procedure to solve and analyze nonlinear dynamic stochastic models takes the following steps. 1. Find the necessary equations characterizing the equilibrium, i.e. constraints, first-order conditions, etc., see sections 4 and 5. 2. Pick parameters and find the steady state(s), see sections 4 and 5. 3. Log-linearize the necessary equations characterizing the equilibrium of the system to make the equations approximately linear in the log-deviations from the steady state, see sections 3, 4 and 5. 4. Solve for the recursive equilibrium law of motion via the method of undetermined coefficients, employing the formulas of section 6. Also, see section 4, where all the calculations are done "by hand" and explained in detail. 5. Analyze the solution via impulse-response analysis, see section 4 and 7, and second-order-properties, possibly taking account of, say, the Hodrick-Prescott-Filter. This can be done without having to simulate the model, see section 7. The next section skips directly to step 3 of the procedure outlined above and describes how to log-linearize nonlinear equations without explicit differentiation. Sections 4 and 5 then provide two prototype examples, in which calculating the Eu-ler equations, the steady state and the log-linearization is carried out to see how this method works. Section 4 analyzes the stochastic neoclassical growth model and states and explains the general modelling approach, all the details of the calculations including the calculation of the recursive equilibrium law of motion "by hand", 4 whereas section 5 studies the real business cycle model of Hansen (1985), deriving the log-linearized version fairly quickly: once, a linearized system has been obtained, the methods in section 6 provide the desired recursive equilibrium law of motion. Those, who wish faster access should skip section 4 and go to section 5 after reading section 3. Readers who are familiar enough with log-linearization are advised to skip even more and go directly to section 6 now. 3 Log-linearization Log-linearizing the necessary equations characterizing the equilibrium is a well-known technique. In the context of real business cycle models, log-linearization has been proposed in particular by King, Plosser and Rebelo (1987) and Campbell (1994). Log-linearization also appears frequently in text books, see e.g. Obstfeld and Rogoff, p. 503-505. Nonetheless, the technique often seems to create more headaches than it should. It is thus useful for the purpose of this chapter to review how it is done. The next two sections simplify the approach of Campbell (1994). Looking ahead at the many equations in particular of section 4 to follow, this claim may not seem entirely credible. However, these equations were stated to spell out each step in detail. When studying Campbell (1994), one might be under the impression, that magic and quite a bit of cleverness is involved in deriving the results. The point of in particular sections 3, 4 and 5 is to show, that one does not need to be as clever as John Campbell to use these methods. On the contrary, everything is remarkably straightforward, and, as long as one proceeds carefully, practically nothing can go wrong. Different choices in places where choices can be made still result in the same final outcome. The principle of log-linearization is to use a Taylor approximation around the steady state to replace all equations by approximations, which are linear functions in the log-deviations of the variables. Formally, let Xt be the vector of variables, X their steady state and xt = log Xt - log X the vector of log-deviations. The vector 100 • xt tells us, by how much the variables differ from their steady state levels in period t in per cent. The necessary equations characterizing the equilibrium can be written as 1 = f(xt,xt_i) (3.1) 1 = Et\g(xt+1,xt)] (3.2) 5 where /(0,0) = 1 and g(0,0) = 1, i.e. the left-hand side of (3.1) and (3.2). Taking first-order approximations around (xt,xt-i) = (0,0) yields5 0 sa fi ■ xt + f2- xt-i 0 ~ -Ej [gi • xt+i + g2 ■ xt] One obtains a linear system in xt and xt~\ in the deterministic equations and xt+\ and xt in the expectational equations. This linear system can be solved with the method of undetermined coefficients, described in section 6. In the large majority of cases, there is no need to differentiate the functions / and g explicitely. Instead, the log-linearized system can usually be obtained as follows. Multiply out everything before log-linearizing. Replace a variable Xt with Xt = Xex\ where xt is a real number close to zero. Let likewise yt be a real number close to zero. Take logarithms, where both sides of an equation only involve products, or use the following three building blocks, where a is some constant: 1 + xt + ay t 0 Et [axt+i] up to a constant . For example, these building blocks yield eXt ss 1 + xt aXt ss aXxt up to a constant (Xt + a)Yt ~ XYXt + (X + a)Yyt up to a constant Constants drop out of each equation in the end, since they satisfy steady state relationships, but they are important in intermediate steps: compare for example the 5An alternative to approximate (3.2) rewrites it as 0 = log(Et[exp(g(xt+1,xt))]) where g = logg. Assuming xt and Xt+i to be (approximately) conditionally jointly normally distributed with an (approximately) constant conditional variance-covariance matrix, and assuming that log fif(0, 0) pa -Vart [gi ■ xt+1 + g2 ■ xt], (3.3) independent oft (rather than log 0 is the coefficient of relative risk aversion. 2. Technologies: We assume a Cobb-Douglas production function7 Ct + Kt = ZtKpt_xN]-p + (1 - č)ÄVi where Kt is capital, Nt is labor, 0 < p < 1 ("capital share") and 0 < 8 < 1 ("depreciation ratev) are parameters and where Zr, the total factor productivity, is exogenously evolving according to , 2\ log Zt = (1 - V>) log Z + V> log Zí_i + et, et ~ i.i.d.J\f(0; a Here, 0 < ip < 1, Z are parameters. 3. Endowment: Each period, the representative agent is endowed with one unit of time, Nt = 1. Furthermore, he is endowed with capital K-\ before t = 0. 4. Information: Ct} Nt and A^ need to be chosen based on all information Xt up to time t. 4.3 The social planners problem. The objective of the social planner is to maximize the utility of the representative agent subject to feasibility, i.e. max E OO /^l- T) i ^ — n -L i=0 ?7 6We use capital letters to denote "levels" of variables, and use small letters to denote log-deviations. This should not be confused with the more common notational usage in other parts of the literature, where capital letters are usually reserved for aggregate variables, while small letters denote individual variables. 7We use the date t — 1 rather than the more commonly used date t as subscript for capital in the production function. This is just a notational difference, which we find useful, however, With the notation here, the date of a variable refers to the point in time, when it is actually chosen. Put differently, it refers to the information, with respect to which a variable is measurable. This turns out to be particularly convenient, once one needs to solve for the dynamics with the theorems in section 6. If the more commonly used notation is used instead, one needs to much more careful in order to not introduce mistakes at that point 8 s.t. A"_i, Z0, Ct + Kt = ZtKU + (1 - S)Kt-i logZt = (1 - tjj)logŽ + Vlog^t-i + et, et ~ z.z.oUV(0;cj2) To solve it, one should use the techniques of dynamic programming. Stokey, Lucas, with Prescott (1989) provide the standard textbook on this technique. Here, we bypass the dynamic programming foundations, and proceed directly to the necessary first order conditions of optimality. To calculate them, form the Lagrangian: oo y^il — ri __ 1 L= max ElYßU^--------- -Xt {Ct + Kt - ZtKpt_x - (1 - č)ÄVi))] The first order conditions are: dL_ 0 = Ct + Kt - ZtKpt_x - (1 - 8)Kt-! dL dot dL dKt 0= cr-x 0= -Aí + /3jBí[Aí+1(/0Zí+1A7-1 + (1-«5))] (4.4) To the uninitiated, the equation (4.4) for -r^- may seem tricky. To check it, write out the terms for t and t + 1 in the objective function, - + ßf (C\ n_~ l - Xt (C\ + Kt - ZtKpt_x - (1 - č)AVi)) ... + ßw (^f-^- - Xt+1 (Ct+1 + Kt+1 - Zt+1KtP - (1 - S)Kt)) + ... and differentiate with respect to Kt to get (4.4). The expectation Et comes in, because information of date t-\-1 is not yet known at date t, when choosing Kt. The first-order conditions are often also called Euler equations. One also obtains the transversality condition 0 = lim E0[ßTCpKT] (4.5) X^oo obtained from a limiting Kuhn-Tucker condition, i.e. from summing just to T rather than oo in the social planners solution, substituting Ct with ZtKp_1 — (1 — 6)Kt-\ —Kt everywhere, taking the derivative with respect to Kt, multiplying with Kt, and 9 setting the result to zero while taking the limit for T —> oo. Another interpretation is given in the next subsection 4.4. It is the transversality condition which (essentially) rules out explosive solutions: this is what we shall keep in mind. To solve for the steady state, rewrite the necessary conditions: 1. a ZtKpt_x + (1 - 6)K i-i K* 2. Rt pZtKtpli + (1-6) 3. Et ß a ^ a i+i, R í+i (4.6) 4. logZt [1 - V>) log Z + V> log Zí_i + et, et ~ i.i.d.J\f(0; a2) Equation (4.6) is the Lucas asset pricing equation, see Lucas (1978), which typically arises in these models. Dropping the time indices yields or C = ZKP + (1 - 8)K - R = pZKp-x + (1-6) 1 = ßR R-\ K - ( PŽ " \Ř-l + 6j 3nc< 3: Ý = ŽKP) C = Ý-SK K i/(i-p) It is possible to reduce the first three of these equations to just two or just one by eliminating some of the variables. Quite popular is the reduction to a system in Ct and Jif-i, which we will discuss in section 4.6, or to a system in just Kt at leads and lags, which we will discuss in subsection 4.7. However, there is no particular 10 reason to make such a reduction: we therefore choose to carry all the equations with us, since it will then also be easier to keep seeing the economic interpretation of the log-linearizations. While one could now start to analyze the dynamics, it may be interesting to do a "detour" via studying the competitive equilibrium: as one shall expect from the welfare theorems, the solution to the competitive equilibrium yields the same allocation as the solution to the social planners problem. A reader who is just interested in analyzing the dynamics of the social planners problem should skip directly to subsection 4.5. 4.4 The competitive equilibrium Let us define a competitive equilibrium to be a sequence (Ct} Nt} Kt} Rt}Wt)^l0} so that 1. Given8 K_l and market wages Wt and returns Rt, the representative agent solves max E CO /^l- T) i f-Z 1 -rt i=0 s.t. Nr = i, Ct + K$a) = WtN(ts) + Rt k£\ plus the no-Ponzi-game condition 0= lim^ou^í"1^- s=l 2. Given (Wt} Rt)^0} the representative firm solves9 max Zt (K&Y (n^ + (1 - 6)K& - WtN^ ~ R^-i ni-l'"i where log Zt = (1 - ý) log Ž + V log Zi-i + et, Q ~ i.i.d.AÍ(0; er2), is exogeneous. 3. Markets clear : 8The superscript (s) on Kt_i and Nt' is meant to indicate "supply". 9The superscript '• ) on K^J^ and Nt ' is meant to indicate "demand". ff (a) The labor market, (b) The capital market, (c) The goods market, Ct + Kt = ZtKU + (1 - S)Kt-i We need only two out of these three conditions by Walras' law. Another way to define a competitive equilibrium is to drop Rt and introduce history-contingent prices Pt for consumption goods of time t in terms of consumption goods at date = 0. This has the advantage of turning the sequence of budget constraints of the consumer into one infinite-horizon budget constraint, clarifying the role of the no-Ponzi-game condition: the no-Ponzi-game condition stipulates, that in net present value terms, the agent should neither have capital left over at infinity or borrow anything at infinity. Using the first order conditions below, a close look at the no-Ponzi-game condition reveals, that it is essentially nothing but the transversality condition 4.5 of the social planners problem. To analyze the competitive equilibrium, proceed as follows. The representative firm solves ma* Zt (K&Y (N^y-P + (1 - 6)K& - WtNJd) ~ RJ^ jAd) N(d) v ' v ' The first order conditions of the firm ("demand curves") are W, = (l-/>)Z,(A-ffi)'(jVÍ«)-' Rewrite this, dropping (d> and using Yt = ZtKUN}-p on obtains, as usual for Cobb-Douglas f. that the wage payments equal the labor share, N(d) = N(s) = Nt aí-i - aí-i - Aí-i WtNt = (l-p)Yt 12 2. and that the returns equal the capital share plus one minus depreciation, i?tAVi = pYt + (1 - «5)AVi The interest rate is Rt — 1: rt ss Rt - 1 = /> Yt Kt-i 6 For the representative agent, form the Lagrangian: L = '>A')t=o i=o x -XtiCt + Kt-Wt-RtK^))] The first order conditions are dL — : 0= Cť + #ť - W* - RtKt_x oXt dL dot dL dE o= cr-Xt : 0= -Xt + ßEt[Xt+1Rt+i] Using, what one already knows for Rt and Wt yields 1. Ct = ZtKU + (1 - «5)AVi - Kt 2. p-i Rt = pZtKU + (1 - 8) 3. 1 = Et ß a y a R í+i, í+i 4. logZt = (1 - ý) log Z + t/jlogZt-! + et, et ~ z.z.öUV(0; er2) These are the same equations as for social planners problem! Thus, whether one studies a competitive equilibrium or the social planners problem, one ends up with the same allocation of resources. 13 4.5 Solving for the dynamics. Let us return to the problem of solving for the dynamics in the stochastic neoclassical growth model. As stated in section 3, one needs to do five things: 1. Find the constraints and the first-order conditions: done! 2. Find the steady state: done! 3. Log-linearize the constraints and the first-order conditions. 4. Solve for the recursive equilibrium law of motion via the method of undetermined coefficients. 5. Analyze the solution via impulse-response analysis and second-order-properties. 4.5.1 Log-Linearization To apply what was stated already in section 3, let e.g. ct denote the logarithmic deviation of Ct from its steady state value C. Formally: ct = log(Ct)-log(C). Interpretation: If ct = 0.03, then Ct is approximately 3 percent above its steady state value. Write Ct = Cect w (7(1 + ct) If there is a magic trick, then this is it! More examples: ZtKPt_x = ZKpeZt+pkt-1 w ZKP(1 + zt + pkt-s) (4.7) Ct + Kt = Cect + Kekt & C + K + Cct + Kkt If there are products, then it is easier to first multiply them out and to combine products of exponential terms before one log-linearizes. E.g., equation (4.7 is easier than ZtKPt_x = ZKpeZtepkt-^ w Ž/?"(1 + ^)(i + Mí-i) w ŽKp(l + zt + pkt_1), although one gets the same final result, of course. Just in case, one needs to keep in mind, that products of "small letters" are approximately zero, e.g. ztkt-i ss 0. Doing this for the constraints and the first-order conditions of the model yields the following. 14 1. For the first equation, the feasibility constraint, one obtains: Ct = ZtK^ + il-S^t^-Kt Cect = ZKpeZt+ph-1 + (1 - S)Kekt-1 - Keh C + Cct w ZKP + (1 - 6)K - K +ZKp(zt + pkt^) + (1 - 6)Kkt_1 - Kkt Use the steady state relationships Ý = ZKP C = Ý-SK to get Čet w ŽKp(zt + pkt_1) + (l-S)Kkt_1-Kkt or, simplified, because we want to solve for the dynamics by hand, et ~ -pZt + -^iikt-x - -^kt One can still see the economic interpretation of this equation. If productivity zt or productive capital kt-\ is above its steady state level, total production is higher, and thus, higher consumption can be afforded. On the other hand, higher investment in the form of higher kt decrease consumption ceteris paribus. To convert percentage changes of any of these variables into percentage changes of consumption, one needs to multiply with the corresponding steady state ratios of the levels. 2. For the second equation, the calculation of the return, one gets Rt = pZtKp:l + l-S Rert = pZK^ď^"-1^-1 +1-S Ř + Řrt w pZKp-x + 1 - 6 +pZKp-1{zt + {p-l)kt_1) Use the steady state relationship - = R = pZKp + 1-S ß to get Rrt w pZKp-\zt + {p-\)kt_x) 15 or, simplified, because we want to solve for the dynamics by hand, rt « (l-ß(l-6))(zt-(l-p)kt_1) Economically, this equation states a relationship between the interest rate on the left hand side and the marginal product of capital on the right-hand side, which is increasing in zt and decreasing in kt-\. This is exactly what one should expect. 3. For the third equation, the the Lucas asset pricing equation, one gets Et Et R í+i , Cí+i / Re^1 Et \ßR + ßR(ri(ct-ct+i) + rt+1] Use the steady state relationship ßR to get 0 Et [f](ct - ct+i) + rt+i] One can see that percentage deviations of the marginal rate of substitution from its steady state level, given by rj(ct — Q+i), need to equal the negative of the interest rate rt+\ in expectation. In particular, high expected interest rates coincide with low marginal rates of substitution, i.e. with an expected rise in consumption. This makes sense: if a rise in consumption is expected, only a high interest rate can prevent agents from borrowing against that future rise. 4. For the fourth equation: logZt \og{ZeZt) holding exactly. Collect the equations obtained: 1. (1 - tfj) log Z + %\) log Zt-x + et, (l-V')logŽ + V'log(Že^-1) + eí, ipzt-t + et, 16 2. n = (1-/3(1-£))(**-(l-z^f-i) 3. 4. Et [f](ct - ct+1) + rt+1] zt = ýzt-i + Q Here too, it is possible to reduce the first three of these equations to just two or just one by eliminating some of the variables. In particular, we will discuss the popular reduction to a system in ct and kt-\ in subsection 4.6, and the reduction to a second-order difference equation in just kt in subsection 4.7. However, there is no particular reason to make such a reduction here: we therefore keep on carrying all the equations with us. The final result is, of course, the same. 4.5.2 Solve for the dynamics with the method of undetermined coefficients. What is given at time t are the state variables kt-\ and zt. What we need to find are kt}rt and ct. We postulate a linear recursive law of motion, kt = Vkkkt-i + vkzzt rt = Kkh-i + vrzzt C-t = ľckkt-l + vczzt The task is to solve for the as of yet "undetermined" coefficients Vkki ^kz^ ^rk^ ^rz^ ^ck^ ^cz This can be done directly, employing the formulas of section 6, but it is instructive to go through this example "by hand" to get a feel for the details. These coefficients can be interpreted as elasticities: if e.g. vck = 0.5 and Kt-\ is 10 percent above its steady state level, then Ct should be set 5 percent above its steady state level. To solve for the coefficients z//^, z//^, vrk, vrZ} vck} vczi substitute the postulated linear recursive law of motion into the equations we have obtained until only kt-\ and Zt remain and compare coefficients, noting that Et[zt+1] = ipzt Thus, 17 1. for the first equation ("feasibility"): ( cK\ K 7 K1 Ý íl \ Kl K Vckkt-i + vczzt = -^zt + [-ß-Vkk] -j^kt-i - ~^vkzzt Since this needs to be satisfied for any value of kt-\ and zt, we must have Vck - Vß-Vkk)c 1 \ K Y K C ~ ~GVkz 2. For the second equation ("calculation of the return "), rt = (l-ß(l-6))(zt-(l-p)kt_1) Vrkh-i + vrzzt = (1 - ß(l - S))(zt - (1 - p)kt_i) Comparing coefficients, we get Vrk = -(1 - ß(l - S))(l - p) Vrz = l-ß{l-6) 3. For the third equation ("asset pricing"), 0 = Et [f](ct - ct+1) + rt+1] 0 = Et[r]((vckkt-i + vczzt) - {vckkt + vczzt+1)) + Vrkkt + VrzZt+l] = {vrk - r\vck)kt + r\vckkt_x + {{vrz - f]vcz)tjj + f]vcz)zt = {{vrk - r\vck)vkk + r\vck)kt-X + {{vrk - r\vck)vkz + {vrz - f]vcz)tjj + r\vcz)zt Note, that we needed to plug things in twice here! This is typical for the log linearized Lucas asset pricing equation. Comparing coefficients, we get 0 = {vrk - r\vck)vkk + r\vck 0 = {vrk - r\vck)vkz + {vrz - f]vcz)tjj + r\vcz 18 Collecting, we get the equations from comparing the coefficients on k í-i? Vek — \r - Vkk \ -^ Vrk = -d- - ß(l - 6))(l - p) 0 = (ľrk - - r\vck)vkk + r\vch (4.8) (4.9) (4.10) (4.11) and the equations from comparing the coefficients on zt, Ý K Vez c~~cVkz (4.12) vrz = l-ß(l-6) (4.13) 0 = {Vrk - T}Vck)Vkz + {Vrz " - Wcz)^ + Wcz (4.14) One now needs to solve for Vkk- This is indeed the "crucial" coefficient, since it relates the new value kt of the endogenous state variable to its old value kt-i, i.e. captures the essence of the dynamics of the system. Once Vkk is known, all other coefficients can easily be computed, as we shall see. To solve for z//^, substitute out vck and vrk in equation (4.10) with (4.9) and (4.8): 0 = (-(1 - ß(l -8))(1 -p)-ril--iskk] -g)vkk + V \~ß~Vkk)~c Simplify: divide by rjKjC, sort powers of Vkk to get 2 1 0 = vkk - IVkk + ~ň where 7 = ^-^l-8))^-P)^K + l + -ß (4-15) (I - ß(l - 6))(l - p)(l - ß + ßS(l - pj) | i | 1 ripß ß The solution to this quadratic equation is given by 7 (1\2 1 Vhk-2~Í\2) ~~ß Note that 7 > 0. The product of the two roots is 1/ß. We are looking for a root which is stable, i.e. is smaller than one in absolute value. The stable root must therefore be the smaller of the two roots. In order to solve for the other coefficients, proceed as follows. 19 1. The other coefficients vrk and vck on kt-\ can be found from rewriting euuations (4.8) and (4.9) as Vrk = -(1 - ß(l - S))(l - p) 2. For the coefficients on zt} directly calculate Vrz = l-ß{l-6) Now, equations (4.14) and (4.12) are a system of two linear equations in the two unknowns vcz and vkz} which can be solved easily. The solution is perhaps a bit ugly, but can be stated without much problem: Vrz^ + 77(1 - ^)^ Vkz — ------------------------------------------- -vrk + rjVck + 7/(1 - tp)^ Y K c ~ ~cVkz 4.5.3 Some results After all this hard work, here are some results. "Calibrated" parameters are ("quarterly data"): ß = 1/1.01 w 0.99, p = 0.36, r/ = 1.0, 8 = 0.025, Ž = 1. We get vhh = 0.965, vkz = 0.075 vck = 0.618, vcz = 0.305 urk = -0.022, vrz = 0.035 Using the formulas obtained above, one can do some sensitivity analysis, see tables 1 and 2. What one can do now is to 1. trace out, what happens if the initial capital is, say, approximately 20 percent below steady state, /c_i = —0.2, and there are otherwise no shocks (zt = 0). Then, kt = v]^. /c_i. With | vkk |< 1, we get convergence back to the steady state. 2. trace out what happens to all the other variables along the way. This can be done in two different ways. Either, one uses the log-linearized system and calculates ct = vckkt-\, for example. This is always done in the programs described in the appendix A. Or, one calculates the level Kt = K exp(kt) from the obtained path for kt and likewise the level of Zt} and computes the level for the original variables using the original nonlinear equations. For example, one gets Ct = ZtKpt_x + (1 - č)ÄVi - Kt. 20 Vkk '■ T) = 0.01 n = 0.5 n = 1 T] = 2 n = 1000 8 = 0 0.8804 0.9857 0.9909 0.9944 1.0000 8 = 0.025 0.6759 0.9496 0.9654 0.9766 0.9998 8 = 0.1 0.3238 0.8489 0.8918 0.9235 0.9987 8= 1.0 0.0086 0.2480 0.3600 0.4789 0.9711 Table 1: Some sensitivity analysis in the neoclassical growth model. If depreciation 8 is less or if the intertemporal elasticity of substitution 1/rj is smaller, the speed 1 — rjkk of convergence back to the steady state is slower. Vkz '■ T) = 0.01 n = 0.5 T) = 1 rj = 2 n = 1000 8 = 0 0.1395 0.0256 0.0238 0.0231 0.0231 8 = 0.025 0.4458 0.0847 0.0752 0.0718 0.0808 8 = 0.1 0.9876 0.2412 0.2003 0.1804 0.2496 8= 1.0 1.4722 1.1433 1.0000 0.8611 1.5772 Table 2: Some sensitivity analysis in the neoclassical growth model. If depreciation 8 is less or if the intertemporal elasticity of substitution 1/rj is smaller, the reaction r\kz of the new capital stock, i.e. of investment, is generally smaller too, except for very low levels ofl/rj (compare the last two columns). 21 3. simulate the model: simulate e'ts} pick some initial &_i and z0. Then, calculate recursively zt = 4>zt-i + et kt = Vkkh-i + vkzzt. With that, obtain all other variables. 4. trace out what happens to all the variables after e0 = 1, et = 0 for t > 1, when starting from the steady state. This is called an impulse response analysis. Impulse responses for the neoclassical growth model are shown in figure 1. Impulse responses to shock in technology Years after shock Figure 1: This figure shows the impulse response for the stochastic neoclassical growth model. The parameters are as stated in the text. 4.6 The relationship to a state-space approach. In this section, we will discuss the popular reduction to a system in ct and kt-\ for the log-linearized system or to a system in Ct and Kt-i in the original system: this 22 yields the state-space approach. To start with the log-linearized system, eliminate rt from the first three of the four equations characterizing the dynamics, and set zt = 0 for the purpose of this discussion. We get the two equations c = ék'-'-§k' (4-16) 0 = ri(c, - c,+1) - (1 - ß(l - 6))(1 - p)k, (4.17) Furthermore, for the purposes of this subsection, it is convenient to solve the first equation for kt and use it to eliminate kt in the second10. Slightly rewriting the result, one gets kt-kt-i = Q - 1J kt-i - jct (4.18) ct+i-ct = 1(1 - ß(l - 6))(1 - p) (Z* - ^kt^ (4.19) In the state space approach, one looks at the equations (4.18) and (4.19) as a dynamic system in the two-dimensional vector (kt-i, ct), and analyzes its properties as follows. First, one needs to solve for the steady state from these two equations: as we know already, it is given by ct = 0 and kt = 0. Seen differently, set kt = kt-i = k and ct = c in (4.18) to get the first steady state equation, (4.20) Proceed likewise with ct-\ = ct = c in (4.19) to get the second steady state equation These two steady state equations describe two curves in the two-dimensional (kt-i, emplane, cutting that plane into four quadrants: see figure 2. Any point (kt-i,ct) in that plane can in principle occur from the perspective of the state space approach. Next, one thus seeks to predict the changes kt — kt-i and ct+i — ct when starting from any such point. The signs of these changes depend on the quadrant in which the point lies. For example, in the upper left quadrant, we are "above" the curve describing the first equation (4.20). Thus, for a point (kt-i,ct) above that curve, we get kt — kt-i < 0 from equation (4.18). This is indicated by an 10This manipulation is necessary because we are in a discrete-time framework, while in a continuous-time framework, one essentially has kt ?a kt-dt- For the same reason, the state space diagram for the discrete-time framework looks slightly different from those familiar from the continuous-time analysis. 23 Neoclassical growth model: State Space Diagram (Log-Deviations) k(t— 1) in Percent Figure 2: This figure shows the state space diagram for the log-linearized neoclassical growth model. The two steady state equations cut the plane into four quadrants, which differ qualitatively in their dynamics as indicated by the arrows at right angles. The stable arm is the function ct = vckkt-\, which was derived with the method of undetermined coefficients. arrow pointing to the left. Furthermore, in the upper left quadrant, we are "to the left" of the curve describing the second equation (4.21). Thus, for a point (kt-i, ct) to the left of that curve, we get ct+i — ct > 0 from equation (4.19). Thus, consumption is increasing there, indicated by the arrows pointing upwards. In this manner, one can analyze the dynamic behaviour at every point in the plane. Looking at these arrows, one can see that the system is saddle-point stable: it diverges away from the origin in the upper left quadrant and the lower right quadrant, and may have a chance to converge towards it in the lower left quadrant and the upper right quadrant. Finally, one can trace out trajectories of the dynamic system, starting it at any point (kt-i, ct) and letting it evolve according to the equations (4.18) and (4.19). It turns out that these trajectories will converge to the steady state k = 0, c = 0, if and only if the 24 trajectories were started from a point on the stable arm. Further analysis reveals, that the stable arm is given by ct = n^ft-x- In other words, the method of undetermined coefficients delivers the calculation of the stable arm for saddle-point stable systems. Rather than looking at the system in log-deviation form, one can also look at the original, nonlinear system and reduce it to a system in Ct and Kt-i, setting Zt = Z for the sake of this argument: Ct = 2KU + {l-S)Kt-i-Kt 1 = ß (7^-V (PŽK?-1 + (1 - S) As above, solve the first equation for Kt and use the result to replace Kt in the second equation11, yielding with slight rewriting 'ß (pŽ (ZKP_X + (1 - č)ÄVi - C\y ' + (1-6) C^ - (o(nřlřV9 ....." -^.....^ ct Again, one obtains two steady state relationships for Kt-\ = Kt = K and Ct+\ Ct = C: C = ZKP-SK pZ i/(i-p) C = ZKP + (1 - 8)K ,(!//?)-1 + ^ These two relationships can be plotted into the (Kt-i} Cf)-plane, dissecting that plane into four quadrants, see figure 3. The analysis proceeds exactly as above. As stable arm, we have used the relationship Ct = C exp(vck log(Kt-i/K))} which according to our log-linear analysis is approximately correct. The state-space approach is certainly useful for gaining insights into small systems such as the neoclassical growth model we have studied here. However, for larger models, it becomes impractical very quickly. 4.7 The relationship to second-order difference equations. In this subsection, we will discuss the popular reduction to a second-order difference equation. Further discussion can also be found in subsection 6.4. As in the previous subsection, we ignore the stochastic term zt for the purpose of the discussion here by setting it identical to zero. The four log-linearized equations characterizing the dynamics can be reduced to a single second-order equation in kt. One way of seeing 1 Again, this manipulation is not necessary in a continuous-time framework. 25 Neoclassical growth model: State Space Diagram (Levels) First steady state equation Second steady state equation 80 Figure 3: This figure shows the state space diagram for the neoclassical growth model in its original, nonlinear form. The two steady state equations cut the plane into four quadrants, which differ qualitatively in their dynamics as indicated by the arrows at right angles. this is to use equation (4.16) from the previous subsection to eliminate ct and ct+i in equation (4.17). The result is the second-order difference equation 0 = kt+1 - -fkt + -&i_i P (4.22) with 7 given in equation (4.15). To solve this second-order difference equations generally, define the characteristic polynomial 0 = ^/2-7^/ + -see e.g. Sargent, 1987. The two solutions to this equation are given by z/1'2 = l±v(l 1 1 26 We then have the following well-known proposition. Proposition 1 If V\ ^ v2, then the general solution to (4-22) is the two-dimensional space, given by kt = av\ + bv\ (4.23) for arbitrary constants a and b. Proof: Suppose, kt is given by (4.23). Substituting it into (4.22) yields kt+1 - -fkt + -,kt-i P = av{-x \v\ -71/! + - J = 0 as desired. Conversely, let any solution to (4.22) be given. Note, that it is enough to just know k0 and k\, say, since all other kt can then be calculated recursively from (4.22). Find a and b such that k0 = a + b ki = av\ + bv2 There is a unique solution, since v\ ^ v2. Then, the given solution to (4.22) must coincide with (4.23) for these values of a and b. • Since the general solution to equation (4.23) is a two-dimensional space, one needs two constraints to pin down a unique solution. One constraint is the initial value for capital &_i (or k0} if one starts time in the neoclassical growth model at t = 1). The second constraint is the stability condition, that 0 = lim kt t^oo This constraint helps, if exactly one of the roots, v\, say, is stable: in that case, we must have b = 0 in (4.23). Furthermore, we now have the recursive equilibrium law of motion kt = vih-i- (4.24) In other words, for second-order difference equations with exactly one stable root, the method of undetermined coefficients finds the stable solution with v\ = Vkk- 27 Note, that the stability condition does not help, if both roots are stable. In that case, one still has a one-dimensional space of general solutions. Such systems can give rise to sunspot dynamics, see Farmer and Guo (1994) for further discussion. One then has to be careful with the interpretation of the results of the method of undetermined coefficients, since that method, given one endogenous state variable, imposes the restriction on the solution of the system to be of form (4.24), which is no longer valid. A remedy is to enlarge the state space to include kt-\ and kt-2- the method of undetermined coefficients then correctly searches for a recursive equilibrium law of motion of the type kt = Vkkikt-i + Vkk2kt-2 with Vkk\ = 7 and Vkk2 = —1//3 as a stable and simple-to-find solution. More generally, enlarging the state space leads to more complicated matrix algebra, which is dealt with in section 6. The point here is to keep in mind, that one should be very careful, if one finds "too many" (or, likewise, "too few") stable roots, when applying the method of undetermined coefficients. 4.8 A quick review. It may be useful at this point to step back and to provide a quick review: 1. We have found the necessary conditions. 2. We log-linearized these conditions and the constraints. E.g. we got 0 = Et [i](ct - ct+1) + rt+1] 3. We postulated a linear law of motion, e.g. kt = Vkkkt-i + VkzZt and solved for the "undetermined coefficients" z//^, Vkz etc.. 4. It all boiled down to solving a quadratic equation for the coefficient z//^, given by 2 1 0 = vkk - lvhk + ~ň where 7 is given in equation (4.15). 5. The resulting equations could then be used to analyze the model by e.g. calculating the coefficient Vkk for particular parameter choices, doing sensitivity analysis with respect to these choices, analyzing the speed of convergence back to the steady state, simulating the model or looking at impulse response functions. 28 6. We have compared the method of undetermined coefficients to a state space approach as well as to solving second order difference equations. In looking back, we can also see that finding the necessary conditions, finding the steady state, as well as log-linearizing these conditions and the constraints was comparatively easy. Painful, however, was to have to solve for Vkk and the other coefficients. For larger models or, worse, for models with multiple endogenous state variables, solving for everything by hand looks quite unattractive. However, this pain can be avoided by applying directly the theorems in section 6. The easiest way to apply these theorems is to obtain MATLAB routines applying them. They are described in appendix A and are available together with some documentation and examples at the following web site: http://cwis.kub.nl/~few5/center/STAFF/uhlig/toolkit.dir/toolkit.htm. 5 An example: Hansens real business cycle model. The next example is Hansens (1985) real business cycle model. It is explained there in detail. Here, the mathematical description shall suffice. The main point of this example is to explain how to perform the first three steps of the general procedure as stated in section 3. In many ways, the model here is just an extension of the stochastic neoclassical growth model of section 4 above: the main difference is to endogenize the labor supply. In fact, it is possible to also solve through that model by hand just as was done above for the stochastic neoclassical growth model. However, here, we want to go through the analysis of this model rather quickly to show how to get to the log-linearized version of the model ready for the analysis with the theorems of section 6 and the MATLAB programs mentioned there. The social planner solves the problem of the representative agent oo / /il-t) _ 1 \ maxi^M \_ -ANA t=i s.t. Ct + h = Yt (5.i; Kt = /t + a-^AVi logZt = (I - 4>)logZ + V'logZt-i + et, et ~ i.i.d.Ai(0;cr2), where Ct is consumption, Nt is labor,It is investment, Yt is production, Kt is capital Zt 29 is the total factor productivity and A, ß,rj,8, p} Z,ip and a2 are parameters. Hansen only considered the case rj = 1, so that the objective function is oo E J2 ř(log Ct-ANt) t=o As in Campbell (1994), there is no difficulty in considering arbitrary 77, since no growth trend is assumed. The first order conditions are A = 1 i+i (5.2) Rt = PT7^ + l-S. (5.3) Equation (5.2) is the Lucas asset pricing equations, see Lucas (1978), which typically arises in these models. In contrast to some of the real business cycle literature and to avoid confusion in the application of the method in section 6, it is very useful to stick to the following dating convention. A new date starts with the arrival of new information. If a variable is chosen and/or (eventually) known at date t, it will be indexed with t. Use only variables dated t and t — 1 in deterministic equations and variables dated t + 1, t and t — 1 in equations involving expectations Et[-]. The steady state for the real business cycle model above is obtained by dropping the time subscripts and stochastic shocks in the equations above, characterizing the equilibrium. Formally, this amounts to finding steady state values such that /(0,0) = 1 and g(0,0) = 1 in the notation of the previous section12. For example, equations (5.2) and (5.3) result in 1 = ßR Ý R = p-^ + 1-8, A where bars over variables denote steady state values. One needs to decide what one wants to solve for. If one fixes ß and 8, these two equations will imply values for R and YIK. Conversely, one can fix R and Y / K and then these two equations yield values for ß and 8. The latter procedure maps observable characteristics of the economy into "deep parameters," and is the essence of calibration, see Kydland and Prescott (1991). 12 Alternatively, find the steady state so that (3.3) is satisfied. This is, however, rarely done. 30 Introduce small letters to denote log-deviations, i.e. write Ct = Cect for example. The resource constraint (5.1) then reads Cect + IeH = Yeyt This can be written approximately as 0(1 + ct) + 7(1 + it) = F(l + yt) Since C + I = Y due to the definition of the steady state, the constant terms drop out13 and one obtains Oct + lit = Yyt (5.4) The resource constraint is now stated in terms of percentage deviations: the steady state levels in this equation rescale the percentage deviations to make them comparable. Note that no explicit differentiation is required to obtain the log-linearized version of the resource constraint: log-linearization is obtained just by using the building blocks described in the previous section. Similarly log-linearizating the other equations yields Kkt -- = Iit + (l-8)Kkt-1 yt = = zt + pkt-x + (1 - p)nt Zt = = ipzt-t + et 0 = = -r\ct + yt -nt 0 = = Et[f](ct - ct+i) + rt+i] Rrt -- = p-^(yt-kt-i). To find the state variables, one needs to find all (linear combinations of) variables dated t — 1 in these equations: the endogenous state variable is capital, kt-\ whereas the exogenous state variable is the technology parameter zt-\. Note that there are as many expectational equations as there are endogenous state variables. The coefficients of the equations above need to be collected in the appropriate matrices to restate these equations in the form required for section 6: this is a straightforward exercise. 13Another way to see that constants can in the end be dropped is to note that the steady state is characterized by ct = kt = yt = &t-i = 0. If one replaces all log-deviations with zero, only the constant terms remain, and that equation can be subtracted from the equation for general ct,kt, yt and kt-i above. 31 6 Solving recursive stochastic linear systems with the method of undetermined coefficients This section describes how to find the solution to the recursive equilibrium law of motion in general, using the method of undetermined coefficients. MATLAB programs performing the calculations in this section are available at my home page14. The idea is to write all variables as linear functions (the "recursive equilibrium law of motion") of a vector of endogenous variables xt~\ and exogenous variables zt, which are given at date t, i.e. which cannot be changed at date t. These variables are often called state variables or predetermined variables. In the real business cycle example of section 5, these are at least kt-\ and zt, since they are clearly unchangeable as of date t and, furthermore, show up in the linearized equations system. In principle, any endogenous variable dated t — 1 or earlier could be considered a state variable. Thus, in subsection 6.1 below, we use "brute force" and simply declare all endogenous variables to be state variables, whereas in subsection 6.2, we try to be a bit more sensitive and exploit more of the available structure. The latter is typically done in practice, see e.g. Campbell (1994). Both subsections will characterize the solution with a matrix quadratic equation, see also Ceria and Rios-Rull (1992) and Binder and Pesaran (1996). Subsection 6.3 shows, how to solve that equation. For models with just one endogenous state variable, such as the real business cycle model of section 5 when analyzed with the more structured approach in subsection 6.2 below, the matrix quadratic equation is simply a quadratic equation in a real number. In that case, the solution to the quadratic equation is obviously known from high-school algebra: it is contained as a special case of the general solution in section 6.3. In subsection 6.4 we discuss our solution method, and compare it in particular to the Blanchard-Kahn (1980) approach. 6.1 With brute force... As a first cut, and with somewhat brute force, one may simply use all variables without distinction as a vector of endogenous state variables15 xt~\ of size m X 1 or as a vector of exogenous stochastic processes zt of size k X 1. It is assumed that the log-linearized equilibrium relationships can be written in the following form 0 = EtlFxt^ + Gxt + Hxt^ + Lzt^ + Mzt] (6.1) 14http://cwis.kub.nl/~few5/center/STAFF/uhlig/toolkit.dir/toolkit.htm is the address of the web site for the programs. 15To make this work really generally, one should actually not only include all the variables dated t — í but also all the variables dated t — 2 as part of the state vector xt-\. More is even required, if the equations already contain further lags of endogenous variables, see also the next footnote. Usually, however, this isn't necessary. 32 zt+1 = Nzt + et+1; Et[et+1] = O, (6.2) where F, G, H} L and M and matrices, collecting the coefficients. It is assumed that N has only stable eigenvalues. The real business cycle example above can be easily written in this form. For example, the resource constraint (5.4) would be 0 = Et[Cct + íit-Ýyt] since ct}it and yt are already known at date t and hence nothing changes when one takes their expectations given all information up to date t. Note that F = L = 0 for this equation. Of course, there are other equations in the real business cycle model, and one of them involves nonzero entries for F and L. What one is looking for is the recursive equilibrium law of motion xt = Pxt-t + Qzt (6.3) i.e. matrices P and Q , so that the equilibrium described by these rules is stable. The solution is characterized in the following theorem, see also Binder and Pesaran (1996). The characterization involves a matrix quadratic equation, see equation (6.4). Subsection 6.3 discusses, how it can be solved. For the purpose of that section, let m be the length of the vector xt} and let / = n = 0. Theorem 1 If there is a recursive equilibrium law of motion solving equations (6.1), and (6.2), then the following must be true. 1. P satisfies the (matrix) quadratic equation 0 = FP2 + GP + H (6.4) The equilibrium described by the recursive equilibrium law of motion (6.3) and (6.2) is stable iff all eigenvalues of P are smaller than unity in absolute value. 2. Given P, let V denote the matrix V = N'®F + Ik®(FP + G), Then, VQ = -vec(LN + M) (6.5) where vec(-) denotes columnwise vectorization. Obviously, if the matrix V in this theorem is invertible, then multiplication of equation (6.5) with V~x yields the unique solution for Q. Proof: Plugging the recursive 33 equilibrium law of motion (6.3) into equation (6.1) twice and using (6.2) to calculate the expectations yields 0 = {{FP + G)P + H)xt_1 + (6.6) {{FQ + L)N + (FP + G)Q + M)zt The coefficient matrices on xt~\ and zt need to he zero. Equating the coefficient on xt-i to zero yields equation (6.4) for P. Taking the columnwise vectorization of the coefficient matrices of zt in this equation and collecting terms in vec(Q) yields the equation (6.5) for Q. • 6.2 ... or with sensitivity. We now exploit more of the structure in the linearized model. Analyzing the equations of the real business cycle example of section 5, one sees that the only endogenous variable dated t — 1 which shows up in any of the equations is capital, kt-\. It is thus a reasonably guess to treat kt-\ as the only endogenous state variable together with the exogenous state variable zt. This principle is general: in the vast majority of cases, this is how one can identify the vector of state variables16. In practice, one often sees researchers exploiting some of the equilibrium equations to "get rid" of some variables, and have only a few variables remaining. For the real business cycle example of section 5, it is actually possible to reduce everything to a single equation for the endogenous variables, containing only kt+i} kt and kt-\. Often, one sees reductions to a system involving two equations in two endogenous variables such as ct and kt-i, see e.g. Campbell (1994), presumably because this allows thinking in terms of a state space diagram, see e.g. Blanchard and Fisher (1989), chapter 2. The analysis below follows this often-used procedure. However, there is no reason to go through the hassle of "eliminating" variables by hand, using some of the equations: since this is all just simple linear algebra applied to a system of equations, it is far 16There are exceptions. In richer models, the state variables need to include variables chosen at a date earlier than t — 1 as well because these lagged variables appear in the equations. One can recast this into the desired format as follows. The list of state variables might consist out of lagged values of the capital stock, kt-\ and kt-2- This can and should be rewritten as k\yt-i and k2tt-i with kit-i replacing kt-\ and where the additional equation k'ift = fci,t-i needs to be added to the system. With that notation, k'ift is "chosen" at date t, satisfying the "dating convention" stated in section 5. One may also need to add additional variables like e.g. ct-\ or kt-2 as state variables, even though they don't show up in the equations with these dates, when the model exhibits sun spot dynamics. This can be done in the same manner, but one needs to be careful with interpreting the results. The reader is advised to read Farmer and Guo (1994) for an example as well for the appropriate interpretation for such a case. 34 easier to leave all the equations in, and leave it to the formulas to sort it all out. That is what is done below. We thus make the following assumptions17. There is an endogenous state vector xt} size m x 1, a list of other endogenous variables ("jump variables") yt} size n X 1, and a list of exogenous stochastic processes zt} size k X 1. The equilibrium relationships between these variables are 0 = Axt + Bxt^ + Cyt + Dzt (6.7) 0 = Et[Fxt+1 + Gxt + Hxt_1 + Jyt+1 + Kyt + Lzt+1 + Mzt] (6.8) zt+1 = Nzt + eť+1; Et[et+1] = 0, (6.9) where it is assumed that C is of size / X n, / > n and18 of rank n, that F is of size (ra + n — I) X n, and that N has only stable eigenvalues. Note, that one could have written all equations (6.7) in the form of equation (6.8) with the corresponding entries in the matrices F, J and L set to zero. Essentially, that is what is done in subsection 6.1. Instead, the point here is to somehow exploit the structure inherent in equations of the form (6.7), which do not involve taking expectations. What one is looking for is the recursive equilibrium law of motion xt = Pxt^ + Qzt (6.10) yt = Rxt-x + Szt, (6-11) i.e. matrices P, Q, R and S, so that the equilibrium described by these rules is stable. The solution is characterized in the next theorem. To calculate the solution, one needs to solve a matrix quadratic equation: how this is done, is explained in subsection 6.3. The important special case / = n is treated in corrolary 1. The special case / = n = 0 was the topic of subsection 6.1 . Theorem 2 If there is a recursive equilibrium law of motion solving equations (6.7), (6.8) and (6.9), then the coefficient matrices can be found as follows. Let C+ be the pseudo-inverse19 of C. Let C° be an (/ — n) X I matrix, whose rows form a basis of the null space20 of C. 17Note that the notation differs from the notation in section 3 18The case / < n can be treated as well: the easiest approach is to simply "redeclare" some other endogenous variables to be state variables instead, i.e. to raise m and thus lower n, until / = n. 19The pseudo-inverse of the matrix C is the n x / matrix C+ satisfying C+CC+ = C+ and CC+C = C. Since it is assumed that rank(C*) > n, one gets C+ = (C'C)-^', see Strang (1980), p. 138. The MATLAB command to compute the pseudo-inverse is pinv(C). 20C° can be found via the singular value decomposition of C, see Strang (1980), p. 142. The MATLAB command for computing C° is (null(C'))'. 35 1. P satisfies the (matrix) quadratic equations 0 = C°AP + C°B (6.12) 0 (F-JC+A)P2 -(JC+B-G + KC+A)P-KC+B + H (6.13) The equilibrium described by the recursive equilibrium law of motion (6.10), (6.11) and by (6.9) is stable iff all eigenvalues of P are smaller than unity in absolute value. 2. R is given by R= -C+(AP + B) 3. Given P and R, let V be the matrix V h®A, h®C N'®F + Ik®(FP + JR + G), N'®J + Ik®K where Ik is the identity matrix of size k x k. Then V where vec(-) denotes columnwise vectorization. vec(Q) vec(S) vec(D) vec(LN + M) (6.14) Obviously, if the matrix V in this theorem is invertible, then multiplication of equation (6.14) with V~x yields the unique solution for Q. Proof: Plug the recursive equilibrium law of motion into equation (6.7). This yields (AP + CR + B)xt_1 + (AQ + CS + D)zt = 0, (6.15) which has to hold for arbitrary xt~\ and zt. Thus, the coefficient matrices on xt~\ and zt in (6.15) are zero. Plugging the recursive equilibrium law of motion into equation (6.8) twice and using (6.9) yields 0 = ((FP + JR + G)P + KR + H)xt_1 + {{FQ + JS + L)N + (FP + JR + G)Q + K S + M)zt (6.16) Again, the coefficient matrices on xt~\ and zt need to be zero. Taking the columnwise vectorization of the coefficient matrices of zt in equations (6.15) and (6.16) and collecting terms in vec(Q) and vec(S) yields the formula for Q and S. To fínd P and thus R, rewrite the coefficient matrix on xt~\ in equation (6.15) as R = -C+(AP + B) 0 = C°AP + C°B, (6.17) 36 noting that the matrix [(C+)', (C0)'] is nonsingular and that C°C = 0, see Strang (1980), p. 88. Use (6.17) to replace R in the coefficient matrix on xt~\ in (6.16), yielding (6.13). Note finally that the stability of the equilibrium is determined by the stability of P, since N has stable roots by assumption. • Corollary 1 Suppose that I = n, i.e. that there are as many expectational equations as there are endogenous state variables. If there is a recursive equilibrium law of motion solving equations (6.7), (6.8) and (6.9), then their coefficient matrices can be found as follows. 1. P satisfies the (matrix) quadratic equation (F - JC~1A)P2 - (JC^B - G + KC~1A)P - KC~XB + H = 0. (6.18) The equilibrium described by the recursive equilibrium law of motion (6.10), (6.11) and by (6.9) is stable iff all eigenvalues of P are smaller than unity in absolute value. 2. R is given by R= -C-^AP + B) 3. Q satisfies (N' (F - JC~XA) + Ik®(JR + FP + G- KC^A^veciQ) = vecdJC^D - L)N + KC~XD - M), (6.19) where Ik is the identity matrix of size k x k, provided the matrix which needs to be inverted in this formula is indeed invertible. Jf. S is given by S = -C-\AQ + D) Proof: This corollary can be obtained directly by inspecting the formulas of theorem 2 above for the special case I = n. In particular, C+ is just the inverse of C. Alternatively, a direct proof can be obtained directly by following the same proof strategy as above: there is no need to repeat it. • The formulas in these theorems become simpler yet, if m = 1 or k = 1. If m = 1, there is just one endogenous state variable and the matrix quadratic equation 37 above becomes a quadratic equation in the real number P, which can be solved using high-school algebra: this is the case for the real business cycle model and thus the case which Campbell (1994) analyzes. If k = 1, there is just one exogenous state variables, in which case the Kronecker product (i.e. "®") in the formulas above becomes multiplication, and in which case vec(Q) = Q and vec(S') = S, since Q and S are already vectors rather than matrices. 6.3 Solving the matrix quadratic equation. To generally solve the matrix quadratic equations (6.4) or (6.12), (6.13) for P, write them generally as mP2 - TP - 0 = 0. (6.20) For equations (6.12) and (6.13), define r 0 U/ — n,m F - JC+A C°A JC+B -G + KC+A C°B KC+B - H, where 0;_„jm is a (/ — n) x m matrix with only zero entries. In the special case I = n, the formulas for ^ř, T and 0 become slightly simpler: $ = F-.JC~XA T = JC~XB - G + KC~XA 0 = KC~XB-E For equation (6.4), simply use $ = P, T = —G and 0 = —H. Equation (6.20) can now be solved by turning it into a generalized eigenvalue and eigenvector problem21, for which most mathematical packages have preprogrammed routines22. Recall, that a generalized eigenvalue A and eigenvector s of a matrix S with respect to a matrix A are defined to be a vector and a value satisfying XAs = Es (6.21) 21An earlier version of the chapter proposed to study an altered version of these equations by postmultiplying equation (6.12) with P. This altered equation together with (6.13) can then often be reduced to a standard rather than a generalized eigenvalue problem, but had the drawback of introducing spurious zero roots. The version presented here does not involve this alteration, and thus does not introduce spurious zero roots. This update is due to Andy Atkeson (1997), and I am very grateful to him for pointing it out to me. Any errors here are mine, of course. 22The Matlab command for finding the generalized eigenvalues and eigenvectors is eig(S,A). 38 A standard eigenvalue problem is obtained, if A is the identity matrix. More generally, the generalized eigenvector problem can be reduced to a standard one, if A is invertible, by calculating standard eigenvalues and eigenvectors for A-1 S instead. Theorem 3 To solve the quadratic matrix equation mp2 - TP - 0 = o, (6.22) for the m xm matrix P, given m xm matrices T and 0; define the 2m X 2m matrices S and A via ' r e -'m Ur Lm ^m^m and A 0 ra.ra ^m L where Im is the identity matrix of size m, and where 0m,m is the m x m matrix with only zero entries. 1. If s is a generalized eigenvector and A the corresponding generalized eigenvalue o/S with respect to A, then s can be written as s1 = [Xx'}x'] for some x £ Rm. 2. If there are m generalized eigenvalues A,. . . , Am together with generalized eigenvectors Si,...,sm of S with respect to A, written as s\ = [A8a;',a;'] for some Xi G Rm; and if (xi}. . . , xm) is linearly independent, then p = QAfr1 is a solution to the matrix quadratic equation (6.22), where O = [xí}. . ., xm] and A = diag(X}. . . , Am). The solution P is stable if | A; |< 1 for all i = 1,. . . , m. Conversely, any diagonalizable solution P to (6.22) can be written in this way. 3. If m = 1, then the solutions P to equation (6.22) are given by 1 pli2 = —(r±vn + 4vř0). if vp ^ 0 and if\S = 0 and ľ ^ 0. P 0 T 39 Proof: First, examine the last m rows of equation (6.21) to see that any eigenvector s for some eigenvalue X of the matrix S with respect to A can indeed he written as Xx x for some x £ Rm because of the special form of ^ and A. Examining the fírst m rows of equation (6.21) then shows that It follows that and hence X2^x - Xľx - Qx = 0 *QA2 - roA - 00 = 0 *P2 - TP - 0 = 0 (6.23) as claimed, after multiplying with 0_1 from the right. Reversing the steps shows that any diagonalizahle solution P to (6.22) can he written in this way. • Some additional properties of a solution P to (6.20) are stated in the following theorem23: Theorem 4 1. The eigenvalues X of ^ are the solutions to the equation det (A2* - Ar - 0) =0. The lower half x of the eigenvector s to X satisfies x2m - xv - 0. Proof: The claim about X follows from rr-Atf) 0 ciet L -Xl„ det(-A(r-Atf)-0) 23I am grateful to Jan Magnus for pointing these out to me. Furthermore, Ceria and Rios-Rull, 1992, point to additional literature on this subject, which found and concentrated on part 1 of theorem 4, but did not study the more useful theorem 3. 40 which follows from inspecting the formula for the determinant. The claim about the eigenvector piece x is just (6.23). For the last claim, calculate that o = tr(p2 - *_1rp - ^e) = tr((p - -*-1r)2 -1*-1© + -(*-1r)2)). The conclusion follows since tr((P — |^,_1r)2) > 0. • 6.4 Discussion. Theorem 3 links the approach used here to Blanchard and Kahn (1980), which is the key reference for solving linear difference equations. Consider solving the second order difference equation tyxt+1 - Txt - Qxt_x = 0. (6.24) The approach in Blanchard and Kahn (1980) amounts to finding the stable roots of S by instead analyzing the dynamics of the "stacked" system s't = [a^a^-J , i.e. by reducing (6.24) to a first-order difference equation. The approach here solves for the matrix P in the recursive equilibrium law of motion xt+i = Pxt. Theorem 3 above states that both approaches amount to the same problem. The advantage of the method here is that it is easily applied to the entire system (6.7), (6.8) and (6.9), reducing it to (6.24) eventually, while finding the stable roots in the entire system given by these equations and at the same time taking care of the expectation operators, using the Blanchard-Kahn (1980) procedure, is often perceived as complicated. Fundamentally, there is no difference. To apply theorem 3, one needs to select m out of 2m possible eigenvalues. Note that P has only nonzero eigenvalues if the state space was chosen to be of minimal size: thus attention can be restricted to the roots | A; |> 0 in that case. In general, there may be quite a bit of choice left. In practice, however, there will often be exactly m stable eigenvalues remaining so that the stable solution is unique24. 24Another approach to select a unique solution is in McCallum (1983), who suggests to use those roots that can be obtained continuously from the zero roots of the equation ^>P2 — TP — a0 for a = 0, as a changes from 0 to 1. However, not only is following these roots as functions of a computationally very demanding, it is also the case that uniqueness gets lost once two or more such paths cross each other. If these paths do not cross in a particular application, and if additionally all roots for all a are positive real numbers, say, then the McCallum proposal simply amounts to using the roots of minimal value. The MATLAB programs supplied by the author use the roots of minimal absolute value subject to eliminating spurious zero roots and tries to use complex roots in conjugate pairs, as described below. 41 For a one-dimensional vector of endogenous state variables, this condition is called saddle-point stability. The literature on solving linear rational expectations equilibria typically assumes this condition to hold or shows it to hold in social planning problems under reasonable conditions, see Blanchard and Kahn (1980), Kollintzas (1985) and Hansen, McGrattan and Sargent (1994). If there are fewer stable eigenvalues than endogenous state variables, the equilibrium might be inherently unstable. The method above then still permits calculation of an equilibrium which satisfies the nonlinear equilibrium conditions at least locally. In particular, in models involving more than one agent or sectors or countries, one may find as many unit roots as there are more agents (sectors, countries) than one since shocks may affect the relative wealth (capital) of any two agents (sectors, countries) and thus may result in permanent changes in their consumption paths (or capital stocks): in these cases, the method above allowing for unit roots still gives useful results, which obviously should then be used with some care. These unit roots typically already show up as an indetermined steady state: any of the possible steady states can then serve as a starting point for the dynamic calculation, keeping in mind that a simulation based on the dynamics calculated here will eventually wander away too far to be numerically useful. If there are more stable eigenvalues than endogenous state variables, enlarging the number of endogenous state variables by including further lagged values might help. Nonetheless, the presence of an excess of stable roots then may point to the existence of sunspots or endogenous fluctuations, see e.g. Farmer and Guo (1994). If not all eigenvalues of S are distinct, P in turn might have repeated eigenvalues. Since the eigenspace for a repeated eigenvalue is (usually) multidimensional, there will be infinitely many choices for the eigenvectors and hence infinitely many choices for P in that case. Note, for example, that for any given A and any three real numbers a, b, c satisfying a2 + be = A2, all matrices P a b c —a solve P2 A2 0 0 A2 0. These cases are rare in practice, since S is diagonalizable with distinct eigenvalues generically in the coefficients of the system (6.7), (6.8) and (6.9). More disconcerting is the possibility that some of the roots may be complex rather than real. Consider, for example, vp = 72, T = ~^2 and 0 0.23 -0.64 0.64 0.23 42 Using the theorem above, one obtains exactly two stable roots, which happen to be complex, Aij2 = 0.3 ± 0.4z = 0.5e±OT, where where a ss 0.9273. Their associated eigenvectors are complex, too. Calculating P results in a matrix with only real entries, however, given by cos a sin a — sin a cos a Since S is a real-valued matrix, complex eigenvalues only arise in complex-conjugate pairs. When using both roots of a complex-conjugate pair to calculate A and thus P, the resulting solution should be a real-valued matrix. In order to do this, one may have to enlarge the state space of endogenous state variables to be at least two-dimensional, see again Farmer and Guo (1994) for an example. The complex roots then give rise to endogenous damped cycles of frequency a. 7 Interpreting the results The results obtained, i.e. the recursive equilibrium law of motion xt = Pxt-t + Qzt yt = Rxt-x + Szt zt = Nzt-x + et can be used to examine model implications. Since xt} yt and zt are log-deviations, the entries in P,Q,R,S and N can be understood as elasticities and interpreted accordingly, see e.g. Campbell (1994). Impulse responses to a particular shock ei can be calculated by setting x0 = 0, i/o = 0 and z0 = 0, as well as €f — 0 for t ^ 2, and recursively calculating Zf and then x f and í/t, given xt-i, J/t-i, zt-\ and et for t = 1,. . . , T with the recursive equilibrium law of motion and the law of motion for zt. This was already described for the stochastic neoclassical growth model in subsubsection 4.5.3. For the real business cycle model of section 5, the impulse response functions (excluding the response of investment, since it reacts quite strongly) to a technology shock can be seen in figure 4. To find the second moment properties of the model such as variances and autocorrelations of certain variables as well as the small sample properties of their estimators, simulation methods are often used. Before calculating these moments, the Hodrick-Prescott filter is typically applied (short: HP-Filter). This section demonstrates a P 0.3 0.4 = 0.5 -0.4 0.3 43 Impulse responses to shock in technology Years after shock Figure 4: Impulse responses for Hansens (1985) real business cycle model, using his parameters. frequency-domain technique to obtain these moments (albeit without the small sample properties of their estimators) without the need for any simulations25. Obviously, the methods here do not deliver properties of the small sample distribution, which may be necessary for testing. The matrix-valued spectral density for [x't, z't]' is given by /( LO 1 2^ (In h Pt h - N'e f ÍUJ\ — 1 -ÍUJ\—1/ )'(Ln th-Ne-^)-1^ PI Ílú\—\ J e ) ,h where I k and Im are the identity matrices of dimension k and ra, see Hamilton (1994), formula (10.4.43). Two ways to calculate the matrix-valued spectral density for the 25Some of these methods were originally contained in an early version of Uhlig and Xu (1996), but were eventually cut from that paper. 44 entire vector of variables st = [x't, y't, z^]1 are 9{u) J-m "m,k Re~tuJ S "k.m J-k t f?'piw n S' h 'k.m Wf(üj)W , where W J-rt 0r RP+, S-RP+t "k.m •} h where P+ is the pseudo-inverse of P and where the last equality exploits st = W[x't,z't]', replacing xt~\ with P+xt — P+Qzt in the recursive equilibrium law of motion for yt. The HP filter aims at removing a smooth trend Tt from some given data St by solving mm E (^-rí)2 + A((rí+1-rí)-(rí-rí_1)r í=i The solution is a linear lag polynomial rt = st — Tt = h(L)st which has the transfer function h(uj) 4A(1 - cos(cü))2 1 +4A(1 -cos(cü))2' see King and Rebelo (1993). Thus, the matrix spectral density of the HP-filtered vector is simply gHp(u) = h2{tü)g{tü), from which one can obtain the autocorrelations of rt in time domain via an inverse Fourier transformation, gHP{u)ei»kdw = E[rtr't_k], see formula (10.4.4) in Hamilton (1994). Inverse Fourier transformations are part of many numerical packages. For Hansens (1985) real business cycle model studied in section 5, tables 3 and 4 report the standard deviations as well as the cross-correlations with GNP for the HP-filtered series in the model. These tables are often used in the real business cycle literature as a first cut for evaluating the fit of a model to the data. 45 capital 0.50 consumption 0.52 output 1.80 labor 1.37 interest 0.06 investment 5.74 technology 0.93 Table 3: Model standard deviations of the HP-filtered series for Hansens (1985) business cycle model, studied in section 5. capital 0.68 0.64 0.54 .35 .07 -0.15 0.30 consumption 0.54 0.66 0.77 0.87 0.52 .24 0.02 output 0.27 .47 0.71 .00 0.71 0.47 0.27 labor 0.15 .37 0.64 .98 0.74 0.53 0.35 interest 0.09 0.32 0.60 0.96 0.74 0.54 0.38 investment 0.19 0.40 0.67 .99 0.73 0.51 0.32 technology .26 0.46 0.71 1.00 0.72 0.48 0.28 j -3 -2 -1 0 1 2 3 Table 4: Cross-correlations corr(y{t + j),GNP(t)) for the HP-filtered series Hansens (1985) real business cycle model, studied in section 5. 46 8 Conclusions We have provided a toolkit to analyze nonlinear dynamic stochastic models easily. The main contribution of this chapter is to simplify and unify existing approaches, showing how to log-linearize the necessary equations characterizing the equilibrium without explicit differentiation, to provide a general solution to a linearized system using the method of undetermined coefficients, allowing in particular for a vector of endogenous states, and to provide simulation-free frequency-domain based method to calculate the the model implications in its HP-filtered version. These methods are easy to use if a numerical package such as MATLAB or GAUSS is available. This chapter should therefore be useful for anybody interested in analyzing nonlinear stochastic dynamic models. Appendix A Description of the MATLAB programs. MATLAB programs to carry out the calculations for sections 6 and 7 are available at the following web site: http://cwis.kub.nl/~few5/center/STAFF/uhlig/toolkit.dir/toolkit.htm They shall briefly be described here. The easiest way to learn about these programs is to store all of them, start MATLAB from the directory, where they are stored and type "readme". This will execute the readme.m-file, providing some documentation. As of this writing, the newest version of the files are "version 2". To see how they differ from the previous version, which was distributed until spring 1997, type "whatsnew" within MATLAB, which executes the file whatsnew.m, printing relevant messages as a result. To see quickly, how these files work, start MATLAB and type "examplO" to calculate through example 0, which is the stochastic neoclassical growth model of section 4, or type "exampll" to calculate through example 1, which is Hansens (1985) real business cycle model of section 5. There are more examples, enumerated "examplNN", where NN stands for their number. To see what any particular example, say, exampll.m, does, type "help exampll" within MATLAB. Use the example files as templates for your own work. Alternatively, declare all needed matrices and type in "do_it" to do all calculations. All the examplNN.m-files call "do_it" at the very end. The files which perform all the calculations (i.e. all the files aside from the examplNN.m-files, the readme.m-file and the whatsnew.m-file) are: 47 do_it.m: does it all, once all needed matrices are defined. This file calls all the other programs. Thus, examining this file will tell you, in which sequence all the other calculations are performed. enlarge.m: allows you to manipulate letter sizes on plots and other properties of plots. Useful for producing slides or plots for publication. impresp.m: calculates and shows impulse responses to shocks, see section 7. mom_out.m: produces output. To be called after moments.m moments.m: calculates second moment properties, see section 7. options.m: sets the options for all programs. It is called by do_it and needs to be called, if any of the following routines is used in isolation. soLout.m: produces output. To be called after solve.m sol ve. m: solves for the recursive equilibrium law of motion with the theorems of section 6. All files are extensively documented. Type, say, "help impresp" in MATLAB to get more information on what the program impresp.m does. Note that these files set some additional variables, which you may have used before: thus, be careful not to use names appearing in the programs. If you have a question, please read this chapter and the documentation carefully. These files are provided as a free externality, and I am not prepared to provide "technical support." However, if there are serious flaws or serious ways to improve on these programs, I would like to learn about them. Feel free to copy and modify these files, and use them at your own risk. There is absolutely no guarantee that they work the way they are supposed to. References [1] Atkeson, A. (1997), "A modification of Harald's program," class notes, University of Pennsylvania. [2] Binder, Michael and Hashem M. Pesaran (1994), "Multivariate Rational Expectations Models and Macroeconomic Modeling: A Review and Some New Results,", University of Cambridge Department of Applied Economics Working Paper, 9415, Handbook of Applied Econometrics (forthcoming). [3] Blanchard, Olivier Jean and Charles M. Kahn (1980), "The Solution of Linear Difference Models under Rational Expectations," Econometrica, 48(5), 1305-11. 48 Blanchard, Oliviers and Stanley Fisher, 1989, Lectures on Macroeconomics, MIT Press. Brock, W.A. and L. Mirman (1972), "Optimal economic growth and uncertainty: the discounted case," Journal of Economic Theory Vol. 4, No. 3, pp. 479-513. Campbell, J. (1994), "Inspecting the mechanism: an analytical approach to the stochastic growth model," Journal of Monetary Economics Vol. 33, No. 3, pp. 463-506. Campbell, J. and J. Cochrane (1994), "By force of habit: A consumption-based explanation of aggregate stock market behavior," draft, Harvard University. Ceria, S. and J.V. Rios-Rull (1992), "On the Existence, Uniqueness, and Com-putability of Nonoptimal Recursive Equilibria in Linear Quadratic Economies," draft, Carnegie-Mellon University, Danthine, J.-P. and J.B. Donaldson (1995), "Computing equilibria of nonoptimal economics," in T. Cooley (ed.), Frontiers of Business Cycle Research, Princeton University Press, pp. 65-97. Farmer, Roger E. A. and Jang-Ting Guo (1994), "Real Business Cycles and the Animal Spirits Hypothesis," Journal of Economic Theory 63, 42-72. Hamilton, J.D. (1994), Time Series Analysis, Princeton University Press. Hansen, G.D. (1985), "Indivisible labor and the business cycle," Journal of Monetary Economics Vol. 16, pp. 309-327. Hansen, G.D. and E.C. Prescott (1995), "Recursive methods for computing equilibria of business cycle models," in T.C. Cooley (ed.), Frontiers of Business Cycle Research, Princeton University, pp. 39-64. Hansen, L., E.R. McGrattan and T.J. Sargent (1994), "Mechanics of forming and estimating linear economies," Federal Reserve Bank of Minneapolis Staff Report 182, King, R.G., C.I. Plosser and S.T. Rebelo (1987), "Production, growth and business cycles: technical appendix," working paper, University of Rochester. King, R.G. and S.T. Rebelo (1993), "Low Frequency Filtering and Real Business Cycles," Journal of Economic Dynamics and Control vol. 17, no. 1-2, 207-231, 49 Judd, K.L. (1991), "Minimum weighted residual methods for solving dynamic economic models," Federal Reserve Bank of Minneapolis Discussion Paper No. 99. Kollintzas, Tryphon, "The Symmetric Linear Rational Expectations Model," Econometrica, vol. 53, no. 4, 963-976. Kydland, F. and E.C. Prescott (1982), "Time to build and aggregate fluctuations," Econometrica, vol. 50, 1345-1370. Kydland, F. and E.C. Prescott (1991), "The econometrics of the general equilibrium approach to business cycles," Scandinavian Journal of Economics Vol. 93, pp. 161-178. Lettau, M. and H. Uhlig (1995), "By force of habit: asset pricing puzzles versus consumption volatility," draft, CentER, Tilburg University. Lucas, R.E., Jr., (1978), "Asset prices in an exchange economy, Econometrica Vol. 46, pp. 1429-1445. McCallum, B. T. (1983), "On non-uniqueness in rational expectations models," Journal of Monetary Economics, vol. 11, 139-168. Muth, J. F., "Rational Expectations and the Theory of Price Movements," Econometrica, vol. 29, 315-335. Obstfeld, M. and K. Rogoff (1996), Foundations of International Macroeconomics, MIT Press. Sargent, T.J. (1987), Macroeconomic Theory, 2nd edition, Academic Press. Stokey, N.L. and R.E. Lucas, Jr., with E.C. Prescott (1989), Recursive Methods in Economic Dynamics, Harvard University Press, Strang, G. (1980), Linear Algebra and Its Applications, 2nd edition, Academic Press, Taylor, J. and H. Uhlig (1990), "Solving nonlinear stochastic growth models: a comparison of alternative solution methods," Journal of Business and Economic Statistics Vol. 8, pp. 1-19. Uhlig, H. and Y. Xu (1996), "Effort and the cycle: Cyclical Implications of Efficiency Wages", CentER DP 9649, Tilburg University.