Potential issues with NDC system modeling
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start in ogcore/pensions.py: reproduce the survival-timing bug in delta_ret_loop with the two-period mortality example, then examine g_ndc for the "Curr GDP" array/scalar mismatch and the placeholder Y=1 passed from net_taxes in ogcore/tax.py. Also read NDC_amount, NDC_3dim_loop, and n_preTP initialization in ogcore/TPI.py for the transition-history issues. This is deep overlapping-generations pension modeling requiring domain knowledge of NDC schemes; "done" means a corrected annuity divisor plus a coherent plan for the crediting and indexation limitations, likely coordinated with @rickecon.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
1. Apparent survival-timing error in the annuity calculation
Classification: reproduced implementation problem.
delta_ret_loop in ogcore/pensions.py skips mortality in the first retirement period when calculating survival to the next payment. A numerical check used two retirement periods, 20% mortality after the first, certain death after the second, and zero discounting. The expected divisor under OG-Core’s household mortality convention is:
1 + 0.8 = 1.8
The function returned 1.0. This produces an excessively large benefit in that example. Correct this before calibrating benefit levels. The example establishes a timing inconsistency; it does not quantify the error in a particular country simulation.
2. Simplified credited returns and broken “Curr GDP” option
Classification: modeling limitation plus reproduced implementation failures.
In g_ndc in ogcore/pensions.py:
"LR GDP"uses terminal productivity growth plus terminal population growth."r"uses the last supplied interest rate.- Contributions are compounded using a single rate rather than products of the rates applicable in successive years.
- Wage-bill growth, average-wage growth, and country-specific averaging or floors are not implemented directly.
"Curr GDP" was unusable in the paths checked. It returns an array where downstream calculations expect a scalar, causing errors. Direct numerical checks produced a ValueError in benefit calculation and a Numba TypingError in annuity calculation.
Moreover, net_taxes in ogcore/tax.py passes a placeholder Y=1 to the pension calculation rather than actual GDP. Fixing the array/scalar mismatch alone would therefore not complete the integration of GDP-linked crediting into the household problem. Growth conventions also need to be reconciled with the model’s stationarized quantities.
3. Annuity mortality assumptions do not follow cohorts through the transition
Classification: modeling limitation.
By default, delta_ret uses terminal mortality, averaged across income groups using lambdas. Changing mortality earlier in the transition while holding terminal mortality fixed leaves the conversion coefficient unchanged; a numerical check confirmed this behavior. A manually supplied mort_rates_SS overrides the default mortality table.
A common divisor can be a legitimate pooling rule, but using terminal mortality throughout limits analysis of longevity reforms and demographic transitions. The World Bank annuity study explains why mortality projections and indexation must be considered together.
4. Limited post-retirement indexation
Classification: modeling limitation.
Benefits effectively remain constant in real terms under unchanged parameters. The declining benefit in stationarized units offsets productivity detrending; it is not itself a real benefit cut. A numerical check confirmed that consecutive stationarized benefits in a simple unchanged-parameter case had ratio exp(-g_y).
There is no dedicated cohort-specific post-retirement indexation rule. replacement_rate_adjust can impose calendar-year adjustments, but wage indexation or age-dependent rules require additional work. The credited return, annuity discounting, and indexation assumptions should be specified consistently.
5. Approximate reconstruction of initial entitlements
Classification: transition-history limitation.
For people already alive when the transition begins:
- Historical wages are anchored to the simulation’s period-zero wage.
- Historical labor comes from the initial age profile,
n_preTP. - Parts of the calculation use terminal effective labor-unit profiles.
Consequently, a reform-induced change in the initial wage can change the model’s valuation of contributions made before the reform. This matters especially for near-term pension spending. See NDC_amount and NDC_3dim_loop in ogcore/pensions.py, and the initialization of n_preTP in ogcore/TPI.py.
cc @rickecon
- Ngôn ngữ chính
- Python
- Star
- 85
- Fork
- 153
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 19
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 PSLmodels/OG-Core
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 57/100
PSLmodels/OG-Core#1218 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của PSLmodels/OG-Core
Issue tương tự
-
Djangonauts
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
render-engine/render-engine-cli#71 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Installation guide's prerequisites leave out ca-certificates, which a no-recommends system needsĐang mởbot-found documentation priority: P3
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
madenvel/KalinkaPlayer#544 ·
-
debt python-version
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/vscode-flake8#614 ·
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 69/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày