Skip to content

Add the seven-family gambling-duty engine foundation - #2590

Merged
juaristi22 merged 8 commits into
mainfrom
feat-2586-gambling-duties
Oct 23, 2026
Merged

juaristi22 merged 8 commits into
mainfrom
feat-2586-gambling-duties

Conversation

@juaristi22

@juaristi22 juaristi22 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #2586

Add annual Household inputs and formulas for General Betting Duty, Pool Betting Duty, Remote Gaming Duty, Machine Games Duty, Bingo Duty, Lottery Duty and Gaming Duty from model year 2024. Fifteen default-zero inputs represent already-attributed, nonnegative dutiable bases. Each formula floors its bases at zero. The aggregate enters household and government tax totals once, with full consumer pass-through as proposed in the issue. Existing fiscal classification and overlap guards remain in force; Other HMRC taxes has partial coverage and its residual components remain unmodelled.

The formulas retain the 1 April statutory changes within the model’s 6 April–5 April year, including the five transition days. Reforms dated within a year split the same way. The casino proxy takes one value per model year. Machine bases follow statutory tax classes rather than premises or Gambling Commission categories. The statutory casino schedule remains an operator/premises six-month catalogue; household casino duty uses the separately documented, incidence proxy of 0.235487, held constant after model year 2024. #2587 tracks its review and refresh.

The casino proxy combines UK HMRC FY2024/25 cash receipts with provisional GB Gambling Commission casino game yield. The observations share a 1 April–31 March year, while their geographic coverage and accounting basis differ. Both source periods differ from the model’s 6 April–5 April year; cash payment lags can also separate receipts from the underlying gaming activity. This approximation does not establish matched accrual liability or national receipts, forecast future casino behaviour, or make operator-band reforms flow through to household incidence. Its source cells, precision and forward-use limitations are documented in docs/engineering/gambling-duties.md and the parameter descriptions.

This PR completes the engine foundation. #2586 remains open for joint machine tax-class × premises data, population mapping and adoption, remote/land allocation, under-recording and receipts reconciliation, and the comparable expenditure contract needed for VAT-base repair. Default-zero inputs do not supply or retrofit those data. Refs #2586 is an explicit partial-scope exception to the repository’s first-line auto-closing convention; this PR does not claim to close the issue.

Validation: the official full policy YAML tree passed 4,318 tests in one completed native invocation (exit 0, 805.757 seconds, reaped with no remaining process group). The earlier 159-test four-family and 99-test delta batches cover relevant Python/YAML, schedule, metadata, registry and fiscal/aggregate guards; their coverage overlaps and is not added. A preserved initial runner setup error executed no tests before the corrected Core invocation. The full Python suite and private population data were not run. The documented local gate exception uses the full YAML tree and affected Python checks; actual resulting-head Linux CI remains required before READY. Formatting has passed with unchanged Python ASTs and policy inputs. Independent code and source reviews of commit a623908 are complete and approve the implementation. The citation finding is resolved; no open findings or material evidence gaps remain. After review round 1, at 1bad8f769: 53 YAML cases (gambling_duty, excise and income integration) and 347 pytest tests pass (the six affected files, plus parameter descriptions, fiscal-year parameters, aggregate-impact reforms and dated reform routes); ruff format and check are clean.

axiom: TheAxiomFoundation/rulespec-uk#488 queued (the casino incidence proxy is an empirical assumption, not law, and is out of scope)

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Aggregate impact on certified data: pass

Base 402e7c6746 against head a9f0d8d254, both on enhanced_frs_2024_25.h5 (policyengine-uk-data 1.58.1, sha256 056e80fd8e91), fiscal years 2025-26 to 2031-32. Each year is a full microsimulation run on each side.

Checks: 0 broken by this change, 1 failing on both sides, 0 fixed. Moves flagged for review: 0 (thresholds in report_spec.yaml; a flag does not fail the job).

Workflow run and full report

New warnings

  • Betting and gaming duties is not zero for every unit (inert:gambling_duty): 2025-26: zero for every unit; 2026-27: zero for every unit; 2027-28: zero for every unit

Notes

  • This change edits the fiscal partition; review the partition diff alongside the moves it explains.
  • In the years a figure from fewer than 10 records is suppressed (spending.disabled_students_allowance), every total containing it, and the decile incomes, are rebuilt from their other components, so no published total includes it. Those totals are marked †. A change is withheld where the two sides leave out different figures and can't be lined up.
  • Betting and gaming duties (receipts.gambling_duty) is measured on the head only.

Moves flagged for review

None.

Receipts by tax head

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Betting and gaming duties (new: head levels) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn

Spending by benefit and service

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Caseloads

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed

Standard reform costings (change in gov_balance)

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise additional rate by 3pp 0 0 0 0 0 suppressed suppressed

Standard reforms: change in each reform's target

Measure 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise additional rate by 3pp: change in income_tax 0 0 0 0 0 suppressed suppressed

Household net income by decile

No household's net income changes in any year.

No change in any year: government balance, each component counted once; model totals; household income totals; population; poverty rates; people in poverty; inequality; mean household net income in each side's own deciles.

Checks failing on both base and head (1)
  • VAT is never negative (sign:vat): 2025-26: 76 units below zero, a weighted £-54,797,972 in total; 2026-27: 76 units below zero, a weighted £-56,271,349 in total; 2027-28: 76 units below zero, a weighted £-57,609,146 in total
Counted-once check

Each of 85 components was raised by £1 per unit in 2026-27, and every head of its totals was read household by household: its own head must rise by exactly £1, no other tax head may move, no other benefit may rise, and the model's own total must move by what its heads moved. A head that breaks a rule is measured again twice: with every other head held at its baseline value, and with every other head held at its value after the first £1 while the component rises again. It fails where either still shows the response. 0 failed; 0 were skipped.

Provenance
Side Commit Runtime Environment hash Partition hash Time
base main 402e7c6746 uk 2.148.4 (files 32999b1d5216), core 3.33.2, py 3.13.17 aarch64 66e05b025dc6 d4c1e9f08160 1560.14s
head #2590 merged into main a9f0d8d254 uk 2.148.4 (files 7358a6042d4b), core 3.33.2, py 3.13.17 aarch64 66e05b025dc6 f520aa167a89 1533.83s

