File tree Expand file tree Collapse file tree
variables/gov/dwp/universal_credit/standard_allowance Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,16 +29,8 @@ def add_universal_credit_reform(sim: Microsimulation):
2929 ) # Monthly amount * 12
3030 sim .set_input ("uc_LCWRA_element" , year , current_health_element )
3131
32- # https://bills.parliament.uk/publications/62123/documents/6889#page=14
33-
34- uc_uplift = rebalancing .standard_allowance_uplift
35-
36- for year in range (2026 , 2030 ):
37- if not rebalancing .active (year ):
38- continue
39- previous_value = sim .calculate ("uc_standard_allowance" , year - 1 )
40- new_value = previous_value * (1 + uc_uplift (year ))
41- sim .set_input ("uc_standard_allowance" , year , new_value )
32+ # Standard allowance uplift is handled in the formula itself so user
33+ # reforms to the base amount are applied before the uplift.
4234
4335
4436universal_credit_july_2025_reform = Scenario (
Original file line number Diff line number Diff line change 1+ """Test UC standard allowance reforms are respected (#1472)."""
2+
3+ from policyengine_uk import Simulation
4+
5+ YEAR = 2026
6+
7+ SITUATION = {
8+ "people" : {"person" : {"age" : {YEAR : 30 }}},
9+ "benunits" : {"benunit" : {"members" : ["person" ]}},
10+ "households" : {"household" : {"members" : ["person" ]}},
11+ }
12+
13+ REFORM = {
14+ "gov.dwp.universal_credit.standard_allowance.amount.SINGLE_OLD" : {
15+ "2025-01-01.2100-12-31" : 800 ,
16+ },
17+ }
18+
19+
20+ def test_uc_standard_allowance_responds_to_reform ():
21+ baseline = Simulation (situation = SITUATION )
22+ baseline_amount = baseline .calculate ("uc_standard_allowance" , YEAR )[0 ]
23+
24+ reformed = Simulation (situation = SITUATION , reform = REFORM )
25+ reform_amount = reformed .calculate ("uc_standard_allowance" , YEAR )[0 ]
26+
27+ assert reform_amount / baseline_amount > 1.5
Original file line number Diff line number Diff line change @@ -11,4 +11,8 @@ class uc_standard_allowance(Variable):
1111 def formula (benunit , period , parameters ):
1212 p = parameters (period ).gov .dwp .universal_credit .standard_allowance
1313 claimant_type = benunit ("uc_standard_allowance_claimant_type" , period )
14- return p .amount [claimant_type ] * MONTHS_IN_YEAR
14+ value = p .amount [claimant_type ] * MONTHS_IN_YEAR
15+ rebalancing = parameters (period ).gov .dwp .universal_credit .rebalancing
16+ if rebalancing .active :
17+ value = value * (1 + rebalancing .standard_allowance_uplift )
18+ return value
You can’t perform that action at this time.
0 commit comments