Skip to content

Commit 735604c

Browse files
Make uprating growthfactors top-down explicit
Fixes #1176
1 parent 14d77ad commit 735604c

90 files changed

Lines changed: 420 additions & 557 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

policyengine_uk/data/uprating_growth_factors.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ personal_pension_contributions,gov.obr.average_earnings,0,0.058,0.065,0.068,0.04
6060
petrol_spending,gov.obr.consumer_price_index,0,0.039,0.101,0.057,0.023,0.032,0.02,0.02,0.02,0.02
6161
pip_dl_reported,gov.obr.consumer_price_index,0,0.039,0.101,0.057,0.023,0.032,0.02,0.02,0.02,0.02
6262
pip_m_reported,gov.obr.consumer_price_index,0,0.039,0.101,0.057,0.023,0.032,0.02,0.02,0.02,0.02
63-
private_pension_income,gov.obr.per_capita.non_labour_income,0,0.068,0.134,0.052,0.069,0.057,0.049,0.038,0.029,0.03
63+
private_pension_income,gov.obr.private_pension_index,0,0.05,0.05,0.05,0.033,0.042,0.03,0.03,0.029,0.028
6464
private_transfer_income,gov.obr.per_capita.gdp,0,0.125,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
6565
property_income,gov.obr.per_capita.gdp,0,0.125,0.092,0.05,0.038,0.028,0.028,0.031,0.033,0.033
6666
recreation_consumption,gov.obr.consumer_price_index,0,0.039,0.101,0.057,0.023,0.032,0.02,0.02,0.02,0.02

policyengine_uk/parameters/gov/benefit_uprating_cpi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ values:
33
2005-01-01: 100
44
metadata:
55
label: Benefit uprating index
6-
uprating: gov.obr.consumer_price_index
6+
uprating: gov.economic_assumptions.indices.obr.consumer_price_index

policyengine_uk/parameters/gov/dwp/IIDB/maximum.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
label: Industrial Injuries Disablement Benefit maximum
77
reference: https://www.gov.uk/industrial-injuries-disablement-benefit/what-youll-get
88
unit: currency-GBP
9-
uprating: gov.obr.consumer_price_index
9+
uprating: gov.economic_assumptions.indices.obr.consumer_price_index
1010
values:
1111
2015-04-01: 182
1212
2025-04-01:

policyengine_uk/parameters/gov/dwp/state_pension/triple_lock/create_triple_lock.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88

99

1010
def add_triple_lock(parameters: ParameterNode) -> ParameterNode:
11-
average_earnings = parameters.gov.obr.average_earnings
12-
cpi = parameters.gov.obr.consumer_price_index
11+
obr = parameters.gov.economic_assumptions.indices.obr
12+
average_earnings = obr.average_earnings
13+
cpi = obr.consumer_price_index
1314
min_rate = parameters.gov.dwp.state_pension.triple_lock.minimum_rate
1415

