Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/1681.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed PolicyBench audit issues in Pension Credit, Capital Gains Tax, and income-tax source ordering, including mixed-age Pension Credit eligibility, property income in Pension Credit, CGT rate-band allocation, savings/dividend ordering, HICBC regression coverage, and property income-tax banding.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ values:
- working_tax_credit
- state_pension
- private_pension_income
- property_income
- pension_credit_deemed_income
- esa_contrib
- jsa_contrib
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
period: 2024
input:
basic_rate_savings_income_pre_starter: 5_000
taxable_savings_interest_income: 6_000
received_allowances_savings_income: 0
earned_taxable_income: 15_000
taxable_dividend_income: 0
output:
Expand All @@ -11,6 +13,8 @@
period: 2024
input:
basic_rate_savings_income_pre_starter: 4_000
taxable_savings_interest_income: 5_000
received_allowances_savings_income: 0
earned_taxable_income: 19_000
taxable_dividend_income: 0
output:
Expand All @@ -20,7 +24,9 @@
period: 2024
input:
basic_rate_savings_income_pre_starter: 2_000
earned_taxable_income: 22_000
taxable_savings_interest_income: 3_000
received_allowances_savings_income: 0
earned_taxable_income: 23_000
taxable_dividend_income: 1_000
output:
savings_starter_rate_income: 0
Expand All @@ -29,6 +35,8 @@
period: 2024
input:
basic_rate_savings_income_pre_starter: 10_000
taxable_savings_interest_income: 11_000
received_allowances_savings_income: 0
earned_taxable_income: 16_000
taxable_dividend_income: 0
output:
Expand All @@ -38,7 +46,9 @@
period: 2024
input:
basic_rate_savings_income_pre_starter: 5_000
taxable_savings_interest_income: 6_000
received_allowances_savings_income: 0
earned_taxable_income: 16_000
taxable_dividend_income: 2_000
output:
savings_starter_rate_income: 4_570
savings_starter_rate_income: 5_000
Original file line number Diff line number Diff line change
@@ -1,22 +1,77 @@
- name: Not pension-age, ineligible for Pension Credit (single)
period: 2022
- name: Case 1, single adult below State Pension age is ineligible.
period: 2026
input:
people:
person:
is_SP_age: false
person1:
age: 54
benunits:
benunit:
members: [person1]
output:
is_pension_credit_eligible: false

- name: Case 2, single adult above State Pension age is eligible.
period: 2026
input:
people:
person1:
age: 79
benunits:
benunit:
members: [person1]
output:
is_pension_credit_eligible: true

- name: Case 3, couple with both adults above State Pension age is eligible.
period: 2026
input:
people:
person1:
age: 79
person2:
age: 70
benunits:
benunit:
members: [person1, person2]
output:
is_pension_credit_eligible: true

- name: Case 4, mixed-age couple without protected exception is ineligible.
period: 2026
input:
people:
person1:
age: 79
person2:
age: 54
benunits:
benunit:
members: [person1, person2]
output:
is_pension_credit_eligible: false

- name: One member of a couple is pension age; eligible for Pension Credit
period: 2022
- name: Case 5, child in benefit unit does not block pension-age adult eligibility.
period: 2026
input:
people:
person:
is_SP_age: false
spouse:
is_SP_age: true
person1:
age: 79
person2:
age: 10
benunits:
benunit:
members: [person, spouse]
members: [person1, person2]
output:
is_pension_credit_eligible: true

- name: Case 6, child-only benefit unit is ineligible.
period: 2026
input:
people:
person1:
age: 10
benunits:
benunit:
members: [person1]
output:
is_pension_credit_eligible: false
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,25 @@
pension_credit_assessable_capital: 10_001
pension_credit_deemed_income: 52
pension_credit_income: 52

- name: Case 4, property income and non-main-home capital count for Pension Credit.
period: 2026
absolute_error_margin: 0.01
input:
people:
person1:
age: 79
property_income: 10_476
benunits:
benunit:
members: [person1]
households:
household:
members: [person1]
other_residential_property_value: 55_370
savings: 455
output:
pension_credit_assessable_capital: 55_825
pension_credit_deemed_income: 4_784
pension_credit_income: 15_260
pension_credit: 0
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
adjusted_net_income: 20_000
capital_gains: 23_000
output:
capital_gains_tax: 2_230
capital_gains_tax: 2_000

- name: Higher rate capital gains tax
period: 2024
input:
adjusted_net_income: 50_000
capital_gains: 50_000
output:
capital_gains_tax: 9_400
capital_gains_tax: 9_373

- name: Additional rate capital gains tax
period: 2024
Expand All @@ -52,15 +52,15 @@
adjusted_net_income: 35_000
capital_gains: 40_000
output:
capital_gains_tax: 7_130
capital_gains_tax: 5_873