Dataset: hf://policyengine/policyengine-uk-data-private/enhanced_frs_2024_25.h5@2526edbbb687a3b54dbb11272e5389e4b62d2ac2, sha256 056e80fd8e9151d78f432a25cde863340baee81304c6216a37fb575ce8563784 (verified on both sides), policyengine-uk-data 1.58.1.

Receipts by tax head: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Income tax £299.29bn £319.01bn £336.54bn £351.69bn £367.24bn £385.36bn £403.66bn
National Insurance (employee and self-employed) £52.58bn £54.94bn £56.75bn £58.48bn £60.62bn £62.57bn £65.03bn
National Insurance (employer) £152.64bn £159.18bn £164.14bn £168.73bn £176.11bn £181.72bn £188.90bn
Employer NI change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Employer NI change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Capital gains tax £12.62bn £13.06bn £13.55bn £14.04bn £14.54bn £15.09bn £15.65bn
Student loan repayments £7.83bn £8.12bn £8.35bn £8.56bn £8.79bn £9.04bn £9.38bn
VAT £253.71bn £260.53bn £266.72bn £273.14bn £279.83bn £286.71bn £293.71bn
Change in VAT from its baseline £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
VAT on private school fees £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Fuel duties £24.53bn £24.64bn £26.64bn £26.69bn £26.42bn £25.76bn £26.35bn
Alcohol duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Tobacco duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Vehicle excise duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Betting and gaming duties £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
TV licence fee £4.28bn £4.43bn £4.44bn £4.46bn £4.48bn £4.51bn £4.53bn
Council tax £49.56bn £52.45bn £55.78bn £59.39bn £62.98bn £66.74bn £70.70bn
High value council tax surcharge £0.00bn £0.00bn £0.00bn £0.48bn £0.49bn £0.51bn £0.52bn
Northern Ireland domestic rates £0.55bn £0.58bn £0.61bn £0.63bn £0.67bn £0.70bn £0.73bn
Business rates £31.73bn £31.73bn £31.73bn £31.73bn £31.73bn £31.73bn £31.73bn
Stamp duty land tax on the household's own purchases £6.93bn £7.42bn £7.85bn £8.26bn £8.68bn £9.09bn £9.51bn
Stamp duty land tax paid by companies £3.13bn £3.13bn £3.13bn £3.13bn £3.13bn £3.13bn £3.13bn
Land transaction tax (Wales) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Land and buildings transaction tax (Scotland) £0.01bn £0.01bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn
Unspecified tax change borne by capital £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Unspecified tax change borne by consumers £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Wealth tax excluding the main residence £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Land value tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Carbon tax £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Spending by benefit and service: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
State Pension £122.15bn £126.64bn £127.76bn £129.65bn £133.46bn £137.40bn £141.47bn
Pension Credit £6.68bn £7.07bn £7.09bn £7.16bn £7.28bn £7.42bn £7.52bn
Winter Fuel Payment £1.70bn £1.68bn £1.59bn £1.57bn £1.57bn £1.55bn £1.52bn
Pension Age Winter Heating Payment (Scotland) £0.19bn £0.20bn £0.20bn £0.21bn £0.21bn £0.22bn £0.22bn
Universal Credit £75.54bn £80.75bn £83.40bn £85.21bn £86.21bn £87.61bn £88.91bn
Housing Benefit £8.59bn £8.93bn £9.19bn £9.33bn £9.61bn £9.87bn £10.15bn
Council Tax Reduction £1.99bn £2.03bn £2.08bn £2.13bn £2.18bn £2.23bn £2.29bn
Employment and Support Allowance (income-related) £0.79bn £0.81bn £0.83bn £0.85bn £0.87bn £0.89bn £0.91bn
Employment and Support Allowance (contribution-based) £5.22bn £5.36bn £5.49bn £5.62bn £5.76bn £5.90bn £6.04bn
Jobseeker's Allowance (income-based) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Jobseeker's Allowance (contribution-based) £0.29bn £0.30bn £0.30bn £0.31bn £0.32bn £0.33bn £0.33bn
Income Support £0.12bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Working Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Tax Credit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Incapacity Benefit £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Personal Independence Payment £27.05bn £28.19bn £29.28bn £30.02bn £30.75bn £31.51bn £32.28bn
Disability Living Allowance £7.52bn £7.83bn £8.14bn £8.34bn £8.55bn £8.76bn £8.97bn
Attendance Allowance £8.71bn £9.08bn £9.43bn £9.67bn £9.90bn £10.15bn £10.40bn
Carer's Allowance £4.50bn £4.69bn £4.87bn £4.99bn £5.11bn £5.23bn £5.36bn
Carer Support Payment (Scotland) £0.31bn £0.32bn £0.34bn £0.34bn £0.35bn £0.36bn £0.37bn
Carer's Allowance Supplement (Scotland) £0.00bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn
Severe Disablement Allowance £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn £0.03bn
Industrial Injuries Disablement Benefit £0.51bn £0.52bn £0.53bn £0.54bn £0.56bn £0.57bn £0.59bn
Armed Forces Compensation Scheme £0.61bn £0.62bn £0.64bn £0.65bn £0.67bn £0.69bn £0.70bn
War Widow's or Widower's Pension £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Child Benefit £16.23bn £16.91bn £17.53bn £17.96bn £18.39bn £18.84bn £19.29bn
Scottish Child Payment £0.50bn £0.52bn £0.53bn £0.55bn £0.56bn £0.57bn £0.58bn
Two Child Limit Payment (Scotland, counterfactual) £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Healthy Start vouchers £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn £0.05bn
Maternity Allowance £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Maternity Pay £3.32bn £3.41bn £3.49bn £3.57bn £3.66bn £3.75bn £3.84bn
Statutory Paternity Pay £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Statutory Sick Pay £1.13bn £1.16bn £1.19bn £1.22bn £1.25bn £1.28bn £1.31bn
Sure Start Maternity Grant £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn £0.01bn
Bereavement Support Payment £0.67bn £0.69bn £0.70bn £0.72bn £0.74bn £0.76bn £0.78bn
Tax-Free Childcare £0.55bn £0.56bn £0.57bn £0.58bn £0.60bn £0.61bn £0.59bn
Extended childcare entitlement £2.77bn £3.27bn £3.36bn £3.43bn £3.53bn £3.61bn £3.70bn
Universal childcare entitlement £2.26bn £2.45bn £2.51bn £2.58bn £2.64bn £2.72bn £2.78bn
Targeted childcare entitlement £0.47bn £0.49bn £0.50bn £0.51bn £0.52bn £0.53bn £0.47bn
Care to Learn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Childcare Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Parents' Learning Allowance £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn £0.20bn
Adult Dependants' Grant £0.06bn £0.06bn £0.04bn £0.04bn £0.04bn £0.04bn £0.04bn
Travel Grant £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
NHS spending £204.68bn £205.46bn £206.22bn £207.04bn £207.96bn £208.89bn £209.79bn
State education spending £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn £0.02bn
Transport subsidy spending £25.15bn £25.25bn £25.34bn £25.44bn £25.55bn £25.67bn £25.78bn
Cost-of-living support payment £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Bills Rebate £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Energy Price Guarantee subsidy £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Disability basic income £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Other public spending budget change £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Caseloads: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
State Pension 11,308k 11,208k 10,906k 10,812k 10,860k 10,908k 10,955k
Pension Credit 1,491k 1,489k 1,478k 1,459k 1,459k 1,456k 1,453k
Winter Fuel Payment 7,091k 7,011k 6,599k 6,512k 6,493k 6,379k 6,248k
Pension Age Winter Heating Payment (Scotland) 806k 807k 807k 805k 809k 812k 816k
Universal Credit 6,361k 6,370k 6,404k 6,419k 6,390k 6,387k 6,368k
Housing Benefit 1,254k 1,252k 1,254k 1,239k 1,245k 1,247k 1,249k
Council Tax Reduction 3,187k 3,212k 3,227k 3,246k 3,265k 3,282k 3,294k
Employment and Support Allowance (income-related) 71k 71k 71k 72k 72k 72k 72k
Employment and Support Allowance (contribution-based) 722k 724k 727k 730k 733k 737k 740k
Jobseeker's Allowance (income-based) 0k 0k 0k 0k 0k 0k 0k
Jobseeker's Allowance (contribution-based) 67k 67k 68k 68k 68k 69k 69k
Income Support 25k 0k 0k 0k 0k 0k 0k
Working Tax Credit 0k 0k 0k 0k 0k 0k 0k
Child Tax Credit 0k 0k 0k 0k 0k 0k 0k
Incapacity Benefit 0k 0k 0k 0k 0k 0k 0k
Personal Independence Payment 3,581k 3,595k 3,608k 3,623k 3,639k 3,655k 3,671k
Disability Living Allowance 1,296k 1,301k 1,306k 1,311k 1,317k 1,323k 1,329k
Attendance Allowance 1,701k 1,708k 1,714k 1,721k 1,729k 1,736k 1,744k
Carer's Allowance 1,038k 1,042k 1,046k 1,050k 1,055k 1,059k 1,064k
Carer Support Payment (Scotland) 71k 72k 72k 72k 73k 73k 73k
Carer's Allowance Supplement (Scotland) 0k 72k 72k 72k 73k 73k 73k
Severe Disablement Allowance 4k 4k 4k 4k 4k 4k 4k
Industrial Injuries Disablement Benefit 137k 138k 139k 139k 140k 140k 141k
Armed Forces Compensation Scheme 94k 94k 94k 95k 95k 95k 96k
War Widow's or Widower's Pension 0k 0k 0k 0k 0k 0k 0k
Child Benefit 8,136k 8,165k 8,185k 8,215k 8,249k 8,282k 8,314k
Scottish Child Payment 352k 354k 355k 359k 357k 358k 357k
Two Child Limit Payment (Scotland, counterfactual) 0k 0k 0k 0k 0k 0k 0k
Healthy Start vouchers 200k 201k 202k 203k 204k 204k 205k
Maternity Allowance 0k 0k 0k 0k 0k 0k 0k
Statutory Maternity Pay 334k 335k 336k 338k 339k 341k 342k
Statutory Paternity Pay 0k 0k 0k 0k 0k 0k 0k
Statutory Sick Pay 182k 183k 183k 184k 185k 186k 186k
Sure Start Maternity Grant 26k 26k 26k 27k 27k 27k 27k
Bereavement Support Payment 98k 98k 99k 99k 100k 100k 101k
Tax-Free Childcare 1,018k 1,029k 1,028k 1,033k 1,034k 1,039k 1,023k
Extended childcare entitlement 718k 724k 728k 732k 737k 741k 743k
Universal childcare entitlement 986k 989k 992k 997k 1,002k 1,013k 1,015k
Targeted childcare entitlement 98k 98k 96k 96k 96k 97k 84k
Care to Learn 0k 0k 0k 0k 0k 0k 0k
Childcare Grant 0k 0k 0k 0k 0k 0k 0k
Parents' Learning Allowance 98k 99k 99k 100k 100k 100k 101k
Adult Dependants' Grant 18k 18k 12k 13k 13k 13k 13k
Travel Grant 0k 0k 0k 0k 0k 0k 0k
Disabled Students' Allowance suppressed suppressed suppressed suppressed suppressed suppressed suppressed
16 to 19 Bursary Fund 0k 0k 0k 0k 0k 0k 0k
Cost-of-living support payment 0k 0k 0k 0k 0k 0k 0k
Energy Bills Rebate 0k 0k 0k 0k 0k 0k 0k
Energy Price Guarantee subsidy 0k 0k 0k 0k 0k 0k 0k
Basic income 0k 0k 0k 0k 0k 0k 0k
Disability basic income 0k 0k 0k 0k 0k 0k 0k
Government balance, each component counted once: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Government receipts, each component once £899.38bn £939.24bn £976.25bn £1,009.45bn £1,045.73bn £1,082.67bn £1,123.55bn
Government spending £530.59bn † £545.60bn † £553.50bn † £560.62bn † £569.17bn † £578.34bn † £587.37bn †
Government balance, each receipt once £368.79bn † £393.64bn † £422.75bn † £448.84bn † £476.56bn † £504.34bn † £536.18bn †
Benefits in household_benefits but not in gov_spending £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn £0.00bn
Model totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
gov_tax £899.38bn £939.24bn £976.25bn £1,009.45bn £1,045.73bn £1,082.67bn £1,123.55bn
household_tax £493.03bn £519.53bn £545.39bn £567.58bn £589.79bn £614.24bn £640.95bn
pre_budget_change_household_tax £485.21bn £511.41bn £537.04bn £558.54bn £580.51bn £604.69bn £631.05bn
gov_spending £530.59bn † £545.60bn † £553.50bn † £560.62bn † £569.17bn † £578.34bn † £587.37bn †
household_benefits £530.59bn † £545.60bn † £553.50bn † £560.62bn † £569.17bn † £578.34bn † £587.37bn †
gov_balance £368.79bn † £393.64bn † £422.75bn † £448.84bn † £476.56bn † £504.34bn † £536.18bn †
Household income totals: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Household market income £1,657.06bn £1,719.25bn £1,771.68bn £1,821.99bn £1,872.88bn £1,930.99bn £2,001.98bn
Household net income £1,655.35bn † £1,704.56bn † £1,737.91bn † £1,772.09bn † £1,808.19bn † £1,849.75bn † £1,901.35bn †
Household net income (HBAI definition) £1,461.82bn £1,509.34bn £1,543.14bn £1,576.21bn £1,610.27bn £1,649.28bn £1,699.67bn
Population: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
People 69,514k 69,778k 70,036k 70,316k 70,626k 70,944k 71,249k
Benefit units 35,247k 35,381k 35,512k 35,654k 35,811k 35,972k 36,127k
Households 31,167k 31,285k 31,401k 31,526k 31,665k 31,808k 31,944k
Poverty rates: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 16.2% 15.2% 15.5% 15.7% 15.8% 15.9% 15.8%
Absolute poverty, before housing costs: children 24.6% 21.4% 21.6% 21.6% 21.8% 22.0% 21.9%
Absolute poverty, before housing costs: working-age adults 14.0% 13.6% 14.0% 14.2% 14.2% 14.3% 14.3%
Absolute poverty, before housing costs: pensioners 13.7% 13.2% 13.2% 13.5% 13.5% 13.6% 13.6%
Absolute poverty, after housing costs: everyone 21.6% 20.9% 21.4% 21.6% 22.0% 22.2% 22.3%
Absolute poverty, after housing costs: children 33.4% 30.9% 31.2% 31.3% 31.7% 32.2% 32.3%
Absolute poverty, after housing costs: working-age adults 19.9% 19.7% 20.3% 20.5% 20.8% 21.1% 21.1%
Absolute poverty, after housing costs: pensioners 12.8% 12.6% 12.6% 13.0% 13.3% 13.4% 13.4%
Relative poverty, before housing costs: everyone 17.3% 16.5% 16.5% 16.6% 16.4% 16.5% 16.4%
Relative poverty, before housing costs: children 26.4% 23.7% 23.4% 23.4% 22.9% 23.0% 22.9%
Relative poverty, before housing costs: working-age adults 14.7% 14.4% 14.7% 14.8% 14.7% 14.8% 14.8%
Relative poverty, before housing costs: pensioners 15.0% 14.8% 14.1% 14.2% 14.0% 14.0% 14.2%
Relative poverty, after housing costs: everyone 21.7% 21.1% 21.3% 21.3% 21.4% 21.5% 21.8%
Relative poverty, after housing costs: children 33.5% 31.3% 31.0% 30.8% 31.0% 31.1% 31.5%
Relative poverty, after housing costs: working-age adults 19.9% 19.9% 20.2% 20.3% 20.5% 20.6% 20.8%
Relative poverty, after housing costs: pensioners 13.0% 12.7% 12.6% 12.2% 12.2% 12.2% 12.9%
People in poverty: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Absolute poverty, before housing costs: everyone 11,292k 10,600k 10,879k 11,030k 11,126k 11,261k 11,276k
Absolute poverty, before housing costs: children 3,696k 3,227k 3,267k 3,285k 3,319k 3,371k 3,363k
Absolute poverty, before housing costs: working-age adults 5,962k 5,814k 6,092k 6,204k 6,256k 6,325k 6,337k
Absolute poverty, before housing costs: pensioners 1,634k 1,560k 1,519k 1,540k 1,551k 1,566k 1,576k
Absolute poverty, after housing costs: everyone 15,006k 14,575k 14,991k 15,214k 15,515k 15,778k 15,881k
Absolute poverty, after housing costs: children 5,005k 4,656k 4,709k 4,752k 4,834k 4,930k 4,973k
Absolute poverty, after housing costs: working-age adults 8,478k 8,434k 8,830k 8,977k 9,160k 9,308k 9,358k
Absolute poverty, after housing costs: pensioners 1,522k 1,484k 1,452k 1,486k 1,521k 1,540k 1,551k
Relative poverty, before housing costs: everyone 11,992k 11,508k 11,549k 11,665k 11,552k 11,671k 11,720k
Relative poverty, before housing costs: children 3,963k 3,570k 3,543k 3,556k 3,490k 3,521k 3,519k
Relative poverty, before housing costs: working-age adults 6,246k 6,184k 6,380k 6,486k 6,458k 6,537k 6,561k
Relative poverty, before housing costs: pensioners 1,782k 1,754k 1,626k 1,623k 1,605k 1,613k 1,640k
Relative poverty, after housing costs: everyone 15,067k 14,733k 14,905k 14,951k 15,105k 15,243k 15,533k
Relative poverty, after housing costs: children 5,019k 4,715k 4,686k 4,669k 4,723k 4,757k 4,840k
Relative poverty, after housing costs: working-age adults 8,497k 8,517k 8,772k 8,888k 8,988k 9,081k 9,205k
Relative poverty, after housing costs: pensioners 1,551k 1,502k 1,447k 1,393k 1,395k 1,404k 1,488k
Inequality: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Gini coefficient, equivalised HBAI income before housing costs 0.3088 0.3062 0.3069 0.3075 0.3080 0.3086 0.3097
Mean household net income in each side's own deciles: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Decile 1: mean household_net_income per household £17,835 † £18,010 † £18,020 † £18,060 † £18,380 † £18,572 † £18,734 †
Decile 2: mean household_net_income per household £28,078 † £29,004 † £28,743 † £29,189 † £29,502 † £29,904 † £30,490 †
Decile 3: mean household_net_income per household £34,294 † £35,659 † £36,184 † £36,723 † £37,036 † £37,546 † £38,328 †
Decile 4: mean household_net_income per household £38,824 † £40,941 † £42,016 † £42,629 † £43,377 † £44,229 † £44,578 †
Decile 5: mean household_net_income per household £43,957 † £44,826 † £45,887 † £46,647 † £47,810 † £48,661 † £49,814 †
Decile 6: mean household_net_income per household £48,402 † £49,760 † £50,859 † £51,587 † £51,895 † £53,349 † £54,692 †
Decile 7: mean household_net_income per household £56,398 † £57,591 † £58,375 † £59,116 † £60,152 † £60,779 † £62,280 †
Decile 8: mean household_net_income per household £69,269 † £70,751 † £72,207 † £73,297 † £74,774 † £76,205 † £78,216 †
Decile 9: mean household_net_income per household £79,799 † £82,161 † £83,281 † £84,726 † £86,255 † £87,812 † £90,866 †
Decile 10: mean household_net_income per household £117,839 † £120,664 † £122,603 † £124,740 † £126,967 † £129,313 † £132,025 †
Standard reform costings (change in gov_balance): head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp £6.22bn £6.50bn £6.70bn £6.90bn £7.11bn £7.34bn £7.62bn
Raise higher rate by 1pp £3.54bn £3.82bn £4.05bn £4.27bn £4.49bn £4.76bn £4.96bn
Raise personal allowance by ~800GBP/year £-3.83bn £-3.96bn £-4.03bn £-4.10bn £-4.19bn £-4.30bn £-2.02bn
Raise child benefit by 25GBP/week per additional child £-2.00bn £-1.76bn £-1.58bn £-1.48bn £-1.38bn £-1.28bn £-1.17bn
Reduce Universal Credit taper rate to 20% £-20.49bn £-21.05bn £-21.50bn £-21.94bn £-22.03bn £-22.40bn £-22.87bn
Raise Class 1 main employee NICs rate to 10% £11.07bn £11.51bn £11.84bn £12.14bn £12.49bn £12.83bn £13.23bn
Raise VAT standard rate by 2pp £25.01bn £25.68bn £26.29bn £26.92bn £27.58bn £28.26bn £28.95bn
Raise additional rate by 3pp £2.83bn £3.07bn £3.27bn £3.47bn £3.67bn suppressed suppressed
Raise the Universal Credit standard allowance by 10% £-3.03bn £-3.16bn £-3.28bn £-3.35bn £-3.39bn £-3.44bn £-3.51bn
Raise the State Pension by 10% £-7.81bn £-8.07bn £-7.99bn £-8.11bn £-8.36bn £-8.66bn £-9.02bn
Standard reforms: change in each reform's target: head levels
Measure (head) 2025-26 2026-27 2027-28 2028-29 2029-30 2030-31 2031-32
Raise basic rate by 1pp: change in income_tax £6.36bn £6.65bn £6.86bn £7.07bn £7.28bn £7.52bn £7.80bn
Raise higher rate by 1pp: change in income_tax £3.55bn £3.83bn £4.06bn £4.28bn £4.50bn £4.77bn £4.97bn
Raise personal allowance by ~800GBP/year: change in income_tax £-3.96bn £-4.10bn £-4.19bn £-4.26bn £-4.36bn £-4.47bn £-1.77bn
Raise child benefit by 25GBP/week per additional child: change in child_benefit £2.34bn £2.15bn £1.96bn £1.85bn £1.74bn £1.63bn £1.51bn
Reduce Universal Credit taper rate to 20%: change in universal_credit £20.48bn £21.04bn £21.49bn £21.93bn £22.02bn £22.40bn £22.86bn
Raise Class 1 main employee NICs rate to 10%: change in national_insurance £11.33bn £11.79bn £12.13bn £12.44bn £12.78bn £13.13bn £13.62bn
Raise VAT standard rate by 2pp: change in vat £25.01bn £25.68bn £26.29bn £26.92bn £27.58bn £28.26bn £28.95bn
Raise additional rate by 3pp: change in income_tax £2.83bn £3.07bn £3.27bn £3.47bn £3.67bn suppressed suppressed
Raise the Universal Credit standard allowance by 10%: change in universal_credit £3.03bn £3.16bn £3.28bn £3.36bn £3.41bn £3.47bn £3.52bn
Raise the State Pension by 10%: change in state_pension £10.72bn £11.23bn £11.37bn £11.62bn £12.08bn £12.54bn £13.07bn

