Skip to content

Funded defined contribution pillar, part 2: steady state - #1284

Merged
rickecon merged 13 commits into
PSLmodels:masterfrom
jdebacker:FDC_SS
Nov 20, 2026
Merged

rickecon merged 13 commits into
PSLmodels:masterfrom
jdebacker:FDC_SS

Conversation

@jdebacker

@jdebacker jdebacker commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

This PR is stacked on #1283 (FDC part 1), so its first commit is #1283's. Review only the second commit, "Solve the steady state with the funded defined contribution pillar", until #1283 merges.

This is part 2 of 4 for the funded defined contribution (FDC) pillar: the steady state. With fdc_tau = 0 (the default) every result is unchanged: the off path adds 0.0 to the existing terms, and the small-model steady state matches part 1 exactly.

What changes when fdc_tau > 0

  • Household budget. Consumption is reduced by the contribution and increased by the annuity, through household.fdc_net_flow. These flows stay out of tax.net_taxes, so they are neither government revenue nor outlays, and the tax outputs are unaffected.

  • Labor FOC. household.fdc_labor_wedge adds two terms:

    • the direct cost of the contribution, −u′(c_s)/p̃ · ∂C_s/∂n_s;
    • the value of the annuity it buys, discounted with the household's own utility weights β^{u−s} Π(1−ρ) e^{(1−σ) g_y (u−s)}.

    Contributions are therefore not treated as a pure tax.

  • Capital market. Fund assets F (aggregates.get_F) are aggregated like get_B, in next-period detrended units like b_{s+1}. They add to domestic savings: get_K_splits(B + F, …).

  • Bequests. Balances of members who die before retirement are bequeathed (added to get_BQ). After retirement, the balances of those who die stay in the annuity pool.

  • Immigrants arrive with the FDC holdings per survivor of their age, as they do with b. This is used in get_F and in the immigrant term of get_I.

  • New SS outputs: F, fdc_contrib, fdc_benefits, fdc_holdings, agg_fdc_contrib, agg_fdc_benefits.

  • Time path. TPI.run_TPI raises NotImplementedError while the pillar is on. Part 3 adds the time path.

Checks (small model, tests/testing_params.json)

fdc_tau r w B F K L RC error
0.00 0.0864 0.9065 2.118 0 1.289 0.4985 1.1e-9
0.05 0.0756 0.9369 2.040 0.244 1.415 0.4978 1.1e-9
0.10 0.0664 0.9651 1.974 0.471 1.537 0.4970 1.1e-9
  • Labor response. Without the accrual term (contributions as a pure tax), L at fdc_tau = 0.10 would be 0.4956 instead of 0.4970. The accrual offsets about half of the labor response.
  • Fund identity. In the steady state, (1 + r_p) F − (FDC bequests) = Σ ω · (start-of-period balances), to rounding. This is tested.
  • Labor wedge. On a consumption path that satisfies the Euler equation, the wedge matches its closed form: pre-retirement contributions are valued like private saving, plus the value of the annuity's mortality credits. This is tested.

Simplifications to review

  • The warm-glow bequest motive is over private savings only, so households do not value the FDC balances bequeathed when they die before retirement.
  • FDC returns are not in before_tax_income or in the income factor calibration.
  • K_d now includes the fund's holdings.

Status

🤖 Generated with Claude Code

@codecov-commenter

codecov-commenter commented Nov 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.24771% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.83%. Comparing base (998032d) to head (6a52f8e).

Files with missing lines Patch % Lines
ogcore/household.py 94.73% 2 Missing ⚠️
ogcore/pensions.py 96.29% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1284      +/-   ##
==========================================
+ Coverage   79.57%   79.83%   +0.25%     
==========================================
  Files          24       24              
  Lines        6924     7028     +104     
==========================================
+ Hits         5510     5611     +101     
- Misses       1414     1417       +3     
Flag Coverage Δ
unittests 79.83% <97.24%> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ogcore/SS.py 92.06% <100.00%> (+0.24%) ⬆️
ogcore/TPI.py 82.19% <100.00%> (+0.05%) ⬆️
ogcore/aggregates.py 100.00% <100.00%> (ø)
ogcore/fiscal.py 100.00% <ø> (ø)
ogcore/pensions.py 72.72% <96.29%> (+0.83%) ⬆️
ogcore/household.py 91.22% <94.73%> (+0.44%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Households pay FDC contributions and receive annuity benefits through
the budget constraint (outside net_taxes and the government budget).
FOC_labor values the annuity a contribution buys via
fdc_labor_wedge. Fund assets F (aggregates.get_F, in next-period
detrended units like b_{s+1}) add to domestic savings in
get_K_splits; pre-retirement balances of the deceased are bequeathed;
immigrants arrive with their age's FDC holdings per survivor. SS
output adds F and FDC profiles. run_TPI raises NotImplementedError
while fdc_tau > 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdebacker
jdebacker requested a review from rickecon November 18, 2026 21:49
rickecon and others added 8 commits November 19, 2026 03:06
Add pension contribution wedge to aggregate budget tracking
A cap of zero means the fund holds no reserve: the whole spread is
paid to the government each period, or covered by a transfer from the
government when the wedge is negative.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reserve, its revenue to the government, and the government's
transfer to it belong to the funded defined contribution fund only, so
name them for it and keep them distinct from the pay-as-you-go pension
variables: fdc_fund_reserves, fdc_fund_revenue, fdc_fund_transfer,
aggregates.get_fdc_fund_reserves, and the parameter
fdc_fund_reserve_max_GDPratio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fund keeps the spread between r_p and r_fdc as a reserve only on the
time path until period tG1, when the whole balance is paid to the
government (or a deficit covered by it); from then on the spread goes to
the government budget each period. So the steady state holds no
reserve: get_fdc_fund_reserves returns a zero reserve with the spread as
FDC fund revenue (or a transfer from the government when negative).

This removes the steady-state reserve between its floor and ceiling,
whose sensitivity to r_p (about 50 times in testing_params) failed the
steady-state resource constraint check on CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rickecon

rickecon commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

@jdebacker. This PR looks good to me. I made one last change that I submitted as a PR to your branch. I updated two docstrings in fiscal.py that described the old method with the upper bound ratio of pension reserves/GDP. I also updated the uv.lock file with one small version update to the ruff package. As soon as you review and merge these changes, I am ready to merge this PR.

One note that I think we should save for the Part 3 PR #1285 is to make sure to remove the fdc_fund_reserve_max_GDPratio parameter from default_parameters.json and from the tests (or anywhere else it shows up). We now have a different approach for solving the model.

@rickecon
rickecon merged commit f21e911 into PSLmodels:master Nov 20, 2026
8 checks passed
jdebacker added a commit to jdebacker/OG-Core that referenced this pull request Nov 20, 2026
Brings in the merged FDC_SS (PSLmodels#1284), Rick's fiscal.py docstring
updates, and the uv.lock update. Resolves conflicts in
ogcore/aggregates.py, tests/test_aggregates.py, and CHANGELOG.md by
keeping the FDC_TPI versions, which contain the steady-state FDC fund
reserve code from FDC_SS plus its time path. Updates the D_G_path
docstring for the payout of the reserve at tG1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jdebacker
jdebacker deleted the FDC_SS branch November 20, 2026 19:24
jdebacker added a commit to jdebacker/OG-Core that referenced this pull request Nov 20, 2026
Brings in upstream/master (with the merged FDC_SS, PSLmodels#1284) through
FDC_TPI. Resolves the conflict in the get_G_ss and get_TR docstrings in
ogcore/fiscal.py by keeping the upstream wording, with the payout at
the end of tG1 - 1 and without the note that the time path is not yet
implemented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants