Journal Issue

Solving and Estimating Indeterminate DSGE Models1

Roger Farmer, and Vadim Khramov
Published Date:
October 2013
  • ShareShare
Show Summary Details

1 Introduction

It is well known that linear rational expectations (LRE) models can have an indeterminate set of equilibria under realistic parameter choices. Lubik and Schorfheide (2003) provided an algorithm that computes the complete set of indeterminate equilibrium, but their approach has not yet been implemented in standard software packages and has not been widely applied in practice. In this paper, we propose an alternative methodology based on the idea that a model with an indeterminate set of equilibria is an incomplete model. We propose to close a model of this kind by treating a subset of the non-fundamental errors as newly defined fundamentals.

Our method builds upon the approach of Sims (2001) who provided a widely used computer code, Gensys, implemented in Matlab, to solve for the reduced form of a general class of linear rational expectations (LRE) models. Sim’s code classifies models into three groups; those with a unique rational expectations equilibrium, those with an indeterminate set of rational expectations equilibria, and those for which no bounded rational expectations equilibrium exists. By moving non-fundamental errors to the set of fundamental shocks, we select a unique equilibrium, thus allowing the modeler to apply standard solution algorithms. We provide step-by-step guidelines for implementing our method in the Matlab-based software programs Dynare and Gensys.

Our paper is organized as follows. In Section 2, we provide a brief literature review. Section 3 discusses the general solution method for indeterminate models and in Section 4, we discuss the choice of expectational errors that should be moved to the set of fundamental shocks and we prove that there is a one-to-one correspondence between variances and covariances of shocks under different selection methods. In Section 5, we apply our method to a simple New-Keynesian model and in section 6 we show how to implement our method in Dynare. Section 7 provides a practical method for choosing which shock to define as fundamental and Section 8 provides a brief conclusion.

2 Related Literature

Blanchard and Kahn (1980) showed that a LRE model can be written as a linear combination of backward-looking and forward-looking solutions. Since then, a number of alternative approaches for solving linear rational expectations models have emerged (King and Watson, 1998; Klein, 2000; Uhlig, 1999; Sims, 2001). These methods provide a solution if the equilibrium is unique, but there is considerable confusion about how to handle the indeterminate case. Some methods fail in the case of a non-unique solution, for example, Klein (2000), while others, e.g. Sims (2001), generate one solution with a warning message.

All of these solution algorithms are based on the idea that, when there is a unique determinate rational expectations equilibrium, the model’s forecast errors are uniquely defined by the fundamental shocks. These errors must be chosen in a way that eliminates potentially explosive dynamics of the state variables of the model.

McCallum (1983) has argued that a model with an indeterminate set of equilibria is incompletely specified and he recommends a procedure, the minimal state variable solution, for selecting one of the many possible equilibria in the indeterminate case. Farmer (1999) has argued instead, that we should exploit the properties of indeterminate models to help understand data, but with the exceptions of an early piece by Farmer and Guo (1995) and a more recent literature (Belaygorod and Dueker, 2009; Castelnuovo and Fanelli, 2013; Hirose, 2011; Zheng and Guo, 2013) that follows the approach of Lubik and Schorfheide (2004), there has not been much empirical work that seeks to formally estimate indeterminate models. That is in contrast to a large body of theoretical work, surveyed in Benhabib and Farmer (1999), which demonstrates that the theoretical properties of models with indeterminacy present a serious challenge to conventional classical and new-Keynesian approaches.

The empirical importance of indeterminacy began with the work of Benhabib and Farmer (1994) who established that a standard one-sector growth model with increasing returns displays an indeterminate steady state and Farmer and Guo (1994) who exploited that property to generate business models driven by self-fulfilling beliefs. More recent New-Keynesian models have been shown to exhibit indeterminacy if the monetary authority does not increase the nominal interest rate enough in response to higher inflation (see, for example, Clarida, Galí, and Gertler (2000); Kerr and King (1996)). Our estimation method should be of interest to researchers in both literatures.

3 Solving LRE Models

Consider the following k-equation LRE model. We assume that XtRk is a vector of deviations from means of some underlying economic variables. These may include predetermined state variables, for example, the stock of capital, non-predetermined control variables, for example, consumption; and expectations at date t of both types of variables.

