frbus_shock: stacking warning only on monetary levers (trp_aerr periods=4 gives +2.37pp, not +1pp); poil_aerr labelled 'model units'
维护者通常 9 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with integration/src/policyengine_macro/core.py, especially FRBUS_VARIABLES and the fallback near line 730; compare the lever unit strings with the period-stacking guidance in us-frb-model/VALIDATION.md. Check the hosted calls cited in the issue against the documented behavior, then update the affected lever descriptions and poil_aerr units. Done means the exposed levers accurately describe stacking and oil-price units; the optional exogenize mode is a broader follow-up.
由索引模型根据 Issue 内容生成。
描述
What
frbus_shock warns that add-factors stack over periods only for the two monetary levers. Every other lever's units string is silent, and poil_aerr returns "units": "model units". us-frb-model/VALIDATION.md ("Period stacking") says: "Any wrapper exposing a periods argument must document this on every lever it exposes."
Evidence (hosted, us-frb-model@2508a2d, 6 Nov 2026)
| Call | Label returned | What happened |
|---|---|---|
frbus_shock(var="trp_aerr", shock=0.01, periods=4) |
"0.01 = a 1 percentage point rise in the effective personal tax rate" | trp +6.6% → +15.5% of baseline by q4, i.e. +2.37pp, not +1pp. GDP −0.39% vs −0.115% for periods=1 |
frbus_shock(var="egfe_aerr", shock=0.01, periods=4) (per VALIDATION.md) |
"0.01 ~ a 1% higher level" | level +2.90% by q4, not +1% |
frbus_shock(var="poil_aerr", shock=10, periods=4) |
"model units" | the units are $/bbl: +10 gives poil +15.4%. It does not stack (level equation) |
Also: the validated sustained +1%-of-GDP purchases experiment (egfe exogenised, VALIDATION.md Test 4, yr-1 multiplier 0.725) cannot be reached through the hosted tool. The nearest call is a one-quarter impulse.
Fix
In integration/src/policyengine_macro/core.py (FRBUS_VARIABLES, ~l.392–450, fallback at l.730):
- Add the stacking sentence to
egfe_aerr,egse_aerr,trp_aerr,trci_aerr,ecnia_aerr(and any other_aerrlever whose equation carries persistence). Better still, return the realised lever path (variables=[<lever>]by default), so callers see what they got. - Give
poil_aerra real unit ("$/barrel add-error on the oil price level; +10 ≈ +15% at the 2026 LONGBASE price"). - Optional: an
exogenizemode foregfe/trp, so the Test 4 experiment is reachable hosted.
🤖 Generated with Claude Code
- 主要语言
- HTML
- 星标
- 3
- 派生
- 0
- 平均合并
- 8 天 15 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PolicyEngine/macro 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
PolicyEngine/macro#225 · 2 条评论 ·
维护者通常 9 天内回复
-
question
难度 2/5 1-3 小时 新手友好度 67/100
PolicyEngine/macro#214 ·
维护者通常 9 天内回复
-
bug documentation
难度 1/5 1-3 小时 新手友好度 76/100
PolicyEngine/macro#211 · 1 条评论 ·
维护者通常 9 天内回复
-
难度 5/5 一周以上 新手友好度 18/100
PolicyEngine/macro#230 ·
维护者通常 9 天内回复
-
question
难度 5/5 一周以上 新手友好度 22/100
PolicyEngine/macro#227 · 4 条评论 ·
维护者通常 9 天内回复
查看 PolicyEngine/macro 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
radiancelux/prgenie#204 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
WalletConnect/walletconnect-monorepo#7392 · 1 条评论 ·
-
Calendar sync: recurring events land a day late when the local start falls on a different UTC date未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
area: app type: bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 2 天内回复