diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..0612eedda 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Saskatchewan infirm dependant amount. diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/age_threshold.yaml new file mode 100644 index 000000000..4babf8272 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/age_threshold.yaml @@ -0,0 +1,18 @@ +description: Saskatchewan qualifies dependants for the infirm dependant tax credit above this age. +values: + 2022-01-01: 18 +metadata: + unit: year + label: Saskatchewan infirm dependants tax credit age threshold + period: year + reference: + - title: 2023 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: 2023 Sasktachewan Personal Tax Credits Return Calculation Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1 + - title: 2022 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2022 Sasktachewan Sasktachewan Personal Tax Credits Return Calculation Form Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6 + - title: Sasktachewan The Income Tax Act, 2000#2020, c25, s.5. + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/higher.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/higher.yaml new file mode 100644 index 000000000..b06dcb55e --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/higher.yaml @@ -0,0 +1,19 @@ +description: Saskatchewan reduces the maximum infirm dependants tax credit amount by the difference of this threshold and the dependants income. +values: + 2022-01-01: 16_734 + 2023-01-01: 17_788 +metadata: + unit: currency-CAD + label: Saskatchewan infirm dependants tax credit higher income threshold + period: year + reference: + - title: 2023 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: 2023 Sasktachewan Personal Tax Credits Return Calculation Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1 + - title: 2022 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2022 Sasktachewan Sasktachewan Personal Tax Credits Return Calculation Form Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6 + - title: Sasktachewan The Income Tax Act, 2000#2020, c25, s.5. + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/lower.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/lower.yaml new file mode 100644 index 000000000..97dec3b3b --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/income_threshold/lower.yaml @@ -0,0 +1,19 @@ +description: Saskatchewan reduces the infirm dependants tax credit amount for dependants wuth net income above this threshold. +values: + 2022-01-01: 6_945 + 2023-01-01: 7_383 +metadata: + unit: currency-CAD + label: Saskatchewan infirm dependants tax credit lower income threshold + period: year + reference: + - title: 2023 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: 2023 Sasktachewan Personal Tax Credits Return Calculation Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1 + - title: 2022 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2022 Sasktachewan Sasktachewan Personal Tax Credits Return Calculation Form Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6 + - title: Sasktachewan The Income Tax Act, 2000#2020, c25, s.5. + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/max_amount.yaml new file mode 100644 index 000000000..32a99a7dd --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_infirm_dependant_amount/max_amount.yaml @@ -0,0 +1,19 @@ +description: Saskatchewan allows for this maximum infirm dependant credit amount. +values: + 2022-01-01: 9_789 + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: Saskatchewan infirm dependants tax credit max amount + period: year + reference: + - title: 2023 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: 2023 Sasktachewan Personal Tax Credits Return Calculation Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1 + - title: 2022 Sasktachewan Personal Tax Credits Return Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2022 Sasktachewan Sasktachewan Personal Tax Credits Return Calculation Form Line10 Amount for infirm dependants age 18 or older + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6 + - title: Sasktachewan The Income Tax Act, 2000#2020, c25, s.5. + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.yaml new file mode 100644 index 000000000..4fcbd5657 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.yaml @@ -0,0 +1,98 @@ +- name: Do not have eligible dependants + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: false + dependant_income: 10_000 + output: + sk_infirm_dependant_amount_person: 0 + +- name: 2023 Have eligible dependants with income at lower income threshold + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 7_383 + output: + sk_infirm_dependant_amount_person: 10_405 + +- name: 2023 Have eligible dependants with income below lower income threshold + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 7_382 + output: + sk_infirm_dependant_amount_person: 10_405 + +- name: 2023 Have eligible dependants with income between lower and higher income threshold + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 10_000 + output: + sk_infirm_dependant_amount_person: 7_788 + +- name: 2023 Have eligible dependants with income at higher income threshold + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 17_788 + output: + sk_infirm_dependant_amount_person: 0 + +- name: 2023 Have eligible dependants with income above higher income threshold + period: 2023 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 17_789 + output: + sk_infirm_dependant_amount_person: 0 + +- name: 2022 Have eligible dependants with income at lower income threshold + period: 2022 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 6_945 + output: + sk_infirm_dependant_amount_person: 9_789 + +- name: 2022 Have eligible dependants with income below lower income threshold + period: 2022 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 6_944 + output: + sk_infirm_dependant_amount_person: 9_789 + +- name: 2022 Have eligible dependants with income between lower and higher income threshold + period: 2022 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 10_000 + output: + sk_infirm_dependant_amount_person: 6_734 + +- name: 2022 Have eligible dependants with income at higher income threshold + period: 2022 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_person: 0 + +- name: 2022 Have eligible dependants with income above higher income threshold + period: 2022 + input: + province_code: SK + sk_infirm_dependant_amount_eligible_person: true + dependant_income: 16_735 + output: + sk_infirm_dependant_amount_person: 0 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.yaml new file mode 100644 index 000000000..f443b64d9 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.yaml @@ -0,0 +1,107 @@ +- name: 2023 Have duplicate eligible infirm dependants - non eligible + period: 2023 + input: + province_code: SK + age: 19 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 10_405 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: 2022 Have duplicate eligible infirm dependants - non eligible + period: 2022 + input: + province_code: SK + age: 19 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 9_789 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: Have infirm dependants below the age threshold - non eligible + period: 2023 + input: + province_code: SK + age: 17 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: Have no dependants - non eligible + period: 2023 + input: + province_code: SK + age: 0 + is_child_of_filer: false + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: Have non-disabled dependants - non eligible + period: 2023 + input: + province_code: SK + age: 20 + is_child_of_filer: true + is_disabled: false + sk_caregiver_amount: 0 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: 2023 Have eligible infirm dependant + period: 2023 + input: + province_code: SK + age: 21 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: true + +- name: 2022 Have eligible infirm dependant + period: 2022 + input: + province_code: SK + age: 19 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 16_734 + output: + sk_infirm_dependant_amount_eligible_person: true + +- name: 2022 Income higher than the higher income threshold + period: 2022 + input: + province_code: SK + age: 19 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 17_789 + output: + sk_infirm_dependant_amount_eligible_person: false + +- name: 2023 Income higher than the higher income threshold + period: 2023 + input: + province_code: SK + age: 19 + is_child_of_filer: true + is_disabled: true + sk_caregiver_amount: 0 + dependant_income: 17_789 + output: + sk_infirm_dependant_amount_eligible_person: false diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_caregiver_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_caregiver_amount.py new file mode 100644 index 000000000..ab6904f6c --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_caregiver_amount.py @@ -0,0 +1,17 @@ +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#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=5", + "https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13", # page=14,16,17 + ) + defined_for = ProvinceCode.SK diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.py new file mode 100644 index 000000000..52b347d5b --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount.py @@ -0,0 +1,17 @@ +from policyengine_canada.model_api import * + + +class sk_infirm_dependant_amount(Variable): + value_type = float + entity = Household + label = "Saskatchewan Infirm Dependant Amount for Household" + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6", + "https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15", + ) + + adds = ["sk_infirm_dependant_amount_person"] diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.py new file mode 100644 index 000000000..92ae44073 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_eligible_person.py @@ -0,0 +1,41 @@ +from policyengine_canada.model_api import * + + +class sk_infirm_dependant_amount_eligible_person(Variable): + value_type = bool + entity = Person + label = "Eligible person for the Saskatchewan Infirm Dependants Amount" + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6", + "https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15", + ) + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_infirm_dependant_amount + + age = person("age", period) + dependant = person("is_child_of_filer", period) + disabled = person("is_disabled", period) + + is_infirm_dependant = dependant & disabled + age_eligibility = age >= p.age_threshold + + infirm_and_age_eligibility = is_infirm_dependant & age_eligibility + + receives_caregiver_amount = person("sk_caregiver_amount", period) > 0 + + dependants_income = person("dependant_income", period) + income_eligibility = dependants_income <= p.income_threshold.higher + + return ( + infirm_and_age_eligibility + & ~receives_caregiver_amount + & income_eligibility + ) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_person.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_person.py new file mode 100644 index 000000000..32ac55344 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/infirm_dependant_amount/sk_infirm_dependant_amount_person.py @@ -0,0 +1,31 @@ +from policyengine_canada.model_api import * + + +class sk_infirm_dependant_amount_person(Variable): + value_type = float + entity = Person + label = "Saskatchewan Infirm Dependant Amount for Each Eligible Dependant" + unit = CAD + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6", + "https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15", + ) + defined_for = "sk_infirm_dependant_amount_eligible_person" + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_infirm_dependant_amount + + dependant_income = person("dependant_income", period) + reduced_income = max_(0, p.income_threshold.higher - dependant_income) + + return select( + dependant_income > p.income_threshold.lower, + min_(reduced_income, p.max_amount), + p.max_amount, + ) diff --git a/policyengine_canada/variables/household/income/individual/dependant_income.py b/policyengine_canada/variables/household/income/individual/dependant_income.py new file mode 100644 index 000000000..dc9bb769c --- /dev/null +++ b/policyengine_canada/variables/household/income/individual/dependant_income.py @@ -0,0 +1,22 @@ +from policyengine_canada.model_api import * + + +class dependant_income(Variable): + value_type = float + entity = Person + label = "Dependant Income" + unit = CAD + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk-ws/td1sk-ws-lp-22e.pdf#page=6", + "https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=13 #page=14,15", + ) + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + dependant = person("is_child_of_filer", period) + income = person("individual_net_income", period) + return dependant * income