We assume that zt is an l × 1 vector of exogenous, mean zero, shocks and ηt is a p × 1 vector of endogenous shocks.1 The matrices Γ0 and Γ1 are of dimension k × k, possibly singular, Ψ and Π are respectively, k × l and k × p known matrices. Sims (2001) shows that this way of representing a LRE is very general and most LRE models that are studied in practice by economists can be written in this form.

Using the above definitions, we will study the class of linear rational expectations models described by Equation (1),

where we assume that

We define the l × l matrix Ω,

which represents the covariance matrix of the exogenous shocks. We refer to these shocks as predetermined errors, or equivalently, predetermined shocks. The second set of shocks, ηt, has dimension p. Unlike the zt, these shocks are endogenous and are determined by the solution algorithm in a way that eliminates the influence of the unstable roots of the system. In many important examples, the ηi,t have the interpretation of expectational errors and, in those examples,

3.1 The QZ Decomposition

Sims (2001) shows how to write equation (1) in the form

where the matrices S, T, Ψ˜, and Π˜ and the transformed variables X˜t are defined as follows. Let

be the QZ decomposition of {Γ0, Γ1} where Q and Z are k × k orthonormal matrices and S and T are upper triangular and possibly complex.

The QZ decomposition is not unique. The diagonal elements of S and T are called the generalized eigenvalues of {Γ0, Γ1} and Sims’s algorithm chooses one specific decomposition that orders the equations so that the absolute values of the ratios of the generalized eigenvalues are placed in increasing order that is,

Sims proceeds by partitioning S, T, Q and Z as

where the first block contains all the equations for which |tjj| / |sjj| < 1 and the second block, all those for which |tjj| / |sjj| ≥ 1. The transformed variables X˜t are defined as

and the transformed parameters as

3.2 Using the QZ decomposition to solve the model

The model is said to be determinate if Equation (5) has a unique bounded solution. To establish existence of at least one bounded solution we must eliminate the influence of all of the unstable roots; by construction, these are contained in the second block,

since the eigenvalues of S221T22 are all greater than one in absolute value. Hence a bounded solution, if it exists, will set


Since the elements of X˜2,t are linear combinations of X2,t, a necessary condition for the existence of a solution is that there are at least as many non-predetermined variables as unstable generalized eigenvalues. A sufficient condition requires checking that the rows of

are linearly independent so that there is at least one solution to Equation (14) for the endogenous shocks, ηt as a function of the fundamental shocks, zt. In the case that Π˜ is square and non-singular, we can write the solution for ηt as

More generally, Sims’ code checks for existence using the singular value decomposition of (15).

To find a solution for X˜1,t we take equation (16) and plug it back into the first block of (5) to give the expression,

Even if there is more than one solution to (14) it is possible that they all lead to the same solution for X˜1,t. Sims provides a second use of the singular value decomposition to check that the solution is unique. Equations (13) and (17) determine the evolution of {X˜t} as functions of the fundamental shocks {zt} and, using the definition of {X˜t} from (11), we can recover the original sequence {Xt}.

3.3 The Indeterminate Case

There are many examples of sensible economic models where the number of expectational variables is larger than the number of unstable roots of the system. In that case, Gensys will find a solution but flag the fact that there are many others. We propose to deal with that situation by providing a statistical model for one or more of the endogenous errors.

The rationale for our procedure is based in economic theory. Agents situated in an environment with multiple rational expectations equilibria must still choose to act. And to act rationally, they must form some forecast of the future. As long as that forecast is constructed in the same way each period, we can model the process of expectations formation by specifying how the forecast errors covary with the other fundamentals.

If a model has n unstable generalized eigenvalues and p non-fundamental errors then, under some regularity assumptions, there will be m = pn degrees of indeterminacy. In that situation we propose to redefine m non-fundamental errors as new fundamental shocks. This transformation allows us to treat indeterminate models as determinate and to apply standard solution and estimation methods.

Consider model (1) and suppose that there are m degrees of indeterminacy. We propose to partition the ηt into two pieces, ηf,t and ηn,t and to partition Π conformably so that,

Here, ηf,t is an m × 1 vector that contains the newly defined fundamental errors and nn,t contains the remaining n non-fundamental errors.

Next, we re-write the system by moving ηf,t from the vector of expectational shocks to the vector of fundamental shocks:

where we treat

