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_shockruns a stylised shock, optionally with the distributional block.hank_summarylists shock kinds, units, variants and scope limits, with no solve.hank_shock_incidencepasses 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 --distribution3
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%.
| Series | Meaning | Unit |
|---|---|---|
Y C I | Output, consumption, investment | % |
w N | Pre-tax real wage, labour | % |
pi | Inflation | pp, quarterly rate |
i | Nominal policy rate: what the Taylor rule sets | pp, quarterly rate |
r | Ex-post real return | pp, quarterly rate |
tax | Labour tax rate: the financing of the shock | pp |
w,Nandicome from thepe-macroCLI and thepolicyengine_macropackage;us_hankitself returns the other six.--distributionadds MPCs by liquid-wealth quartile, the hand-to-mouth share and impact consumption by total-wealth quartile. With--jsonit 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’stwo_assetmodel (default) or a fastone_assettextbook 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-modelfrom 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 shareMore detailnotes
The solve behind these calls is on Methodology; what to trust the results for is on Validation.