1516
values = {}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
from policyengine_core.parameters import (
2+
ParameterNode,
3+
Parameter,
4+
get_parameter,
5+
)
6+
7+
8+
def create_economic_assumption_indices(parameters: ParameterNode) -> ParameterNode:
9+
econ_assumptions: ParameterNode = parameters.gov.economic_assumptions
10+
yoy_growth: ParameterNode = econ_assumptions.yoy_growth
11+
indices = ParameterNode(
12+
name="gov.economic_assumptions.indices",
13+
data={},
14+
)
15+
econ_assumptions.add_child(
16+
"indices",
17+
indices,
18+
)
19+
20+
for descendant in yoy_growth.get_descendants():
21+
parent_node = parameters.get_child(descendant.parent.name.replace("yoy_growth", "indices"))
22+
full_name = descendant.name
23+
child_name = full_name.split(".")[-1]
24+
if isinstance(descendant, ParameterNode):
25+
mirror_node = ParameterNode(
26+
name=descendant.name.replace("yoy_growth", "indices"),
27+
data={},
28+
)
29+
parent_node.add_child(
30+
child_name,
31+
mirror_node,
32+
)
33+
else:
34+
start_year = int(descendant.values_list[-1].instant_str[:4])
35+
values = {
36+
start_year: 1.0
37+
}
38+
39+
for year in range(start_year + 1, 2030):
40+
yoy_growth = descendant(year)
41+
indices_value = round(
42+
values[year - 1] * (1 + yoy_growth),
43+
5,
44+
)
45+
values[year] = indices_value
46+
47+
mirror_parameter = Parameter(
48+
name=descendant.name.replace("yoy_growth", "indices"),
49+
data={
50+
"values": {
51+
f"{year}-01-01": value
52+
for year, value in values.items()
53+
},
54+
},
55+
)
56+
57+
parent_node.add_child(
58+
child_name,
59+
mirror_parameter,
60+
)
61+
62+
print(parameters.gov.economic_assumptions.indices)
63+
return parameters
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
obr:
2+
average_earnings:
3+
description: Average earnings year-on-year growth.
4+
values:
5+
2009-01-01: 0.018
6+
2010-01-01: 0.008
7+
2011-01-01: 0.016
8+
2012-01-01: 0.007
9+
2013-01-01: 0.047
10+
2014-01-01: 0.006
11+
2015-01-01: 0.020
12+
2016-01-01: 0.024
13+
2017-01-01: 0.032
14+
2018-01-01: 0.026
15+
2019-01-01: 0.022
16+
2020-01-01: 0.003
17+
2021-01-01: 0.059
18+
2022-01-01: 0.064
19+
2023-01-01: 0.069
20+
2024-01-01: 0.047
21+
2025-01-01: 0.037
22+
2026-01-01: 0.022
23+
2027-01-01: 0.021
24+
2028-01-01: 0.023
25+
2029-01-01: 0.025
26+
metadata:
27+
unit: /1
28+
label: average earnings growth
29+
reference:
30+
- title: OBR EFO March 2025 (detailed forecast tables, economy, Table 1.6, Row Q)
31+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
32+
33+
consumer_price_index:
34+
description: Consumer price index year-on-year growth.
35+
values:
36+
2009-01-01: 0.022
37+
2010-01-01: 0.035
38+
2011-01-01: 0.043
39+
2012-01-01: 0.027
40+
2013-01-01: 0.023
41+
2014-01-01: 0.011
42+
2015-01-01: 0.001
43+
2016-01-01: 0.011
44+
2017-01-01: 0.028
45+
2018-01-01: 0.023
46+
2019-01-01: 0.017
47+
2020-01-01: 0.006
48+
2021-01-01: 0.040
49+
2022-01-01: 0.100
50+
2023-01-01: 0.057
51+
2024-01-01: 0.023
52+
2025-01-01: 0.032
53+
2026-01-01: 0.019
54+
2027-01-01: 0.020
55+
2028-01-01: 0.020
56+
2029-01-01: 0.020
57+
metadata:
58+
unit: /1
59+
label: consumer price index growth
60+
reference:
61+
- title: OBR EFO March 2025
62+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
63+
64+
non_labour_income:
65+
description: Non-labour income year-on-year growth.
66+
values:
67+
2021-01-01: 0.072
68+
2022-01-01: 0.138
69+
2023-01-01: 0.066
70+
2024-01-01: 0.08
71+
2025-01-01: 0.068
72+
2026-01-01: 0.056
73+
2027-01-01: 0.045
74+
2028-01-01: 0.034
75+
2029-01-01: 0.035
76+
metadata:
77+
unit: /1
78+
label: non-labour income growth
79+
reference:
80+
- title: OBR EFO March 2025
81+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
82+
83+
council_tax:
84+
description: Council tax year-on-year growth.
85+
values:
86+
2021-01-01: 0.0
87+
2022-01-01: 0.0
88+
2023-01-01: 0.0
89+
2024-01-01: 0.064
90+
2025-01-01: 0.046
91+
2026-01-01: 0.045
92+
2027-01-01: 0.046
93+
2028-01-01: 0.045
94+
2029-01-01: 0.045
95+
metadata:
96+
unit: /1
97+
label: council tax growth
98+
reference:
99+
- title: OBR EFO March 2025
100+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
101+
102+
per_capita:
103+
gdp:
104+
description: Per capita GDP year-on-year growth.
105+
values:
106+
2021-01-01: 0.125
107+
2022-01-01: 0.092
108+
2023-01-01: 0.05
109+
2024-01-01: 0.038
110+
2025-01-01: 0.028
111+
2026-01-01: 0.028
112+
2027-01-01: 0.031
113+
2028-01-01: 0.033
114+
2029-01-01: 0.033
115+
metadata:
116+
unit: /1
117+
label: per capita GDP growth
118+
reference:
119+
- title: OBR EFO March 2025
120+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
121+
122+
mixed_income:
123+
description: Per capita mixed income year-on-year growth.
124+
values:
125+
2021-01-01: 0.06
126+
2022-01-01: 0.063
127+
2023-01-01: 0.024
128+
2024-01-01: 0.048
129+
2025-01-01: 0.047
130+
2026-01-01: 0.031
131+
2027-01-01: 0.031
132+
2028-01-01: 0.036
133+
2029-01-01: 0.038
134+
metadata:
135+
unit: /1
136+
label: per capita mixed income growth
137+
reference:
138+
- title: OBR EFO March 2025
139+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
140+
141+
non_labour_income:
142+
description: Per capita non-labour income year-on-year growth.
143+
values:
144+
2021-01-01: 0.068
145+
2022-01-01: 0.134
146+
2023-01-01: 0.052
147+
2024-01-01: 0.069
148+
2025-01-01: 0.057
149+
2026-01-01: 0.049
150+
2027-01-01: 0.038
151+
2028-01-01: 0.029
152+
2029-01-01: 0.03
153+
metadata:
154+
unit: /1
155+
label: per capita non-labour income growth
156+
reference:
157+
- title: OBR EFO March 2025
158+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
159+
160+
house_prices:
161+
description: House prices year-on-year growth.
162+
values:
163+
2021-01-01: 0.082
164+
2022-01-01: 0.083
165+
2023-01-01: -0.01
166+
2024-01-01: 0.027
167+
2025-01-01: 0.024
168+
2026-01-01: 0.025
169+
2027-01-01: 0.026
170+
2028-01-01: 0.023
171+
2029-01-01: 0.024
172+
metadata:
173+
unit: /1
174+
label: house prices growth
175+
reference:
176+
- title: OBR EFO March 2025
177+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
178+
179+
mortgage_interest:
180+
description: Mortgage interest year-on-year growth.
181+
values:
182+
2021-01-01: 0.003
183+
2022-01-01: 0.262
184+
2023-01-01: 0.485
185+
2024-01-01: 0.221
186+
2025-01-01: 0.136
187+
2026-01-01: 0.126
188+
2027-01-01: 0.082
189+
2028-01-01: 0.042
190+
2029-01-01: 0.047
191+
metadata:
192+
unit: /1
193+
label: mortgage interest growth
194+
reference:
195+
- title: OBR EFO March 2025
196+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
197+
198+
rent:
199+
description: Rent year-on-year growth.
200+
values:
201+
2021-01-01: 0.018
202+
2022-01-01: 0.04
203+
2023-01-01: 0.063
204+
2024-01-01: 0.074
205+
2025-01-01: 0.057
206+
2026-01-01: 0.036
207+
2027-01-01: 0.027
208+
2028-01-01: 0.023
209+
2029-01-01: 0.024
210+
metadata:
211+
unit: /1
212+
label: rent growth
213+
reference:
214+
- title: OBR EFO March 2025
215+
href: https://obr.uk/efo/economic-and-fiscal-outlook-march-2025/
216+
217+
ons:
218+
population:
219+
description: Population year-on-year growth.
220+
values:
221+
2021-01-01: 0.004
222+
2022-01-01: 0.003
223+
2023-01-01: 0.014
224+
2024-01-01: 0.01
225+
2025-01-01: 0.011
226+
2026-01-01: 0.007
227+
2027-01-01: 0.008
228+
2028-01-01: 0.004
229+
2029-01-01: 0.005
230+
metadata:
231+
unit: /1
232+
label: population growth
233+
reference:
234+
- title: ONS Population Projections
235+
href: https://www.ons.gov.uk/
236+
237+
household:
238+
wealth:
239+
corporate_wealth:
240+
description: Corporate wealth year-on-year growth.
241+
values:
242+
2021-01-01: 0.0
243+
2022-01-01: -0.109
244+
2023-01-01: 0.004
245+
2024-01-01: 0.03
246+
2025-01-01: 0.031
247+
2026-01-01: 0.035
248+
2027-01-01: 0.035
249+
2028-01-01: 0.035
250+
2029-01-01: 0.0
251+
metadata:
252+
unit: /1
253+
label: corporate wealth growth
254+
reference:
255+
- title: Household wealth estimates
256+
href: https://www.ons.gov.uk/
257+
258+
financial_assets:
259+
description: Financial assets year-on-year growth.
260+
values:
261+
2021-01-01: 0.014
262+
2022-01-01: -0.108
263+
2023-01-01: 0.004
264+
2024-01-01: 0.03
265+
2025-01-01: 0.032
266+
2026-01-01: 0.034
267+
2027-01-01: 0.034
268+
2028-01-01: 0.036
269+
2029-01-01: 0.0
270+
metadata:
271+
unit: /1
272+
label: financial assets growth
273+
reference:
274+
- title: Household wealth estimates
275+
href: https://www.ons.gov.uk/

policyengine_uk/parameters/gov/hmrc/income_tax/allowances/personal_allowance/amount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ metadata:
1111
name: personal_allowance
1212
label: Personal allowance
1313
unit: currency-GBP
14-
uprating: gov.obr.consumer_price_index
14+
uprating: gov.economic_assumptions.indices.obr.consumer_price_index
1515
reference:
1616
- title: Income Tax Act 2007 s. 35
1717
href: https://www.legislation.gov.uk/ukpga/2007/3/section/35

0 commit comments

Comments
 (0)