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 Caregiver Amount #487

Draft
wants to merge 67 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
10e6588
Alberta Caregiver Amount
Kenyaokun Jun 8, 2023
d8b6879
Alberta Caregiver Amount
Kenyaokun Jun 9, 2023
fdd9a60
Alberta Caregiver Amount
Kenyaokun Jun 14, 2023
ee7dc1f
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
Kenyaokun Jul 4, 2023
74dbb83
Alberta Caregiver Amount
Kenyaokun Jul 4, 2023
3f6d0d8
Alberta Caregiver Amount
Kenyaokun Jul 4, 2023
dc870ec
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
Kenyaokun Jul 25, 2023
9e990a7
Alberta Caregiver Amount
Kenyaokun Jul 25, 2023
d59402b
edit changelog
SirMalamute Apr 28, 2024
ad37601
added ab_caregiver
SirMalamute Apr 29, 2024
95bf6df
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
SirMalamute Apr 29, 2024
2895c86
spelling
SirMalamute Apr 29, 2024
137dcad
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 6, 2024
961b99c
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 6, 2024
382bc42
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 6, 2024
d13fb57
fixes
SirMalamute May 6, 2024
6f292a6
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute May 6, 2024
4e4e67a
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute May 11, 2024
fc30a3b
updated
SirMalamute May 11, 2024
85651c5
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute May 11, 2024
f16f384
added period + removed lower_age_eligibility
SirMalamute May 11, 2024
2e425e8
formatting
SirMalamute May 11, 2024
f3151b4
added lower higher age eligibility
SirMalamute May 11, 2024
3d30079
spelling
SirMalamute May 11, 2024
4b30602
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute May 15, 2024
51d4f1c
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute May 15, 2024
588ac8f
major
SirMalamute May 15, 2024
4ccaad0
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute May 15, 2024
c7bb5bc
formatting
SirMalamute May 15, 2024
647275d
rename higher to upper
SirMalamute May 20, 2024
4c4fee0
added some legal refs
SirMalamute May 20, 2024
5348a36
fixed legal code
SirMalamute May 20, 2024
de449ae
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
7a72ca1
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
cbd9cec
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute May 27, 2024
b0200b8
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute May 27, 2024
6a79dd6
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
5a9215a
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
85438ca
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
51e09eb
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute May 27, 2024
fbe4856
fixed description
SirMalamute May 27, 2024
243dfec
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute May 27, 2024
bfce0be
fixed formatting
SirMalamute May 27, 2024
381a502
added to non refundable
SirMalamute May 27, 2024
beca7f9
minor change
SirMalamute May 31, 2024
f989cfc
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jun 3, 2024
da01d88
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jun 3, 2024
3416a86
fix description
SirMalamute Jun 9, 2024
166e366
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute Jun 9, 2024
0efb17c
split into 2 python files
SirMalamute Jun 10, 2024
79812dd
formatting
SirMalamute Jun 10, 2024
2518072
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
08e6d69
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
d18e080
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
8ef3077
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
54c57b6
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
8da163f
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
5115435
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
bc93764
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute Jul 1, 2024
42dffa6
added restructuring
SirMalamute Jul 1, 2024
9aef9ff
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute Jul 1, 2024
2158717
format
SirMalamute Jul 1, 2024
cad3f01
name change
SirMalamute Jul 1, 2024
c00fc62
minor
SirMalamute Jul 1, 2024
53d6b7e
minor
SirMalamute Jul 1, 2024
72600d4
added unit test
SirMalamute Jul 1, 2024
e74f5cb
edited var
SirMalamute Jul 1, 2024
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 caregiver amount.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Alberta limits its caregiver amount to disabled adult dependants above this age.
values:
2022-01-01: 18
metadata:
unit: year
period: year
label: Alberta caregiver credit adult dependant lower age eligibility
reference:
- title: Province of Alberta - Alberta Child and Family Benefit (2022)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.pdf#page=1
- title: Province of Alberta - Alberta Child and Family Benefit (2023)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1
- title: Province of Alberta - Alberta Personal Income Tax Act, RSA 2000, Division 3 (b) (ii) (D)
href: https://www.canlii.org/en/ab/laws/stat/rsa-2000-c-a-30/latest/rsa-2000-c-a-30.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Alberta limits its caregiver amount to non-disabled adult dependants above this age.
values:
2022-01-01: 65
metadata:
unit: year
period: year
label: Alberta caregiver credit adult dependant higher age eligibility
reference:
- title: Province of Alberta - Alberta Child and Family Benefit (2022)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.pdf#page=1
- title: Province of Alberta - Alberta Child and Family Benefit (2023)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1
- title: Province of Alberta - Alberta Personal Income Tax Act, RSA 2000, Division 3 (c)
href: https://www.canlii.org/en/ab/laws/stat/rsa-2000-c-a-30/latest/rsa-2000-c-a-30.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Alberta limits the caregiver amount to dependants with income below this threshold.
values:
2022-01-01: 17_826
2023-01-01: 19_331
metadata:
unit: currency-CAD
period: year
label: Alberta caregiver amount dependent lower income threshold
reference:
- title: Government of Canada - Alberta Caregiver Amount (2022)
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.pdf#page=1
- title: Government of Canada - Alberta Caregiver Amount (2023)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1
- title: Province of Alberta - Alberta Personal Income Tax Act, RSA 2000, Division 3 (b) (iv)
href: https://www.canlii.org/en/ab/laws/stat/rsa-2000-c-a-30/latest/rsa-2000-c-a-30.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Alberta provides the following maximum caregiver amount.
values:
2022-01-01: 11_212
2023-01-01: 12_158
metadata:
unit: currency-CAD
period: year
label: Alberta caregiver amount max amount
reference:
- title: Government of Canada - Alberta Caregiver Amount (2022)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.pdf#page=1
- title: Government of Canada - Alberta Caregiver Amount (2023)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1
- title: Province of Alberta - Alberta Personal Income Tax Act, RSA 2000, Division 3 (c)
href: https://www.canlii.org/en/ab/laws/stat/rsa-2000-c-a-30/latest/rsa-2000-c-a-30.html
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
description: Alberta caregiver amount phases out for dependants above this income threshold.
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
values:
2022-01-01: 29_038
2023-01-01: 31_489
metadata:
unit: currency-CAD
period: year
label: Alberta caregiver amount upper dependant income threshold
reference:
- title: Government of Canada - Alberta Caregiver Amount (2022)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-22e.pdf#page=1
- title: Government of Canada - Alberta Caregiver Amount (2023)
href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1
- title: Province of Alberta - Alberta Personal Income Tax Act, RSA 2000, Division 3 (d) (iii)
href: https://www.canlii.org/en/ab/laws/stat/rsa-2000-c-a-30/latest/rsa-2000-c-a-30.html

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ values:
- ab_pension_credit
- ab_spouse_and_common_law_partner_amount_credit
- ab_basic_personal_amount
- ab_caregiver_amount