@juaristi22
juaristi22 marked this pull request as ready for review October 23, 2026 04:31

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juaristi22 thanks for this, it is a careful piece of work. First-round review at head a623908b.

Summary. I checked every rate and date against the statutes and HMRC's current rates page, reran the new tests, and checked that they fail on the base. All 13 statutory rate parameters are correct. The 1 April changes are split by day the right way round. The casino proxy reproduces exactly from the cited cells. Incidence is stated as an assumption and is treated the same way as fuel, alcohol and tobacco duty. CI is green at head. I found two shoulds and some nits. I'm leaving this as a comment, not an approval, until the two shoulds are sorted.

Should

  1. should: Lottery Duty and the casino proxy don't split dated reforms within a year, unlike the other five families. variables/gov/hmrc/gambling_duty/lottery_duty.py:13 and gaming_duty.py:16 read parameters(period), so each household-year gets one value. lottery/rate.yaml also has no preserve_calendar_dates. The other five families go through fiscal_year_segments and split by day.

    • Repro, model year 2026 (6 April 2026 to 5 April 2027): reform gov.hmrc.gambling_duty.lottery.rate with {"2027-01-01.2027-04-05": 0.2} and £1,000 of national_lottery_ticket_spending. The result is £120, so the reform has no effect. A day-weighted split would give 1,000 x (270 x 12% + 95 x 20%) / 365 = £140.82.
    • The same reform shape on gov.hmrc.gambling_duty.remote_gaming.rate (50% for 2027-01-01.2027-04-05, £10,000 of losses, same year) is split correctly. It gives £4,260.27, which is 10,000 x (270 x 40% + 95 x 50%) / 365.
    • Baseline results are not affected, because 12% is constant and the proxy is fixed. But both parameters can be reformed, and users would get inconsistent answers between families with no warning.
    • Fix for lottery: route it through fiscal_year_segments, add preserve_calendar_dates, and add a dated-reform test.
    • For the casino proxy, the ask is weaker, since it is an empirical incidence assumption rather than a statutory rate. Either split it the same way, or state in its description that it takes one value per model year.
  2. should: the PR body's axiom: needed line. .github/PULL_REQUEST_TEMPLATE.md:16 reserves axiom: needed for external contributors who cannot do the Axiom work. As a maintainer, please use one of the standard options:

    • <rulespec-uk issue> queued: the issue needs the pe-parity label and the blocker recorded.
    • n/a: <reason>: if you think gambling duties are out of Axiom scope for now, say why.

    No Reproducer: line is needed, since this adds a feature rather than fixing a bug. The changelog fragment changelog.d/2586.added.md is fine.

