PolicyEngine / PolicyEngine/policyengine-uk

Legacy capital tariff income omits prescribed-accommodation branch

Open
#1,758 0 comments 0 reactions 0 assignees View on GitHub

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:

Affected formulas inspected locally:

  • policyengine_uk/variables/gov/dwp/esa_income_tariff_income.py
  • policyengine_uk/variables/gov/dwp/jsa_income_tariff_income.py
  • policyengine_uk/variables/gov/dwp/income_support_tariff_income.py
  • policyengine_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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.