diff --git a/CHANGELOG.md b/CHANGELOG.md index d74690035..9f1ffd3f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,38 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.80.2] - 2023-08-21 20:36:42 + +## [0.80.1] - 2023-08-21 20:22:09 + +### Fixed + +- Manitoba BPA parameter folder structure. + +## [0.80.0] - 2023-08-20 20:37:37 + +### Added + +- Yukon Employment Amount. + +## [0.79.0] - 2023-08-18 04:11:47 + +### Added + +- Saskatchewan age amount tax credit. + +## [0.78.0] - 2023-08-18 03:53:19 + +### Added + +- Saskatchewan Senior Supplementary amount Tax Credit. + +## [0.77.0] - 2023-08-18 03:48:59 + +### Added + +- Saskatchewan disability amount. + ## [0.76.0] - 2023-08-11 04:31:59 ### Added @@ -588,6 +620,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +[0.80.2]: https://github.com/PolicyEngine/policyengine-canada/compare/0.80.1...0.80.2 +[0.80.1]: https://github.com/PolicyEngine/policyengine-canada/compare/0.80.0...0.80.1 +[0.80.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.79.0...0.80.0 +[0.79.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.78.0...0.79.0 +[0.78.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.77.0...0.78.0 +[0.77.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.76.0...0.77.0 [0.76.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.75.0...0.76.0 [0.75.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.74.0...0.75.0 [0.74.0]: https://github.com/PolicyEngine/policyengine-canada/compare/0.73.0...0.74.0 diff --git a/changelog.yaml b/changelog.yaml index 56267c24d..00e0276f2 100644 --- a/changelog.yaml +++ b/changelog.yaml @@ -481,3 +481,33 @@ added: - Alberta age credit. date: 2023-08-11 04:31:59 +- bump: minor + changes: + added: + - Saskatchewan disability amount. + date: 2023-08-18 03:48:59 +- bump: minor + changes: + added: + - Saskatchewan Senior Supplementary amount Tax Credit. + date: 2023-08-18 03:53:19 +- bump: minor + changes: + added: + - Saskatchewan age amount tax credit. + date: 2023-08-18 04:11:47 +- bump: minor + changes: + added: + - Yukon Employment Amount. + date: 2023-08-20 20:37:37 +- bump: patch + changes: + fixed: + - Manitoba BPA parameter folder structure. + date: 2023-08-21 20:22:09 +- bump: patch + changes: + fixes: + - Canada Basic Personal Amount Supplement label. + date: 2023-08-21 20:36:42 diff --git a/policyengine_canada/parameters/gov/provinces/mb/credits/basic_personal_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/basic_personal_amount.yaml similarity index 100% rename from policyengine_canada/parameters/gov/provinces/mb/credits/basic_personal_amount.yaml rename to policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/basic_personal_amount.yaml diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml new file mode 100644 index 000000000..ad6a6dd01 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/age_eligibility.yaml @@ -0,0 +1,16 @@ +description: Saskatchewan provides the age amount credit for filers at or above this age threshold. +values: + 2021-01-01: 65 + +metadata: + unit: year + label: Saskatchewan age amount credit age eligibility + reference: + - title: 2021 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1 + - title: 2022 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml new file mode 100644 index 000000000..e83521a43 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/max_amount.yaml @@ -0,0 +1,18 @@ +description: Saskatchewan provides this maximum age amount credit. +values: + 2021-01-01: 4_942 + 2022-01-01: 5_061 + 2023-01-01: 5_380 + +metadata: + unit: currency-CAD + label: Saskatchewan age amount credit max amount + reference: + - title: 2021 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.pdf#page=1 + - title: 2022 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + - title: 2023 Saskatchewan Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml new file mode 100644 index 000000000..ba8683ef2 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/age_amount/reduction/rate.yaml @@ -0,0 +1,28 @@ +description: Saskatchewan reduces the age amount tax credit at this rate based on the income. + +metadata: + type: marginal_rate + threshold_unit: currency-CAD + rate_unit: /1 + label: Saskatchewan age amount credit reduction rate + reference: + - title: Worksheet for the 2021 Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1 + - title: Worksheet for the 2022 Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1 + - title: Worksheet for the 2023 Personal Tax Credit Return + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1 + - title: The Income Tax Act, 2000 DIVISION 2 Section 17, Age Credit 17(1) + href: https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15 + +brackets: + - threshold: + 2021-01-01: 0 + rate: + 2021-01-01: 0 + - threshold: + 2021-01-01: 36_794 + 2022-01-01: 37_677 + 2023-01-01: 40_051 + rate: + 2021-01-01: 0.15 diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml new file mode 100644 index 000000000..b01e17fe8 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/disability_amount/amount.yaml @@ -0,0 +1,15 @@ +description: Saskatchewan provides this amount for qualified disabled filers under the disability amount. +values: + 2022-01-01: 9_789 + 2023-01-01: 10_405 +metadata: + unit: currency-CAD + label: Saskatchewan disability amount + reference: + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 5 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Page 25, Mental or physical impairment credit (23), (1) + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=25&26 + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 5 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml new file mode 100644 index 000000000..a4e49fa75 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/age_threshold.yaml @@ -0,0 +1,14 @@ +description: Saskatchewan provides the senior supplementary amount for filers this age or older. +values: + 2022-01-01: 65 +metadata: + unit: year + label: Saskatchewan senior supplementary tax credit age threshold + reference: + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Senior supplementary credit + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=24 + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 + diff --git a/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml new file mode 100644 index 000000000..0da5ed3fc --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/amount.yaml @@ -0,0 +1,14 @@ +description: Saskatchewan provides this senior supplementary amount. +values: + 2022-01-01: 1_336 + 2023-01-01: 1_421 +metadata: + unit: currency-CAD + label: Saskatchewan Senior Supplementary tax credit amount + reference: + - title: 2023 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-23e.pdf#page=1 + - title: Saskatchewan I2-01 The Income Tax Act, 2000, Senior supplementary credit + href: https://pubsaskdev.blob.core.windows.net/pubsask-prod/806/I2-01.pdf#page=24 + - title: 2022 Saskatchewan TD1SK Personal Tax Credits Return, line 3 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-22e.pdf#page=1 diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml new file mode 100644 index 000000000..dbbd52b46 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/employment_amount/amount.yaml @@ -0,0 +1,12 @@ +description: Yukon provides this employment amount. +values: + 2022-01-01: 1_287 +metadata: + unit: currency-CAD + label: Yukon employment amount + reference: + - title: Yukon Tax Form YT428 - Line 58310 + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=1 + # Credit is not mentioned in the Yukon income tax act + - title: Government of Canada - Yukon Information Guide + href: https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml new file mode 100644 index 000000000..5a17ffcd7 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.yaml @@ -0,0 +1,117 @@ +- name: Ineligible + period: 2021 + input: + province_code: SK + sk_age_amount_eligible: false + individual_net_income: 20_000 + output: + sk_age_amount: 0 + + +- name: Eligible and net income below base amount + period: 2021 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 35_000 + output: + sk_age_amount: 4_942 + + +- name: Eligible and net income between base net income amount and maximum net income amount # 4_942 - ((60_000 - 36_794) * 0.15) + period: 2021 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 60_000 + output: + sk_age_amount: 1_461.1 + + +- name: Eligible over maximum net income amount + period: 2021 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 100_000 + output: + sk_age_amount: 0 + +- name: Ineligible + period: 2022 + input: + province_code: SK + sk_age_amount_eligible: false + individual_net_income: 20_000 + output: + sk_age_amount: 0 + + +- name: Eligible and net income below base amount + period: 2022 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 35_000 + output: + sk_age_amount: 5_061 + + +- name: Eligible and net income between base net income amount and maximum net income amount # 5_061 - ((60_000 - 37_677) * 0.15) + period: 2022 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 60_000 + output: + sk_age_amount: 1_712.55 + + +- name: Eligible over maximum net income amount + period: 2022 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 100_000 + output: + sk_age_amount: 0 + + +- name: Ineligible + period: 2023 + input: + province_code: SK + sk_age_amount_eligible: false + individual_net_income: 20_000 + output: + sk_age_amount: 0 + + +- name: Eligible and net income below base amount + period: 2023 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 40_000 + output: + sk_age_amount: 5_380 + + +- name: Eligible and net income between base net income amount and maximum net income amount # 5_380 - ((60_000 - 40_051) * 0.15) + period: 2023 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 60_000 + output: + sk_age_amount: 2_387.65 + + +- name: Eligible over maximum net income amount + period: 2023 + input: + province_code: SK + sk_age_amount_eligible: true + individual_net_income: 100_000 + output: + sk_age_amount: 0 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml new file mode 100644 index 000000000..d96fca067 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.yaml @@ -0,0 +1,52 @@ +- name: Ineligible Age + period: 2021 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible: false + + +- name: Eligible Age + period: 2021 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible: true + + +- name: Ineligible Age + period: 2022 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible: false + + +- name: Eligible Age + period: 2022 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible: true + + +- name: Ineligible Age + period: 2023 + input: + province_code: SK + age: 64 + output: + sk_age_amount_eligible: false + + +- name: Eligible Age + period: 2023 + input: + province_code: SK + age: 70 + output: + sk_age_amount_eligible: true diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml new file mode 100644 index 000000000..c58e69692 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_disability_amount.yaml @@ -0,0 +1,23 @@ +- name: Head and disabled + period: 2023 + input: + province_code: SK + is_disabled: true + output: + sk_disability_amount: 10_405 + +- name: Head, not disabled + period: 2024 + input: + province_code: SK + is_disabled: false + output: + sk_disability_amount: 0 + +- name: Head and disabled 2022 + period: 2022 + input: + province_code: SK + is_disabled: true + output: + sk_disability_amount: 9_789 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml new file mode 100644 index 000000000..bed2d1879 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_credit.yaml @@ -0,0 +1,31 @@ +- name: 2024 SK senior supplementary tax credit - non eligible + period: 2024 + input: + province_code: SK + sk_senior_supplementary_credit_eligible: false + output: + sk_senior_supplementary_credit: 0 + +- name: 2023 SK senior supplementary tax credit - eligible + period: 2023 + input: + province_code: SK + sk_senior_supplementary_credit_eligible: true + output: + sk_senior_supplementary_credit: 1_421 + +- name: 2024 SK senior supplementary tax credit - eligible + period: 2024 + input: + province_code: SK + sk_senior_supplementary_credit_eligible: true + output: + sk_senior_supplementary_credit: 1_421 + +- name: 2022 SK senior supplementary tax credit - eligible + period: 2022 + input: + province_code: SK + sk_senior_supplementary_credit_eligible: true + output: + sk_senior_supplementary_credit: 1_336 diff --git a/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml new file mode 100644 index 000000000..8a5612a3c --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/sk/tax/income/credits/sk_senior_supplementary/sk_senior_supplementary_eligible.yaml @@ -0,0 +1,23 @@ +- name: SK senior supplementary tax credit - Under age threshold + period: 2024 + input: + province_code: SK + age: 64 + output: + sk_senior_supplementary_credit_eligible: false + +- name: SK senior supplementary tax credit - At age threshold + period: 2023 + input: + province_code: SK + age: 65 + output: + sk_senior_supplementary_credit_eligible: true + +- name: SK senior supplementary tax credit - Above age threshold + period: 2024 + input: + province_code: SK + age: 68 + output: + sk_senior_supplementary_credit_eligible: true diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml new file mode 100644 index 000000000..0e0d46c31 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/benefits/yt_employment_amount/yt_employment_amount.yaml @@ -0,0 +1,24 @@ +- name: tax return with maximum amount + period: 2022 + input: + province_code: YT + canada_employment_amount: 30_000 + output: + yt_employment_amount: 1_287 + +- name: tax return with no income + period: 2022 + input: + province_code: YT + canada_employment_amount: 0 + output: + yt_employment_amount: 0 + +- name: tax return with income under maximum amount + period: 2022 + input: + province_code: YT + canada_employment_amount: 1_000 + output: + yt_employment_amount: 1_000 + diff --git a/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py b/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py index 6ae50beb1..90808f107 100644 --- a/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py +++ b/policyengine_canada/variables/gov/cra/tax/income/credits/basic_personal_amount/basic_personal_amount_supplement.py @@ -4,7 +4,7 @@ class basic_personal_amount_supplement(Variable): value_type = float entity = Person - label = "Basic Personal Amount" + label = "Basic Personal Amount Supplement" unit = CAD definition_period = YEAR diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py index 9c69c9ef9..bd3e6a57e 100644 --- a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/mb_basic_personal_amount.py @@ -11,5 +11,5 @@ class mb_basic_personal_amount(Variable): defined_for = ProvinceCode.MB def formula(person, period, parameters): - p = parameters(period).gov.provinces.mb.credits + p = parameters(period).gov.provinces.mb.tax.income.credits return p.basic_personal_amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py new file mode 100644 index 000000000..f66962d69 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount.py @@ -0,0 +1,25 @@ +from policyengine_canada.model_api import * + + +class sk_age_amount(Variable): + value_type = float + entity = Person + label = "Saskatchewan age amount credit" + unit = CAD + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.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/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1", + "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15", + ) + defined_for = "sk_age_amount_eligible" + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount + income = person("individual_net_income", period) + reduction = p.reduction.rate.calc(income) + return max_(p.max_amount - reduction, 0) diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py new file mode 100644 index 000000000..8a743fe96 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/age_amount/sk_age_amount_eligible.py @@ -0,0 +1,24 @@ +from policyengine_canada.model_api import * + + +class sk_age_amount_eligible(Variable): + value_type = bool + entity = Person + label = "Saskatchewan age amount eligibility" + unit = CAD + definition_period = YEAR + reference = ( + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1sk/td1sk-21e.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/td1sk-23e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-21e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-22e.pdf#page=1", + "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1-ws/td1-ws-23e.pdf#page=1", + "https://publications.saskatchewan.ca/api/v1/products/583/formats/806/download#page=15", + ) + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters(period).gov.provinces.sk.tax.income.credits.age_amount + age = person("age", period) + return age >= p.age_eligibility diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py new file mode 100644 index 000000000..196c5429f --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/disability_amount/sk_disability_amount.py @@ -0,0 +1,17 @@ +from policyengine_canada.model_api import * + + +class sk_disability_amount(Variable): + value_type = float + entity = Person + unit = CAD + label = "Saskatchewan disability amount tax credit" + definition_period = YEAR + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.disability_amount + disabled = person("is_disabled", period) + return disabled * p.amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py new file mode 100644 index 000000000..3115f73dc --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit.py @@ -0,0 +1,17 @@ +from policyengine_canada.model_api import * + + +class sk_senior_supplementary_credit(Variable): + value_type = float + unit = CAD + entity = Person + label = "Sasktachewan senior supplementary tax credit" + definition_period = YEAR + defined_for = "sk_senior_supplementary_credit_eligible" + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary + eligibility = person("sk_senior_supplementary_credit_eligible", period) + return eligibility * p.amount diff --git a/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py new file mode 100644 index 000000000..862148040 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/sk/tax/income/credits/sk_senior_supplementary_credit/sk_senior_supplementary_credit_eligible.py @@ -0,0 +1,16 @@ +from policyengine_canada.model_api import * + + +class sk_senior_supplementary_credit_eligible(Variable): + value_type = bool + entity = Person + label = "Sasktachewan senior supplementary tax credit eligibility" + definition_period = YEAR + defined_for = ProvinceCode.SK + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.sk.tax.income.credits.sk_senior_supplementary + age = person("age", period) + return age >= p.age_threshold diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py new file mode 100644 index 000000000..c87dbddab --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_employment_amount.py @@ -0,0 +1,18 @@ +from policyengine_canada.model_api import * + + +class yt_employment_amount(Variable): + value_type = float + entity = Person + label = "Yukon Employment Amount" + unit = CAD + definition_period = YEAR + defined_for = ProvinceCode.YT + reference = "https://www.canada.ca/en/revenue-agency/services/forms-publications/tax-packages-years/general-income-tax-benefit-package/yukon/5011-pc/information-residents-yukon.html#P4_58310" + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.yt.tax.income.credits.employment_amount + canada_employment_amount = person("canada_employment_amount", period) + return min_(canada_employment_amount, p.amount) diff --git a/setup.py b/setup.py index 42bfff573..4214dfc91 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ setup( name="policyengine-canada", - version="0.76.0", + version="0.80.2", author="PolicyEngine", author_email="hello@policyengine.org", classifiers=[