diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb..b8ef7a44b 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Yukon medical expense credit. diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/max_amount.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/max_amount.yaml new file mode 100644 index 000000000..7d84437a8 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/max_amount.yaml @@ -0,0 +1,11 @@ +description: Yukon allows for the following maximum amount under the medical expense credit. +values: + 2022-01-01: 2_479 +metadata: + unit: currency-CAD + label: Yukon medical expense credit max amount + # Credit is not mentioned in the in Yukon Income Tax Act + reference: + - title: Yukon Tax-Medical Expenses + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=2 + diff --git a/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/rate.yaml b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/rate.yaml new file mode 100644 index 000000000..405e88264 --- /dev/null +++ b/policyengine_canada/parameters/gov/provinces/yt/tax/income/credits/medical_expense/rate.yaml @@ -0,0 +1,10 @@ +description: Yukon multiplies the medical expenses by the following rate under the medical expenses tax credit. +values: + 2022-01-01: 0.03 +metadata: + unit: /1 + label: Yukon Medical Expenses credit applicable rate + # Credit is not mentioned in the in Yukon Income Tax Act + reference: + - title: Yukon Tax-Medical Expenses + href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=2 diff --git a/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_medical_expenses.yaml b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_medical_expenses.yaml new file mode 100644 index 000000000..c3e1cc8e4 --- /dev/null +++ b/policyengine_canada/tests/gov/provinces/yt/tax/income/credits/yt_medical_expenses.yaml @@ -0,0 +1,35 @@ +- name: Zero Medical Expenses of Net Income over Maximum Amount + period: 2022 + input: + province_code: YT + household_medical_expenses: 0 + household_net_income: 10_000_000_000 + output: + yt_medical_expense_credit: 0 + +- name: Zero Medical Expenses of Net Income below Maximum Amount + period: 2022 + input: + province_code: YT + household_medical_expenses: 0 + household_net_income: 100 + output: + yt_medical_expense_credit: 0 + +- name: Medical Expenses of Net Income below Maximum Amount + period: 2022 + input: + province_code: YT + household_medical_expenses: 10_000 + household_net_income: 100 + output: + yt_medical_expense_credit: 9_997 + +- name: Medical Expenses of Net Income over Maximum Amount + period: 2022 + input: + province_code: YT + household_medical_expenses: 4_000 + household_net_income: 10_000_000_000 + output: + yt_medical_expense_credit: 1_521 diff --git a/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_medical_expenses.py b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_medical_expenses.py new file mode 100644 index 000000000..ef89bbac5 --- /dev/null +++ b/policyengine_canada/variables/gov/provinces/yt/tax/income/credits/yt_medical_expenses.py @@ -0,0 +1,26 @@ +from policyengine_canada.model_api import * + + +class yt_medical_expense_credit(Variable): + value_type = float + entity = Household + label = "Yukon Medical Expense Credit" + definition_period = YEAR + defined_for = ProvinceCode.YT + + def formula(household, period, parameters): + p = parameters( + period + ).gov.provinces.yt.tax.income.credits.medical_expense + + claimed_medical_expenses = household( + "household_medical_expenses", period + ) + net_income = household("household_net_income", period) + medical_expenses_rate = p.rate + + applicable_amount = min_( + p.max_amount, net_income * medical_expenses_rate + ) + + return max_(claimed_medical_expenses - applicable_amount, 0) diff --git a/policyengine_canada/variables/household/expenses/medical/household_medical_expenses.py b/policyengine_canada/variables/household/expenses/medical/household_medical_expenses.py new file mode 100644 index 000000000..1c5f1c6cd --- /dev/null +++ b/policyengine_canada/variables/household/expenses/medical/household_medical_expenses.py @@ -0,0 +1,9 @@ +from policyengine_canada.model_api import * + + +class household_medical_expenses(Variable): + value_type = float + entity = Household + label = "Household medical expenses" + unit = CAD + definition_period = YEAR