Nits

  1. nit: the casino band table can be reformed but has no effect. parameters/gov/hmrc/gambling_duty/gaming/normal_six_month_bands.yaml is not read by any formula, because gaming_duty uses the 0.235487 proxy. Your tests confirm that a band reform leaves gaming_duty unchanged. This is intended and documented, but because the table sits under gov.hmrc, someone reforming the bands in the app will see zero impact with no warning. A sentence in its description saying "not used in household calculations; see household.consumption.gambling.casino_effective_rate" would help. Separately, its metadata says period: year, but the thresholds apply to a six-month accounting period.

  2. nit: negative inputs give negative duty. With −£1,000 of remote_gaming_net_losses, Remote Gaming Duty comes out at −£400. The docs say the bases are nonnegative, so this isn't a contract breach. A max_(…, 0) on the bases, or a test that pins the intended behaviour, would protect against future data that brings in signed net losses.

  3. nit: programs.yaml:138 sets verified_end_year: 2027. The November 2025 EFO (para 3.39) says casino Gaming Duty bands are frozen in 2026-27 "with the usual RPI uprating thereafter". So the bands for periods from 1 April 2027 are expected to change but are not yet law. This doesn't affect household outputs, because of the proxy. A line in docs/engineering/gambling-duties.md would cover it.

  4. nit: add a receipts target to the docs. For the later reconciliation in #2586, it would help to record HMRC's 2024-25 receipts in gambling-duties.md. The source is HMRC's UK betting and gaming statistics, July 2026 tables (Table_1_BG_receipts, 2024 to 2025 row: https://assets.publishing.service.gov.uk/media/6ab54fd9fe72ed1e2b02f06b/2026_Jul_Bet_and_Gam_Tab.ods). The total is £3.616bn: General Betting Duty £714m, Remote Gaming Duty £1,163m, Lottery Duty £932m, Machine Games Duty £609m, Gaming Duty £165m, Bingo Duty £25m and Pool Betting Duty £8m.

