Repository navigation
Use published LHA determinations and apply Sch 3B paras 3 and 3A - #2022
Merged
Merged
Conversation
LHA rates came from the 30th percentile of the 2020 list of rents, uprated by the private rent index. They now come from the published tables (VOA, Rent Officers Wales, Scottish Government, NIHE, and DWP and nidirect for monthly Universal Credit rates), April 2014 to April 2026. Determinations from April 2020 are recomputed from the published 30th percentile rents with the national maxima, the anomalous-rate rule (para 3) and the March 2020 minimum (para 3A), which reproduces every published rate. Fixes #2012 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every Welsh, Scottish and Northern Irish list in lha_list_of_rents.csv.gz is a copy of an English BRMA's list (all 480, checked), so a percentile reform scaled those nations' published rates by a copied list's shape. They now take the median English ratio for the same category. Baseline rates are unchanged: the ratio is one at the 30th percentile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 2, 2026
The list of rents' Scottish, Welsh and Northern Ireland lists are copies of English lists (policyengine-uk-data#515), so their entry counts say nothing about where people rent. Each region's default is now its BRMA with the most private-rented households in the 2021 (England, Wales, Northern Ireland) and 2022 (Scotland) censuses, mapped to BRMAs. Scotland moves to Lothian, Yorkshire to Leeds and the East of England to Central Norfolk & Norwich. The new YAML tests no longer pin LHA rates, which #2022 changes; a Python test checks instead that each default gives the same rates as inputting it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Scottish lists in lha_list_of_rents.csv.gz were copies of English BRMAs' lists (#2036). Replace them with Rent Service Scotland's records released under FOI 202200303624: the list for April Y is the sheet for the year to September Y-1 (sheets 2018 and 2019 for 2019 and 2020). Those sheets reproduce the published 30th percentiles to the penny in 87 and 86 of 90 cells respectively. Scottish BRMAs now take percentile-reform ratios from their own lists; Welsh and Northern Irish BRMAs, still copies, keep the median English ratio, and the English median no longer includes Scotland. The build script pins the workbook by sha256 and leaves every other row unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From review: choose the latest list year per region so a newer sheet for one nation cannot drop the others; define English regions once (NON_ENGLISH_REGIONS) for the code and tests; compute the test's English median the way the code does; pin two Scottish P50 ratios so the test catches a return to copied data (both Scottish tests fail on aef9c24's file); assert the number of BRMA-less rents per sheet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ding - The March 2020 minimum now applies to Northern Ireland's UC rates (SR 2016/222 Sch 1 para 6). NI's April 2020 monthly rates were not published, so the floor is the April 2020 weekly rate converted to a month; before, a missing value silently dropped the floor. - Welsh restatements of held April 2020 rates now adjust the held determination's percentile rent before the maximum, anomalous-rate and minimum rules, rather than adding cash afterwards, so a reformed maximum still binds. The minimum uses the determinations as originally published. - The allowance after the maximum is rounded to the penny (para 2(10)). - Tests pin the exact restated Welsh cells, check whole pence exactly, use fractional-penny maxima, bound held years, use an independent NI floor, and add a regression test for each counterexample. - Docs: NI UC sources, missing-percentile fallback, devolved ratios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rent Officers Wales's April 2022 and 2023 tables restate 14 weekly (17 monthly) of the April 2020 rates they hold. Each restated monthly figure is a round monthly rent, which reads as a correction, so the para 3A minimum now uses the latest held table's figures (no baseline effect: every affected cell's April 2024 rate is above both). The test computes that floor independently from the pinned restatements. Docs state the rounding order, the reset-year percentile fill, the extra three monthly restatements, and nidirect as Northern Ireland's UC source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 of 52 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed rates Main's #2006 gives Housing Benefit its own category of dwelling (housing_benefit_LHA_category) and a housing_benefit_LHA_rate that the HB maximum rent reads. Rent officers determine one rate per BRMA and category, so that variable now looks up the same determined table as BRMA_LHA_rate through benunit_lha, which takes the category variable to read. The list-of-rents helper main added (lha_rate_for_category) and the helpers left in LHA_category.py go, as before; LHA_category keeps main's Universal Credit-only rule and documentation. A new test sets every BRMA and category with the UC category set to a different one, and checks each variable follows its own category and matches the table and every published cell; pointing the HB variable at LHA_category makes it fail. Also from the delta review: the Welsh restatement wording (16 of the 17 monthly figures are multiples of GBP 5; Vale of Glamorgan one bedroom is GBP 100 a week) and a stale comment in housing_benefit_lha_order.yaml (the model's 2026 Maidstone one-bedroom rate is 8,975.20; the test keeps its 9,467.64 input). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Merged at reviewed head 088addb under Max's ruling d829 (merge on green CI at the reviewed head).
|
This was referenced Oct 4, 2026
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2012
What changes
Local Housing Allowance rates now come from the published determinations: every year from April 2014 (England, Wales) or April 2015 (Scotland, Northern Ireland) to April 2026. They replace the 30th percentile of
lha_list_of_rents.csv.gz(2019 and 2020 rows), which was uprated by the private rent index for later years.Data.
parameters/gov/dwp/LHA/lha_published_rates.csv.gzhas one row per year, BRMA and category.scripts/build_lha_published_rates.pybuilds it from the files listed inlha_published_rates_sources.csv, with each file's URL and SHA-256. Every BRMA has rates for every year from 2020 to 2025, and every GB BRMA for 2026. No NIHE table for April 2026 could be retrieved; SR 2026/2 holds Northern Ireland's rates at the April 2024 determination, which the model applies. NI's monthly UC rates are published (nidirect) from April 2024; earlier ones are converted from the weekly percentile.Rules.
policyengine_uk/utils/lha.pyrecomputes each determination from April 2020 from the published 30th percentile rents, following Rent Officers (Housing Benefit Functions) Order 1997 Sch 3B and Rent Officers (Universal Credit Functions) Order 2013 Sch 1:gov.dwp.LHA.march_2020_minimum), which the model also lacked;The March 2020 minimum applies to UC in Northern Ireland too (SR 2016/222 Sch 1 para 6). NI's April 2020 monthly rates were not published, so the floor there is the April 2020 weekly rate converted to a month.
The NI rules are the same (SR 2016/222 Sch 1, SR 2008/100, and the NI modification and amendment regulations). While
gov.dwp.LHA.freezeis true, the last unfrozen determination holds. Before April 2020, the published rates are used as they stand: they follow CPI and 1% uprating, then the 2016-2020 freeze with targeted affordability uplifts, none of which the model encodes.Universal Credit gets its monthly determination. Before, it took 52 weeks of the weekly rate, which ran 1.8% low in April 2020 against DWP's tables.
Reforms.
gov.indices.private_rent_index.lha_list_of_rents.csv.gz(300) is a copy of an English BRMA's list, and the Scottish ones were too (all 480 checked; see policyengine-uk-data#515). Welsh and Northern Irish BRMAs therefore take the median English ratio for the category. For Scotland, Use Rent Service Scotland's own lists of rents for Scottish percentile ratios #2037 (merged into this branch; fixes Scottish, Welsh and NI lists of rents are copies of English BRMAs' lists #2036; independently reviewed) replaces the copies with Rent Service Scotland's own list-of-rents records, released under FOI 202200303624. They reproduce 173 of 180 published April 2019 and April 2020 30th percentiles exactly. Scottish BRMAs now use their own ratios. Welsh and Northern Irish BRMAs keep the English median, which now excludes Scotland.Freeze timing was already right
The issue suggested that calendar 2025 was treated as unfrozen. It is not.
convert_to_fiscal_year_parametersreads every parameter at 30 April, so year 2025 takes the freeze from 6 April 2025, held at the January 2024 determination (checked at 7b9fc37: freeze(2025) is true, anchor 2024). The newtest_years_map_to_april_determinationspins this.One publisher inconsistency, kept as published
Rent Officers Wales's April 2022 and April 2023 tables say their rates are "fixed at the April 2020 rate". In 14 Housing Benefit cells, though, they differ from its own April 2020 and April 2021 tables (for example, Blaenau Gwent one-bedroom: £66.39, then £66.74). DWP's monthly Wales tables restate the 14 cells' monthly counterparts plus three more by 1p or 2p (Monmouthshire C, Newport E, Pembrokeshire E): 17 UC cells. Each restated figure is a round rent (16 of the 17 monthly figures are multiples of £5; the other, Vale of Glamorgan one-bedroom at £434.52, is £100 a week), which reads as a correction. The model takes each table as published. A held year adjusts the held determination's percentile rent by the published restatement (
restatement) before the maximum, anomalous-rate and minimum rules, so a reform to those rules still binds. For example, a £60 maximum on Blaenau Gwent one-bedroom in 2020 holds at £60 through 2022, not £60.35. The March 2020 minimum uses the restated figures too (no baseline effect: every affected cell's April 2024 rate is above both).test_published_frozen_years_repeat_the_last_determinationpins the exception to those Welsh cells.Interaction with #2021
#2021 (the default BRMA follows the region) moves the same two test pins. Whichever PR merges second needs to re-pin them to Inner South East London, London's default under #2021. Computed on this branch with that BRMA:
LHA.yaml"BRMA default value" (2020, category C):BRMA_LHA_rate16,155.36. That is the VOA April 2020 rate of £310.68 a week.entitledto_scenarios.yamlAdd contributory JSA #1 (2025, shared accommodation):uc_LHA_cap7,800, which is DWP's April 2024 UC rate of £650.00 a month, held for 2025-26.universal_creditbecomes 6,001.68 andhousehold_net_income16,627.14.from policyengine_uk.parameters.gov.dwp.LHA import lha_list_of_rentsstill works here (module__getattr__), which #2021'stest_brma_region_default.pyuses.Housing Benefit's own category of dwelling (#2006)
#2006 (on main) gave Housing Benefit its own category of dwelling,
housing_benefit_LHA_category(HB Regs 2006 reg 13D), and ahousing_benefit_LHA_ratethat the HB maximum rent (LHA_cap) reads. Each determination has one rate per BRMA and category, sohousing_benefit_LHA_ratenow reads the weekly determination for the HB category (benunit_lha(..., category_variable="housing_benefit_LHA_category")).BRMA_LHA_ratereads the same weekly determination for the UC category, anduc_LHA_capreads the monthly determination (Rent Officers (Universal Credit Functions) Order 2013) for the UC category. #2006's list-of-rents helper (lha_rate_for_category) and the per-category maximum lookup go with the rest of the list-of-rents code: the maximum is applied inside the determination, before the anomalous-rate rule and the minimum.Before and after
At 7b9fc37, against the published tables:
Rates fell with dwelling size in 25 BRMA-years before (5 BRMAs in April 2024: Carmarthenshire, Lough Neagh Lower, North (NI), North West (NI), Taff Rhondda), and in none after.
After this change, every published rate is reproduced exactly, 2014 to 2026, in every nation: 12,830 Housing Benefit cells and 12,600 Universal Credit cells. The same holds end to end through
BRMA_LHA_rateanduc_LHA_capfor every BRMA and category in 2019, 2020, 2023, 2024, 2025 and 2026, and throughhousing_benefit_LHA_ratefor every published HB cell from 2019 to 2026.test_model_reproduces_every_published_rateis the differential test. Where a publisher gives no separate percentile for a reset year (Wales and NI in April 2020, NI in April 2024), and for UC in reset years wherever the weekly rate equals its percentile, the published rate stands in for the percentile; for those cells the match shows only that the rules leave an unadjusted rate alone. The law-derived regression tests and Hypothesis properties cover the rules themselves.Invariants
Impact
Real microsimulations of the released enhanced FRS 2024-25 (policyengine-uk-data 1.57.4, sha256 03fe15e4…): main at 6ae9c5e (4 October) against this PR's merged head 088addb. Aggregates only; any figure from fewer than 10 survey households is suppressed.
Three real runs per model (fiscal years 2025-26, 2026-27 and 2029-30); every figure below comes from one of them.
2026-27 by nation, Universal Credit paid:
The UC housing costs element before taper and take-up changes by −£1.82bn, +£0.16bn, +£0.06bn and +£0.01bn respectively.
Across LHA-eligible benefit units, the weekly Housing Benefit LHA rate (
housing_benefit_LHA_rate) changes on average by −£8.36 in England (higher for 16%), +£20.82 in Northern Ireland (higher for 98%), +£3.26 in Scotland and +£0.92 in Wales. The direction follows the errors above: the list-of-rents model overstated English rates on average and understated Northern Irish ones.1.34m households lose more than £1 a year (275 survey households), and 0.29m gain (147).
Poverty changes rest on only 12 to 18 survey households per figure, so treat them as indicative. Before housing costs: +33k people in 2026-27 (12 survey households change status). After housing costs: +24k (18).
The first runs (base 7b9fc37 against 43ef96f, before main's HB changes) gave nearly the same totals: −£0.668bn household net income in 2026-27.
Tests
test_lha_published_rates.py:housing_benefit_LHA_rateandBRMA_LHA_rateeach follow their own category (HB and UC), for every BRMA and category, with the other category set differently. Pointing the HB variable at the UC category makes it fail.lha_published_rates.yaml: rates pinned to published figures, England, Wales, Scotland and NI, across reset, frozen and pre-2020 years. Includes the Durham anomalous-rate case and the central London maximum.LHA.yaml: 2020 Maidstone and Guildford;test_lha_freeze.py: Maidstone April 2020 £187.56 (was the list-of-rents £187.91);test_lha_uc_maximum.py: the pre-2020 UC rate is DWP's published monthly rate;entitledto_scenarios.yamlAdd contributory JSA #1: a pinned PolicyEngine output. Maidstone shared accommodation UC is £444.83 a month, so UC is £285.32 lower.Commands run:
uv run pytest policyengine_uk/tests/test_lha_published_rates.py policyengine_uk/tests/test_lha_freeze.py policyengine_uk/tests/test_lha_maximum.py policyengine_uk/tests/test_lha_uc_maximum.pyuv run policyengine-core test policyengine_uk/tests/policy -c policyengine_ukruff formatandruff checkon the changed filesThe data build was re-run from the cached source files. The
make test-microsimulationtests were not run (they need the private dataset). The impact figures above come from runs at this PR's current head. The dataset is uk-data 1.57.4'senhanced_frs_2024_25.h5(sha256 03fe15e4…, per the release manifest; 1.57.4 is still the latest release).axiom: n/a for the published rates themselves (rent-officer determinations, which rulespec-uk takes as inputs). The determination rules in Sch 3B paras 2(2), 3 and 3A (and UC Order Sch 1 paras 2, 5 and 7) are queued: TheAxiomFoundation/rulespec-uk#415 queued
🤖 Generated with Claude Code