Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ docs/_build/
**/*.ipynb_checkpoints/
**/*.h5
**/iframe_figures/
.DS_Store
Comment thread
ZhiruiLi1 marked this conversation as resolved.
.DS_Store
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a changelog_entry

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changelog_entry.yaml
changelog.yaml

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Yukon multiplies the net income by the following rate under the medical expense credit.

metadata:
period: year
unit: /1
label: Yukon medical expense credit net income rate
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Outdated
reference:
- title: Yukon 2022 non-refundable tax credits medical expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-22e.pdf#page=2
- title: Yukon 2023 non-refundable tax credits medical expenses
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-23e.pdf#page=2

values:
2022-01-01: 0.03
2023-01-01: 0.03

Comment thread
ZhiruiLi1 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from policyengine_canada.model_api import *


class yt_medical_expense_credit(Variable):
value_type = float
entity = Person
label = "Yukon medical expenses"
definition_period = YEAR
defined_for = ProvinceCode.YT
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-23e.pdf"
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Outdated

def formula(person, period, parameters):
income = person("individual_net_income", period)
Comment thread
ZhiruiLi1 marked this conversation as resolved.
p = parameters(period).gov.provinces.yt.medical
rate = p.rate
income_fraction = income * p.rate
reduction_cap = p.reduction_cap
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Outdated
return min_(income_fraction, p.reduction_cap)
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
- name: Yukon medical expense credit net income below reduction cap 2022
period: 2022
input:
people:
p1:
individual_net_income: 10_000
household:
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Outdated
members: p1
Comment thread
ZhiruiLi1 marked this conversation as resolved.
Outdated
province_code: YT
output:
yt_medical_expense_credit: 300 # 10_000 * 0.03

- name: Yukon medical expense credit zero net income 2022
period: 2022
input:
people:
p1:
individual_net_income: 0
household:
members: p1
province_code: YT
output:
yt_medical_expense_credit: 0

- name: Yukon medical expense credit net income below reduction cap 2023
period: 2023
input:
people:
p1:
individual_net_income: 20_000
household:
members: p1
province_code: YT
output:
yt_medical_expense_credit: 600 # 20_000 * 0.03