What I checked and found correct

  • Rates and dates. All match the law:
    • Remote Gaming Duty: 21%, rising to 40% from 1 April 2026 (FA 2026 s86).
    • General Betting Duty: the new 25% remote rate from 1 April 2027 (FA 2026 s87, new FA 2014 s127A), with exclusions matching the statute. The other rates are 15% on fixed odds, racing pools and exchange commission, 3% on financial spread bets and 10% on other spread bets.
    • Pool Betting Duty: 15%.
    • Machine Games Duty: 5%, 20% and 25% (FA 2012 Sch 24 para 9).
    • Bingo Duty: 10% until it is abolished on 1 April 2026 (FA 2026 s88).
    • Lottery Duty: 12% (FA 1993 s25).
    • Gaming Duty bands: as set from April 2022 by FA 2022 s81.
  • Transition days. FA 2026 s86(3)-(4) and s87(8)-(9) split by time any accounting period that crosses 1 April, so day-weighting is right. For 2025-26, Remote Gaming Duty gets 360 days at 21% and 5 days at 40%. For 2026-27, the General Betting Duty remote rate gets 360 days at 15% and 5 at 25%. Leap-year day counts are handled. For Bingo Duty the transitional rule works by accounting period, so the time split is a close approximation there.
  • Casino proxy. £165.397m of Gaming Duty (HMRC 2024-25) divided by £702.361m of casino game yield (Gambling Commission) gives 0.235487. The file hashes match those in the docs.
  • Integration.
    • gambling_duty is added once each to household_tax and gov_tax.
    • In a 2026 test household, household_net_income falls by exactly the duty and hbai_household_net_income is unchanged, the same as for the other excise duties.
    • Nothing else in the model touches gambling, so there is no double counting.
    • The fiscal partition move to Other HMRC taxes matches OBR Table A.5 footnote 5.
    • Aggregate-impact CI (run on this head) shows zero change, which is expected while the inputs default to zero. The docs and PR body state clearly that the inputs default to zero.
  • Tests.
    • YAML: 46 passed at head (gambling_duty, excise integration, income integration).
    • pytest: 167 passed at head (the two new files plus the fiscal partition, programme registry, excise schedule and aggregate-impact partition tests).
    • On the base commit, all 10 new pytest tests and all 36 new YAML cases fail.
    • The tests cover both sides of the 1 April 2026 and 1 April 2027 changes, and every band edge.
  • Overlap. #2589 touches the same two aggregate lists in different hunks, so there is no textual conflict. Whichever merges second just needs a rebase.