metadata:
unit: list
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
- name: Dependant Over 18 with net income between 19,331 and 31,489
period: 2023
input:
age: 19
is_disabled: true
cohabitating_dependant: true
individual_net_income: 20_000
province_code: AB
output:
ab_caregiver_amount: 11_489

- name: Dependant Over 18 with net income below 19,331
period: 2023
input:
age: 19
is_disabled: true
cohabitating_dependant: true
individual_net_income: 10_000
province_code: AB
output:
ab_caregiver_amount: 12_158

- name: Dependant Over 65 with net income below 19,331
period: 2023
input:
age: 66
cohabitating_dependant: true
individual_net_income: 10_000
province_code: AB
output:
ab_caregiver_amount: 12_158

- name: Dependant Over 65 with net income between 19,331 and 31,489
period: 2023
input:
age: 67
cohabitating_dependant: true
individual_net_income: 20_000
province_code: AB
output:
ab_caregiver_amount: 11_489

- name: Dependant Over 65 with net income over 31,489
period: 2023
input:
age: 25
is_disabled: true
cohabitating_dependant: false
individual_net_income: 40_000
province_code: AB
output:
ab_caregiver_amount: 0
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
from policyengine_canada.model_api import *


class ab_caregiver_amount(Variable):
value_type = float
entity = Person
label = "Alberta caregiver amount"
unit = CAD
definition_period = YEAR
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf"
defined_for = ProvinceCode.AB
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved

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

# Whether the person is dependant (65 or older/ disabled)
age = person("age", period)
disabled = person("is_disabled", period)
is_dependant = (age >= p.age_eligibility.upper) | (
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved
age >= p.age_eligibility.lower & disabled
)
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved

income = person("individual_net_income", period)
dependant_net_income = income * is_dependant
SirMalamute marked this conversation as resolved.
Show resolved Hide resolved

income_eligibility = (
dependant_net_income <= p.upper_dependant_income_threshold
)

net_income = max_(
0, p.upper_dependant_income_threshold - dependant_net_income
)

cohabitating_dependant = person("cohabitating_dependant", period)

caregiver_amount = (
net_income * income_eligibility * cohabitating_dependant
)

return min_(caregiver_amount, p.max_amount)
10 changes: 10 additions & 0 deletions policyengine_canada/variables/household/cohabitating_dependant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from policyengine_canada.model_api import *


class cohabitating_dependant(Variable):
value_type = bool
entity = Person
label = "Dependant living with the head of household"
documentation = "Whether your spouse's or common-law partner's dependant lives with you or not."
definition_period = YEAR
reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf#page=1"
Loading