Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fix-uc-standard-allowance-reform.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix UC standard allowance reforms being ignored due to rebalancing set_input.
13 changes: 3 additions & 10 deletions policyengine_uk/scenarios/uc_reform.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,9 @@ def add_universal_credit_reform(sim: Microsimulation):
) # Monthly amount * 12
sim.set_input("uc_LCWRA_element", year, current_health_element)

# https://bills.parliament.uk/publications/62123/documents/6889#page=14

uc_uplift = rebalancing.standard_allowance_uplift

for year in range(2026, 2030):
if not rebalancing.active(year):
continue
previous_value = sim.calculate("uc_standard_allowance", year - 1)
new_value = previous_value * (1 + uc_uplift(year))
sim.set_input("uc_standard_allowance", year, new_value)
# Standard allowance uplift is now handled in the uc_standard_allowance
# formula itself, so that user reforms to the base amount are respected.
# See: https://github.com/PolicyEngine/policyengine-uk/issues/1472


universal_credit_july_2025_reform = Scenario(
Expand Down
2 changes: 1 addition & 1 deletion policyengine_uk/tests/microsimulation/reforms_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ reforms:
parameters:
gov.hmrc.child_benefit.amount.additional: 25
- name: Reduce Universal Credit taper rate to 20%
expected_impact: -43.2
expected_impact: -42.0
parameters:
gov.dwp.universal_credit.means_test.reduction_rate: 0.2
- name: Raise Class 1 main employee NICs rate to 10%
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Test UC standard allowance reforms are respected (#1472)."""

from policyengine_uk import Simulation

YEAR = 2026

SITUATION = {
"people": {"person": {"age": {YEAR: 30}}},
"benunits": {"benunit": {"members": ["person"]}},
"households": {"household": {"members": ["person"]}},
}

REFORM = {
"gov.dwp.universal_credit.standard_allowance.amount.SINGLE_OLD": {
"2025-01-01.2100-12-31": 800,
},
}


def test_uc_standard_allowance_responds_to_reform():
baseline = Simulation(situation=SITUATION)
b = baseline.calculate("uc_standard_allowance", YEAR)[0]
reformed = Simulation(situation=SITUATION, reform=REFORM)
r = reformed.calculate("uc_standard_allowance", YEAR)[0]
assert r / b > 1.5
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ class uc_standard_allowance(Variable):
def formula(benunit, period, parameters):
p = parameters(period).gov.dwp.universal_credit.standard_allowance
claimant_type = benunit("uc_standard_allowance_claimant_type", period)
return p.amount[claimant_type] * MONTHS_IN_YEAR
value = p.amount[claimant_type] * MONTHS_IN_YEAR
rebalancing = parameters(period).gov.dwp.universal_credit.rebalancing
if rebalancing.active:
value = value * (1 + rebalancing.standard_allowance_uplift)
return value