No history yet

Sequence Space Algebra

From State-Space to Sequence-Space

Traditional dynamic stochastic general equilibrium (DSGE) models are typically cast in a recursive, state-space form. This representation defines the system's evolution period by period, where the state at time tt is a function of the state and shocks at t1t-1. While elegant and efficient for models with a low-dimensional state vector, this approach becomes computationally intractable for Heterogeneous Agent New Keynesian (HANK) models. The state vector in a HANK model must include the entire distribution of wealth and other idiosyncratic states, which is effectively infinite-dimensional.

The sequence-space approach circumvents this curse of dimensionality by fundamentally changing the perspective. Instead of solving the model recursively, we treat the entire time paths of variables as single points in an infinite-dimensional vector space, known as a sequence space. A model solution is no longer a set of policy functions, but a specific sequence of endogenous variables that satisfies all equilibrium conditions for a given sequence of exogenous shocks.

The Model as a Mapping

We can formalize this by defining a mapping, HH, that takes the infinite sequences of all unknown endogenous variables, denoted by X={xt}t=0X = \{x_t\}_{t=0}^\infty, and all exogenous shocks, Z={zt}t=0Z = \{z_t\}_{t=0}^\infty, and maps them to the infinite sequences of the model's equilibrium conditions, expressed as residuals, Y={yt}t=0Y = \{y_t\}_{t=0}^\infty. The equilibrium conditions could include market clearing conditions, Euler equations, and budget constraints for all periods.

Solving the model is then equivalent to a root-finding problem: for a given path of shocks ZZ, find the path of unknowns XX such that the path of residuals YY is a sequence of zeros. This reframes the dynamic problem into a static one, albeit in an infinite-dimensional space.

H(X,Z)=Y{Ht({xs}s=0,{zs}s=0)}t=0=0H(X, Z) = Y \equiv \{H_t(\{x_s\}_{s=0}^\infty, \{z_s\}_{s=0}^\infty)\}_{t=0}^\infty = 0

Jacobians in Sequence Space

To solve this high-dimensional root-finding problem, we typically use Newton's method, which requires computing the Jacobian of the map HH. The Sequence-Space Jacobian (SSJ), denoted by JJ, is the total derivative of the residual map HH with respect to the sequence of unknowns XX, evaluated at the deterministic steady state (where X=XˉX=\bar{X} and Z=0Z=0).

This Jacobian is an infinite-by-infinite matrix of matrices. Each block JtsJ_{ts} within the larger matrix represents the partial derivative of the vector of residuals at time tt, yty_t, with respect to the vector of unknowns at time ss, xsx_s. It captures the full set of intertemporal linkages: how a perturbation to a variable in one period propagates to the equilibrium conditions in all other periods.

J=HX(Xˉ,0)=(y0x0y0x1y0x2y1x0y1x1y1x2y2x0y2x1y2x2)J = \frac{\partial H}{\partial X}\bigg|_{(\bar{X}, 0)} = \\ \begin{pmatrix} \\ \frac{\partial y_0}{\partial x_0} & \frac{\partial y_0}{\partial x_1} & \frac{\partial y_0}{\partial x_2} & \cdots \\ \frac{\partial y_1}{\partial x_0} & \frac{\partial y_1}{\partial x_1} & \frac{\partial y_1}{\partial x_2} & \cdots \\ \frac{\partial y_2}{\partial x_0} & \frac{\partial y_2}{\partial x_1} & \frac{\partial y_2}{\partial x_2} & \cdots \\ \vdots & \vdots & \vdots & \ddots \\ \end{pmatrix}

This representation is equivalent to the one used in Reiter's (2009) perturbation method. However, the sequence-space formulation provides a more intuitive and computationally efficient framework, especially when dealing with the high-dimensional state distributions found in HANK models. By avoiding the explicit construction of the state-space transition matrices, we can exploit the inherent structure of the model's equations.

Taming Infinity

Working with infinite-dimensional objects is not practical. To implement this numerically, we first truncate the infinite sequences at a sufficiently large time horizon, TT. This transforms the infinite Jacobian into a large, but finite, block matrix. The choice of TT must be large enough that the discounted effects of variables beyond this horizon on the dynamics within the horizon are negligible.

Even in its truncated form, the Jacobian for a complex HANK model is massive. Direct construction and inversion would be prohibitively slow. The key insight is that this Jacobian is highly structured and sparse. We can exploit this structure by decomposing the model into modular 'Blocks' organized by a Directed Acyclic Graph (DAG).

A 'Block' might represent the household's problem, the firms' pricing decisions, or market clearing. The DAG dictates the dependencies: the outputs of one block (e.g., labor supply from households) become the inputs for another (e.g., firms' production). This modularity allows for the Jacobian to be computed efficiently using the chain rule, block by block, rather than through brute-force numerical differentiation of the entire system. This is where the major computational gains over traditional methods are realized.

This DAG-based approach not only organizes the model's logic but also provides a clear roadmap for parallelizing the computation of the Jacobian and solving the system. It transforms a daunting, monolithic problem into a series of smaller, manageable, and computationally efficient steps.

Quiz Questions 1/5

What is the primary limitation of traditional state-space methods that necessitates the use of the sequence-space approach for HANK models?

Quiz Questions 2/5

The sequence-space approach transforms the problem of solving a dynamic model into what kind of problem?