🤖 Generated with Claude Code

juaristi22 and others added 6 commits October 23, 2026 10:59
Lottery Duty read the rate once per model year, so a reform dated within
a fiscal year had no effect. It now goes through fiscal_year_segments
like the other statutory families, and the rate keeps its calendar dates.
A 20% rate from 1 January to 5 April 2027 on GBP 1,000 of FY2026 ticket
spending now gives GBP 140.82 rather than GBP 120.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The casino incidence proxy sits outside gov with the other household
consumption assumptions. Formulas read it at 1 January of the model
year, and the reform routes read a bare year on it as a calendar year,
so a day split would spread a bare-year reform over two model years.
Its description and the docs now say it takes one value per model year
and is not split by day like the statutory rates, and a test pins that.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A negative input gave negative duty: -GBP 1,000 of remote gaming losses
gave -GBP 400 of Remote Gaming Duty. Each of the fifteen bases is now
floored at zero with max_, as the alcohol duty formulas floor their
litres, so a negative input gives no duty and does not offset another
base. A YAML case per family pins this.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The six-month Gaming Duty band table is an operator catalogue that no
formula reads, so a band reform in the app leaves household duty
unchanged. Its description now says so and points to the household
incidence proxy. Its metadata said period: year, but the thresholds
apply to a six-month accounting period; the period key is dropped, as
for the per-transaction SDLT, LBTT and LTT bands, and the description
states the six-month period.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The government froze the casino Gaming Duty bands for 2026-27 with the
usual RPI uprating thereafter (OBR November 2025 EFO paragraph 3.39), so
bands for accounting periods from 1 April 2027 are expected to change
but are not yet law. The docs now say so, and that verified_end_year
2027 in programs.yaml is deliberate because household outputs use the
incidence proxy rather than the bands.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs now give HMRC's 2024-25 UK betting and gaming receipts by duty,
GBP 3,616.284 million in total, with their cells in Table_1_BG_receipts
of the July 2026 tables the casino proxy already cites. HMRC's
commentary gives the same rounded figures for General Betting Duty,
Pool Betting Duty and Lottery Duty.