- name: High capital gains, low income
period: 2024
input:
adjusted_net_income: 10_000
capital_gains: 200_000
output:
capital_gains_tax: 36_630
capital_gains_tax: 35_630

- name: Very high capital gains and income
period: 2024
Expand All @@ -76,4 +76,50 @@
adjusted_net_income: 0
capital_gains: 3_000
output:
capital_gains_tax: 0
capital_gains_tax: 0

- name: Case 11, two adults each receive the annual exempt amount.
period: 2026
input:
people:
person1:
capital_gains: 151_800
person2:
capital_gains: 151_800
benunit:
members: [person1, person2]
output:
capital_gains_tax: [33_450, 33_450]

- name: Case 12, ordinary income below allowances leaves the full basic rate band for gains.
period: 2026
absolute_error_margin: 0.01
input:
people:
person1:
adjusted_net_income: 9_324
capital_gains: 228_890
person2:
capital_gains: -124_972
benunit:
members: [person1, person2]
output:
capital_gains_tax: [51_951.60, 0]

- name: Case 13, Gift Aid extends the basic rate band for capital gains.
period: 2018
input:
adjusted_net_income: 41_850
gift_aid: 40_000
capital_gains: 70_000
output:
capital_gains_tax: 6_210

- name: Case 14, personal pension contributions extend the basic rate band for capital gains.
period: 2026
input:
employment_income: 52_570
personal_pension_contributions: 10_000
capital_gains: 30_000
output:
capital_gains_tax: 6_018
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,26 @@
employment_income: 60_000
output:
CB_HITC: 1_000

- name: Case 5, high-income family pays one full Child Benefit charge.
period: 2026
absolute_error_margin: 0.01
input:
people:
person1:
age: 40
self_employment_income: 113_850
person2:
age: 38
employment_income: 35_000
person3:
age: 8
person4:
age: 5
benunit:
members: [person1, person2, person3, person4]
output:
child_benefit: 2_328.16
CB_HITC: [2_328.16, 0, 0, 0]
income_tax_pre_charges: [35_142, 4_486, 0, 0]
income_tax: [37_470.16, 4_486, 0, 0]
74 changes: 70 additions & 4 deletions policyengine_uk/tests/policy/integration/income.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
output:
basic_rate_savings_income_pre_starter: 10_000
savings_starter_rate_income: 0
basic_rate_savings_income: 10_000
basic_rate_savings_income: 9_500
savings_allowance: 500
higher_rate_savings_income: 4_500
higher_rate_savings_income: 5_000
taxed_savings_income: 14_500

- name: Dividends taxed at the marginal rates
Expand All @@ -35,7 +35,73 @@
# Nullify Personal Allowance for testing purposes
gov.hmrc.income_tax.allowances.personal_allowance.amount: 0
output:
dividend_income_tax: 6_225
dividend_income_tax: 6_725

- name: Savings and dividend allowances occupy tax bands before taxable income.
period: 2027
absolute_error_margin: 0.01
input:
employment_income: 50_000
savings_interest_income: 1_000
dividend_income: 1_000
output:
earned_taxable_income: 37_430
savings_allowance: 500
basic_rate_savings_income: 0
higher_rate_savings_income: 500
savings_income_tax: 210
taxed_dividend_income: 500
dividend_income_tax: 178.75
income_tax: 7_874.75

- name: Personal allowance caps savings starter rate before dividends.
period: 2027
absolute_error_margin: 0.01
input:
employment_income: 10_000
savings_interest_income: 5_000
dividend_income: 5_000
output:
received_allowances_savings_income: 2_570
basic_rate_savings_income_pre_starter: 2_430
savings_starter_rate_income: 2_430
savings_allowance: 1_000
savings_income_tax: 0
taxed_dividend_income: 4_500
dividend_income_tax: 483.75
income_tax: 483.75

- name: Starter-rate savings applies before personal savings allowance.
period: 2027
absolute_error_margin: 0.01
input:
employment_income: 12_570
savings_interest_income: 5_500
output:
basic_rate_savings_income_pre_starter: 5_500
savings_starter_rate_income: 5_000
savings_allowance: 1_000
basic_rate_savings_income: 0
savings_income_tax: 0
income_tax: 0

- name: Property income uses post-allowance rate bands.
period: 2026
absolute_error_margin: 0.01
input:
people:
person1:
taxable_property_income: 75_900
savings_interest_income: 2_900
person2:
taxable_property_income: 46_451
savings_interest_income: 1_525
benunit:
members: [person1, person2]
output:
property_income_tax: [17_792, 6_776.20]
savings_income_tax: [0, 0]
income_tax: [17_792, 6_776.20]

- name: Household net income can be negative
period: 2020
Expand All @@ -45,4 +111,4 @@
household_tax: 2
household_benefits: 0
output:
household_net_income: -1
household_net_income: -1
Loading