From d8a4dc43caa82e5478e96b6a785cc597c57ee5c4 Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 04:27:47 +0400 Subject: [PATCH 1/3] Correct historical higher pension-age Housing Benefit allowances --- changelog.d/hb-pensioner-history.fixed.md | 1 + .../allowances/couple/aged.yaml | 22 ++- .../allowances/lone_parent/aged.yaml | 22 ++- .../allowances/single/aged.yaml | 22 ++- .../housing_benefit_pensioner_history.yaml | 169 ++++++++++++++++++ 5 files changed, 233 insertions(+), 3 deletions(-) create mode 100644 changelog.d/hb-pensioner-history.fixed.md create mode 100644 policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml diff --git a/changelog.d/hb-pensioner-history.fixed.md b/changelog.d/hb-pensioner-history.fixed.md new file mode 100644 index 0000000000..7ffe878c33 --- /dev/null +++ b/changelog.d/hb-pensioner-history.fixed.md @@ -0,0 +1 @@ +- Corrected the higher pension-age Housing Benefit personal allowances for 2015 to 2018, retaining the 2019 rates from 2019. diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged.yaml index 12cf678445..b7a3c35b93 100644 --- a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged.yaml +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged.yaml @@ -1,6 +1,26 @@ description: The following couple personal allowance is provided under the Housing Benefit if at least one member is over the state pension age threshold. values: - 2015-04-01: 270.6 + 2015-04-01: + value: 248.3 + reference: + - title: The Social Security Benefits Up-rating Order 2015, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + 2016-04-01: + value: 252.3 + reference: + - title: The Social Security Benefits (Adjustment of Amounts and Thresholds) Regulations 2016, regulation 6 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + 2017-04-01: + value: 258.15 + reference: + - title: The Social Security Benefits Up-rating Order 2017, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + 2018-04-01: + value: 263.8 + reference: + - title: The Social Security Benefits Up-rating Order 2018, Schedule 6 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + 2019-04-01: 270.6 2021-04-01: 286.05 2022-04-06: 294.9 2023-04-01: 324.7 diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged.yaml index 0292f05a7c..1e5a194f86 100644 --- a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged.yaml +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged.yaml @@ -1,7 +1,27 @@ description: Personal allowance for Housing Benefit for a lone parent over State Pension age. values: - 2015-04-01: 181 + 2015-04-01: + value: 166.05 + reference: + - title: The Social Security Benefits Up-rating Order 2015, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + 2016-04-01: + value: 168.7 + reference: + - title: The Social Security Benefits (Adjustment of Amounts and Thresholds) Regulations 2016, regulation 6 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + 2017-04-01: + value: 172.55 + reference: + - title: The Social Security Benefits Up-rating Order 2017, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + 2018-04-01: + value: 176.4 + reference: + - title: The Social Security Benefits Up-rating Order 2018, Schedule 6 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + 2019-04-01: 181 2021-04-01: 191.15 2022-04-06: 197.1 2023-04-01: 217 diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged.yaml index c3bf99f4ba..1ebc166b30 100644 --- a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged.yaml +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged.yaml @@ -1,6 +1,26 @@ description: The following personal allowance amount is provided to single filers over the pension age under the Housing Benefit. values: - 2015-04-01: 181 + 2015-04-01: + value: 166.05 + reference: + - title: The Social Security Benefits Up-rating Order 2015, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + 2016-04-01: + value: 168.7 + reference: + - title: The Social Security Benefits (Adjustment of Amounts and Thresholds) Regulations 2016, regulation 6 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + 2017-04-01: + value: 172.55 + reference: + - title: The Social Security Benefits Up-rating Order 2017, Schedule 7 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + 2018-04-01: + value: 176.4 + reference: + - title: The Social Security Benefits Up-rating Order 2018, Schedule 6 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + 2019-04-01: 181 2021-04-01: 191.15 2022-04-06: 197.1 2023-04-01: 217 diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml new file mode 100644 index 0000000000..dff74880e5 --- /dev/null +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_pensioner_history.yaml @@ -0,0 +1,169 @@ +# Higher category only: Schedule 3 paragraph 1, age 65 or over. + +- name: Higher pension-age single allowance in 2015 + period: 2015 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: true + is_couple: false + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 166.05 * 52 + +- name: Higher pension-age single allowance in 2016 + period: 2016 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: true + is_couple: false + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 168.7 * 52 + +- name: Higher pension-age single allowance in 2017 + period: 2017 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: true + is_couple: false + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 172.55 * 52 + +- name: Higher pension-age single allowance in 2018 + period: 2018 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: true + is_couple: false + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 176.4 * 52 + +- name: Higher pension-age lone parent allowance in 2015 + period: 2015 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: false + is_lone_parent: true + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 166.05 * 52 + +- name: Higher pension-age lone parent allowance in 2016 + period: 2016 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: false + is_lone_parent: true + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 168.7 * 52 + +- name: Higher pension-age lone parent allowance in 2017 + period: 2017 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: false + is_lone_parent: true + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 172.55 * 52 + +- name: Higher pension-age lone parent allowance in 2018 + period: 2018 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: false + is_lone_parent: true + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 176.4 * 52 + +- name: Higher pension-age couple allowance in 2015 + period: 2015 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: true + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 248.3 * 52 + +- name: Higher pension-age couple allowance in 2016 + period: 2016 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: true + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 252.3 * 52 + +- name: Higher pension-age couple allowance in 2017 + period: 2017 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: true + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 258.15 * 52 + +- name: Higher pension-age couple allowance in 2018 + period: 2018 + absolute_error_margin: 0.01 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 70 + is_single_person: false + is_couple: true + is_lone_parent: false + benefits_premiums: 0 + output: + housing_benefit_applicable_amount: 263.8 * 52 From b632ba7ce67b85d8ec43ff12480fb7c4bc51f17a Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 17:04:03 +0400 Subject: [PATCH 2/3] Route historical under-65 Housing Benefit pensioner allowances --- changelog.d/hb-under-65-history.fixed.md | 1 + .../allowances/couple/aged_under_65.yaml | 60 ++++++++++ .../allowances/lone_parent/aged_under_65.yaml | 60 ++++++++++ .../allowances/single/aged_under_65.yaml | 60 ++++++++++ .../housing_benefit_applicable_amount.yaml | 103 ++++++++++++++++++ .../housing_benefit_applicable_amount.py | 24 +++- 6 files changed, 305 insertions(+), 3 deletions(-) create mode 100644 changelog.d/hb-under-65-history.fixed.md create mode 100644 policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged_under_65.yaml create mode 100644 policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged_under_65.yaml create mode 100644 policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged_under_65.yaml diff --git a/changelog.d/hb-under-65-history.fixed.md b/changelog.d/hb-under-65-history.fixed.md new file mode 100644 index 0000000000..a2e82102a7 --- /dev/null +++ b/changelog.d/hb-under-65-history.fixed.md @@ -0,0 +1 @@ +- Use the separate historical under-65 pensioner Housing Benefit allowances, with jurisdiction-specific category end dates and the existing annual sampling convention. diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged_under_65.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged_under_65.yaml new file mode 100644 index 0000000000..5c8593ce8a --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/couple/aged_under_65.yaml @@ -0,0 +1,60 @@ +description: Historical lower Housing Benefit pensioner allowance for couple families below age 65. +amount: + description: Weekly allowance for the former qualifying under-65 pensioner category. + values: + 2015-04-01: + value: 230.85 + reference: + - title: GB pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/nisr/2015/124/schedule/7/made + 2016-04-01: + value: 237.55 + reference: + - title: GB pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + - title: NI pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/nisr/2016/110/regulation/6/made + 2017-04-01: + value: 243.25 + reference: + - title: GB pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/nisr/2017/56/schedule/7/made + 2018-04-01: + value: 248.8 + reference: + - title: GB pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + - title: NI pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/nisr/2018/58/schedule/6/made + metadata: + unit: currency-GBP + period: week + label: Housing Benefit historical lower couple allowance +age_limit_great_britain: + description: Upper age boundary for the former GB pensioner allowance category; zero after its removal. + values: + 2015-04-01: 65 + 2018-12-06: + value: 0 + reference: + - title: Social Security (Miscellaneous Amendments No. 5) Regulations 2017, regulations 1(2)(b) and 7(7) + href: https://www.legislation.gov.uk/uksi/2017/1187/made + metadata: + unit: year + label: Historical lower GB pensioner allowance age limit +age_limit_northern_ireland: + description: Upper age boundary for the former NI pensioner allowance category; zero in the April 2019 replacement table. + values: + 2015-04-01: 65 + 2019-04-01: + value: 0 + reference: + - title: NI Social Security Benefits Up-rating Order 2019, articles 1 and 24 and Schedule 4 + href: https://www.legislation.gov.uk/nisr/2019/58/made + metadata: + unit: year + label: Historical lower NI pensioner allowance age limit diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged_under_65.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged_under_65.yaml new file mode 100644 index 0000000000..db22f430f7 --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/lone_parent/aged_under_65.yaml @@ -0,0 +1,60 @@ +description: Historical lower Housing Benefit pensioner allowance for lone parent families below age 65. +amount: + description: Weekly allowance for the former qualifying under-65 pensioner category. + values: + 2015-04-01: + value: 151.2 + reference: + - title: GB pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/nisr/2015/124/schedule/7/made + 2016-04-01: + value: 155.6 + reference: + - title: GB pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + - title: NI pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/nisr/2016/110/regulation/6/made + 2017-04-01: + value: 159.35 + reference: + - title: GB pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/nisr/2017/56/schedule/7/made + 2018-04-01: + value: 163 + reference: + - title: GB pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + - title: NI pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/nisr/2018/58/schedule/6/made + metadata: + unit: currency-GBP + period: week + label: Housing Benefit historical lower lone parent allowance +age_limit_great_britain: + description: Upper age boundary for the former GB pensioner allowance category; zero after its removal. + values: + 2015-04-01: 65 + 2018-12-06: + value: 0 + reference: + - title: Social Security (Miscellaneous Amendments No. 5) Regulations 2017, regulations 1(2)(b) and 7(7) + href: https://www.legislation.gov.uk/uksi/2017/1187/made + metadata: + unit: year + label: Historical lower GB pensioner allowance age limit +age_limit_northern_ireland: + description: Upper age boundary for the former NI pensioner allowance category; zero in the April 2019 replacement table. + values: + 2015-04-01: 65 + 2019-04-01: + value: 0 + reference: + - title: NI Social Security Benefits Up-rating Order 2019, articles 1 and 24 and Schedule 4 + href: https://www.legislation.gov.uk/nisr/2019/58/made + metadata: + unit: year + label: Historical lower NI pensioner allowance age limit diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged_under_65.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged_under_65.yaml new file mode 100644 index 0000000000..87a48c15eb --- /dev/null +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/allowances/single/aged_under_65.yaml @@ -0,0 +1,60 @@ +description: Historical lower Housing Benefit pensioner allowance for single families below age 65. +amount: + description: Weekly allowance for the former qualifying under-65 pensioner category. + values: + 2015-04-01: + value: 151.2 + reference: + - title: GB pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/uksi/2015/457/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2015 + href: https://www.legislation.gov.uk/nisr/2015/124/schedule/7/made + 2016-04-01: + value: 155.6 + reference: + - title: GB pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + - title: NI pensioner Housing Benefit allowances, 2016 + href: https://www.legislation.gov.uk/nisr/2016/110/regulation/6/made + 2017-04-01: + value: 159.35 + reference: + - title: GB pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made + - title: NI pensioner Housing Benefit allowances, 2017 + href: https://www.legislation.gov.uk/nisr/2017/56/schedule/7/made + 2018-04-01: + value: 163 + reference: + - title: GB pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/uksi/2018/281/schedule/6/made + - title: NI pensioner Housing Benefit allowances, 2018 + href: https://www.legislation.gov.uk/nisr/2018/58/schedule/6/made + metadata: + unit: currency-GBP + period: week + label: Housing Benefit historical lower single allowance +age_limit_great_britain: + description: Upper age boundary for the former GB pensioner allowance category; zero after its removal. + values: + 2015-04-01: 65 + 2018-12-06: + value: 0 + reference: + - title: Social Security (Miscellaneous Amendments No. 5) Regulations 2017, regulations 1(2)(b) and 7(7) + href: https://www.legislation.gov.uk/uksi/2017/1187/made + metadata: + unit: year + label: Historical lower GB pensioner allowance age limit +age_limit_northern_ireland: + description: Upper age boundary for the former NI pensioner allowance category; zero in the April 2019 replacement table. + values: + 2015-04-01: 65 + 2019-04-01: + value: 0 + reference: + - title: NI Social Security Benefits Up-rating Order 2019, articles 1 and 24 and Schedule 4 + href: https://www.legislation.gov.uk/nisr/2019/58/made + metadata: + unit: year + label: Historical lower NI pensioner allowance age limit diff --git a/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_applicable_amount.yaml b/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_applicable_amount.yaml index eeea8a6e58..8cd6c277c9 100644 --- a/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_applicable_amount.yaml +++ b/policyengine_uk/tests/policy/baseline/finance/benefit/family/housing_benefit/housing_benefit_applicable_amount.yaml @@ -115,3 +115,106 @@ benefits_premiums: 0 output: housing_benefit_applicable_amount: 108.3 * 52 + +- name: "Historical 2015 lower/higher pensioner allowances in GB and NI" + period: 2015 + absolute_error_margin: 0.02 + input: + country: ["ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND"] + housing_benefit_eligible: [true,true,true,true,true,true,true,true,true,true,true,true] + housing_benefit_pension_age_regulations_apply: [true,true,true,true,true,true,true,true,true,true,true,true] + eldest_claimant_or_partner_age: [64,65,64,65,64,65,64,65,64,65,64,65] + is_single_person: [true,true,false,false,false,false,true,true,false,false,false,false] + is_lone_parent: [false,false,true,true,false,false,false,false,true,true,false,false] + is_couple: [false,false,false,false,true,true,false,false,false,false,true,true] + benefits_premiums: [0,0,0,0,0,0,0,0,0,0,0,0] + output: + housing_benefit_applicable_amount: [7862.4,8634.6,7862.4,8634.6,12004.199999999999,12911.6,7862.4,8634.6,7862.4,8634.6,12004.199999999999,12911.6] + +- name: "Historical 2016 lower/higher pensioner allowances in GB and NI" + period: 2016 + absolute_error_margin: 0.02 + input: + country: ["ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND"] + housing_benefit_eligible: [true,true,true,true,true,true,true,true,true,true,true,true] + housing_benefit_pension_age_regulations_apply: [true,true,true,true,true,true,true,true,true,true,true,true] + eldest_claimant_or_partner_age: [64,65,64,65,64,65,64,65,64,65,64,65] + is_single_person: [true,true,false,false,false,false,true,true,false,false,false,false] + is_lone_parent: [false,false,true,true,false,false,false,false,true,true,false,false] + is_couple: [false,false,false,false,true,true,false,false,false,false,true,true] + benefits_premiums: [0,0,0,0,0,0,0,0,0,0,0,0] + output: + housing_benefit_applicable_amount: [8091.2,8772.4,8091.2,8772.4,12352.6,13119.6,8091.2,8772.4,8091.2,8772.4,12352.6,13119.6] + +- name: "Historical 2017 lower/higher pensioner allowances in GB and NI" + period: 2017 + absolute_error_margin: 0.02 + input: + country: ["ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND"] + housing_benefit_eligible: [true,true,true,true,true,true,true,true,true,true,true,true] + housing_benefit_pension_age_regulations_apply: [true,true,true,true,true,true,true,true,true,true,true,true] + eldest_claimant_or_partner_age: [64,65,64,65,64,65,64,65,64,65,64,65] + is_single_person: [true,true,false,false,false,false,true,true,false,false,false,false] + is_lone_parent: [false,false,true,true,false,false,false,false,true,true,false,false] + is_couple: [false,false,false,false,true,true,false,false,false,false,true,true] + benefits_premiums: [0,0,0,0,0,0,0,0,0,0,0,0] + output: + housing_benefit_applicable_amount: [8286.199999999999,8972.6,8286.199999999999,8972.6,12649,13423.8,8286.199999999999,8972.6,8286.199999999999,8972.6,12649,13423.8] + +- name: "Historical 2018 lower/higher pensioner allowances in GB and NI" + period: 2018 + absolute_error_margin: 0.02 + input: + country: ["ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","ENGLAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND","NORTHERN_IRELAND"] + housing_benefit_eligible: [true,true,true,true,true,true,true,true,true,true,true,true] + housing_benefit_pension_age_regulations_apply: [true,true,true,true,true,true,true,true,true,true,true,true] + eldest_claimant_or_partner_age: [64,65,64,65,64,65,64,65,64,65,64,65] + is_single_person: [true,true,false,false,false,false,true,true,false,false,false,false] + is_lone_parent: [false,false,true,true,false,false,false,false,true,true,false,false] + is_couple: [false,false,false,false,true,true,false,false,false,false,true,true] + benefits_premiums: [0,0,0,0,0,0,0,0,0,0,0,0] + output: + housing_benefit_applicable_amount: [8476,9172.800000000001,8476,9172.800000000001,12937.6,13717.6,8476,9172.800000000001,8476,9172.800000000001,12937.6,13717.6] + +- name: "Both jurisdictions use the higher category after abolition under annual sampling" + period: 2019 + absolute_error_margin: 0.02 + input: + country: ["ENGLAND","NORTHERN_IRELAND"] + housing_benefit_eligible: [true,true] + housing_benefit_pension_age_regulations_apply: [true,true] + eldest_claimant_or_partner_age: [64,64] + is_single_person: [true,true] + is_lone_parent: [false,false] + is_couple: [false,false] + benefits_premiums: [0,0] + output: + housing_benefit_applicable_amount: [9412,9412] + +- name: "A zero lower amount reform is not overwritten by the higher allowance" + period: 2017 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: true + eldest_claimant_or_partner_age: 64 + is_single_person: true + is_lone_parent: false + is_couple: false + benefits_premiums: 0 + gov.dwp.housing_benefit.allowances.single.aged_under_65.amount: 0 + output: + housing_benefit_applicable_amount: 0 + +- name: "A working-age family does not use the historical pensioner category" + period: 2017 + input: + housing_benefit_eligible: true + housing_benefit_pension_age_regulations_apply: false + eldest_claimant_or_partner_age: 64 + is_single_person: true + is_lone_parent: false + is_couple: false + benefits_premiums: 0 + gov.dwp.housing_benefit.allowances.single.older: 100 + output: + housing_benefit_applicable_amount: 5200 diff --git a/policyengine_uk/variables/gov/dwp/housing_benefit/housing_benefit_applicable_amount.py b/policyengine_uk/variables/gov/dwp/housing_benefit/housing_benefit_applicable_amount.py index cba43eaafe..ef15be85d6 100644 --- a/policyengine_uk/variables/gov/dwp/housing_benefit/housing_benefit_applicable_amount.py +++ b/policyengine_uk/variables/gov/dwp/housing_benefit/housing_benefit_applicable_amount.py @@ -11,6 +11,8 @@ class housing_benefit_applicable_amount(Variable): reference = ( "https://www.legislation.gov.uk/uksi/2006/213/schedule/3", "https://www.legislation.gov.uk/uksi/2006/214/schedule/3", + "https://www.legislation.gov.uk/uksi/2017/1187/regulation/7", + "https://www.legislation.gov.uk/nisr/2019/58/schedule/4/made", ) def formula(benunit, period, parameters): @@ -31,20 +33,36 @@ def formula(benunit, period, parameters): single = benunit("is_single_person", period) couple = benunit("is_couple", period) lone_parent = benunit("is_lone_parent", period) + country = benunit.household("country", period) + northern_ireland = country == country.possible_values.NORTHERN_IRELAND + + def pensioner_allowance(category): + # Existing 30-April fiscal-year convention: the raw GB category + # ends on 6 December 2018; NI's replacement table is April 2019. + # Neither date is a new claimant-history input. A zero reform of + # the lower amount must remain zero, not fall back to the higher. + lower = category.aged_under_65 + age_limit = where( + northern_ireland, + lower.age_limit_northern_ireland, + lower.age_limit_great_britain, + ) + return where(eldest_age < age_limit, lower.amount, category.aged) + single_personal_allowance = ( u_25 * p.single.younger + o_25 * p.single.older - + pension_age_regulations * p.single.aged + + pension_age_regulations * pensioner_allowance(p.single) ) couple_personal_allowance = ( u_18 * p.couple.younger + o_18 * p.couple.older - + pension_age_regulations * p.couple.aged + + pension_age_regulations * pensioner_allowance(p.couple) ) lone_parent_personal_allowance = ( u_18 * p.lone_parent.younger + o_18 * p.lone_parent.older - + pension_age_regulations * p.lone_parent.aged + + pension_age_regulations * pensioner_allowance(p.lone_parent) ) personal_allowance = ( single * single_personal_allowance From 96ed76ead014d9c9edb3a7a934de45d0b307fcd1 Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 18:49:17 +0400 Subject: [PATCH 3/3] Align historical allowance regressions with combined HB corrections --- ...housing_benefit_pension_age_means_test.yaml | 18 +++++++++++------- .../state_pension_credit_qualifying_age.yaml | 12 ++++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/housing_benefit_pension_age_means_test.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/housing_benefit_pension_age_means_test.yaml index 4e721cbe6b..d45fb05179 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/housing_benefit_pension_age_means_test.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/housing_benefit_pension_age_means_test.yaml @@ -1,9 +1,13 @@ # HB Regs 2006 reg 5 and HB (SPC) Regs 2006 reg 5 route a claimant on # income-based JSA to the working-age regulations even after the qualifying # age. CTR SI 2012/2885 reg 3 applies the same exclusion to its pensioner test. -# These tests preserve the model's existing historical allowance parameters: -# 73.10 * 52 = 3,801.20 and 181 * 52 = 9,412, without asserting that the -# shared pension-age allowance parameter reproduces every statutory age band. +# Working-age allowance: 73.10 * 52 = 3,801.20. A qualifying 64-year-old +# under the pension-age HB regulations has the lower allowance: +# 159.35 * 52 = 8,286.20 (SI 2017/260 Schedule 7). +# https://www.legislation.gov.uk/uksi/2017/260/schedule/7/made +# CTR reads the same higher-category HB rate: 172.55 * 52 = 8,972.60. +# Its existing formula does not select the historical under-65 category; +# these CTR assertions test that unchanged approximation, not its legal rate. - name: Qualifying-age claimant on income-based JSA uses working-age HB and CTR allowances period: 2017 @@ -64,8 +68,8 @@ housing_benefit_pension_age_regulations_apply: true council_tax_reduction_pensioner: true benefits_premiums: 0 - housing_benefit_applicable_amount: 9_412 - council_tax_reduction_applicable_amount: 9_412 + housing_benefit_applicable_amount: 8_286.20 + council_tax_reduction_applicable_amount: 8_972.60 - name: Synthetic component routing does not apply the pension-age guarantee-credit passport under working-age flags # This fixes the scheme flags and income components to test their consumers; @@ -146,8 +150,8 @@ savings: 12_000 output: has_attained_state_pension_credit_qualifying_age: true - housing_benefit_applicable_amount: 9_412 - council_tax_reduction_applicable_amount: 9_412 + housing_benefit_applicable_amount: 8_286.20 + council_tax_reduction_applicable_amount: 8_972.60 housing_benefit_assessable_capital: 0 housing_benefit_tariff_income: 0 housing_benefit_applicable_income: 0 diff --git a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/state_pension_credit_qualifying_age.yaml b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/state_pension_credit_qualifying_age.yaml index e993dfbfb0..2c2e3c3dc5 100644 --- a/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/state_pension_credit_qualifying_age.yaml +++ b/policyengine_uk/tests/policy/baseline/gov/dwp/pension_credit/state_pension_credit_qualifying_age.yaml @@ -327,8 +327,12 @@ - name: Case 14, the pension-age Housing Benefit and CTR personal allowance applies from the qualifying age. # Born 6 April 1952, over the qualifying age in 2016-17, so the pension-age - # regulations (SI 2006/214) apply. The model's single pension-age rate for - # 2016-17 is 181 a week: 181 x 52 = 9,412. No premiums apply. + # regulations (SI 2006/214) apply. The under-65 single HB allowance is + # 155.60 a week: 155.60 x 52 = 8,091.20. No premiums apply. + # https://www.legislation.gov.uk/uksi/2016/242/regulation/6/made + # CTR shares the higher-category HB parameter: 168.70 x 52 = 8,772.40. + # Its unchanged formula does not select the historical under-65 category; + # the CTR assertion below preserves that approximation, not its legal rate. period: 2016 absolute_error_margin: 0.01 input: @@ -346,8 +350,8 @@ tenure_type: RENT_FROM_COUNCIL output: benefits_premiums: 0 - housing_benefit_applicable_amount: 9_412 - council_tax_reduction_applicable_amount: 9_412 + housing_benefit_applicable_amount: 8_091.20 + council_tax_reduction_applicable_amount: 8_772.40 - name: Case 15, below the qualifying age the working-age allowance for a single person aged 25 or over applies. # Born 6 September 1953, under the qualifying age in 2017-18: 73.10 a week,