Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yukon medical expense credit #493

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
.DS_Store
12 changes: 12 additions & 0 deletions policyengine_canada/parameters/gov/provinces/yt/medical/rate.yaml
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
description: Yukon multiplies the net income by the follwoing rate under the medical expense credit.

metadata:
period: year
unit: /1
label: Yukon medical expense credit net income rate
reference:
- 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:
2023-01-01: 0.03
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from policyengine_canada.model_api import *


class yt_medical_expenses(Variable):
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = Person
label = "Yukon medical expenses"
definition_period = YEAR
defined_for = ProvinceCode.YT
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved

def formula(person, period, parameters):
income = person("individual_net_income", period)
p = parameters(period).gov.provinces.yt.medical
rate = p.rate
income_fraction = income * rate
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved
reduction_cap = p.reduction_cap
return min_(income_fraction, reduction_cap)
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved

# reference: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5011-c/5011-c-23e.pdf
# random stuff
ZhiruiLi1 marked this conversation as resolved.
Show resolved Hide resolved

Loading