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

Saskatchewan Caregiver Amount #406

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
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:
- Saskatchewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Saskatchewan Tax Credit Amount for persons who have eligible dependants.
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
values:
2023-01-01: 10_405
metadata:
unit: currency-CAD
label: Saskatchewan Caregiver Tax Credit Amount
reference:
- title: Sasktachewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan Caregiver Amount Calculation Form
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/td1sk-ws-23e%20(SK%20Tax%20Credit%20Calculation).pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan The Income Tax Act, 2000
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/I2-01.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved

PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Saskatchewan Caregiver Tax Credit Amount allows eligibility for elderly relatives at this age or higher.
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
values:
2023-01-01: 65
metadata:
unit: year
label: Saskatchewan Caregiver Tax Credit Elderly Dependant Age Eligibility
reference:
- title: Sasktachewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan Caregiver Amount Calculation Form
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/td1sk-ws-23e%20(SK%20Tax%20Credit%20Calculation).pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan The Income Tax Act, 2000
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/I2-01.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Saskatchewan Tax Credit Higher Income threshold for the Dependant.
values:
2023-01-01: 28_175
metadata:
unit: currency-CAD
label: Saskatchewan Caregiver Tax Credit Higher Income Threshold for the Dependant
reference:
- title: Sasktachewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan Caregiver Amount Calculation Form
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/td1sk-ws-23e%20(SK%20Tax%20Credit%20Calculation).pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan The Income Tax Act, 2000
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/I2-01.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
description: Saskatchewan Caregiver Tax Credit Amount allows eligibility for infirm relatives at this age or higher.
values:
2023-01-01: 18
metadata:
unit: year
label: Saskatchewan Caregiver Tax Credit Infirm Dependant Age Eligibility
reference:
- title: Sasktachewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan Caregiver Amount Calculation Form
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/td1sk-ws-23e%20(SK%20Tax%20Credit%20Calculation).pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan The Income Tax Act, 2000
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/I2-01.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Saskatchewan Tax Credit Lower Income threshold for the dependant.
values:
2023-01-01: 17_770
metadata:
unit: currency-CAD
label: Saskatchewan Caregiver Tax Credit Lower Income Threshold for the dependant
reference:
- title: Sasktachewan Caregiver Amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan Caregiver Amount Calculation Form
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/td1sk-ws-23e%20(SK%20Tax%20Credit%20Calculation).pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
- title: Sasktachewan The Income Tax Act, 2000
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: file:///C:/Users/yaoke/OneDrive/Desktop/PolicyEngine/SK/SK%20Tax%20Credit%20Return/I2-01.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved

Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
- name: Do not have dependants living with the person
period: 2024
input:
province_code: SK
is_live_together: False
output:
sk_caregiver_amount: 0

- name: One Elderly 64-years-old Dependant with less than 17_770 income
period: 2024
input:
province_code: SK
dependants_income: 17_769
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 64
output:
sk_caregiver_amount: 0

- name: One Elderly 65-years-old Dependant with less than 17_770 income
period: 2024
input:
province_code: SK
dependants_income: 17_769
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 65
output:
sk_caregiver_amount: 10_405

- name: One Elderly 66-years-old Dependant with an income of 17_770
period: 2024
input:
province_code: SK
dependants_income: 17_770
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 66
output:
sk_caregiver_amount: 10_405

- name: One Elderly 65-years-old Dependant with an income between 17_770 and 28_175
period: 2024
input:
province_code: SK
dependants_income: 20_000
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 65
output:
sk_caregiver_amount: 8_175

- name: One Elderly 65-years-old Dependant with an income of 28_175
period: 2024
input:
province_code: SK
dependants_income: 28_175
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 65
output:
sk_caregiver_amount: 0

- name: One Elderly 65-years-old Dependant with an income more than 28_175
period: 2024
input:
province_code: SK
dependants_income: 30_000
is_live_together: True
is_elderly_dependant: True
is_infirm_dependant: False
dependant_age: 65
output:
sk_caregiver_amount: 0

