-
Notifications
You must be signed in to change notification settings - Fork 35
Alberta Caregiver Amount #487
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
Draft
SirMalamute
wants to merge
67
commits into
PolicyEngine:master
Choose a base branch
from
SirMalamute:abcaregiveramount
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
10e6588
Alberta Caregiver Amount
Kenyaokun d8b6879
Alberta Caregiver Amount
Kenyaokun fdd9a60
Alberta Caregiver Amount
Kenyaokun ee7dc1f
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
Kenyaokun 74dbb83
Alberta Caregiver Amount
Kenyaokun 3f6d0d8
Alberta Caregiver Amount
Kenyaokun dc870ec
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
Kenyaokun 9e990a7
Alberta Caregiver Amount
Kenyaokun d59402b
edit changelog
SirMalamute ad37601
added ab_caregiver
SirMalamute 95bf6df
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
SirMalamute 2895c86
spelling
SirMalamute 137dcad
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 961b99c
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 382bc42
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute d13fb57
fixes
SirMalamute 6f292a6
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute 4e4e67a
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute fc30a3b
updated
SirMalamute 85651c5
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute f16f384
added period + removed lower_age_eligibility
SirMalamute 2e425e8
formatting
SirMalamute f3151b4
added lower higher age eligibility
SirMalamute 3d30079
spelling
SirMalamute 4b30602
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 51d4f1c
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 588ac8f
major
SirMalamute 4ccaad0
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute c7bb5bc
formatting
SirMalamute 647275d
rename higher to upper
SirMalamute 4c4fee0
added some legal refs
SirMalamute 5348a36
fixed legal code
SirMalamute de449ae
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 7a72ca1
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute cbd9cec
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute b0200b8
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 6a79dd6
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 5a9215a
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 85438ca
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute 51e09eb
Update policyengine_canada/parameters/gov/provinces/ab/tax/income/cre…
SirMalamute fbe4856
fixed description
SirMalamute 243dfec
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute bfce0be
fixed formatting
SirMalamute 381a502
added to non refundable
SirMalamute beca7f9
minor change
SirMalamute f989cfc
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute da01d88
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 3416a86
fix description
SirMalamute 166e366
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute 0efb17c
split into 2 python files
SirMalamute 79812dd
formatting
SirMalamute 2518072
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 08e6d69
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute d18e080
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 8ef3077
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 54c57b6
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 8da163f
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 5115435
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute bc93764
Update policyengine_canada/variables/gov/provinces/ab/tax/credits_ret…
SirMalamute 42dffa6
added restructuring
SirMalamute 9aef9ff
Merge branch 'abcaregiveramount' of https://github.com/SirMalamute/po…
SirMalamute 2158717
format
SirMalamute cad3f01
name change
SirMalamute c00fc62
minor
SirMalamute 53d6b7e
minor
SirMalamute 72600d4
added unit test
SirMalamute e74f5cb
edited var
SirMalamute File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| - bump: minor | ||
| changes: | ||
| added: | ||
| - Alberta caregiver amount. |
14 changes: 14 additions & 0 deletions
14
.../parameters/gov/provinces/ab/tax/income/credits/credits_return/age_eligibility/lower.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
14 changes: 14 additions & 0 deletions
14
.../parameters/gov/provinces/ab/tax/income/credits/credits_return/age_eligibility/upper.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
15 changes: 15 additions & 0 deletions
15
.../gov/provinces/ab/tax/income/credits/credits_return/lower_dependant_income_threshold.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| 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 | ||
15 changes: 15 additions & 0 deletions
15
...gine_canada/parameters/gov/provinces/ab/tax/income/credits/credits_return/max_amount.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
16 changes: 16 additions & 0 deletions
16
.../gov/provinces/ab/tax/income/credits/credits_return/upper_dependant_income_threshold.yaml
SirMalamute marked this conversation as resolved.
Show resolved
Hide resolved
SirMalamute marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| description: Alberta limits the caregiver amount for dependants above this income threshold. | ||
| 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 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
..._canada/tests/gov/provinces/ab/tax/income/credits/credits_return/ab_caregiver_amount.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
32 changes: 32 additions & 0 deletions
32
...ests/gov/provinces/ab/tax/income/credits/credits_return/ab_caregiver_amount_eligible.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| - 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_eligible: true | ||
|
|
||
| - 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_eligible: true | ||
|
|
||
| - 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_eligible: false |
34 changes: 34 additions & 0 deletions
34
policyengine_canada/variables/gov/provinces/ab/tax/credits_return/ab_caregiver_amount.py
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| 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 = "ab_caregiver_amount_eligible" | ||
|
|
||
| def formula(person, period, parameters): | ||
| p = parameters( | ||
| period | ||
| ).gov.provinces.ab.tax.income.credits.credits_return | ||
|
|
||
| # Whether the person is eligible or not (income based) | ||
|
|
||
| net_income = max_( | ||
| 0, | ||
| p.upper_dependant_income_threshold | ||
| - person("ab_dependant_net_income", period), | ||
| ) | ||
|
|
||
| cohabitating_dependant = person("cohabitating_dependant", period) | ||
|
|
||
| caregiver_amount = ( | ||
| net_income | ||
| * person("ab_caregiver_amount_eligible", period) | ||
| * cohabitating_dependant | ||
| ) | ||
|
|
||
| return min_(caregiver_amount, p.max_amount) |
19 changes: 19 additions & 0 deletions
19
...gine_canada/variables/gov/provinces/ab/tax/credits_return/ab_caregiver_amount_eligible.py
SirMalamute marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class ab_caregiver_amount_eligible(Variable): | ||
SirMalamute marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| value_type = bool | ||
| entity = Person | ||
| label = "Eligible person for the Alberta caregiver amount" | ||
| definition_period = YEAR | ||
| reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf" | ||
| defined_for = ProvinceCode.AB | ||
|
|
||
| def formula(person, period, parameters): | ||
| p = parameters( | ||
| period | ||
| ).gov.provinces.ab.tax.income.credits.credits_return | ||
|
|
||
| dependant_net_income = person("ab_dependant_net_income", period) | ||
|
|
||
| return dependant_net_income <= p.upper_dependant_income_threshold | ||
29 changes: 29 additions & 0 deletions
29
policyengine_canada/variables/gov/provinces/ab/tax/credits_return/ab_dependant_net_income.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| from policyengine_canada.model_api import * | ||
|
|
||
|
|
||
| class ab_dependant_net_income(Variable): | ||
| value_type = float | ||
| entity = Person | ||
| label = "Alberta caregiver amount dependant net income" | ||
| unit = CAD | ||
| definition_period = YEAR | ||
| reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1ab/td1ab-23e.pdf" | ||
| defined_for = ProvinceCode.AB | ||
|
|
||
| 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 = person("is_dependant", period) | ||
| eligible_dependant = (age >= p.age_eligibility.upper) | ( | ||
| age >= p.age_eligibility.lower & disabled | ||
| ) & is_dependant | ||
|
|
||
| income = person("individual_net_income", period) | ||
| dependant_net_income = income * eligible_dependant | ||
|
|
||
| return dependant_net_income |
10 changes: 10 additions & 0 deletions
10
policyengine_canada/variables/household/cohabitating_dependant.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.