as a new vector of fundamental shocks and ηn,t as a new vector of non-fundamental shocks. To complete this specification, we define Ω˜

to be the new covariance matrix of fundamental shocks. This definition requires us to specify m (m +1+2l)/2 new variance parameters, these are the m (m +1)/2 elements of Ωf, and ml new covariance parameters, these are the elements of Ωz,f. By choosing these new parameters and applying Sims’ solution algorithm, we select a unique bounded rational expectations equilibrium. The diagonal elements of Ω˜ that correspond to ηf have the interpretation of a pure ‘sunspot’ component to the shock and the covariance of these terms with zt represent the response of beliefs to the original set of fundamentals.

Our approach to indeterminacy is equivalent to defining a new model in which the indeterminacy is resolved by assuming that expectations are formed consistently using the same forecasting method in every period. Our newly transformed model can be written in the form of Equation (1), but the fundamental shocks in the transformed model include the original fundamental shocks zt, as well as the vector of new fundamental shocks, ηf,t. Indeterminacy is resolved by specifying a new set of fundamental parameters contained in the covariance matrix Ω˜. This matrix specifies the variance of the ‘sunspot shocks’ and their covariance with the original fundamentals.

4 Choice of Expectational Errors

Our approach raises the practical question of which non-fundamentals should we choose to redefine as fundamental. Here we show that, given a relatively mild regularity condition, there is an equivalence between all possible ways of redefining the model.

Definition 1 (Regularity)Let ε be an indeterminate equilibrium of model (1) and use the QZ decomposition to write the following equation connecting fundamental and non-fundamental errors.

Let n be the number of generalized eigenvalues that are greater than or equal to 1 and let p > n be the number of non-fundamental errors. Partition ηt into two mutually exclusive subsets, ηf,t and ηn,t such that ηf,tηn,t = ηt and partitionΠ˜2conformably so that

The indeterminate equilibrium, ε, is regular if, for all possible mutually exclusive partitions of ηt; Π˜2nhas full rank.

Regularity rules out situations where there is a linear dependence in the non-fundamental errors and all of the indeterminate LRE models that we are aware of, that have been studied in the literature, satisfy this condition.

Theorem 1Let ε be an indeterminate equilibrium of model (1) and let P be an exhaustive set of mutually exclusive partitions of ηt into two non-intersecting subsets; where{pP|p=(ηf,tm×n,ηn,tn×n)}. Let p1and p2be elements of P and letΩ˜1be the covariance matrix of the new set of fundamentals, [ztf,t] associated with partition p1. If ε is regular then there is a covariance matrixΩ˜2, associated with partition 2 such that the covariance matrix

is the same for both partitions. p1and p2, parameterized byΩ˜1andΩ˜2, are said to be equivalent partitions.

Proof. See Appendix A.

Corollary 1The joint probability distribution over sequences {Xt} is the same for all equivalent partitions.

Proof. The proof follows immediately from the fact that the joint probability of sequences {Xt}, is determined by the joint distribution of the shocks.

While the question of which set of expectational errors should be fundamental shocks is irrelevant from the theoretical standpoint, it becomes important in estimation. Some choices of p are more natural than others. When using Bayesian methods, it is usual to place a prior over the elements of Ω˜ and a simple prior for one choice of p may lead to a complicated expression for some alternative partition. In practice, we find that the results of alternative priors over different partitions leads to different parameter estimates. In the following sections, we illustrate these ideas with two examples.

5 Example: A Simple New-Keynesian Model

In this section, we show how to apply our proposed method to a simple form of the New-Keynesian model, discussed in Lubik and Schorfheide (2004), where we simplify the model by assuming that there is only one fundamental shock. This model has three equations:

where xt is output, πt is inflation, Rt is the interest rate, and εt is a fundamental interest rate shock. The first equation is a consumption-Euler equation, the second is a monetary policy rule, and the third is a New-Keynesian Phillips curve. This model has two forward-looking variables and one fundamental shock.

Substituting Rt into Equation (25), this model can be reduced to the following system of two equations:

Writing the system out in Sims’ notation gives,

where the parameter matrices Γ0, Γ1, Ψ and Π are given by the expressions,

and the vector of variables, Xt is,

The fundamental and non-fundamental shocks are


5.1 The Determinate Case

