Solving Heterogeneous Agent Models with the Master Equation
📄 Summarized from the full manuscript · Human-reviewed for faithfulness before publication
In brief
Heterogeneous-agent models are hard to solve because decisions look forward while the population distribution they depend on evolves backward, and prices must clear both at once. This paper adapts a mathematical technique for systems of interacting agents -- one equation taking the population's whole distribution as an input -- and shows its basic local approximation collapses to an ordinary, low-dimensional planning equation, fast to compute by standard methods. A second-order version adds risk and asset pricing. That matters: the welfare cost of business cycles turns out 23 times larger than a classic 1987 estimate; in a 381-city migration model, the basic approximation is nearly indistinguishable from the richer one.
What this paper finds — and why it matters
This paper proposes a new conceptual and computational framework for perturbing heterogeneous-agent economies with aggregate shocks, built around the “Master Equation” recently characterized in the mathematics mean-field-games literature. The core idea is to include the underlying cross-sectional distribution of agents as an explicit state variable in each individual’s decision problem – since knowledge of the distribution pins down prices, and households (who know the distribution’s law of motion) can forecast future prices from it just as they would forecast any other state variable – yielding a single Bellman-type equation, the Master Equation, that merges the usual forward-looking/backward-looking fixed point of heterogeneous-agent models into one Markovian object. The paper’s second core idea is to take analytic (rather than numerical) perturbations of this equation around a deterministic steady state, using Fréchet derivatives in the space of distributions while preserving the full nonlinearity of individual decisions in idiosyncratic states, and working in continuous time so that borrowing constraints can be handled without Lagrange multipliers. The resulting First-order Approximation to the Master Equation (FAME) reduces to an ordinary, finite-dimensional Bellman equation for an “Impulse Value” – the directional derivative of the value function with respect to a distributional impulse – whose dimension is only twice the number of idiosyncratic states (four in a standard Krusell-Smith example), which depends in closed form on interpretable steady-state objects, applies even when many prices or distributional moments enter decisions (as in dynamic spatial, job-ladder or search models), is block-recursive (the distribution’s evolution requires no further fixed point once the Impulse Value is known), delivers the first general stability criteria and characterization of the stochastic steady state for heterogeneous-agent economies, and can be computed with standard finite-difference methods as a modified Sylvester matrix equation, typically in a tenth of a second. The Second-order Approximation to the Master Equation (SAME) shares all these properties while capturing risk, nonlinearity, and asset pricing, at the cost of tracking three times the idiosyncratic states. Two applications illustrate the framework’s reach: in an incomplete-markets business-cycle model with countercyclical unemployment risk and a low-liquidity, high-MPC calibration, the paper finds the welfare cost of business cycles is 2.3% of steady-state consumption – 23 times Lucas’s (1987) classic representative-agent estimate – concentrated among low-wealth and unemployed households, who could gain over 10% from eliminating business cycles; in a dynamic spatial migration model spanning 381 U.S. metropolitan areas, the paper finds first- and second-order perturbation solutions are virtually indistinguishable for aggregate shocks up to 30%, suggesting first-order methods suffice for many applications of this kind. Both applications solve in a couple of seconds on a laptop.
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 basic difficulty in heterogeneous-agent models does the Master Equation approach address?
“The classic difficulty in characterizing this economy is that individual decisions are forward-looking in time, while the evolution of the infinite-dimensional distribution is backward-looking in time. Prices are the fixed point of this forward-backward system that clear the capital and labor market” (Introduction, p. 3). The paper resolves this by making the distribution an explicit state variable in household decisions – since the distribution fully determines prices and households know its law of motion, they can forecast prices exactly as they forecast any other state, “merg[ing] the fixed point on decisions, prices and the distribution into a single object”: the Master Equation (Introduction, pp. 3-4).
Q2. What is the Master Equation, concretely, in the Krusell-Smith example?
It “consists of a single Bellman equation that describes the entire behavior of a system of interacting agents”; in the Krusell and Smith (1998) example, the Master Equation defines a value function that depends on a given household’s own idiosyncratic states – assets and productivity – as well as the underlying distribution of assets and productivity of all other households in the economy (Introduction, p. 4). Because this includes as a state variable all the information needed to forecast the economy’s evolution, it is “a Markovian representation of the economy.”
Q3. How does the FAME reduce an infinite-dimensional object to something tractable?
The FAME’s solution, the Impulse Value, “consists of the directional derivatives of the value function with respect to the distribution” and “depends on only twice the number of idiosyncratic states, down from infinity in the fully nonlinear Master Equation”; in the Krusell-Smith example, “the Impulse Value has dimension four” (Introduction, p. 4). Concretely, individuals need only know their own idiosyncratic states and the idiosyncratic state at which a hypothetical distributional impulse is occurring – twice the underlying state count – “a drastic dimension reduction” that is “a feature of the local perturbation.”
Q4. Why does the FAME apply to settings well beyond a simple incomplete-markets consumption-savings model?
Because the FAME is a perturbation with respect to the entire distribution rather than a small set of pre-selected moments, it “applies equally well to settings in which few or many prices summarize feedback between the general equilibrium and individual decisions” – for instance dynamic spatial models where households track several location-specific prices, or search-and-matching models where the entire distribution of wage offers matters directly to workers (Introduction, p. 5). The paper cites Bilal and Rossi-Hansberg (2023), which uses the FAME to evaluate the cost of climate change in a U.S. economy disaggregated into over 3,000 counties, as an example of this generality.
Q5. What stability results does the FAME deliver, and why is a naive numerical check potentially misleading?
The FAME provides, “to the best of my knowledge, the first stability criteria and a description of the stochastic steady-state in heterogeneous agent economies,” showing that dynamic stability and exponential convergence to steady state obtain when steady-state transition probabilities satisfy either a mixing condition or a Lyapunov function condition (Introduction, pp. 5-6). Crucially, “if these conditions fail, checking the dominant eigenvalue in numerically discretized economies can be misleading about true convergence rates: the numerical dominant eigenvalue will converge to zero as the discretization becomes finer if the underlying law of motion exhibits a continuous spectrum that includes zero” – the mixing/Lyapunov conditions rule this failure mode out and guarantee a genuine spectral gap.
Q6. What does the SAME add, and at what computational cost?
“Conceptually and practically, the Second-order Approximation to the Master Equation (SAME) is the same as the FAME,” again depending only on closed-form steady-state objects, but its solution “now depends on three times the number of idiosyncratic states because pairwise impulses in the distribution matter to second order,” computed via tensor Sylvester equations, and the paper further characterizes second moments of the stochastic steady-state distribution and a welfare formula, making the SAME “well-suited for applications that focus on non-linearities, aggregate risk or asset pricing which requires second-order perturbations to depart from certainty equivalence” (Introduction, pp. 6-7).
Q7. What does the business-cycle-cost application find, and why is the estimate so much larger than Lucas’s?
Using a low-liquidity, high-MPC calibration (targeting an average MPC of 0.2 and aggregate consumption volatility of 0.032, as in Lucas 1987) in an incomplete-markets economy with countercyclical income risk, the paper finds an aggregate cost of business cycles of 2.3% of steady-state consumption, “23 times larger than Lucas (1987)’s seminal calculation,” with losses “concentrated on the low-wealth and unemployed individuals, who can gain over 10% from the elimination of business cycles” (Introduction, p. 5). The gap from Lucas’s representative-agent estimate reflects the combination of incomplete markets and countercyclical idiosyncratic risk, which exposes low-wealth, borrowing-constrained households to business-cycle risk far more severely than a representative consumer.
Q8. What does the dynamic spatial application find about the adequacy of first-order perturbation?
Disaggregating the U.S. into 381 Metropolitan Statistical Areas, with bilateral migration costs, idiosyncratic preference shocks, locally supplied housing, and location-specific exposure to an aggregate productivity shock, the paper estimates the model on U.S. data and finds “the response of population and welfare across all locations is virtually identical in the FAME and the SAME for aggregate shocks up to 30%,” indicating “that first-order perturbations are sufficient for many applications of interest” (Introduction, pp. 5-6). Both the FAME and SAME solve in a couple of seconds on a laptop in this application.
Q9. How does this paper’s approach relate to the sequence-space methods and other higher-order perturbation papers in this reading list?
The paper positions itself as reversing the usual order of operations in sequence-space methods like Boppart, Krusell and Mitman (2018) and Auclert, Bardóczy, Rognlie and Straub (2021), which “first discretize, then linearize to first order”: by “linearizing first, discretizing next, the FAME is the internally consistent foundation for this computational approach,” providing an economic interpretation of otherwise opaque numerical output (Introduction, p. 6). The paper also notes that, since its first circulation in 2021, “Bhandari et al. (2023) have developed complementary techniques to compute perturbations in discrete time heterogeneous agent economies,” and that the Master Equation approach “delivers a systematic approach to higher order perturbations such as the SAME,” with third and higher orders possible in principle though not derived explicitly in this paper.
Key terms in this paper
Definitions below follow the paper's own usage.
- The Master Equation
- A single Bellman-type equation, adapted from the mathematics mean-field-games literature (Cardaliaguet et al. 2019), that fully characterizes a dynamic general equilibrium economy with cross-sectional heterogeneity by treating the underlying distribution of agents as an explicit state variable in each individual's decision problem, alongside their own idiosyncratic states. Because it merges the fixed point over individual decisions, prices, and the distribution into one object, it is "a Markovian representation of the economy" (Introduction, pp. 3-4).
- FAME (First-order Approximation to the Master Equation)
- The paper's first-order local perturbation of the Master Equation around a deterministic steady state, obtained via Fréchet derivatives (generalized derivatives on infinite-dimensional spaces) with respect to distributional impulses. It reduces to a standard, finite-dimensional Bellman equation for the "Impulse Value" -- the directional derivative of the value function with respect to a distributional impulse -- and has six properties: finite dimension (twice the idiosyncratic state count in the Krusell-Smith example), closed-form dependence on steady-state objects, applicability when many prices or moments matter, block-recursivity, characterized stability/stochastic steady state, and fast standard-method implementation as a modified Sylvester matrix equation (Abstract; Introduction, pp. 4-6).
- SAME (Second-order Approximation to the Master Equation)
- The paper's second-order local perturbation of the Master Equation, which the paper shows shares all the same properties as the FAME but whose solution depends on three times the number of idiosyncratic states because pairwise distributional impulses now matter; computed via tensor Sylvester equations, and suited to applications -- nonlinearities, aggregate risk, or asset pricing -- that require departing from certainty equivalence (Introduction, pp. 6-7).
- Cost of business cycles in an incomplete-markets economy
- The paper's finding, in an Aiyagari/Krusell-Smith-style incomplete-markets economy with countercyclical income risk calibrated to a low-liquidity, high-MPC target (average MPC of 0.2, aggregate consumption volatility of 0.032 as in Lucas 1987), that the welfare cost of business cycles is 2.3% of steady-state consumption -- "23 times larger than Lucas (1987)'s seminal calculation" -- with losses "concentrated on the low-wealth and unemployed individuals, who can gain over 10% from the elimination of business cycles" (Introduction, p. 5, section on applications).
- Near-linearity of a dynamic spatial migration model
- A dynamic spatial application disaggregating the U.S. economy into 381 Metropolitan Statistical Areas, in which a household's current location is an individual state and the population distribution across locations is the aggregate state. After estimating the model on U.S. data, the paper finds "the response of population and welfare across all locations is virtually identical in the FAME and the SAME for aggregate shocks up to 30%," indicating first-order perturbation is sufficient for this class of application (Introduction, pp. 5-6).