diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..4ef0fa71f 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Manitoba spouse and common-law partner amount. diff --git a/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/spouse_or_common_law_partner_amount/base_amount.yaml b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/spouse_or_common_law_partner_amount/base_amount.yaml new file mode 100644 index 000000000..18c5cdcf8 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/mb/tax/income/credits/spouse_or_common_law_partner_amount/base_amount.yaml @@ -0,0 +1,10 @@ +description: Manitoba provides this spouse and common-law partner amount, which is equivalent to the spouses basic personal amount. +values: + 2023-01-01: 9_134 +metadata: + unit: currency-CAD + period: year + label: Manitoba spouse and commonlaw partner amount credit. + reference: + - title: Government of Canada - Manitoba spouse and commonlaw partner amount credit + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1mb/td1mb-23e.pdf#page=1 diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_amount.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_amount.yaml new file mode 100644 index 000000000..bc98e0fa7 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_credit_amount.yaml @@ -0,0 +1,19 @@ +- name: Eligible spouse with household's head not taking care of her + period: 2023 + input: + province_code: MB + spouse_income: 5_000 + is_caregiver: false + mb_spouse_eligibility: true + output: + mb_spouse_credit_amount: 0 + +- name: Eligible spouse with household's head taking care of her + period: 2023 + input: + province_code: MB + spouse_income: 5_000 + is_caregiver: true + mb_spouse_eligibility: true + output: + mb_spouse_credit_amount: 4_134 diff --git a/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_eligible.yaml b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_eligible.yaml new file mode 100644 index 000000000..5a26f83a1 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/mb_spouse_eligible.yaml @@ -0,0 +1,29 @@ +- name: Spouse not living with household's head + period: 2023 + input: + province_code: MB + is_spouse: true + lived_together: false + spouse_income: 5_000 + output: + mb_spouse_eligibility: false + +- name: Spouse does not have eligible income and lived with household's head + period: 2023 + input: + province_code: MB + is_spouse: true + lived_together: true + spouse_income: 10_000 + output: + mb_spouse_eligibility: false + +- name: Spouse has eligible income and lived with household's head + period: 2023 + input: + province_code: MB + is_spouse: true + lived_together: true + spouse_income: 5_000 + output: + mb_spouse_eligibility: true diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_and_common_law_tax_amount.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_and_common_law_tax_amount.py new file mode 100644 index 000000000..1d77f00d2 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_and_common_law_tax_amount.py @@ -0,0 +1,27 @@ +from policyengine_canada.model_api import * + + +class mb_spouse_credit_amount(Variable): + value_type = float + entity = Person + label = "Manitoba spouse and commonlaw partner net income" + definition_period = YEAR + defined_for = ProvinceCode.MB + + def formula(person, period, parameters): + + p = parameters( + period + ).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount + + caregiver = person("is_caregiver", period) + + spouse_income = person("spouse_income", period) + + spouse_credit_amount = ( + caregiver + * person("mb_spouse_eligibility", period) + * (p.base_amount - spouse_income) + ) + + return spouse_credit_amount diff --git a/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_income_eligibility.py b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_income_eligibility.py new file mode 100644 index 000000000..6c6265dd8 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/mb/tax/income/credits/spouse_and_common_law_partner_amount/spouse_income_eligibility.py @@ -0,0 +1,24 @@ +from policyengine_canada.model_api import * + + +class mb_spouse_eligibility(Variable): + value_type = bool + entity = Person + label = "Manitoba spouse and commonlaw partner eligibility" + definition_period = YEAR + defined_for = ProvinceCode.MB + + def formula(person, period, parameters): + p = parameters( + period + ).gov.provinces.mb.tax.income.credits.spouse_or_common_law_partner_amount + + spouse = person("is_spouse", period) + living_together = person("lived_together", period) + spouse_income_eligible = ( + person("spouse_income", period) < p.base_amount + ) + + spouse_eligibility = spouse & living_together & spouse_income_eligible + + return spouse_eligibility diff --git a/policyengine_canada/variables/household/person/is_caregiver.py b/policyengine_canada/variables/household/person/is_caregiver.py new file mode 100644 index 000000000..5e348a8bc --- /dev/null +++ b/policyengine_canada/variables/household/person/is_caregiver.py @@ -0,0 +1,8 @@ +from policyengine_canada.model_api import * + + +class is_caregiver(Variable): + value_type = bool + entity = Person + label = "Is the caregiver" + definition_period = YEAR diff --git a/policyengine_canada/variables/household/person/lived_together.py b/policyengine_canada/variables/household/person/lived_together.py new file mode 100644 index 000000000..374fdfd45 --- /dev/null +++ b/policyengine_canada/variables/household/person/lived_together.py @@ -0,0 +1,9 @@ +from policyengine_canada.model_api import * + + +class lived_together(Variable): + value_type = bool + entity = Person + label = "Lived together with the tax filer" + unit = CAD + definition_period = YEAR