# What is state space representation for DSGE modeling

I'm beginning with DSGE modeling, and a mathematical representation (perhaps trivial for most of the people that are more with this topic) is the space-state state representation of a dynamical model, like depicted here (s.2), or similar documents.

I have already read the Wikipedia article about this topic, and I get the general idea (in this case applied to engineering). But I want a further explanation in how this applies in DSGE modeling, and if possible some literature (preferably economics-focused). The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory), and some key insights about the notation.

Thank you!

This question is too broad as it stands. There is a longer answer already, but I think it is possible to deal with a core part of the question easily.

The concrete question is what is a state-space representation, if possible with some of the intuition, its uses in economics (control theory)

My background is in control systems theory, where the notion of a state space representation developed. Optimal control theory, including the Kalman filter, was developed mainly in the 1960s. Economists have kept using the core ideas, but migrated off to their own standards of mathematical presentation.

A state space model is a canonical representation of a mathematical system. The idea is to take a model derived from underlying dynamics, and re-cast it into a standard format, so that existing tools can be applied to it.

In control theory, the standard canonical form of a nonlinear state space system is: $$x(t+1) = f(t, x(t), w(t)),$$ $$y(t) = g(t, x(t), w(t)),$$ $$x(0) = x_0 \in R^n,$$ with:

• $$x(t)$$ an n-dimensional state vector,
• $$w(t)$$ a vector of all external variables,
• $$y(t)$$ a vector of measured variables.

A fairly typical simplification is that the system is linear and time invariant, where the description collapses to: $$x(t+1) = A x(t) + B w(t),$$ $$y(t) = C x(t) + D w(t).$$

Typical examples of external variables that appear in $$w$$ include:

• variables used to control the system (typically fixed by feedback rules),
• variables that disturb the state variables,
• noise that effects measurements.

The vector $$w$$ is often partitioned into groups corresponding to these cases, and the $$B,C,D$$ matrices are correspondingly partitioned.

Once we have the system in this format, we can then apply existing tools. A typical example is applying the Kalman filter to infer the state variable $$x(t)$$ from directly measured variables. Numerical toolboxes will give results based on the $$[A,B,C,D]$$ representation.

In economics, the variable $$r^*$$ is typically inferred by the use of a Kalman filter (E.g., see New York Fed r* page). This variable roughly corresponds to what was called “the natural rate of interest”, and cannot be measured directly. Instead, it needs to be inferred from measured variables. This example underlines why we need to differentiate between the state vector, and the variables that are directly measurable. The state vector includes all variables need for the dynamical description of the system, and not just variables that are measured.

(Note: control theory uses a somewhat unintuitive definition of “observable.” A variable is observable if its value can be inferred from measurements - even if it is not directly measured. Since observability is a mathematical requirement for the Kalman Filter to converge, this needs to kept in mind when reading documentation prepared by control engineers.)

As a final technical note, state space representations may not always exist. A key example in control theory are linear continuous time systems with a time delay. It would require an infinite number of states to represent a time delay, and so engineers are forced to either use frequency domain representations, or an approximation.

State Space Representations of Linear Systems:

https://lpsa.swarthmore.edu/Representations/SysRepSS.html

As systems become more complex, representing them with differential equations or transfer functions becomes cumbersome. This is even more true if the system has multiple inputs and outputs. This document introduces the state space method which largely alleviates this problem. The state space representation of a system replaces an nth order differential equation with a single first order matrix differential equation.

• The notation is very compact. Even large systems can be represented by two simple equations.
• Because all systems are represented by the same notation, it is very easy to develop general techniques to solve these systems.
• Computers easily simulate first order equations.

DSGEs are State-Space Models (see page 11 of 20 page presentation).

https://www.karlwhelan.com/MAMacro/part10.pdf

In general, for a model to have well-defined econometric estimates, it is necessary that for every observable variable there be at least one unobservable shock. This can either take the form of a “measurement error” or else involve a shock in each equation with a clear structural interpretation.

