Repository navigation
Relieve a miscellaneous loss only against miscellaneous income - #2327
Merged
Merged
Conversation
…007 s. 152(4)) Fixes #2326. taxable_miscellaneous_income added miscellaneous_income as it stood, so a loss reduced total and adjusted net income and the tax on pay, pensions, savings and dividends. A net loss now counts as nil; carrying it forward is not modelled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review changes: total_income (ITA 2007 s. 23 Step 1) and Universal Credit earned income now read taxable_miscellaneous_income, so a loss neither reduces total income (the Winter Fuel test, non-dependant deductions) nor widens the UC earnings error in #1961. The docstring states s. 152(5)'s same-provision limit and the input's wider scope. Tests add the personal allowance taper, total income and UC earnings; the property test covers total income, with 25 examples and a taper-region example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
marked this pull request as ready for review
October 11, 2026 22:47
Collaborator
Author
|
CI run cancelled to free runners (UK hub, 2026-10-11 23:30Z). The PolicyEngine org is at GitHub's limit of 60 concurrent jobs, with about 360 queued. Fleet ops asked the hub to let the Budget-critical #2305 take runners first. This PR's queued run had not started, so I cancelled it. Nothing is wrong with the PR. Please don't re-run it or push just to retrigger CI. The hub re-runs this run itself once #2305 has runners. The record is |
This was referenced Oct 11, 2026
Collaborator
Author
|
Hand-off to the UK hub (session local_66e4b1fd, PolicyBench UK round 2).
|
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 #2326
axiom: ukpga/2007/3/152 TheAxiomFoundation/rulespec-uk#452 queued (s. 152 is not yet in the corpus, and the signed encoder run needs its own approval)
What changes
ITA 2007 s. 152(4) allows a miscellaneous loss to be deducted "only from the person's relevant miscellaneous income". Until now,
taxable_miscellaneous_incomepassed a negativemiscellaneous_incomethrough to total and adjusted net income. So the loss reduced tax on pay, pensions, savings and dividends: pay of £50,000 with a £10,000 miscellaneous loss paid £5,486 instead of £7,486.taxable_miscellaneous_incomeis nowmax(0, miscellaneous_income). The model holds one net miscellaneous figure per person, so a net loss has nothing left to set against in the year.total_income(ITA 2007 s. 23 Step 1) reads the floored figure. A loss no longer lowers total income, and so no longer passes a pensioner with £40,000 of pension through the Winter Fuel Payment income test.uc_income_tax_on_earnings.tax_credits_applicable_income) still read the raw figure. Tax credits ended in April 2025, so this affects only runs for earlier years.Impact (real run)
Measured on
enhanced_frs_2023_24.h5(local policyengine-uk-data storage, 6 October build) for 2026: no one has negative miscellaneous income (0 records; £5,116.8m positive in total). The formula is unchanged for non-negative values, so the change is nil on the enhanced FRS.It matters for household calculations and for datasets that carry losses. The public transfer dataset has negative miscellaneous income for 964 of 58,848 people.
On PolicyBench UK round 2's 200 transfer-data households (every output recomputed on this head, 9e2192d, against policyengine-uk 2.126.7):
council_tax_reduction_applicable_incomededucts the whole of it (Council Tax Reduction income deducts the family's whole income tax, not the tax the schemes allow #2090), although CTR does not count that income, so CTR income falls to nil and CTR to the full £3,251.Invariants and tests
gov/hmrc/income_tax/bases/taxable_miscellaneous_income.yaml):test_miscellaneous_loss_properties.py, Hypothesis): any miscellaneous loss leaves Income Tax, adjusted net income and total income exactly as with no miscellaneous income, whatever the pay, savings, dividends and pension income. This runs 25 examples plus a fixed example in the taper region. Positive miscellaneous income is taxable in full.🤖 Generated with Claude Code