Refs #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juaristi22

Copy link
Copy Markdown
Collaborator Author

@vahid-ahmadi thanks. Each item is addressed in the commits below, now pushed (head 1bad8f769). Item 2 is in the PR body.

Should

  1. Dated reforms within a year.
    • Lottery Duty now goes through fiscal_year_segments, and lottery/rate.yaml keeps its calendar dates with preserve_calendar_dates (07e1ba8).
      • Your repro now gives £140.82: 1,000 × (270 × 12% + 95 × 20%) / 365.
      • test_dated_reform_within_the_fiscal_year_splits_by_day pins it next to your remote gaming case (£4,260.27). It fails with £120 on the old code.
      • A bare-year lottery reform still replaces the whole fiscal year. The lottery case is added to test_annual_gambling_reform_replaces_the_whole_fiscal_year.
    • The casino proxy keeps one value per model year, and its description and the docs now say so (b446a58). A day split doesn't fit cleanly:
      • The proxy sits outside gov. There, formulas read a parameter at 1 January, and the reform routes read a bare year as the calendar year.
      • Split by day, the existing annual reform {"2024": 0.3} would give £283.21 instead of £300.
      • A bare-year "2027" reform would spread over two model years: £252.28 in 2026 and £283.08 in 2027. The six statutory families instead give a bare year to one whole fiscal year.
      • The other household consumption assumptions (fuel prices, ABVs, cigarette pack price and size) are read the same way.
      • The cost is that a change in force on a model year's 1 January applies to that whole model year. The docs say so.
      • test_casino_proxy_takes_one_value_per_model_year pins this: a change from 1 January to 5 April 2027 leaves FY2026 at £235.49.
  2. Axiom line. The body now reads TheAxiomFoundation/rulespec-uk#488 queued.
    • The issue is labelled pe-parity and quotes the operative law for all seven duties. Its companion cases are statute arithmetic.
    • It records the blockers: the signed-encoder run is not approved, and nobody has checked whether the pinned corpus release holds these provisions.
    • The casino proxy is out of scope, because it is an empirical assumption rather than law.

Nits

  1. The casino band table (9878ca6).
    • Its description now says household calculations don't use it, so changing the bands leaves household casino duty unchanged. It points to household.consumption.gambling.casino_effective_rate.
    • I dropped period: year. The metadata has no value for a six-month period, and the SDLT, LBTT and LTT band tables, which apply per transaction, have no period either. The description states the six-month accounting period.
  2. Negative inputs (d13275d).
    • Each of the fifteen bases is now floored at zero with max_(…, 0), as the alcohol duty formulas floor their litres. So −£1,000 of remote gaming losses now gives £0, not −£400.
    • The statute also treats a negative profit as nil (FA 2014 s155(5) and its counterparts). It lets the loss carry forward, which the formulas don't model.
    • Each family has a YAML case. The General Betting Duty and Machine Games Duty cases also check that a negative base doesn't offset another base. The docs say so.
  3. Band freeze (326c0fa). The docs now say:
    • the bands haven't changed since 1 April 2022, and HMRC's rates page gives the same bands for periods from 1 April 2026;
    • the government froze them for 2026-27 "with the usual RPI uprating thereafter" (EFO para 3.39), so bands from 1 April 2027 are expected to change but are not yet law;
    • verified_end_year: 2027 is deliberate, because household outputs use the proxy, not the bands.
  4. Receipts target (1bad8f7).
    • The docs now give the 2024-25 receipts by duty, in exact £000, with their cells (B45 to K45 of Table_1_BG_receipts). They come from the same July 2026 file the casino proxy cites.
    • They total £3,616.284m, which matches your £3.616bn. I checked them against that file, whose SHA-256 the docs already record.
    • HMRC's commentary gives the same rounded figures for General Betting Duty (£714m), Pool Betting Duty (£8.1m) and Lottery Duty (£931.9m).

Tests at 1bad8f769

  • YAML: 53 passed (gambling_duty, excise integration, income integration). That is your 46 plus the 7 negative-base cases.
  • pytest:
    • 171 passed on the six files you ran (your 167 plus 4 new);
    • 176 more passed in parameter descriptions, fiscal-year parameters, aggregate-impact reforms and dated reform routes;
    • nothing was skipped.
  • ruff format and check are clean.
  • On the old code, the new lottery test and all seven negative-base cases fail.

Overlap. #2589 is still open, and this branch merges cleanly with main at 402e7c674. Whichever merges second will rebase.

🤖 Generated with Claude Code

@vahid-ahmadi vahid-ahmadi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juaristi22 thanks, this all looks good. Second-round review at head 1bad8f76, covering the delta since round 1 (a623908b).

Earlier findings

  1. should, dated reforms within a year: resolved.
    • Lottery Duty. lottery_duty.py now goes through fiscal_year_segments, and lottery/rate.yaml has preserve_calendar_dates. I reran my repro: 20% from 1 January to 5 April 2027 on £1,000 in model year 2026 gives £140.82, against 1,000 x (270 x 12% + 95 x 20%) / 365 = £140.82. Both Scenario and a plain reform= dict give this. The leap-year case also works: 20% from 1 January 2028 gives £140.98 in model year 2027, which is 96 of 366 days. Through those two routes, a bare "2026" reform still gives £200 in 2026 and leaves 2025 at £120. The new test fails on a623908b with £120 and passes at head.
    • Casino proxy. Keeping one value per model year and documenting it was one of the two options I offered, and your reason for not splitting by day holds: a bare year outside gov is read as a calendar year. The parameter description and the docs now say so, and test_casino_proxy_takes_one_value_per_model_year pins it. I get £235.49 for a 1 January to 5 April 2027 change in model year 2026, and £300 for a bare "2027" change in 2027.
  2. should, axiom: line: resolved. The body now reads TheAxiomFoundation/rulespec-uk#488 queued. That issue is open, labelled pe-parity, quotes the law for all seven duties and records the blocker (the signed encoder run is not yet approved, and nobody has checked the pinned corpus). Leaving the casino proxy out of scope is reasonable, since it is not law.
  3. nit, casino band table: resolved. The description now says household calculations do not use the table and points to the proxy. Dropping period: year and stating the six-month period in the description is fine, and it matches the SDLT, LBTT and LTT band tables.
  4. nit, negative inputs: resolved. All fifteen bases are floored with max_(…, 0). In my runs, −£1,000 gives £0 for Remote Gaming Duty, Lottery Duty and the casino proxy. In General Betting Duty, −£1,000 of remote losses next to £1,000 of fixed-odds losses gives £150, so a negative base doesn't offset another. The seven new YAML cases fail on a623908b and pass at head.
  5. nit, verified_end_year: 2027: resolved. gambling-duties.md now records the 2026-27 freeze and the expected RPI uprating from April 2027, and explains why 2027 is deliberate.
  6. nit, receipts target: resolved. I downloaded the July 2026 HMRC file again (its SHA-256 matches the one in the docs) and read Table_1_BG_receipts row 45. All eight cells match the new table: B45 713,858; C45 8,125; E45 165,397; F45 1,162,539; H45 25,233; I45 609,245; J45 931,887; K45 3,616,284 (£000).

