From 0d9a9a438274a66d8688ddeba4503a8482b32d37 Mon Sep 17 00:00:00 2001 From: Anthony Volk <14987227+anth-volk@users.noreply.github.com> Date: Fri, 9 Oct 2026 04:28:50 +0400 Subject: [PATCH] Correct pension-age Housing Benefit capital threshold history --- .../hb-capital-threshold-history.fixed.md | 1 + .../pension_age/tariff_income/threshold.yaml | 11 ++++++- ...using_benefit_capital_threshold_history.py | 32 +++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 changelog.d/hb-capital-threshold-history.fixed.md create mode 100644 policyengine_uk/tests/test_housing_benefit_capital_threshold_history.py diff --git a/changelog.d/hb-capital-threshold-history.fixed.md b/changelog.d/hb-capital-threshold-history.fixed.md new file mode 100644 index 0000000000..fe84babb15 --- /dev/null +++ b/changelog.d/hb-capital-threshold-history.fixed.md @@ -0,0 +1 @@ +- Corrected the ordinary pension-age Housing Benefit capital threshold history to £6,000 before 2 November 2009 and £10,000 thereafter. diff --git a/policyengine_uk/parameters/gov/dwp/housing_benefit/means_test/capital/pension_age/tariff_income/threshold.yaml b/policyengine_uk/parameters/gov/dwp/housing_benefit/means_test/capital/pension_age/tariff_income/threshold.yaml index df97be0015..4dc35f866f 100644 --- a/policyengine_uk/parameters/gov/dwp/housing_benefit/means_test/capital/pension_age/tariff_income/threshold.yaml +++ b/policyengine_uk/parameters/gov/dwp/housing_benefit/means_test/capital/pension_age/tariff_income/threshold.yaml @@ -7,4 +7,13 @@ metadata: - title: The Housing Benefit (Persons who have attained the qualifying age for state pension credit) Regulations 2006 reg. 29(2) href: https://www.legislation.gov.uk/uksi/2006/214/regulation/29 values: - 2006-04-10: 10000 + 2006-04-10: + value: 6000 + reference: + - title: The Housing Benefit (Persons who have attained the qualifying age for state pension credit) Regulations 2006, regulation 29(2)(b) as made + href: https://www.legislation.gov.uk/uksi/2006/214/regulation/29/made + 2009-11-02: + value: 10000 + reference: + - title: The Social Security (Deemed Income from Capital) Regulations 2009, regulations 1 and 5 + href: https://www.legislation.gov.uk/uksi/2009/1676/made diff --git a/policyengine_uk/tests/test_housing_benefit_capital_threshold_history.py b/policyengine_uk/tests/test_housing_benefit_capital_threshold_history.py new file mode 100644 index 0000000000..3eeccc8507 --- /dev/null +++ b/policyengine_uk/tests/test_housing_benefit_capital_threshold_history.py @@ -0,0 +1,32 @@ +"""Ordinary pension-age HB capital history, before fiscal-year conversion.""" + +from pathlib import Path + +import pytest +import yaml +from policyengine_core.parameters import Parameter + +PARAMETER_PATH = ( + Path(__file__).resolve().parents[1] + / "parameters/gov/dwp/housing_benefit/means_test/capital/pension_age" + / "tariff_income/threshold.yaml" +) + + +@pytest.mark.parametrize( + "instant, expected", + [ + ("2006-04-10", 6000), + ("2009-11-01", 6000), + ("2009-11-02", 10000), + ("2015-04-30", 10000), + ("2026-04-30", 10000), + ], +) +def test_ordinary_threshold_history(instant, expected): + # Read the enacted calendar history: annual model conversion starts in 2015. + # SI 2006/214 reg 29(2)(b), replaced by SI 2009/1676 regs 1 and 5. + data = yaml.safe_load(PARAMETER_PATH.read_text()) + data["values"] = {str(date): value for date, value in data["values"].items()} + threshold = Parameter("pension_age_tariff_threshold", data=data) + assert threshold(instant) == expected