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

Nova Scotia Basic personal amount #407

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c00d35d
Add parameters
okeyiii Jul 13, 2023
bc34af8
Add Variables and Partial Tests
okeyiii Jul 13, 2023
0f71af7
Nova Scotia Basic Personal Amount
okeyiii Jul 17, 2023
c9a2626
Complete
okeyiii Jul 17, 2023
cafa9ed
Nova Scotia Basic Personal Amount
okeyiii Jul 24, 2023
f13d546
Nova Scotia Basic Personal Amount
okeyiii Jul 31, 2023
ce10cc0
Nova Scotia Basic Personal Amount
okeyiii Jul 31, 2023
a8f1e15
Nova Scotia Basic Personal Amount
okeyiii Aug 8, 2023
02b51c5
Nova Scotia Basic Personal Amount
okeyiii Aug 10, 2023
c526ad9
Nova Scotia Basic Personal Amount
okeyiii Aug 15, 2023
e11e19b
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
okeyiii Aug 16, 2023
18136a1
Nova Scotia Basic Personal Amount
okeyiii Aug 16, 2023
948dce7
Nova Scotia Basic Personal Amount
okeyiii Aug 29, 2023
7bbcf3a
Nova Scotia Basic Personal Amount
okeyiii Aug 30, 2023
219e0ed
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
okeyiii Aug 30, 2023
b58867b
rename parameters
PavelMakarchuk Aug 30, 2023
dec4499
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
okeyiii Sep 6, 2023
92d4e06
Nova Scotia Basic Personal Amount
okeyiii Sep 6, 2023
dc95143
Merge branch 'okeyiii/issue395' of https://github.com/okeyiii/policye…
okeyiii Sep 6, 2023
36bb813
Update policyengine_canada/variables/gov/provinces/ns/tax/income/cred…
PavelMakarchuk Sep 9, 2023
e122967
Update changelog_entry.yaml
PavelMakarchuk Sep 9, 2023
a4e1df7
remove additional variable
PavelMakarchuk Sep 10, 2023
6d0a860
unit
PavelMakarchuk Sep 10, 2023
496cbea
Nova Scotia Basic Personal Amount
okeyiii Oct 6, 2023
c28e4d3
Merge branch 'okeyiii/issue395' of https://github.com/okeyiii/policye…
okeyiii Oct 6, 2023
793adca
Nova Scotia Basic Personal Amount
okeyiii Oct 6, 2023
4919431
Nova Scotia Basic Personal Amount
okeyiii Oct 8, 2023
3576b40
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
okeyiii Oct 11, 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
5 changes: 5 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- bump: minor
changes:
added:
- Nova Scotia Basic Personal Amount.
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved

okeyiii marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Nova Scotia adds this additional amount to the basic personal amount.
values:
2022-01-01: 3_000
metadata:
unit: currency-CAD
label: Nova Scotia basic personal amount additional base
reference:
- title: 2022 Nova Scotia Personal Tax Credits Return
href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1
- title: 2022 Worksheet NS428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf#page=1
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Nova Scotia lower income threshold for maximum basic personal amount in basic personal amount.
okeyiii marked this conversation as resolved.
Show resolved Hide resolved

values:
2022-01-01: 25_000
metadata:
unit: currency-CAD
label: Nova Scotia Basic Personal Amount Lower Income Threshold
reference:
- title: Nova Scotia Basic Personal Amount
href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf
- title: Nova Scotia Basic Personal Amount
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Nova Scotia provides this max personal amount under the basic personal amount.
values:
2022-01-01: 11_481
metadata:
unit: currency-CAD
label: Nova Scotia basic personal amount max personal amount
reference:
- title: 2022 Nova Scotia Personal Tax Credits Return
href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1
- title: 2022 Worksheet NS428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf#page=1
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
description: Nova Scotia phases its additional basic personal amount out at this rate.
brackets:
- threshold:
2022-01-01: 0
rate:
2022-01-01: 0
- threshold:
2022-01-01: 25_000
rate:
2022-01-01: 0.06

metadata:
type: marginal_rate
rate_unit: /1
threshold_unit: currency-CAD
period: year
label: Nova Scotia basic personal amount phase out rate
reference:
- title: 2022 Nova Scotia Personal Tax Credits Return
href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1
- title: 2022 Worksheet NS428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf#page=1
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Nova Scotia provides this base amount under the basic personal amount.
values:
2022-01-01: 8_481
okeyiii marked this conversation as resolved.
Show resolved Hide resolved
metadata:
unit: currency-CAD
label: Nova Scotia basic personal amount base
reference:
- title: 2022 Nova Scotia Personal Tax Credits Return
href: https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1
- title: 2022 Worksheet NS428
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf#page=1
- title: Nova Scotia income tax act - subdivision c - Deduction for employment out of Canada
href: https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
- name: Person has taxable income lower than 25_000
period: 2023
input:
province_code: NS
total_individual_pre_tax_income: 24_999
output:
ns_basic_personal_amount: 11_481

- name: Person has taxable income between 25_000 and 75_000
period: 2023
input:
province_code: NS
total_individual_pre_tax_income: 27_000
output:
ns_basic_personal_amount: 11_361

- name: Person has taxable income between 25_000 and 75_000
period: 2023
input:
province_code: NS
total_individual_pre_tax_income: 70_000
output:
ns_basic_personal_amount: 8_781

- name: Person has taxable income higher than 75_000
period: 2023
input:
province_code: NS
total_individual_pre_tax_income: 75_001
output:
ns_basic_personal_amount: 8_481
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from policyengine_canada.model_api import *


class ns_basic_personal_amount(Variable):
value_type = float
entity = Person
label = "Nova Scotia Basic Personal Amount"
definition_period = YEAR
defined_for = ProvinceCode.NS
reference = (
"https://hr.acadiau.ca/files/sites/hr/Payroll/Pensions%20&%20Benefits/NS_TD1_2022.pdf#page=1",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5003-d/5003-d-22e.pdf#page=1",
"https://nslegislature.ca/sites/default/files/legc/statutes/income%20tax.pdf#page=24",
)

def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.ns.tax.income.credits.basic_personal_amount
taxable_income = person("total_individual_pre_tax_income", period)

# Calculate additional amount added to base amount
okeyiii marked this conversation as resolved.
Show resolved Hide resolved

reduced_additional_amount = max_(
0,
p.additional_amount.base
- p.additional_amount.phase_out_rate.calc(taxable_income),
)
additional_amount = min_(
reduced_additional_amount, p.additional_amount.base
)

return where(
taxable_income <= p.additional_amount.income_threshold,
p.additional_amount.max_personal_amount,
p.base + additional_amount,
)