-
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 #263 from ziyuliuzilla/ziyuliuzilla/issue257
Nova Scotia Age tax credit
- Loading branch information
Showing
6 changed files
with
85 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: | ||
- Nova Scotia Age tax credit. |
9 changes: 9 additions & 0 deletions
9
policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/age/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,9 @@ | ||
description: Nova Scotia limits its Age Tax Credit to people this age or older. | ||
values: | ||
2022-12-31: 65 | ||
metadata: | ||
unit: year | ||
label: Nova Scotia Age tax credit age eligibility | ||
reference: | ||
- title: Government of Canada - Nova Scotia Information Guide - Age tax credit | ||
href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/nova-scotia/5003-pc/information-residents-nova-scotia.html#P90-4569 |
9 changes: 9 additions & 0 deletions
9
policyengine_canada/parameters/gov/provinces/ns/tax/income/credits/age/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,9 @@ | ||
description: Nova Scotia provides this amount under the Age Tax Credit. | ||
values: | ||
2022-12-31: 1_000 | ||
metadata: | ||
unit: currency-CAD | ||
label: Nova Scotia Age tax credit base amount | ||
reference: | ||
- title: Government of Canada - Nova Scotia Information Guide - Age tax credit | ||
href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/nova-scotia/5003-pc/information-residents-nova-scotia.html#P90-4569 |
9 changes: 9 additions & 0 deletions
9
...yengine_canada/parameters/gov/provinces/ns/tax/income/credits/age/income_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,9 @@ | ||
description: Nova Scotia limits its age tax credit to filers with taxable income below this amount. | ||
values: | ||
2022-12-31: 24_000 | ||
metadata: | ||
unit: currency-CAD | ||
label: Nova Scotia Age tax credit taxable income limit | ||
reference: | ||
- title: Government of Canada - Nova Scotia Information Guide - Age tax credit | ||
href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/nova-scotia/5003-pc/information-residents-nova-scotia.html#P90-4569 |
35 changes: 35 additions & 0 deletions
35
policyengine_canada/tests/gov/provinces/ns/tax/income/credits/age/ns_age_tax_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: Nova Scotia Age tax credit; eligible age with eligible taxable income | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
age: 65 | ||
ns_taxable_income: 23_999 | ||
output: | ||
ns_age_tax_credit: 1_000 | ||
|
||
- name: Nova Scotia Age tax credit; ineligible age with eligible taxable income | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
age: 64 | ||
ns_taxable_income: 23_999 | ||
output: | ||
ns_age_tax_credit: 0 | ||
|
||
- name: Nova Scotia Age tax credit; eligible age with ineligible taxable income | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
age: 65 | ||
ns_taxable_income: 24_000 | ||
output: | ||
ns_age_tax_credit: 0 | ||
|
||
- name: Nova Scotia Age tax credit; ineligible age with ineligible taxable income | ||
period: 2023 | ||
input: | ||
province_code: NS | ||
age: 64 | ||
ns_taxable_income: 24_000 | ||
output: | ||
ns_age_tax_credit: 0 |
19 changes: 19 additions & 0 deletions
19
policyengine_canada/variables/gov/provinces/ns/tax/income/credits/age/ns_age_tax_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,19 @@ | ||
from policyengine_canada.model_api import * | ||
|
||
|
||
class ns_age_tax_credit(Variable): | ||
value_type = float | ||
entity = Person | ||
label = "Nova Scotia Age tax credit" | ||
definition_period = YEAR | ||
defined_for = ProvinceCode.NS | ||
|
||
def formula(person, period, parameters): | ||
age = person("age", period) | ||
income = person("ns_taxable_income", period) | ||
p = parameters(period).gov.provinces.ns.tax.income.credits.age | ||
eligibility = (age >= p.age_eligibility) & ( | ||
income < p.income_eligibility | ||
) | ||
|
||
return eligibility * p.amount |