-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #886 from PolicyEngine/fix/income_tax_improvements…
…_new Improvements to income-related variables
- Loading branch information
Showing
13 changed files
with
891 additions
and
141 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- bump: patch | ||
changes: | ||
added: | ||
- Tests to income-related variables |
10 changes: 10 additions & 0 deletions
10
...ine_uk/parameters/gov/hmrc/income_tax/reliefs/pension_contribution/pensions_programs.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: Pensions programs | ||
values: | ||
0000-01-01: | ||
- private_pension_contributions | ||
- occupational_pension_contributions | ||
|
||
metadata: | ||
unit: program | ||
label: Refundable tax credits | ||
period: year |
File renamed without changes.
File renamed without changes.
52 changes: 0 additions & 52 deletions
52
policyengine_uk/tests/policy/baseline/finance/tax/income_tax/liability.yaml
This file was deleted.
Oops, something went wrong.
83 changes: 0 additions & 83 deletions
83
policyengine_uk/tests/policy/baseline/finance/tax/income_tax/relief.yaml
This file was deleted.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
policyengine_uk/tests/policy/baseline/gov/hmrc/capital_gains_tax/capital_gains_tax.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
- name: No capital gains | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 0 | ||
capital_gains: 0 | ||
output: | ||
capital_gains_tax: 0 | ||
|
||
- name: Capital gains below annual exempt amount | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 0 | ||
capital_gains: 2_000 | ||
output: | ||
capital_gains_tax: 0 | ||
|
||
- name: Capital gains just above annual exempt amount | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 0 | ||
capital_gains: 3_500 | ||
output: | ||
capital_gains_tax: 50 | ||
|
||
- name: Basic rate capital gains tax | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 20_000 | ||
capital_gains: 23_000 | ||
output: | ||
capital_gains_tax: 2_230 | ||
|
||
- name: Higher rate capital gains tax | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 50_000 | ||
capital_gains: 50_000 | ||
output: | ||
capital_gains_tax: 9_400 | ||
|
||
- name: Additional rate capital gains tax | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 150_000 | ||
capital_gains: 100_000 | ||
output: | ||
capital_gains_tax: 19_400 | ||
|
||
- name: Mixed rates capital gains tax | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 35_000 | ||
capital_gains: 40_000 | ||
output: | ||
capital_gains_tax: 7_130 | ||
|
||
- name: High capital gains, low income | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 10_000 | ||
capital_gains: 200_000 | ||
output: | ||
capital_gains_tax: 36_630 | ||
|
||
- name: Very high capital gains and income | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 500_000 | ||
capital_gains: 1_000_000 | ||
output: | ||
capital_gains_tax: 199_400 | ||
|
||
- name: Edge case, capital gains exactly equal to annual exempt amount | ||
period: 2024 | ||
input: | ||
adjusted_net_income: 0 | ||
capital_gains: 3_000 | ||
output: | ||
capital_gains_tax: 0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
134 changes: 134 additions & 0 deletions
134
policyengine_uk/tests/policy/baseline/gov/hmrc/income_tax/liability.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
- name: Allowances are deducted to zero | ||
period: 2020 | ||
absolute_error_margin: 0 | ||
input: | ||
employment_income: 10000 | ||
pension_income: 10000 | ||
allowances: 20000 | ||
output: | ||
earned_taxable_income: 0 | ||
- name: Earned income is split correctly | ||
period: 2020 | ||
absolute_error_margin: 0 | ||
input: | ||
earned_taxable_income: 100000 | ||
output: | ||
basic_rate_earned_income: 37500 | ||
higher_rate_earned_income: 62500 | ||
add_rate_earned_income: 0 | ||
- name: Earned income is taxed correctly | ||
period: 2020 | ||
absolute_error_margin: 0 | ||
input: | ||
employment_income: 100000 | ||
output: | ||
allowances: 12500 | ||
earned_taxable_income: 87500 | ||
basic_rate_earned_income_tax: 7500 | ||
higher_rate_earned_income_tax: 20000 | ||
add_rate_earned_income_tax: 0 | ||
earned_income_tax: 27500 | ||
tax_band: "HIGHER" | ||
taxed_income: 87500 | ||
- name: Savings slice of basic rate band | ||
period: 2020 | ||
absolute_error_margin: 0 | ||
input: | ||
employment_income: 40000 | ||
savings_interest_income: 15000 | ||
output: | ||
basic_rate_savings_income_pre_starter: 10000 | ||
savings_starter_rate_income: 0 | ||
basic_rate_savings_income: 10000 | ||
savings_allowance: 500 | ||
higher_rate_savings_income: 4500 | ||
taxed_savings_income: 14500 | ||
- name: Dividends taxed at the marginal rates | ||
period: 2020 | ||
absolute_error_margin: 0 | ||
input: | ||
dividend_income: 50000 | ||
output: | ||
dividend_income_tax: 6225 | ||
|
||
# taxed_dividend_income | ||
- name: No dividend income | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 0 | ||
dividend_allowance: 1000 | ||
output: | ||
taxed_dividend_income: 0 | ||
|
||
- name: Dividend income below allowance | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 500 | ||
dividend_allowance: 1000 | ||
output: | ||
taxed_dividend_income: 0 | ||
|
||
- name: Dividend income equal to allowance | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 1000 | ||
dividend_allowance: 1000 | ||
output: | ||
taxed_dividend_income: 0 | ||
|
||
- name: Dividend income slightly above allowance | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 1100 | ||
dividend_allowance: 1000 | ||
output: | ||
taxed_dividend_income: 100 | ||
|
||
- name: High dividend income | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 50000 | ||
dividend_allowance: 2000 | ||
output: | ||
taxed_dividend_income: 48000 | ||
|
||
- name: Very high dividend income | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 1000000 | ||
dividend_allowance: 2000 | ||
output: | ||
taxed_dividend_income: 998000 | ||
|
||
- name: Dividend income with zero allowance | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 5000 | ||
dividend_allowance: 0 | ||
output: | ||
taxed_dividend_income: 5000 | ||
|
||
- name: Decimal values | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 2500.50 | ||
dividend_allowance: 2000.00 | ||
output: | ||
taxed_dividend_income: 500.50 | ||
|
||
- name: Allowance higher than income | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 1000 | ||
dividend_allowance: 2000 | ||
output: | ||
taxed_dividend_income: 0 | ||
|
||
- name: Very small positive difference | ||
period: 2024 | ||
input: | ||
taxable_dividend_income: 1000.01 | ||
dividend_allowance: 1000 | ||
output: | ||
taxed_dividend_income: 0.01 | ||
|
Oops, something went wrong.