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

Alberta Infirm Dependants Credit #491

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Alberta infirm dependant credit.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Alberta provides the infirm dependant amount for filers with dependant at or above this age threshold.

values:
2022-01-01: 18
metadata:
unit: year
label: Alberta infirm dependant amount minimum dependant age
reference:
- title: Alberta 2023 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.#page=1
- title: Alberta 2023 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-23e.pdf#page=1
- title: Alberta 2022 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.#page=1
- title: Alberta 2022 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-22e.pdf#page=1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
description: Alberta provides this maximum amount under the infirm dependant credit.
values:
2023-01-01: 12_158
2022-01-01: 11_212
metadata:
unit: currency-CAD
period: year
label: Alberta infirm dependant credit maximum amount
reference:
- title: Alberta 2023 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.#page=1
- title: Alberta 2023 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-23e.pdf#page=1
- title: Alberta 2022 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.#page=1
- title: Alberta 2022 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-22e.pdf#page=1


Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Alberta provides the infirm dependant amount for filers with income of up to this threshold.
values:
2023-01-01: 20_190
2022-01-01: 18_619
metadata:
unit: currency-CAD
period: year
label: Alberta infirm dependant credit max income
reference:
- title: Alberta 2023 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.#page=1
- title: Alberta 2023 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-23e.pdf#page=1
- title: Alberta 2022 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.#page=1
- title: Alberta 2022 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-22e.pdf#page=1

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Alberta phases the infirm dependant amount out above this dependant income threshold.
values:
2023-01-01: 8_032
2022-01-01: 7_407
metadata:
unit: currency-CAD
period: year
label: Alberta infirm dependant phase out start
reference:
- title: Alberta 2023 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.#page=1
- title: Alberta 2023 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-23e.pdf#page=1
- title: Alberta 2022 personal tax credits return TD1AB
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.#page=1
- title: Alberta 2022 personal tax credits return worksheet TD1AB-WS
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab-ws/td1ab-ws-22e.pdf#page=1

Copy link
Collaborator

Choose a reason for hiding this comment

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

rename to match the variable

Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
- name: Infirm dependant net income below 8_032
period: 2023
input:
people:
p1:
is_infirm_dependant: true
infirm_dependant_income: 8_000
household:
members: p1
province_code: AB
output:
ab_infirm_dependant_credit: 12_158

- name: Infirm dependant net income below 7_407
period: 2022
input:
people:
p1:
is_infirm_dependant: true
infirm_dependant_income: 7_000
household:
members: p1
province_code: AB
output:
ab_infirm_dependant_credit: 11_212

- name: Infirm dependant net income over 8_032 but lower than 20_190
period: 2023
input:
people:
p1:
is_infirm_dependant: true
infirm_dependant_income: 20_000
household:
members: p1
province_code: AB
output:
ab_infirm_dependant_credit: 190


- name: Infirm dependant net income over 8_032 but lower than 20_190
period: 2023
input:
people:
p1:
is_infirm_dependant: true
infirm_dependant_income: 20_000
household:
members: p1
province_code: AB
output:
ab_infirm_dependant_credit: 190

- name: Infirm dependant net income over 20_190
period: 2023
input:
people:
p1:
is_infirm_dependant: true
infirm_dependant_income: 30_190
household:
members: p1
province_code: AB
output:
ab_infirm_dependant_credit: 0


- name: Multiple infirm dependants with high income over than 20_190
period: 2023
input:
people:
p1:
is_infirm_dependant: No
infirm_dependant_income: 0
p2:
is_infirm_dependant: true
infirm_dependant_income: 30_190
p3:
is_infirm_dependant: true
infirm_dependant_income: 30_190
household:
members: [p1, p2, p3]
province_code: AB
output:
ab_infirm_dependant_credit: 0

- name: Multiple infirm dependants with low income less than 8_032
period: 2023
input:
people:
p1:
is_infirm_dependant: No
infirm_dependant_income: 0
p2:
is_infirm_dependant: true
infirm_dependant_income: 800
p3:
is_infirm_dependant: true
infirm_dependant_income: 300
household:
members: [p1, p2, p3]
province_code: AB
output:
ab_infirm_dependant_credit: 24_316

- name: Multiple infirm dependants with high income and low income
period: 2023
input:
people:
p1:
is_infirm_dependant: No
infirm_dependant_income: 0
p2:
is_infirm_dependant: true
infirm_dependant_income: 20_000
p3:
is_infirm_dependant: true
infirm_dependant_income: 800
household:
members: [p1, p2, p3]
province_code: AB
output:
ab_infirm_dependant_credit: 12_348
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from policyengine_canada.model_api import *


class ab_infirm_dependant_credit(Variable):
value_type = float
entity = Household
label = "Alberta infirm dependant credit"
definition_period = YEAR
defined_for = ProvinceCode.AB

def formula(household, period, parameters):
person = household.members
p = parameters(
period
).gov.provinces.ab.tax.income.credits.infirm_dependant

eligible = person("is_infirm_dependant", period)

infirm_dependant_income = person("infirm_dependant_income", period)

income_level_condition = infirm_dependant_income > p.phase_out_start

max_credit = eligible * p.base

reduced_threshold = max_(
0, p.income_threshold - infirm_dependant_income
)

partial_credit = eligible * reduced_threshold

capped_credit = where(
income_level_condition,
partial_credit,
max_credit,
)
return household.sum(capped_credit)
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from policyengine_canada.model_api import *


class infirm_dependant_income(Variable):
value_type = float
entity = Person
label = "Infirm dependant income"
definition_period = YEAR

def formula(person, period, parameters):
infirm_dependant = person("is_infirm_dependant", period)
income = person("individual_net_income", period)
return infirm_dependant * income
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_canada.model_api import *


class is_infirm_dependant(Variable):
value_type = bool
entity = Person
label = "Is an infirm dependant"
definition_period = YEAR

# Impute dependant status on age.
def formula(person, period, parameters):
p = parameters(
period
).gov.provinces.ab.tax.income.credits.infirm_dependant
return person("age", period) >= p.age_threshold
Loading