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

Nunavut Age Amount Credit #279

Merged
merged 33 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8da46ca
add age parameter
runyao-yin May 16, 2023
3f33cd7
add relevant files
runyao-yin May 24, 2023
e36fd5f
fix problems for nunavut age amount credit
runyao-yin May 24, 2023
f2d4487
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
runyao-yin May 24, 2023
6346806
Update changelog_entry.yaml
runyao-yin Jun 5, 2023
4734556
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Jun 5, 2023
e56b5d1
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Jun 5, 2023
43d1b30
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Jul 11, 2023
2b7fc5c
Add changes
runyao-yin Aug 1, 2023
02355fe
Adjust the amount for Nunavut age amount
runyao-yin Aug 2, 2023
806b5c1
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 8, 2023
be130df
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 8, 2023
28f832a
small fix
runyao-yin Aug 8, 2023
78de17d
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 8, 2023
c52f6b5
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Aug 8, 2023
df42501
Add changes
runyao-yin Aug 8, 2023
01b2528
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Aug 8, 2023
2b3d538
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Aug 8, 2023
c62c014
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Aug 8, 2023
f3ff85b
Update policyengine_canada/parameters/gov/provinces/nu/tax/income/cre…
runyao-yin Aug 8, 2023
0720f1e
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 8, 2023
6331b7d
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 8, 2023
375033d
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 15, 2023
0a2cabb
Update nu_age_amount_credit.py
runyao-yin Aug 15, 2023
4d5fd60
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 16, 2023
c16b13d
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 16, 2023
0ea02e5
Update policyengine_canada/variables/gov/provinces/nu/tax/income/cred…
runyao-yin Aug 16, 2023
1a06b03
Update nu_age_amount_credit_eligible_person.py
runyao-yin Aug 29, 2023
71a5967
Update eligible_age.yaml
runyao-yin Aug 30, 2023
f8a10b0
Update phase_out_rate.yaml
runyao-yin Aug 30, 2023
b2306ee
test fix
PavelMakarchuk Sep 4, 2023
1e47136
format
PavelMakarchuk Sep 4, 2023
2217109
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
PavelMakarchuk Sep 4, 2023
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:
- Nunavut age amount credit.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Nunavut provides this maximum age amount credit for eligible filers.
values:
2022-07-01: 10_764
metadata:
unit: currency-CAD
label: Nunavut age amount credit maximum amount
reference:
- title: Consolidation of Income Tax Act, Part I Division B Subdivision c 2.2
runyao-yin marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.nunavutlegislation.ca/en/consolidated-law/income-tax-act-consolidation
runyao-yin marked this conversation as resolved.
Show resolved Hide resolved
- title: Worksheet NU428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5014-d/5014-d-22e.pdf#page=1

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
description: Nunavut allow filers at or over this age to receive the age amount credit.
values:
2002-01-01: 65
metadata:
unit: year
label: Nunavut age amount credit eligible age
reference:
- title: Consolidation of Income Tax Act, Part I Division B Subdivision c 2.2
href: https://www.nunavutlegislation.ca/en/consolidated-law/income-tax-act-consolidation
- title: Worksheet NU428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5014-d/5014-d-22e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
description: Nunavut phases the age amount credit out at this rate, based on income.
brackets:
- threshold:
2022-07-01: 0
rate:
2022-07-01: 0
- threshold:
2022-07-01: 39_826
rate:
2022-07-01: 0.15

metadata:
type: marginal_rate
rate_unit: /1
threshold_unit: currency-CAD
label: Nunavut age amount credit reduction rate
reference:
- title: Consolidation of Income Tax Act, Part I Division B Subdivision c 2.2
runyao-yin marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.nunavutlegislation.ca/en/consolidated-law/income-tax-act-consolidation
- title: Worksheet NU428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5014-d/5014-d-22e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
- name: Under threshold with eligible age
period: 2023
input:
nu_age_amount_credit_eligible: true
total_individual_pre_tax_income: 0
output:
nu_age_amount_credit: 10_764

- name: Over threshold income with eligible age
period: 2023
input:
total_individual_pre_tax_income: 69_826
nu_age_amount_credit_eligible: true
output:
nu_age_amount_credit: 6_264

- name: Max out credit with eligible age
period: 2023
absolute_error_margin: 0.5
input:
total_individual_pre_tax_income: 111_586
nu_age_amount_credit_eligible: true
output:
nu_age_amount_credit: 0


- name: Under threshold with ineligible age
period: 2023
input:
total_individual_pre_tax_income: 0
nu_age_amount_credit_eligible: false
output:
nu_age_amount_credit: 0

- name: Over threshold income with ineligible age
period: 2023
input:
total_individual_pre_tax_income: 69_826
nu_age_amount_credit_eligible: false
output:
nu_age_amount_credit: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- name: Eligible
period: 2023
input:
province_code: NU
age: 65
output:
nu_age_amount_credit_eligible: true

- name: Ineligible
period: 2023
input:
province_code: NU
age: 60
output:
nu_age_amount_credit_eligible: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from policyengine_canada.model_api import *


class nu_age_amount_credit(Variable):
value_type = float
entity = Person
label = "Nunavut age amount credit"
unit = CAD
definition_period = YEAR
defined_for = "nu_age_amount_credit_eligible"

def formula(person, period, parameters):
income = person("total_individual_pre_tax_income", period)
p = parameters(period).gov.provinces.nu.tax.income.credits.age_amount
phase_out_amount = p.phase_out_rate.calc(income)
return max_(p.amount - phase_out_amount, 0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from policyengine_canada.model_api import *


class nu_age_amount_credit_eligible(Variable):
value_type = bool
entity = Person
label = "Eligible for the Nunavut age amount credit"
definition_period = YEAR
defined_for = ProvinceCode.NU

def formula(person, period, parameters):
age = person("age", period)
p = parameters(period).gov.provinces.nu.tax.income.credits.age_amount
return age >= p.eligible_age