Skip to content

Commit 1339ce9

Browse files
vahid-ahmadiclaude
andauthored
Restructure minimum wage as age-based scale parameter (#1612)
* Restructure minimum wage as apprentice + age-based scale parameter Split minimum_wage.yaml into minimum_wage/apprentice.yaml (scalar) and minimum_wage/non_apprentice.yaml (single_amount scale keyed by age). Update the minimum_wage variable formula to use age-based lookup instead of enum indexing. Fixes #1015. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix minimum wage scale boundary lookups --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8c0fa1d commit 1339ce9

5 files changed

Lines changed: 104 additions & 47 deletions

File tree

changelog.d/1015.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Restructure minimum wage parameter into apprentice and non-apprentice (age-based scale) files
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
description: Minimum wage rate for apprentices
2+
values:
3+
2012-10-01: 2.65
4+
2013-10-01: 2.68
5+
2014-10-01: 2.73
6+
2015-10-01: 3.3
7+
2016-10-01: 3.4
8+
2017-04-01: 3.5
9+
2018-04-01: 3.7
10+
2019-04-01: 3.9
11+
2020-04-01: 4.15
12+
2021-04-01: 4.3
13+
2022-04-01: 4.81
14+
2024-04-01:
15+
value: 6.4
16+
reference:
17+
- title: The National Minimum Wage (Amendment) (No. 2) Regulations 2024
18+
href: https://www.legislation.gov.uk/uksi/2024/432/made
19+
2025-04-01:
20+
value: 7.55
21+
reference:
22+
- title: The National Minimum Wage (Amendment) Regulations 2025
23+
href: https://www.legislation.gov.uk/uksi/2025/401/made
24+
metadata:
25+
economy: false
26+
household: false
27+
label: Apprentice minimum wage
28+
unit: currency-GBP
29+
reference:
30+
- href: https://www.gov.uk/national-minimum-wage-rates
31+
title: GOV.UK - National Minimum Wage

policyengine_uk/parameters/gov/hmrc/minimum_wage.yaml renamed to policyengine_uk/parameters/gov/hmrc/minimum_wage/non_apprentice.yaml

Lines changed: 33 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
APPRENTICE:
2-
values:
3-
2012-10-01: 2.65
4-
2013-10-01: 2.68
5-
2014-10-01: 2.73
6-
2015-10-01: 3.3
7-
2016-10-01: 3.4
8-
2017-04-01: 3.5
9-
2018-04-01: 3.7
10-
2019-04-01: 3.9
11-
2020-04-01: 4.15
12-
2021-04-01: 4.3
1+
description: Minimum wage rate for non-apprentices by age
2+
3+
brackets:
4+
- threshold:
5+
2012-10-01: 0
6+
amount:
7+
2012-10-01: 3.68
8+
2013-10-01: 3.72
9+
2014-10-01: 3.79
10+
2015-10-01: 3.87
11+
2016-10-01: 4.0
12+
2017-04-01: 4.05
13+
2018-04-01: 4.2
14+
2019-04-01: 4.35
15+
2020-04-01: 4.55
16+
2021-04-01: 4.62
1317
2022-04-01: 4.81
1418
2024-04-01:
1519
value: 6.4
@@ -21,8 +25,9 @@ APPRENTICE:
2125
reference:
2226
- title: The National Minimum Wage (Amendment) Regulations 2025
2327
href: https://www.legislation.gov.uk/uksi/2025/401/made
24-
BETWEEN_18_20:
25-
values:
28+
- threshold:
29+
2012-10-01: 18
30+
amount:
2631
2012-10-01: 4.98
2732
2013-10-01: 5.03
2833
2014-10-01: 5.13
@@ -44,8 +49,9 @@ BETWEEN_18_20:
4449
reference:
4550
- title: The National Minimum Wage (Amendment) Regulations 2025
4651
href: https://www.legislation.gov.uk/uksi/2025/401/made
47-
BETWEEN_21_22:
48-
values:
52+
- threshold:
53+
2012-10-01: 21
54+
amount:
4955
2012-10-01: 6.19
5056
2013-10-01: 6.31
5157
2014-10-01: 6.5
@@ -68,8 +74,9 @@ BETWEEN_21_22:
6874
reference:
6975
- title: The National Minimum Wage (Amendment) Regulations 2025
7076
href: https://www.legislation.gov.uk/uksi/2025/401/made
71-
BETWEEN_23_24:
72-
values:
77+
- threshold:
78+
2012-10-01: 23
79+
amount:
7380
2012-10-01: 6.19
7481
2013-10-01: 6.31
7582
2014-10-01: 6.5
@@ -91,8 +98,9 @@ BETWEEN_23_24:
9198
reference:
9299
- title: The National Minimum Wage (Amendment) Regulations 2025
93100
href: https://www.legislation.gov.uk/uksi/2025/401/made
94-
OVER_24:
95-
values:
101+
- threshold:
102+
2012-10-01: 25
103+
amount:
96104
2012-10-01: 6.19
97105
2013-10-01: 6.31
98106
2014-10-01: 6.5
@@ -114,36 +122,15 @@ OVER_24:
114122
reference:
115123
- title: The National Minimum Wage (Amendment) Regulations 2025
116124
href: https://www.legislation.gov.uk/uksi/2025/401/made
117-
UNDER_18:
118-
values:
119-
2012-10-01: 3.68
120-
2013-10-01: 3.72
121-
2014-10-01: 3.79
122-
2015-10-01: 3.87
123-
2016-10-01: 4.0
124-
2017-04-01: 4.05
125-
2018-04-01: 4.2
126-
2019-04-01: 4.35
127-
2020-04-01: 4.55
128-
2021-04-01: 4.62
129-
2022-04-01: 4.81
130-
2024-04-01:
131-
value: 6.4
132-
reference:
133-
- title: The National Minimum Wage (Amendment) (No. 2) Regulations 2024
134-
href: https://www.legislation.gov.uk/uksi/2024/432/made
135-
2025-04-01:
136-
value: 7.55
137-
reference:
138-
- title: The National Minimum Wage (Amendment) Regulations 2025
139-
href: https://www.legislation.gov.uk/uksi/2025/401/made
140-
description: Minimum wage by age group
125+
141126
metadata:
127+
amount_unit: currency-GBP
142128
economy: false
143129
household: false
144-
label: Minimum wage
130+
label: Non-apprentice minimum wage
145131
propagate_metadata_to_children: true
132+
threshold_unit: year
133+
type: single_amount
146134
reference:
147135
- href: https://www.gov.uk/national-minimum-wage-rates
148136
title: GOV.UK - National Minimum Wage
149-
unit: currency-GBP

policyengine_uk/tests/policy/baseline/finance/income/minimum_wage.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,35 @@
55
age: 30
66
output:
77
minimum_wage: 8.91
8+
9+
- name: Minimum wage for a person aged 18 uses the 18 to 20 bracket
10+
period: 2025
11+
absolute_error_margin: 0
12+
input:
13+
age: 18
14+
output:
15+
minimum_wage: 10
16+
17+
- name: Minimum wage for a person aged 21 uses the 21 to 22 bracket
18+
period: 2025
19+
absolute_error_margin: 0
20+
input:
21+
age: 21
22+
output:
23+
minimum_wage: 12.21
24+
25+
- name: Minimum wage for a person aged 23 uses the 23 to 24 bracket
26+
period: 2025
27+
absolute_error_margin: 0
28+
input:
29+
age: 23
30+
output:
31+
minimum_wage: 12.21
32+
33+
- name: Minimum wage for a person aged 25 uses the 25 or over bracket
34+
period: 2021
35+
absolute_error_margin: 0
36+
input:
37+
age: 25
38+
output:
39+
minimum_wage: 8.91

policyengine_uk/variables/household/income/minimum_wage.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,10 @@ class minimum_wage(Variable):
1212

1313
def formula(person, period, parameters):
1414
MW = parameters(period).gov.hmrc.minimum_wage
15-
return MW[person("minimum_wage_category", period)]
15+
is_apprentice = person("is_apprentice", period)
16+
age = person("age", period)
17+
return where(
18+
is_apprentice,
19+
MW.apprentice,
20+
MW.non_apprentice.calc(age),
21+
)

0 commit comments

Comments
 (0)