Fed FRB/US, rebuilt
FRB/US
Run it hosted, from the CLI or in Python, and reproduce its numbers.
Ask the server, or install it
Five steps, from a hosted one-liner to the full model in Python.
Ask the hosted server
The hosted MCP server has four FRB/US tools: frbus_list_variables (the shockable levers, with units), frbus_shock (solve and return impulse responses), frbus_summary (vintage and validation provenance), and frbus_shock_incidence (who bears a shock, experimental).
pe-macro frbus-variables
pe-macro frbus-shock --var rffintay_aerr --shock 1.0
pe-macro frbus-summaryAbout this stepnotes
The same four on the CLI
The CLI runs them locally, with no server round-trip; the fourth is pe-macro frbus-shock-incidence.
Three traps
Units differ by lever. rffintay_aerr is in percentage points (1.0 = a 100bp tightening); spending levers such as egfe_aerr are in log points of quarterly growth, not billions of dollars. A dollar-sized number diverges the solver.
About this stepnotes
Each rule reads its own add-error. rffintay_aerr works only under inertial_taylor; taylor rejects it and points to rfftay_aerr.
The rejection replaces what would otherwise be silent all-zero responses.
Shocks stack across periods. A shock is added in each shocked quarter, on top of the equation’s own persistence. Holding +1.0 on rffintay_aerr for 4 quarters peaks the funds rate at +2.97pp, not +1; holding +0.01 on egfe_aerr for 4 quarters raises federal purchases 2.90%, not 1%.
Choose the policy rule
frbus_shock takes a policy_rule: inertial_taylor (the default, the LONGBASE rule, used by the validation numbers), taylor (the non-inertial variant), or fixed_funds_rate, which holds the funds rate on its baseline path, so there is no endogenous monetary offset.
About this stepnotes
The rule is usually the point of the exercise: a four-quarter federal-purchases shock of 0.01 log points (which stacks to 2.90% on purchases) peaks higher on real GDP with the funds rate fixed, and the price-level response is larger still.
Install the package
Install for the full 284-variable model, the Board's own demo scripts, or anything the four tools do not expose. The package is separate from the rest of the suite, with its own Python API.
git clone https://github.com/PolicyEngine/us-frb-model
cd us-frb-model
uv venv && uv pip install -e ".[dev]"About this stepnotes
The Board's raw materials are vendored unmodified, so there is no data download, but you clone rather than pip-install from an index.
Run a 100bp shock in Python
Load LONGBASE, set the Board's demo fiscal configuration, add-factor with init_trac so the baseline reproduces LONGBASE exactly, add the shock, solve.
import pandas as pd
from frbus import Frbus, load_data
data = load_data("vendor/data_only_package/LONGBASE.TXT")
model = Frbus("vendor/pyfrbus_package/models/model.xml")
start, end = pd.Period("2026Q1"), pd.Period("2030Q4")
# the fiscal-policy configuration the Board's own demos use
data.loc[start:end, "dfpdbt"] = 0
data.loc[start:end, "dfpsrp"] = 1
# add-factor the model so the baseline reproduces LONGBASE exactly
with_adds = model.init_trac(start, end, data)
# 100bp monetary policy shock in the first quarter
with_adds.loc[start, "rffintay_aerr"] += 1
sim = model.solve(start, end, with_adds)
print((sim.loc[start:end, "xgdp"] / with_adds.loc[start:end, "xgdp"] - 1) * 100)About this steptable, notes
| code | variable | role |
|---|---|---|
rffintay_aerr | Taylor-rule policy-rate error term | shock instrument — +1 for a 100bp tightening |
dfpdbt / dfpsrp | Fiscal policy switches | exogenous — set the debt / surplus closure |
xgdp | Real GDP | endogenous — headline output |
lur | Unemployment rate | endogenous — rate, pp |
picxfe | Core PCE inflation | endogenous — rate, pp |
rff | Federal funds rate | endogenous under the rule, pp |
examples/monetary_policy_shock.py
The API mirrors the essentials of pyfrbus's Frbus class
(Frbus(path), .init_trac(),
.solve(), .exogenize()), so the Board's
demo scripts port across with minimal change.