-
Notifications
You must be signed in to change notification settings - Fork 33
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 #289 from zqw5219/zqw5219/issue288
Northwest Territories Age Credit
- Loading branch information
Showing
8 changed files
with
169 additions
and
0 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: minor | ||
changes: | ||
added: | ||
- Northwest Territories Age Credit. |
14 changes: 14 additions & 0 deletions
14
...ine_canada/parameters/gov/provinces/nt/tax/income/credits/age_credit/age_eligibility.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,14 @@ | ||
description: Northwest Territories provides the age credit to filers at or above this age threshold. | ||
|
||
values: | ||
2022-01-01: 65 | ||
metadata: | ||
unit: year | ||
label: Northwest Territories age credit age eligibility | ||
reference: | ||
- title: Income Tax Act - Section 2.2 Age Credit | ||
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31 | ||
- title: 2022 Worksheet NT428 - line 58080 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1 | ||
- title: 2023 Personal Tax Credits Return - line 2 Age amount | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1 |
15 changes: 15 additions & 0 deletions
15
...cyengine_canada/parameters/gov/provinces/nt/tax/income/credits/age_credit/max_amount.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,15 @@ | ||
description: Northwest Territories provides this maximum amount under the age credit. | ||
values: | ||
# Amount increases with inflation every year | ||
2022-01-01: 7_635 | ||
2023-01-01: 8_116 | ||
metadata: | ||
unit: currency-CAD | ||
label: Northwest Territories age credit maximum amount | ||
reference: | ||
- title: Income Tax Act - Section 2.2 Age Credit | ||
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31 | ||
- title: 2022 Worksheet NT428 - line 58080 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1 | ||
- title: 2023 Personal Tax Credits Return - line 2 Age amount | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1 |
23 changes: 23 additions & 0 deletions
23
policyengine_canada/parameters/gov/provinces/nt/tax/income/credits/age_credit/reduction.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,23 @@ | ||
description: Northwest Territories phases the age credit out at this rate based on the filer's income. | ||
brackets: | ||
- threshold: | ||
2022-01-01: 0 | ||
rate: | ||
2022-01-01: 0 | ||
- threshold: | ||
2022-01-01: 39_826 | ||
2023-01-01: 42_335 | ||
rate: | ||
2022-01-01: 0.15 | ||
metadata: | ||
type: marginal_rate | ||
threshold_unit: currency-CAD | ||
rate_unit: /1 | ||
label: Northwest Territories Age Credit phase out rate | ||
reference: | ||
- title: Income Tax Act - Section 2.2 Age Credit | ||
href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31 | ||
- title: 2022 Worksheet NT428 - line 58080 | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-d/5012-d-22e.pdf#page=1 | ||
- title: 2023 Personal Tax Credits Return - line 2 Age amount | ||
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt-ws/td1nt-ws-23e.pdf#page=1 |
35 changes: 35 additions & 0 deletions
35
policyengine_canada/tests/gov/provinces/nt/tax/income/nt_age_credit.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,35 @@ | ||
- name: Under taxable income 2022 | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
nt_age_credit_eligible: true | ||
nt_taxable_income: 39_825 | ||
output: | ||
nt_age_credit: 7_635 | ||
|
||
- name: Calculation 2022 # 7,635 - ((40,100 - 39,826) * 0.15) | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
nt_age_credit_eligible: true | ||
nt_taxable_income: 40_100 | ||
output: | ||
nt_age_credit: 7_593.9 | ||
|
||
- name: Under taxable income 2023 | ||
period: 2023 | ||
input: | ||
province_code: NT | ||
nt_age_credit_eligible: true | ||
nt_taxable_income: 42_334 | ||
output: | ||
nt_age_credit: 8_116 | ||
|
||
- name: Calculation 2023 # 8_116 - ((45_000 - 42_335) * 0.15) | ||
period: 2023 | ||
input: | ||
province_code: NT | ||
nt_age_credit_eligible: true | ||
nt_taxable_income: 45_000 | ||
output: | ||
nt_age_credit: 7_716.25 |
47 changes: 47 additions & 0 deletions
47
policyengine_canada/tests/gov/provinces/nt/tax/income/nt_age_credit_eligible.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,47 @@ | ||
- name: Under age amount 2022 | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
age: 64 | ||
output: | ||
nt_age_credit_eligible: false | ||
|
||
- name: 65 years old 2022 | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
age: 65 | ||
output: | ||
nt_age_credit_eligible: true | ||
|
||
- name: Above age amount 2022 | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
age: 66 | ||
output: | ||
nt_age_credit_eligible: true | ||
|
||
- name: Under age amount 2023 | ||
period: 2023 | ||
input: | ||
province_code: NT | ||
age: 64 | ||
output: | ||
nt_age_credit_eligible: false | ||
|
||
- name: 65 years old 2022 | ||
period: 2022 | ||
input: | ||
province_code: NT | ||
age: 65 | ||
output: | ||
nt_age_credit_eligible: true | ||
|
||
- name: Above age amount 2023 | ||
period: 2023 | ||
input: | ||
province_code: NT | ||
age: 66 | ||
output: | ||
nt_age_credit_eligible: true |
16 changes: 16 additions & 0 deletions
16
...cyengine_canada/variables/gov/provinces/nt/tax/income/credits/age_credit/nt_age_credit.py
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,16 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class nt_age_credit(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Northwest Territories age credit" | ||
unit = CAD | ||
definition_period = YEAR | ||
defined_for = "nt_age_credit_eligible" | ||
reference = "https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31" | ||
|
||
def formula(person, period, parameters): | ||
p = parameters(period).gov.provinces.nt.tax.income.credits.age_credit | ||
income = person("nt_taxable_income", period) | ||
return max_(p.max_amount - p.reduction.calc(income), 0) |
15 changes: 15 additions & 0 deletions
15
...canada/variables/gov/provinces/nt/tax/income/credits/age_credit/nt_age_credit_eligible.py
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,15 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class nt_age_credit_eligible(Variable): | ||
value_type = bool | ||
entity = Person | ||
label = "Northwest Territories age credit eligibility" | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.NT | ||
reference = "https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=31" | ||
|
||
def formula(person, period, parameters): | ||
p = parameters(period).gov.provinces.nt.tax.income.credits.age_credit | ||
age = person("age", period) | ||
return age >= p.age_eligibility |