The determinacy properties of this example are determined by the roots of the matrix Γ01Γ1, and, in the determinate case, some tedious, but straightforward algebra, reveals that the vector of expectational errors is described by the following function of the fundamental shock:

In this case, the first two equations of system (30), yield the following solution for xt and πt,

Using the symbols σx2, and σπ2 for the variances of x and π, and σz2, for the variance of z, some further algebra gives,

In this example, when there is a unique determinate equilibrium, the dynamics of real variables are completely determined by the dynamics of the fundamental shock.

5.2 The Indeterminate Case

Suppose instead that the equilibrium is indeterminate, a case which occurs if 0 < ψ < 1 (Lubik and Schorfheide, 2004). When the model is indeterminate, we propose two new alternative models, described below by equations (38) and (39).2

In this example, the analog of Equation (22) is (40), which links the fundamental and non-fundamental errors,

and where a0, a1, a2 and d are known functions of the underlying parameters.

This simple example illustrates that the choice of which expectational error to move to the set of fundamental shocks is irrelevant for identification purposes. By specifying η1,t as fundamental, Equation (40) determines the variance-covariance properties of η2,t with zt and η1,t. By picking η2,t as the fundamental, the same equation determines the variance-covariance properties of η1,t. In both cases, the variance of the two expectational shocks and their covariance with the fundamental shock are linearly related.

Notice however, that the variance of the non-fundamental shock will, in general, depend on the coefficients a0, a1 and a2 which are functions of all of the other parameters of the model. It follows that, when we place restrictions on one representation of the model, for example, by setting covariance terms to zero, those restrictions will have non-trivial implications for the behavior of the observables.

6 Implementing our Procedure in Dynare

This section shows how to implement our method in the popular software package, Dynare.3 Consider the following elaboration of the model described in (25)—(27) which complicates that example by adding two additional shocks.

Here, xt is output, πt is inflation, and Rt is the interest rate. The first equation is a consumption-Euler equation, the second one is the New-Keynesian Phillips curve, and the third one is a monetary policy rule. The model is indeterminate of degree one if the monetary policy is passive, 0 < ψ1 < 1, and determinate if the monetary policy is active, ψ1 > 1.

In the case of the determinate model, Dynare finds the unique series of non-fundamental errors that keeps the state variables bounded. In the case of the indeterminate model, running Dynare produces an error with a message “Blanchard-Kahn conditions are not satisfied: indeterminacy.” For regions of the parameter space where the code produces that message, we provide two alternative versions of the model that redefine one or other of the non-fundamental shocks as new fundamentals. We refer to these cases as Model 1, where η1,t = xtEt−1[xt] is a fundamental shock, and Model 2, where it is η2,t = πtEt−1[πt] and we present Dynare code to estimate the determinate case and two indeterminate cases in Tables 1, 2 and 3.

Table 1:Determinate Model
Variable Definitionsvar x, R, pi;

varexo er_R, er_g, er_z;
Parameter Definitionsparameters tau, kappa, rho_R, psi1 psi2, sigmag, sigmaz, sigmaR;
Model equationsmodel(linear);

x = x (+1) − tau * (Rpi (+1)) + sigmag * er_g;

pi = 0.95 * pi (+1) + kappa * x + sigmaz * er_z;

R = rho_R * R (−1) + (1 − rho_R) *

(psi1 * pi + psi2 * x)+ sigmaR * er_R;

Table 2:Indeterminate Model 1: η1,t = xtEt−1 [xt] is new fundamental
Variable Definitionsvar x, R, pi, xs;

varexo er_R, er_g, er_z, sunspot;
Parameter Definitionsparameters tau, kappa, rho_R, psi1 psi2, sigmag, sigmaz, sigmaR, sigmasun;
Model equationsmodel(linear);

x = xstau * (Rpi (+1)) + sigmag * er_g;

pi = 0.95 * pi (+1) + kappa * x + sigmaz * er_z;

R = rho_R * R (−1) + (1 − rho_R) *

(psi1 * pi + psi2 * x)+ sigmaR * er_R;

xs (−1) = x + sigmasun * sunspot;

Table 3:Indeterminate Model 2: η2,t = πtEt−1 [πt] is new fundamental
Variable Definitionsvar x, R, pi, pis;

