Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yukon basic personal amount #490

Merged
merged 31 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6aa2638
changelog
RuoqiTan May 29, 2023
f6a4494
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
RuoqiTan Jun 26, 2023
960344a
parameter & variables
RuoqiTan Jun 26, 2023
84e520b
test passed
RuoqiTan Jun 26, 2023
fb1483d
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
RuoqiTan Jul 3, 2023
6d5baec
Yukon basic personal amount
RuoqiTan Jul 3, 2023
a8a41a3
add BPA
RuoqiTan Jul 5, 2023
85ce339
format
RuoqiTan Jul 5, 2023
ec4e071
changes
RuoqiTan Jul 17, 2023
b14a171
create folder reduction
RuoqiTan Jul 17, 2023
4f15b14
formula
RuoqiTan Jul 22, 2023
e9eb73b
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
RuoqiTan Aug 8, 2023
a62cef6
Yukon basic personal amount
RuoqiTan Aug 8, 2023
b0cf36e
partial fixes
PavelMakarchuk Aug 28, 2023
5591dbe
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
PavelMakarchuk Aug 28, 2023
fb95796
Update policyengine_canada/parameters/gov/provinces/yt/tax/income/cre…
sqw0418 Sep 15, 2023
c6795bd
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
sqw0418 Oct 2, 2023
e5388f2
modify
sqw0418 Oct 2, 2023
593d678
Merge branch 'Yukon-Basic-Personal-Amount' of https://github.com/sqw0…
sqw0418 Oct 2, 2023
43b2172
modify
sqw0418 Oct 4, 2023
44e2935
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
sqw0418 Oct 4, 2023
2a0de5d
modify
sqw0418 Oct 9, 2023
52a3106
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
sqw0418 Oct 9, 2023
088f163
modify
sqw0418 Oct 18, 2023
203b6d1
update variables
yy3187 May 13, 2024
7e6c155
update variables and parameters
yy3187 May 13, 2024
fba286d
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
yy3187 May 13, 2024
a1b2aa9
make format
yy3187 May 14, 2024
e09eec9
update variables and test cases
yy3187 May 17, 2024
8084e87
add test cases
yy3187 May 28, 2024
6f51269
update references
yy3187 May 30, 2024
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
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Yukon basic personal amount.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Yukon reduces the basic personal amount for high income filers by this amount.

values:
2022-01-01: 1_679
2023-01-01: 1_479
metadata:
unit: currency-CAD
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
period: year
label: Yukon basic personal amount applicable amount
reference:
- title: Worksheet for the Yukon 2023 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-23e.pdf#page=1
- title: Worksheet for the Yukon 2022 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-22e.pdf#page=1
# The credit amount is not mentioned in the Yukon income tax act
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
# https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon divides the basic personal amount by this amount.
values:
2022-01-01: 66_083
2023-01-01: 70_245
metadata:
unit: currency-CAD
period: year
label: Yukon income basic personal divisor
reference:
- title: Worksheet for the Yukon 2023 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-23e.pdf#page=1
- title: Worksheet for the Yukon 2022 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-22e.pdf#page=1
# The credit amount is not mentioned in the Yukon income tax act
# https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon reduces the basic personal amount for filers with income above this threshold.
values:
2022-01-01: 155_625
2023-01-01: 165_430
metadata:
unit: currency-CAD
period: year
label: Yukon basic personal amount reduction income threshold
reference:
- title: Worksheet for the Yukon 2023 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-23e.pdf#page=1
- title: Worksheet for the Yukon 2022 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-22e.pdf#page=1
# The credit amount is not mentioned in the Yukon income tax act
# https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Yukon provides this base basic personal amount.
values:
2022-01-01: 12_719
2023-01-01: 13_521
metadata:
unit: currency-CAD
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
period: year
label: Yukon income basic personal base amount
reference:
- title: Worksheet for the Yukon 2023 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-23e.pdf#page=1
- title: Worksheet for the Yukon 2022 Personal Tax Credits Return
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1yt-ws/td1yt-ws-22e.pdf#page=1
# The credit amount is not mentioned in the Yukon income tax act
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
# https://laws.yukon.ca/cms/images/LEGISLATION/PRINCIPAL/2002/2002-0118/2002-0118.pdf
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- name: Income above the income threshold but additional amount below 0 in 2023
period: 2023
input:
province_code: YT
individual_net_income: 250_000
output:
yt_basic_personal_amount_additional: 0

- name: Income below the income threshold and additional amount equals 0 in 2023 (edge case)
period: 2023
absolute_error_margin: 0.2
input:
province_code: YT
individual_net_income: 235_675
output:
yt_basic_personal_amount_additional: 0

- name: Income below the income threshold and additional amount above 0 in 2023
period: 2023
absolute_error_margin: 0.2
input:
province_code: YT
individual_net_income: 200_000
output:
yt_basic_personal_amount_additional: 751

- name: Income above the income threshold but additional amount below 0 in 2022
period: 2022
input:
province_code: YT
individual_net_income: 250_000
output:
yt_basic_personal_amount_additional: 0

- name: Income below the income threshold and additional amount equals 0 in 2022 (edge case)
period: 2022
absolute_error_margin: 0.2
input:
province_code: YT
individual_net_income: 221_708
output:
yt_basic_personal_amount_additional: 0

- name: Income below the income threshold and additional amount above 0 in 2022
period: 2022
absolute_error_margin: 0.2
input:
province_code: YT
individual_net_income: 200_000
output:
yt_basic_personal_amount_additional: 551.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_canada.model_api import *


class yt_basic_personal_amount(Variable):
value_type = float
entity = Person
label = "Yukon basic personal amount"
definition_period = YEAR
defined_for = ProvinceCode.YT
adds = [
"yt_basic_personal_amount_base",
"yt_basic_personal_amount_additional",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from policyengine_canada.model_api import *


class yt_basic_personal_amount_additional(Variable):
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = Person
label = "Yukon additional basic personal amount"
definition_period = YEAR
defined_for = ProvinceCode.YT

def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.yt.tax.income.credits.basic_personal_amount.additional

individual_net_income = person("individual_net_income", period)
additional_amount = p.divisor - (
individual_net_income - p.income_threshold
yy3187 marked this conversation as resolved.
Show resolved Hide resolved
)
additional_amount_eligible = additional_amount > 0
yt_additional_amount = additional_amount_eligible * additional_amount
yt_additional_amount = yt_additional_amount / p.divisor

return yt_additional_amount * p.applicable_amount
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from policyengine_canada.model_api import *


class yt_basic_personal_amount_base(Variable):
value_type = float
entity = Person
label = "Yukon basic personal amount base"
definition_period = YEAR
defined_for = ProvinceCode.YT
adds = (
"gov.provinces.yt.tax.income.credits.basic_personal_amount.base_amount"
)
Loading