model 04 — US heterogeneous-agent NK model · 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 — aggregate impulse responses plus first-order distributional output: MPCs by wealth quartile and the hand-to-mouth share.
Ask the server, or install it.
Four steps from hosted call to local Python API; each step's code follows its narrative.
Ask the hosted server
Two MCP tools
Quickest is the hosted MCP server: hank_shock runs a stylized shock, optionally with the distributional block; hank_summary lists shock kinds, units, variants, and scope limits — instant, no solve.
Cold vs warm
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.
Or use the CLI
Same two calls
The same two operations on the command line: hank-summary to see what the model accepts, hank-shock to run one — here a 25bp monetary easing with the distributional block on.
Know the units and variants
Units differ per kind
monetary: level change in the quarterly policy rate (−0.0025 = a 25bp easing); fiscal_spending: level change in G (steady-state output is 1, so 0.01 = 1% of GDP); productivity: level change in TFP.
Two variants
variant 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.
Install and script it
The Python API
Beyond the hosted surface, install the package and use the Python API directly: solve the steady state once, solve the Jacobian once, then draw impulse responses and distributional summaries instantly.
What sits behind it
The solve behind these calls — steady state, Jacobian, then instant IRFs — is on the methodology page; what to trust the results for, on the validation page.