varexo er_R, er_g, er_z, sunspot;
Parameter Definitionsparameters tau, kappa, rho_R, psi1 psi2, sigmag, sigmaz, sigmaR, sigmasun;
Model equationsmodel(linear)

x = x (+1) − tau * (Rpis)+ sigmag * er_g

pi = 0.95 * pis + kappa * x + sigmaz * er_z

R = rho_R * R (−1) + (1 − rho_R) *

(psi1 * pi + psi2 * x)+ sigmaR * er_R

pis (−1) = pi + sigmasun * sunspot;


Tables 2 and 3 show how to amend the code from Table 1 when one of the non-fundamental errors is redefined as fundamental. In Table 2, we show how to change the model by redefining η1,t as fundamental and Table 3 presents an equivalent change to Table 1 in which η2,t becomes the new fundamental. We have represented the new variables and new equations in that table using bold typeface.

The following steps explain the changes in more detail. First, we define a new variable, xsEt[Xt+1] and include it as one of the endogenous variables in the model. This leads to the declaration:

which appears in the first line of Table 2. Next, we add an expectational shock, which we call sunspot, to the set of exogenous shocks. In our code we call the other three fundamental shocks, er_R, er_g and er_z. This leads to the Dynare statement

which appears in row 2. Next, we add a new standard deviation parameter, we call this, sigmasun, to the parameter vector. This leads to the parameter definition statement

Then we replace x (+1) by xs in the consumption-Euler equation, which becomes,

and we add a new equation that defines the relationship between xs, x and the new fundamental error:

Similar steps apply in the case of Model 2, but with η2,t taking the role of η1,t. Note that, by substituting expectations of forward-looking variables x(+1) in Model 1, and pi(+1) in Model 2, with xs and pis, respectively, we decrease the number of forward-looking variables by one. Since these variables are no longer solved forwards, we must add an equation—this appears as Equation (48)—to describe the dynamics of the new fundamental shock.

7 A Model Selection Criterion

In this section, we propose a selection criterion to decide which expectational errors to move to the set of fundamental shocks in the model with p expectational variables and m degrees of indeterminacy. For a given data set, we recommend that the economist write down the determinate model, together with a set of indeterminate models, determined by all possible permutations, piP of partitions of the non-fundamental shocks. The decision as to which indeterminate models are a priori plausible will be a matter of judgement, often guided by simple examples.

In the new-Keynesian example, there is a substantial body of work which indicates how to partition the parameter space into determinate and indeterminate cases. To specify a class of determinate models, for example, the researcher would place a prior on the parameter space that puts zero weight on models for which 0 ≤ |ψ| < 1. The determinate model can then be compared with an alternative in which the prior restricts |ψ| to be greater than 1. In this example, the researcher has two choices as to which endogenous shock should be redefined as fundamental. In our simulations, described below, we placed priors over correlation coefficients and we assumed that those coefficients have uniform distributions in the open interval (−1, 1).

To check the plausibility of our selection we criterion, we simulated data from equations (41)(43) and we attempted to recover the parameters by estimating the model under two alternative model specifications. Tables 4 and 5 illustrate our results.

Table 4:Data comes from Model 1
Model 1:Model 2:
η1,t is fundamentalη2,t is fundamental
Prior Model Probability0.50.5
Log Marginal Density−977.2−982.5
Posterior Model Probability0.9950.005
Table 5:Data comes from Model 2
Model 1:Model 2:
η1,t is fundamentalη2,t is fundamental
Prior Model Probability0.50.5
Log Marginal Density−848.7.2−828.06
Posterior Model Probability01

Table 4 shows the result of an experiment in which we generated data from Model 1, in which we treated η1,t as a new fundamental, and we compared two alternative estimation methods, one treating η1,t as fundamental and the other treating η2,t as fundamental. We placed a prior weight of 0.5 on the two models. The table shows that the posterior odds ratio, computed in Dynare, overwhelmingly favors the true model.

Table 5 constructs the same comparison when model 2 is the true model and, once again, estimates on the simulated data overwhelmingly favor the true model. Although our theoretical results illustrate that there is an equivalence between alternative representations of the model, that equivalence imposes strong parameter restrictions on the variance properties of the endogenous shock. Our estimation results show that in practice it is possible to distinguish between models. Models 1 and 2 are not equivalent because we do not impose those restrictions when we move between representations.

8 Conclusion

