Using the Sequence-Space Jacobian to Solve and Estimate Heterogeneous-Agent Models
📄 Summarized from the full manuscript · Human-reviewed for faithfulness before publication
In brief
Solving macro models with rich household heterogeneity has traditionally required tracking a huge, evolving distribution of agents, which is slow and makes likelihood-based estimation nearly infeasible. This paper's "fake news" algorithm computes the derivative of aggregate outcomes with respect to aggregate shocks -- the sequence-space Jacobian -- with a single backward iteration instead of one per shock date, a speedup roughly equal to the number of periods considered. Composed with a model's other equilibrium conditions, these Jacobians deliver general-equilibrium impulse responses in milliseconds, and make it possible to estimate a two-asset heterogeneous-agent New Keynesian model by full-information Bayesian methods in hours rather than years.
What this paper finds — and why it matters
This paper proposes a general and highly efficient method for solving and estimating general-equilibrium heterogeneous-agent models with aggregate shocks in discrete time. Building on Reiter (2009)’s idea of perturbing a heterogeneous-agent model to first order in aggregates, the authors write the linearized equilibrium conditions not in the state space (as Reiter does) but in the “sequence space” – as a system relating perfect-foresight paths of aggregate variables – so that the size of the resulting linear system no longer depends on the size of the underlying distributional state space. The paper’s central objects are sequence-space Jacobians: derivatives of the mapping from aggregate input sequences (such as interest rates or wages) to aggregate output sequences (such as consumption or investment), which the authors show are “sufficient statistics” summarizing everything about household or firm heterogeneity relevant for general equilibrium. Their main technical contribution is a “fake news” algorithm (Proposition 1) that computes these Jacobians using a single backward iteration and a single set of forward-iterated expectation vectors, rather than the costly direct approach of repeating a full backward-then-forward solve separately for a shock at each date – lowering the computational cost by a factor of roughly T, the number of periods considered, which is typically 300 to 1,000 in practice. These heterogeneous-agent Jacobians are then combined with the Jacobians of the model’s other equilibrium conditions – represented as a directed acyclic graph of blocks – via the chain rule, to obtain full general-equilibrium impulse responses essentially instantaneously. The authors verify the method’s accuracy by showing it reproduces the Reiter method’s solutions, using automatic differentiation in both methods, to within machine precision on models small enough for Reiter to remain feasible. They then develop two applications that this speed makes newly practical: full-information, likelihood-based Bayesian estimation of heterogeneous-agent models (by recovering an MA representation, computing autocovariances analytically, and applying the Kalman filter, while reusing Jacobians across repeated likelihood evaluations), and the computation of nonlinear perfect-foresight transitions via a quasi-Newton method that reuses the steady-state Jacobian at every iteration. Applied to three canonical models of increasing complexity – a Krusell-Smith neoclassical model, a one-asset New Keynesian HANK model, and a two-asset New Keynesian HANK model – the methods compute all heterogeneous-agent Jacobians in under 11 seconds, obtain posterior-mode estimates in under nine minutes, and trace out full posterior distributions via Markov Chain Monte Carlo with 200,000 draws in under twelve hours even for the most complex two-asset model – estimation exercises the authors describe as previously out of reach for the literature.
Summary of a classic paper, AI-assisted and human-reviewed. See the linked original for the authoritative claims and full conditions.
Questions & answers
Q1. What problem is this paper solving, and how does its approach differ from the existing Reiter method?
The paper addresses the computational challenge that equilibrium in heterogeneous-agent models involves a time-varying, high-dimensional distribution of agents, by linearizing the model’s equilibrium conditions in the “sequence space” of perfect-foresight aggregate paths rather than in the state space of the distribution itself, so that the size of the resulting linear system “is independent of the size of the state space” (Introduction, pp. 1-2). Like Reiter (2009), the authors perturb the model to first order in aggregates while preserving full nonlinearity with respect to idiosyncratic shocks; unlike Reiter, whose linear system grows (and becomes costly to solve, scaling roughly with the cube of the state-space size) with the dimension of the discretized distribution, their sequence-space system’s size depends only on the number of aggregate variables and the time horizon T, “making it feasible to solve and estimate models that feature very rich heterogeneity” (pp. 1-2, 5).
Q2. What is a sequence-space Jacobian, and in what sense is it a “sufficient statistic”?
A sequence-space Jacobian is the derivative, evaluated around the steady state, of a mapping from a time path of aggregate inputs (e.g., real interest rates) to a time path of aggregate outputs (e.g., aggregate consumption) implied by heterogeneous households’ or firms’ optimizing behavior; the paper calls it a sufficient statistic because “to know the aggregate effect of r on C, all we need to know is [the Jacobian]” – the underlying heterogeneous household responses and distributional dynamics do not need to be recomputed once the Jacobian is known (Introduction, p. 2). The general representation the paper works with (equations 10-12, Section 3.1) expresses any such heterogeneous-agent problem via three linked functions describing (i) a value-function-like object’s backward recursion, (ii) the distribution’s forward law of motion, and (iii) the aggregation of individual outcomes into aggregate outputs.
Q3. What is the “fake news” algorithm, and why is it fast?
The fake news algorithm (Section 3.2, Proposition 1) computes the full sequence-space Jacobian using only a single backward iteration – to obtain, for a shock at each possible date s, the resulting date-0 output response and date-1 distribution response – combined with a single set of forward-iterated “expectation vectors” computed once from the steady state, whereas the “direct” approach requires a full separate backward-then-forward iteration for a shock at each of the T dates (Section 3.2, pp. 11-14). The name reflects the intuition behind the recursion: the date-1 distributional response to a shock announced for some future date s behaves like a piece of “fake news” that is essentially retracted by date 1 if that shock does not occur, so its later effects can be reconstructed from steady-state “expectation vectors” (Lemma 3) rather than resimulated. This lowers the computational cost “by a factor of about T relative to the direct approach,” and the paper reports that computing all heterogeneous-agent Jacobians for each of its three example models takes well under 11 seconds on a laptop (Introduction, pp. 2-4; Table 1).
Q4. How are these heterogeneous-agent Jacobians turned into full general-equilibrium impulse responses?
General equilibrium is written as a nonlinear system F(X, Z) = 0 in endogenous variables X and shocks Z, whose first-order solution dX = -F_X^{-1} F_Z dZ requires the Jacobians F_X and F_Z, formed by combining the heterogeneous-agent Jacobians (from the fake news algorithm) with the Jacobians of the model’s other equilibrium conditions via the chain rule (Section 4.1, pp. 19-21). The authors implement this by representing the model as a directed acyclic graph (DAG) of “blocks” – as illustrated for the Krusell-Smith economy in their Figure 3 – and composing block Jacobians along the graph via “forward accumulation,” a procedure they say “can be automated, and it usually only takes a few milliseconds” once the component Jacobians are known (p. 2, p. 21).
Q5. How do the authors verify the method’s numerical accuracy?
The authors benchmark their sequence-space Jacobian (SSJ) method against the Reiter method, both implemented with automatic differentiation to eliminate derivative-approximation error, and find that on models small enough for Reiter to remain feasible, the two methods “deliver exactly the same solution,” with impulse responses differing by less than 10^-9 and the recovered state-space law-of-motion matrices differing by less than 10^-8 (Section 4.2, pp. 21-23). They further note that SSJ implemented with numerical rather than automatic differentiation produces “larger but still relatively minor errors,” and discuss how the truncation horizon T affects accuracy.
Q6. How does the paper use sequence-space Jacobians to make likelihood-based Bayesian estimation of heterogeneous-agent models practical?
Truncated linear impulse responses form a moving-average, MA(T-1), representation of the model (following Boppart, Krusell and Mitman 2018), from which the authors compute autocovariances analytically via a standard formula rather than by simulation, recover a state-space law of motion, and apply the Kalman filter to evaluate the exact Gaussian likelihood of an observed time series – with the crucial efficiency gain that heterogeneous-agent Jacobians, once computed, can be reused across the many likelihood evaluations required by posterior-mode search and Markov Chain Monte Carlo (Sections 5.1-5.4, pp. 25-32). Quantitatively, they report that a single likelihood evaluation takes a fraction of a second even for the two-asset HANK model, that finding the posterior mode takes under nine minutes for every model considered, and that a 200,000-draw Random Walk Metropolis-Hastings run over the two-asset model’s parameters takes under twelve hours – versus an estimated “about 8 full days” just to re-evaluate the heterogeneous-agent Jacobian 200,000 times using their own fake news algorithm, and “about 6 years” using the direct algorithm, underscoring that Jacobian reuse, not merely Jacobian speed, drives the estimation gains (Section 5.4, pp. 32-33).
Q7. How does the paper compute nonlinear (rather than merely linearized) transition dynamics, and how well does it perform?
The paper solves the model’s nonlinear perfect-foresight transition equations with a quasi-Newton iteration that updates a guess for the path of unknowns using the fixed steady-state Jacobian at every step, rather than recomputing the true Jacobian at each guess, and shows this “falls in the class of quasi-Newton methods” yet converges rapidly (Section 6, pp. 33-34). For a large -5 percentage-point monetary policy shock in the two-asset HANK model, the algorithm converges to a residual below 10^-8 in 13 iterations, versus 5 iterations for a smaller -1 percentage-point shock; comparing the linear approximation to the true nonlinear response, the authors find them “almost identical” for the small shock and only modestly different even for the large one (0.81% versus 0.86% on impact), leading them to conclude that “nonlinearities in the household model… do not play an important role for plausibly-sized shocks” in this application (p. 34). The same procedure, applied with the terminal steady-state Jacobian, computes the nonlinear transition following a permanent 1% TFP shock in 7 iterations (p. 34).
Q8. What models does the paper apply its methods to, and what do the reported computing times show?
The paper applies its methods to three canonical heterogeneous-agent models of rising complexity – a Krusell-Smith neoclassical model (and a “high-dimensional” version with 250,000 idiosyncratic states), a one-asset New Keynesian HANK model in the spirit of McKay, Nakamura and Steinsson (2016), and a two-asset New Keynesian HANK model in the spirit of Kaplan, Moll and Violante (2018) (Section 1, Table 1, pp. 3-4). Reported laptop computing times (Table 1) show heterogeneous-agent Jacobians computed in under 11 seconds and full sets of general-equilibrium impulse responses (matrix G) in a fraction of a second for all models, with the heaviest cost – full MCMC estimation of the two-asset model – still completing in under twelve hours, which the authors describe as faster than what “the leading computational techniques existing today” can achieve for models of comparable richness (p. 4).
Q9. What limitations does the paper acknowledge for its method?
The authors note that, like all methods that linearize with respect to aggregates, their approach “does not generate risk premia,” leaves “portfolio choice… indeterminate,” and leaves “optimal Ramsey policy… ill-defined,” so that applications requiring these objects need higher-order perturbation or global solution methods instead (Introduction, footnote 7, p. 5). They also flag a structural limitation of their core framework (equations 10-12): the value function vt “is not allowed to depend on” the distribution Dt, which “prevents us from applying the fake news algorithm when the behavior of heterogeneous agents depends on the anticipated future distribution through the value function, in a way that cannot be intermediated via aggregates… in general equilibrium” – examples they name include OLG models with endogenous bequest distributions and labor- or money-search models with wage posting or distribution-dependent bargaining (Section 3.3, “Scope and limitations,” p. 19). For other extensions – entry and exit, nonlinear functionals of the distribution, sub-period timing – the paper’s appendix generalizes Proposition 1 (its Propositions 2 and 3) so the fake news algorithm continues to apply (p. 19).
Key terms in this paper
Definitions below follow the paper's own usage.
- Sequence-space Jacobian
- The Jacobian of the mapping from a time path of aggregate inputs (e.g., interest rates, wages) to a time path of aggregate outputs (e.g., aggregate consumption or savings) implied by household or firm optimization, evaluated around the steady state; the paper's central claim is that this object is "a sufficient statistic" for everything about heterogeneous-agent behavior that matters for general equilibrium, so that once it is known, computing general-equilibrium impulse responses no longer requires re-solving the heterogeneous-agent block.
- Fake news algorithm
- The paper's fast method (Section 3, Proposition 1) for computing the sequence-space Jacobian of a heterogeneous-agent problem using only a single backward iteration (to get the date-0 output and date-1 distribution response to a shock at every future date s) plus a single set of forward-iterated "expectation vectors," combined via a simple recursion, rather than the "direct" approach of repeating a full backward-then-forward iteration separately for a shock at every date; named because the date-1 distribution response to a shock at date s behaves like transitory "fake news" that is fully unwound by date 1 if the shock does not materialize.
- General heterogeneous-agent representation (v, Lambda, y)
- The paper's general representation (equations 10-12) of a heterogeneous-agent problem as three functions linking a value-function object, a distribution-transition matrix, and an outcome/aggregation map across dates, into which the authors show a wide range of heterogeneous-agent household and firm problems can be cast, and which is the input the fake news algorithm operates on.
- Reiter (state-space) method
- The existing linearization method (Reiter 2009) that solves heterogeneous-agent models by writing the linearized system in the state space (i.e., in terms of the distribution's own law of motion), so that its computational cost scales with the size -- often the cube of the size -- of the discretized state space; the paper uses the Reiter method, implemented with automatic differentiation, as the accuracy benchmark its own sequence-space method is checked against, finding agreement to near machine precision on models small enough for the Reiter method to remain feasible.
- Directed acyclic graph (DAG) Jacobian composition
- The paper's approach to building a full general-equilibrium model's Jacobians (with respect to shocks) out of the individual Jacobians of its component blocks -- including heterogeneous-agent blocks computed via the fake news algorithm -- by representing the model as a directed acyclic graph of blocks and applying the chain rule ("forward accumulation") along it, which the paper says can be automated and typically takes only a few milliseconds once the underlying Jacobians are known.
- MA(T-1) representation and likelihood-based estimation
- The paper's observation, following Boppart, Krusell and Mitman (2018), that truncated linear impulse responses to shocks constitute a moving-average representation of the model, from which sample paths can be simulated, autocovariances computed analytically via a standard formula, and -- via the Kalman filter applied to a recovered state-space law of motion -- the exact Gaussian likelihood of an observed time series evaluated, all while reusing the same heterogeneous-agent Jacobians across repeated likelihood evaluations during MCMC estimation.
- Nonlinear perfect-foresight transitions via quasi-Newton iteration
- The paper's quasi-Newton procedure (Section 6) for solving the model's nonlinear perfect-foresight transition equations exactly, by iterating on a linear system whose coefficient matrix is fixed at the steady-state Jacobian rather than being recomputed at every guess, which the paper shows converges in a handful of iterations both for large one-time ("MIT") shocks and for permanent transitions between two steady states.