UK SVAR adapter publishes log-difference YoY as if it were the simple rate
Maintainer thường phản hồi trong vòng 1 ngà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
- 45/100
Hướng nghiên cứu
Read integration/src/policyengine_macro/core.py around svar_forecast and the SVAR inflation-incidence tool, then check the upstream boe-var-model forecast helpers and the scorecard treatment of archived rounds. Confirm the conversion for aggregated medians and bands, and decide how scoring should handle older rounds. Done means the forecast and CPI comparison use simple-rate units, with a test matching 100*(P_t/P_{t-4}-1) and a clear basis for archived rounds.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
The UK SVAR adapter publishes the model's four-quarter log difference as if it were the simple four-quarter rate that ONS, the BoE MPR and the OBR EFO publish.
integration/src/policyengine_macro/core.py:1365(main 153cf41), insvar_forecast:yoy_paths.append(forecast.yoy(np.vstack([tail, path]))).boe_var.forecast.yoyisx_t - x_{t-4}on 100·log levels, which is 100·log(P_t/P_{t-4}). The medians and 68/90 bands go out unchanged as "YoY %".core.py:3850-3851, in the SVAR inflation-incidence tool:svar_cpi_yoy_pct(log basis, from the same path) is differenced againstreference_cpi_yoy_pct(a published simple rate). So the gap mixes units with the forecast difference.
The simple rate is above the log rate by about x²/200: +0.04pp at 2.8% CPI, +0.13pp at 5%, +0.5pp at 10%. For 2026 CPI near 3%, that is about 0.03–0.05pp on every archived CPI row on /forecasts, which is small but has a consistent sign. In a 2022-style episode it is about half a point.
Upstream fix
PolicyEngine/boe-var-model adds forecast.yoy_pct and forecast.log_to_simple_pct (draft PR https://github.com/PolicyEngine/boe-var-model/pull/18). The map 100·expm1(x/100) is monotone, so applying it to the aggregated median and band edges gives exactly the bands of the converted paths. There is no need to convert each path.
What the adapter should do (not done here)
- In
svar_forecast, convertbandswithforecast.log_to_simple_pctafter aggregating. Fall back to100*np.expm1(x/100)for olderboe_varversions without the helper. - Use the converted CPI value for
svar_cpi_yoy_pctat :3850, so the gap at :3851 is simple minus simple. - Archived forecast rounds: leave the vintages as they are (append-only). Add a basis note to rounds before the change, so a scorecard does not mix log-basis and simple-basis errors without flagging it. Alternatively, convert at scoring time. The conversion is exact for medians and bands, so either option is safe.
- Add a test: for a known level path, the adapter's YoY must match
100*(P_t/P_{t-4}-1).
Decision for Vahid
Decide whether the scorecard should re-express past SVAR rounds on the simple basis at scoring time (recommended: it is exact and keeps the vintages untouched), or leave them on the log basis with a note.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- HTML
- Star
- 3
- Fork
- 1
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 53
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PolicyEngine/macro
-
HANK incidence overlay omits the model's labour-tax financingCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởquestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
PolicyEngine/macro#214 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Hosted score_reform (OBR, default window) has not finished within 10 minutes since the 30 Oct deployĐang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 25/100
PolicyEngine/macro#243 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Referee review of the model pages (6 Nov 2026)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởquestion
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
PolicyEngine/macro#227 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
PolicyEngine/macro#223 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
PolicyEngine/macro#210 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PolicyEngine/macro
Issue tương tự
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
meetecho/juturna_nodes#43 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
ranxianglei/billion-context#7860 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
`RequestHandler.build_request_kwargs` drops empty request bodies such as `{}` or `""`Có thể đã có người làm @abhirajadhikary06 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
typesense/typesense-python#170 ·
Maintainer thường phản hồi trong vòng 1 ngày