Log-linearised DSGE models with a mix of observable and unobservable variables are an example of state-space models. Recall that these models can be described using two equations.

The first, known as the state or transition equation, describes how a set of unobservable state variables, S(t), evolve over time as follows:

S(t) = FS(t−1) + u(t).

The term u(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity. We will write this as u(t) ∼ N(0,Σu) though Σu may not have a full matrix rank.

The second equation in a state-space model, which is known as the measurement equation, relates a set of observable variables, Z(t), to the unobservable state variables

Z(t) = HS(t) + v(t)

Again, the term w(t) can include either normally-distributed errors or perhaps zeros if the equation being described is an identity. We will write this as v(t) ∼ N(0,Σv) though Σv may not have a full matrix rank.

In engineering the state-space representation is primarily a standard way to characterize the system in terms of standard matrix methods applied in software solvers. However the DSGE reference above says DSGEs are state-space models.

The 30 page working paper (2012) under this link has title Bayesian Estimation of DSGE Models:

It provides a short history of DSGE Model Estimation then describes the application of a Canonical New Keynesian DSGE Model. Page 12 describes the state-space representation of the NKDSGE. This quote is insight into the Bayesian assumption that there is no "true" model for the system in contrast to the Frequentist assumption:

Bayesians avoid having to assume there exists a true or correctly specified DSGE model because of the likelihood principle (LP). The LP is a foundation of Bayesian statistics and says that all evidence about a DSGE model is contained in its likelihood conditional on the data; see Berger and Wolpert (1988). Since the data’s probabilistic assessment of a DSGE model is summarized by its likelihood, the likelihoods of a suite of DSGE models possess the evidence needed to judge which “best” fit the data. Thus, Bayesian likelihood-based evaluation is consistent with the view that there is no true DSGE model because, for example, this class of models is afflicted with incurable misspecification.

So DSGE models are data in search of the most likely underlying system models. The state-space representation is a method to structure the search for a solution using numerical theory and methods.

Two academic references on DSGE models have mentioned Dynare open source software which runs DSGE simulations on an underlying platform.

https://www.dynare.org/

Questions are posted on the Dynare Forum:

https://forum.dynare.org/

PS - Despite this long answer I will add that my intuition as an electrical engineer and former commercial lawyer who follows financial markets as cash flow systems is as follows. When investors and credit dealers converge perceptions to "put risk on" in aggregate then balance sheets expand, cash flows increase, asset prices rise, good things happen, and GDP goes up. When investors take risk off and credit dealers converge to" take risk off" in aggregate then balance sheets attempt to unwind, cash flows decrease, asset prices fall, bad things happen, and GDP goes down or does not return to former rates of growth due to hysteresis in the behavior of intelligent agents. If perceptions do not converge then asset prices will be more stable and less prone to overshoot and collapse, but if perceptions converge to drive overshoot eventually they will converge to drive collapse in asset prices. Government spending, taxes, credit enhancements, and financial regulations or lack thereof can attenuate or amplify the market-based causes of overshoot and collapse patterns. The perceptions, decisions, and actions of intelligent agents are thus stochastic parameters endogenous to the financial and real economy and to an infinite possible number of toy DSGE models. The cell phone network has only so much bandwidth. Stochastic cell phone use patterns typically do not use up all the available bandwidth. One day an earth quake hit the East Coast. Stochastic use spiked when millions of people tried to call each other to discuss the quake. This "fat tail" event used up all the bandwidth in the cell phone network. Banks and other financial intermediaries (FI) are designed to provide credit and cash flow via the expansion of balance sheets with rising or steady asset prices. This is because assets are collateral for long term debt so when assets fall borrowers go underwater (negative equity) in their balance sheets. When investors all want to sell and few want to buy as asset prices collapse these intelligent agent inputs disrupt the liquidity and cash flow generating capacity of credit and money markets. Paradoxically the systemic market forces reduce and unwind balance sheet capacity when too many units demand liquidity at the same time which is a "fat tail" liquidity event.