Models / us-hank

model 06 · us-hank · US · hosted

See who responds to a US shock, not just how much.

Run stylized monetary, fiscal-spending, and productivity shocks through a two-asset heterogeneous-agent New Keynesian model and read the aggregate impulse responses alongside first-order distributional output — MPCs by wealth quartile and the hand-to-mouth share.

01 — what it is

The distributional member for the US.

This is a validated replication of the two-asset heterogeneous-agent New Keynesian (HANK) model of Auclert, Bardóczy, Rognlie and Straub — the model of their Econometrica 2021 paper, "Using the Sequence-Space Jacobian to Solve and Estimate Heterogeneous-Agent Models" — built directly on the authors' sequence-jacobian toolkit at the paper's production grid sizes rather than the packaged demo grids.

Where frb-us answers "how much does US output move after a shock", this model answers a question frb-us cannot: who moves. Households differ in liquid and illiquid wealth, so their marginal propensities to consume differ, and the model carries that whole distribution through the general-equilibrium response. It is a VAR-free, sequence-space HANK: no estimated reduced form, no expectations shortcut — first-order impulse responses computed from the model's own general-equilibrium Jacobian.

It is not a forecaster, and it does not score detailed tax reforms: it scores stylized shocks — monetary, fiscal spending, and productivity — around a calibrated steady state, and its distributional outputs are first-order approximations from steady-state policies.

02 — how it works

Steady state, Jacobian, then instant IRFs.

The us-hank solve pipeline, stage by stage
stagewhat it does
Calibrate & solve Solves the general-equilibrium steady state at the paper's production grids (50 liquid × 70 illiquid × 50 capital points), calibrating discounting and portfolio-adjustment costs to hit the paper's asset-market targets. About 13 seconds, computed once and cached.
Differentiate Builds the general-equilibrium sequence-space Jacobian — the T×T linear map from each exogenous path to each outcome path (T = 300 quarters). About 5 seconds, cached alongside the steady state.
Shock A shock is an AR(1) path, size × persistencet, on one of three instruments: the Taylor-rule intercept (monetary), real government spending (fiscal_spending), or TFP (productivity). With both caches warm an IRF is a matrix–vector product — effectively instant.
Distribute From the steady-state joint distribution and consumption policy: MPCs by liquid-wealth quartile, the hand-to-mouth share, and a first-order allocation of the impact consumption response across total-wealth quartiles.

One design point matters for what you can ask it: the labor tax is endogenous. The fiscal block balances the government budget each period, so a spending shock is implicitly tax-financed — and there is no exogenous transfer or tax-rate instrument to shock. Requests for one are refused with that explanation rather than answered with an invented mapping.

03 — how to run it

Ask the server, or install it.

The quickest route is the hosted MCP server, where two tools reach this model: hank_shock (run a stylized shock, optionally with the distributional block) and hank_summary (the shock catalogue, units, variants, and scope limits — instant, no solve). The first call per variant pays the steady-state and Jacobian solves, roughly 18 seconds cold; both are cached, so warm calls are effectively instant. The same two are on the CLI:

pe-macro hank-summary
pe-macro hank-shock --kind monetary --size -0.0025 --persistence 0.6 --distribution

Units differ per kind. monetary is a level change in the quarterly policy rate (−0.0025 = a 25bp easing); fiscal_spending is a level change in G (steady-state output is 1, so 0.01 = 1% of GDP); productivity is a level change in TFP. A variant option selects the paper's two_asset model (the default) or a fast one_asset textbook variant — no capital, so no investment response, and monetary/productivity shocks only.

For anything beyond the hosted surface, install the package and use its Python API directly:

pip install git+https://github.com/PolicyEngine/us-hank-model
from us_hank import model, distributional

ss = model.solve_steady_state()          # ~13s, cached
G = model.solve_jacobian(ss, T=300)      # ~5s, cached

irf = model.shock("monetary", size=-0.0025, persistence=0.6, ss=ss, G_jac=G)
print(irf["Y"][:8])                      # output, % deviation from steady state
print(distributional.summary(ss))        # MPCs by quartile, hand-to-mouth share
04 — what it can answer

Stylized US shocks, with the household distribution attached.

The model's designed job is the qualitative and quantitative transmission of a stylized aggregate shock through a realistic household wealth distribution: how a monetary easing raises output, consumption, investment and inflation; how a tax-financed spending expansion raises output while the endogenous labor tax leans on consumption; and how the response concentrates among high-MPC, low-liquid-wealth households — the economic point of a HANK model, and the thing a representative-agent model cannot say.

It cannot forecast — responses are deviations around a calibrated steady state, not a projection of the US economy. It cannot score a PolicyEngine reform: score_reform refuses model="hank" outright, because the model has three stylized instruments and an endogenous labor tax, so no mapping from statute exists. Its responses are first-order — linear in the shock, with no state dependence — and its distributional cuts are first-order approximations from steady-state policies, not full household-level dynamics.
05 — how far to trust it

A replication gate, not a forecast-accuracy claim.

The ground truth here is the published paper. The model repository's 18-test suite gates the steady-state calibration targets, market clearing, and the signs and magnitudes of the shock responses against the published Econometrica 2021 results, and the implementation builds on the authors' own sequence-jacobian toolkit rather than re-deriving the model. That makes fidelity strong and the claim narrow: this is evidence the replication is right, not evidence the model predicts the US economy — no predictive validation exists or is claimed.

This is an independent replication of a published academic model. It is not produced or endorsed by the paper's authors, and its results are model counterfactuals, not official estimates or forecasts.

06 — limits

What is absent, and what is deliberate.

Known limits of the us-hank implementation
limitdetail
Not a forecaster There is no data, no estimation, and no forecast origin: every result is an impulse response around the paper's calibrated steady state. Use boe-svar (UK) for forecasts; nothing in this suite forecasts the US.
Stylized instruments only Three shock kinds — monetary, fiscal spending, productivity. The labor tax is endogenous (the fiscal block balances the budget), so there is no transfer or tax-rate instrument, and score_reform refuses model="hank" rather than inventing a reform mapping.
First-order responses IRFs are linear in the shock size, with no state dependence, no zero-lower-bound, and no asymmetry between large and small or positive and negative shocks.
Approximate distributional output The by-quartile consumption response allocates the aggregate response in proportion to steady-state MPCs. It captures the MPC-heterogeneity channel, not full household-level dynamics along the transition.
Calibration, not vintage The parameterisation is the published paper's. There is no data vintage to refresh; revisiting the calibration would be a deliberate model change, not a data update.