We have shown how to solve and estimate indeterminate LRE models using standard software packages. Our method transforms indeterminate models by redefining a subset of the non-fundamental shocks and classifying them as new fundamentals. We show how to implement our method in the case of a simple monetary model and we provide parameterized examples of two alternative indeterminate equilibria.

Our procedure raises the question of which non-fundamental shocks to reclassify as fundamental. We provide a practical solution to that problem; we propose that the researcher compare a range of alternative models, each of which reclassifies a different non-fundamental shock as a new fundamental. Those alternative models are, effectively, different theories of how expectations are formed. By carrying out a Bayesian model comparison, a researcher can use our approach to distinguish which of several alternative theories of expectation formation are the best fit for a given data set. Our simulation results show that this technique works well in a simple new-Keynesian example. Our work should be of particular interest to economists who are interested in estimating models that do not impose a determinacy prior.

Appendix A

Proof of Theorem 1. Let A1 and A2 be two orthonormal row operators associated with partitions p1 and p2;

We assume that the operators, Ai have the form

where A˜i is a permutation of the columns of an Ip identity matrix. Premultiplying the vector [ztt]T by the operator Ai permutes the rows of ηt while leaving the rows of zt unchanged. Define matrices Ωfi and Ωz,fi for i ∈ {1, 2} to be the new terms in the fundamental covariance matrix,

Next, use (22) and (23) to write the non-fundamentals as linear functions of the fundamentals,


and define the matrix Di,

Using this definition, the covariance matrix of all shocks, fundamental and non-fundamental, has the following representation,

We can also combine the last two row blocks of Di and write Di as follows


Using (49) and the fact that Ai is orthonormal, we can write the following expression for the complete set of shocks

Using equations (54) and (57), it follows that



Using this expression, we can write out equation (58) in full to give,

We seek to establish that for any partition pi, parameterized by matrices Ωfi, and Ωz,fi that there exist matrices Ωfi and Ωz,fi for all partitions pjP, ji, such that

To establish this proposition, we write out the elements of (61) explicitly. Since Wi and Bi are symmetric we need consider only the upper-triangular elements which give three equations in the matrices of Ωz,fi and Ωfi,

The first of these equations defines the covariance of the fundamental shocks and it holds for all i, j. Now define

Using the fact that

we can pass the vec operator through equation (63) and write the following system of linear equations in the unknowns xj and yj,

It follows from the assumption that the equilibrium is regular that Sj has full rank for all j hence for any permutation pi, parameterized by {xi,yi} we can find an alternative permutation pj with associated parameterization {xj,yj},

that gives the same covariance matrix Ω˜ for the fundamental and non-fundamental shocks.


We would like to thank the participants of UCLA seminars for their useful comments and suggestions. We gratefully acknowledge the comments from seminar participants at the DYNARE workshop in Paris on July 2nd, 2010, where Roger Farmer first presented the method of solving indeterminate models by redefining one or more of the endogenous errors as exogenous errors during his lectures.

This study was written while Farmer was a Senior Houblon-Norman Fellow at the Bank of England. Farmer would like to thank the Trustees of the Houblon-Norman Fund for their support. The ideas expressed herein do not reflect those of the Bank of England, nor those of the Monetary Policy Committee.

Sims (2001) allows zt to be autoregressive with non zero conditional expectation. We assume, instead, that zt always has zero conditional mean. That assumption is unrestrictive since an autoregressive error can always be written in our form by defining a new state variable, zt and letting the innovation of the original variable, z˜t, be the new fundamental shock.

Sims’ code will always generate a purely autoregressive solution in the state vector Xt but, in the indeterminate case, one of the lagged expectations, either Et−1 (xt) or Et−1 (πt), will appear as a lagged state. If we are interested in an equivalent representation that uses xt and πt as state variables, we must rewrite the system by finding an expression for the lagged expectation in terms of realized values of xt and πt and the lagged shock. Rewriting the system in this way introduces a moving average error term and the resulting system of equations is a VARMA(1,1). This is related to the point made by Lubik and Schorfheide (2004) who show that models with indeterminacy display higher order dynamics than determinate models.

Dynare is a Matlab-based software platform for handling a wide class of economic models, in particular dynamic stochastic general equilibrium (DSGE). Visit for details.

Other Resources Citing This Publication