- name: One infirm 17-years-old Dependant with less than 17_770 income
period: 2024
input:
province_code: SK
dependants_income: 17_769
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 17
output:
sk_caregiver_amount: 0

- name: One infirm 18-years-old Dependant with less than 17_770 income
period: 2024
input:
province_code: SK
dependants_income: 17_769
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 18
output:
sk_caregiver_amount: 10_405

- name: One infirm 19-years-old Dependant with 17_770 income
period: 2024
input:
province_code: SK
dependants_income: 17_770
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 19
output:
sk_caregiver_amount: 10_405

- name: One infirm 19-years-old Dependant with an income between 17_770 and 28_175
period: 2024
input:
province_code: SK
dependants_income: 21_000
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 19
output:
sk_caregiver_amount: 7_175

- name: One infirm 21-years-old Dependant with an income of 28_175
period: 2024
input:
province_code: SK
dependants_income: 28_175
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 21
output:
sk_caregiver_amount: 0

- name: One infirm 18-years-old Dependant with an income more than 28_175
period: 2024
input:
province_code: SK
dependants_income: 28_176
is_live_together: True
is_elderly_dependant: False
is_infirm_dependant: True
dependant_age: 18
output:
sk_caregiver_amount: 0
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class dependant_age(Variable):
value_type = int
entity = Person
label = "Saskatchewan Caregiver Amount Dependant's Age"
documentation = "The age of your spouse's or common-law partner's parent or grandparent or an infirm relative."
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from policyengine_canada.model_api import *


class dependants_income(Variable):
value_type = float
entity = Person
label = "Saskatchewan Caregiver Amount Dependant's Income"
documentation = "The income of your spouse's or common-law partner's parent or grandparent or an infirm relative."
unit = CAD
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class is_elderly_dependant(Variable):
value_type = bool
entity = Person
label = "Saskatchewan Caregiver Amount Elderly Dependant"
documentation = "Whthere your spouse's or common-law partner's dependant is your parent or grandparent or not."
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class is_infirm_dependant(Variable):
value_type = bool
entity = Person
label = "Saskatchewan Caregiver Amount Infirm Dependant"
documentation = "Whthere your spouse's or common-law partner's dependant is an infirm dependant or not."
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class is_live_together(Variable):
value_type = bool
entity = Person
label = "Saskatchewan Caregiver Dependant"
documentation = "Whthere your spouse's or common-law partner's dependant lives with you or not."
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from policyengine_canada.model_api import *


class sk_caregiver_amount(Variable):
value_type = float
entity = Person
label = "Saskatchewan Caregiver Amount"
unit = CAD
definition_period = YEAR
reference = (
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf",
"https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf",
"https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf",
)
defined_for = ProvinceCode.SK

def formula(person, period, parameters):
relative_live_eligibility = person("is_live_together", period)
is_elderly_dependant = person("is_elderly_dependant", period)
is_infirm_dependant = person("is_infirm_dependant", period)
dependants_income = person("dependants_income", period)
dependant_age = person("dependant_age", period)
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved

p = parameters(
period
).gov.provinces.sk.tax.income.credits.sk_caregiver_amount

age_threshold = select(
[
(is_elderly_dependant == 1) & (is_infirm_dependant == 0),
(is_elderly_dependant == 0) & (is_infirm_dependant == 1),
],
[p.elderly_age_threshold, p.infirm_age_threshold],
)
age_eligibility = where(dependant_age >= age_threshold, 1, 0)

eligibility = relative_live_eligibility & age_eligibility

return select(
[
eligibility == 0,
(eligibility == 1)
& (dependants_income >= p.higher_income_threshold),
(eligibility == 1)
& (dependants_income <= p.lower_income_threshold),
(eligibility == 1)
& (
p.higher_income_threshold
> dependants_income
> p.lower_income_threshold
),
],
[0, 0, p.amount, p.higher_income_threshold - dependants_income],
)