PolicyEngine / PolicyEngine/policyengine-uk
Legacy capital tariff income omits prescribed-accommodation branch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 50
- Forks
- 33
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 14
Description
PolicyEngine UK's legacy capital tariff income formulas appear to model only the ordinary GBP 6,000 lower-threshold branch and compute tariff income above GBP 16,000, but the current regulations include additional branch/limit conditions:
- ESA: The Employment and Support Allowance Regulations 2008 regulation 118(2)-(3) uses a GBP 10,000 lower threshold where prescribed accommodation circumstances apply, and regulation 118(1)-(2) describes capital not exceeding GBP 16,000. https://www.legislation.gov.uk/uksi/2008/794/regulation/118
- JSA: The Jobseeker's Allowance Regulations 1996 regulation 116(1A)-(1B) has the same prescribed-accommodation GBP 10,000 branch, with the GBP 16,000 upper limit in regulation 116(1)/(1A). https://www.legislation.gov.uk/uksi/1996/207/regulation/116
- Income Support: The Income Support (General) Regulations 1987 regulation 53(1A)-(1B) has the same prescribed-accommodation GBP 10,000 branch, with the GBP 16,000 upper limit in regulation 53(1)/(1A). https://www.legislation.gov.uk/uksi/1987/1967/regulation/53
- Working-age Housing Benefit: The Housing Benefit Regulations 2006 regulation 52(3)-(4) has a GBP 10,000 branch for prescribed circumstances, with the GBP 16,000 upper limit in regulation 52(1)/(3). https://www.legislation.gov.uk/uksi/2006/213/regulation/52
Affected formulas inspected locally:
policyengine_uk/variables/gov/dwp/esa_income_tariff_income.pypolicyengine_uk/variables/gov/dwp/jsa_income_tariff_income.pypolicyengine_uk/variables/gov/dwp/income_support_tariff_income.pypolicyengine_uk/variables/gov/dwp/housing_benefit/applicable_income/housing_benefit_tariff_income.py
Current formulas use the ordinary threshold/step/amount and ceil(excess / step) for all rows. That matches the ordinary branch exactly; in Axiom EFRS oracle validation I therefore projected the prescribed-accommodation/circumstances leaves false and compared only capital at or below GBP 16,000 for these surfaces.
Likely fix: add explicit input/proxy variables for the prescribed accommodation/circumstance predicates, branch to the GBP 10,000 threshold where true, and decide whether the exposed tariff-income variables should return zero or otherwise be guarded when capital exceeds GBP 16,000.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the four named tariff-income files and the cited regulations, then trace how their ordinary threshold, step, amount, and capital-limit inputs are supplied. Use the existing Axiom EFRS oracle validation approach to cover prescribed-accommodation circumstances and capital above GBP 16,000; done means all four formulas reflect the applicable branches and their over-limit behavior is decided and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100