Two-asset HANK

US HANK

Run it hosted, from the CLI or in Python, and reproduce its numbers.

Ask the server, or install it

Four steps, from a hosted call to the local Python API.

1

Ask the hosted server

The hosted MCP server has three tools:

More detail3 points
  • hank_shock runs a stylised shock, optionally with the distributional block.
  • hank_summary lists shock kinds, units, variants and scope limits, with no solve.
  • hank_shock_incidence passes the wage and labour responses to the US microsimulation (the join).

The first call per variant pays the solves (timings); later calls are instant.

2

Or use the CLI

hank-summary shows what the model accepts; hank-shock runs one shock, here an easing shock of −0.0025 to the Taylor-rule intercept (ρ 0.61) with the distributional block on.

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

Know the units and outputs

size is a level change in the instrument:

More detailtable, 6 points
  • monetary: the quarterly Taylor-rule intercept. −0.0025 is 25bp per quarter, about 100bp annualised. The policy rate is an output (i), not the shock (how it responds).
  • fiscal_spending: government spending. Steady-state output is 1, so 0.01 is 1% of GDP.
  • productivity: TFP. Steady-state TFP is 0.468, so 0.01 is a 2.14% rise, not 1%.
Returned series: quarterly deviations from steady state
SeriesMeaningUnit
Y C IOutput, consumption, investment%
w NPre-tax real wage, labour%
piInflationpp, quarterly rate
iNominal policy rate: what the Taylor rule setspp, quarterly rate
rEx-post real returnpp, quarterly rate
taxLabour tax rate: the financing of the shockpp
  • w, N and i come from the pe-macro CLI and the policyengine_macro package; us_hank itself returns the other six.
  • --distribution adds MPCs by liquid-wealth quartile, the hand-to-mouth share and impact consumption by total-wealth quartile. With --json it also carries the share with an MPC above 0.25, which is zero at the default windfall and positive at rebate size (figure).
  • variant: the paper’s two_asset model (default) or a fast one_asset textbook variant with no capital, so no investment response, and monetary and productivity shocks only.
4

Install and script it

Install the package, solve the steady state and the Jacobian once, then draw impulse responses and distributional summaries instantly.

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

ss = model.solve_steady_state()          # a few seconds, cached
G = model.solve_jacobian(ss, T=300)      # a few seconds, cached

irf = model.shock("monetary", size=-0.0025, persistence=0.61, 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
More detailnotes

The solve behind these calls is on Methodology; what to trust the results for is on Validation.