frbus_shock: stacking warning only on monetary levers (trp_aerr periods=4 gives +2.37pp, not +1pp); poil_aerr labelled 'model units'

Đang mở
#212 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 9 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

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):

  1. Add the stacking sentence to egfe_aerr, egse_aerr, trp_aerr, trci_aerr, ecnia_aerr (and any other _aerr lever whose equation carries persistence). Better still, return the realised lever path (variables=[<lever>] by default), so callers see what they got.
  2. Give poil_aerr a real unit ("$/barrel add-error on the oil price level; +10 ≈ +15% at the 2026 LONGBASE price").
  3. Optional: an exogenize mode for egfe/trp, so the Test 4 experiment is reachable hosted.

🤖 Generated with Claude Code

Ngôn ngữ chính
HTML
Star
3
Fork
0
Merge trung bình
8 ngày 15 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PolicyEngine/macro

Tất cả issue của PolicyEngine/macro

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.