New findings

None at must or should level. The delta only changes the items above, plus tests and docs.

Checks at head

  • YAML: 43 passed in gambling_duty/ (36 from round 1 plus the 7 negative-base cases), and 2 passed in excise_integration.yaml.
  • pytest: 160 passed in the two gambling files plus the excise schedule, fiscal partition and programme registry tests. I did not rerun the slower parameter-description and fiscal-year sweeps, which you report as passing. Ruff format is clean on the touched files.
  • The Gaming Duty band references cite FA 1997 s11, as amended by FA 2022 s81, which is correct. The only reference to BGDA 1981 is s17, for Bingo Duty, which is also correct.
  • The branch merges cleanly with main at 402e7c674 and with #2589.
  • CI at head: Lint passes. Aggregate impact, Changes, Fix evidence and Test documentation builds were still pending when I checked.

Approving. Thanks for the quick and thorough turnaround.

🤖 Generated with Claude Code

@juaristi22
juaristi22 enabled auto-merge October 23, 2026 11:21
@juaristi22
juaristi22 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit efea68c Oct 23, 2026
29 of 32 checks passed
@juaristi22
juaristi22 deleted the feat-2586-gambling-duties branch October 23, 2026 21:35
@MaxGhenis

Copy link
Copy Markdown
Collaborator

Merged by the UK hub (Claude session 8e19f9d5) at head 1bad8f769, through the merge queue with the head pinned.

  • What it does: it adds the engine for seven gambling duties: general betting, pool betting, remote gaming, machine games, gaming (casino), bingo and lottery duty. That covers their liabilities, government receipts and household incidence. All 15 base inputs default to zero, and negative bases floor at zero.
  • Reviews: Vahid approved at this head. An independent GPT-6.1 Sol review APPROVE at this head checked every family's rates, bases and dates against HMRC and legislation. That includes Remote Gaming Duty's rise from 21% to 40% from 1 April 2026 (FA 2026 s86, apportioned on a time basis) and Machine Games Duty's 5% / 20% / 25% bands. It hand-checked the period splits (for example £36,500 of FY2025 remote gaming profits gives £7,760). It reproduced the casino incidence proxy (0.235487 = £165.4m Gaming Duty receipts over £702.4m casino game yield) and all seven receipts (£3,616m in total) from the official workbooks. It found no unrelated edits among the 54 paths.
  • Impact: none on certified data. The Aggregate impact report shows zero household change and zero gambling receipts, because Microcosm and the FRS supply no gambling bases yet. Scoring a duty change on population data still needs data mapping, calibration and the machine-class allocation (Microcosm Fix randomness between runs caused by UC reform #1359).
  • CI: all 17 checks pass at this head.
  • Follow-up (P3, nonblocking): property tests that vary the gambling bases across several households. The existing randomized fiscal tests leave them at zero.
  • Why now: a gambling duty rise is an anticipated Autumn Budget measure, and this is the engine it would be scored on once bases exist.

juaristi22 added a commit to PolicyEngine/microcosm that referenced this pull request Oct 24, 2026
…m#1359)

level_excise_quantities now also writes:
- beer_draught_share and cider_draught_share, each the clearances under
  draught relief (alone or with small producer relief) over all of that
  product's clearances, in litres of pure alcohol;
- policyengine-uk's thirteen gambling duty bases
  (PolicyEngine/policyengine-uk#2590, from 2.151.0). A single-duty base is
  HMRC's receipts for the duty, or Machine Games Duty's liabilities for the
  band, over the engine's rate, so the engine charges back the published
  receipts. General Betting Duty's base, its receipts over the fixed-odds
  rate, is split over its five inputs by the Gambling Commission's gross
  gambling yield for Great Britain. Every base goes to households by their
  drawn gambling stakes at prior weights, the alcohol and tobacco rule.

A gambling series may pin dimensions of its own, such as the cash
accounting basis. The vendored resource is renamed excise_facts.json: it
carries HMRC's clearances, receipts and liabilities and the Commission's
yield. The stage-health gate checks the receipt's draught shares against
the declared rows. The engine test checks every new input and rate
against policyengine-uk, and that gambling duty is linear in the bases
and reaches household tax; it needs policyengine-uk 2.151.0 or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
juaristi22 added a commit to PolicyEngine/microcosm that referenced this pull request Oct 24, 2026
…m#1359)

level_excise_quantities now also writes:
- beer_draught_share and cider_draught_share, each the clearances under
  draught relief (alone or with small producer relief) over all of that
  product's clearances, in litres of pure alcohol;
- policyengine-uk's thirteen gambling duty bases
  (PolicyEngine/policyengine-uk#2590, from 2.151.0). A single-duty base is
  HMRC's receipts for the duty, or Machine Games Duty's liabilities for the
  band, over the engine's rate, so the engine charges back the published
  receipts. General Betting Duty's base, its receipts over the fixed-odds
  rate, is split over its five inputs by the Gambling Commission's gross
  gambling yield for Great Britain. Every base goes to households by their
  drawn gambling stakes at prior weights, the alcohol and tobacco rule.

A gambling series may pin dimensions of its own, such as the cash
accounting basis. The vendored resource is renamed excise_facts.json: it
carries HMRC's clearances, receipts and liabilities and the Commission's
yield. The stage-health gate checks the receipt's draught shares against
the declared rows. The engine test checks every new input and rate
against policyengine-uk, and that gambling duty is linear in the bases
and reaches household tax; it needs policyengine-uk 2.151.0 or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants