Fix state pension reforms having no budget impact (#1178)#1509
Open
Fix state pension reforms having no budget impact (#1178)#1509
Conversation
basic_state_pension and additional_state_pension read parameters at data_year using node-level access (parameters(instant).path.amount), which doesn't reflect parameter reforms. Fixed by: 1. Using leaf-level access (parameters.path.amount(instant)) which correctly reflects reforms applied to the parameter tree. 2. Computing each person's share of the maximum at data_year, then applying that share to the (possibly reformed) maximum at the simulation period — replacing the manual triple-lock uprating. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
vahid-ahmadi
left a comment
There was a problem hiding this comment.
1. new_state_pension has the same bug
new_state_pension.py:18 uses node-level access (parameters(period).gov.dwp...), which I verified empirically does not see reforms — same root cause fixed here. Currently dormant (£0 in baseline) but trivial to fix with the same leaf-level pattern.
2. additional_state_pension baseline changes should be documented
The old formula had no uprating; the new one adds bsp(period) / bsp(data_year) (~1.26x at 2029). This increases baseline additional SP by ~26% (~£5bn) and is what shifts the UC taper expected impact from -34.3 to -42.0. Adding uprating is arguably correct (real additional SP is CPI-uprated), but the PR description says the ratio is 1.0 when no reform is active — that only holds when data_year == period. Worth acknowledging as an intentional improvement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
basic_state_pensionandadditional_state_pensionformulas now respond to parameter changes at the simulation periodRoot cause
basic_state_pensionreadparameters(data_year)instead ofparameters(period). The formula fetched the parameter at the survey data year and applied a fixed triple-lock uprating, so reforms to the parameter for the simulation year were never seen. Same issue inadditional_state_pension.Fix
Both formulas now compute a reform ratio:
parameters(period).amount / parameters(data_year).amountapplied as a multiplier on top of the triple-lock-uprated amount. If no reform is active, the ratio is 1.0 (no change). If a reform modifies the parameter, the ratio adjusts the output accordingly.Test plan
Fixes #1178