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

Saver's Credit #4015

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
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:
- Retirement Savings Contributions Credit (Saver’s Credit)
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: Taxpayers over following age are eligible for the saver's credit.
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
values:
2019-01-01: 18
metadata:
unit: year
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
name: saver's credit age
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
label: Retirement Savings Contributions Credit (Saver’s Credit) age
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: the maximum contribution amount that may qualify for the credit is this amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
values:
2019-01-01: 2_000
metadata:
unit: currency-USD
period: year
label: qualified contribution cap amount
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to make some adjustments:
Create 2 match files
head of household (75%)
other (50%)

break the joint.yaml into 3 threshold and 3 rate files
upper
middle
lower

in the calculation when checking which rate is applied we will need to decrease the threshold based on filing status, if not joint

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
description: head of household saver's credit threshold and rate
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
metadata:
threshold_unit: currency_USD
amount_unit: /1
threshold_period: year
type: single_amount
label: head of household saver's credit rate
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
brackets:
- threshold:
2019-01-01: 0
amount:
2019-01-01: 0.5
- threshold:
2019-01-01: 28_876
2020-01-01: 29_251
2021-01-01: 29_626
2022-01-01: 20_501
2023-01-01: 32_626
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
amount:
2019-01-01: 0.2
- threshold:
2019-01-01: 31_126
2020-01-01: 31_876
2021-01-01: 32_251
2022-01-01: 22_001
2023-01-01: 35_626
amount:
2019-01-01: 0.1
- threshold:
2019-01-01: 48_001
2020-01-01: 48_751
2021-01-01: 49_501
2022-01-01: 34_001
2023-01-01: 54_751
amount:
2019-01-01: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
description: joint saver's threshold and rate
metadata:
threshold_unit: currency_USD
amount_unit: /1
threshold_period: year
type: single_amount
label: joint saver's credit rate
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
brackets:
- threshold:
2019-01-01: 0
amount:
2019-01-01: 0.5
- threshold:
2019-01-01: 38_501
2020-01-01: 39_001
2021-01-01: 39_501
2022-01-01: 41_001
2023-01-01: 43_501
amount:
2019-01-01: 0.2
- threshold:
2019-01-01: 41_501
2020-01-01: 42_501
2021-01-01: 43_001
2022-01-01: 44_001
2023-01-01: 47_501
amount:
2019-01-01: 0.1
- threshold:
2019-01-01: 64_001
2020-01-01: 65_001
2021-01-01: 66_001
2022-01-01: 68_001
2023-01-01: 73_001
amount:
2019-01-01: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
description: separate saver's threshold and rate
metadata:
threshold_unit: currency_USD
amount_unit: /1
threshold_period: year
type: single_amount
label: separate saver's credit rate
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
brackets:
- threshold:
2019-01-01: 0
amount:
2019-01-01: 0.5
- threshold:
2019-01-01: 19_251
2020-01-01: 19_501
2021-01-01: 19_751
2022-01-01: 20_501
2023-01-01: 21_751
amount:
2019-01-01: 0.2
- threshold:
2019-01-01: 20_751
2020-01-01: 21_251
2021-01-01: 21_501
2022-01-01: 22_001
2023-01-01: 23_751
amount:
2019-01-01: 0.1
- threshold:
2019-01-01: 32_001
2020-01-01: 32_501
2021-01-01: 33_001
2022-01-01: 34_001
2023-01-01: 35_501
amount:
2019-01-01: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
description: single saver's credit threshold and rate
metadata:
threshold_unit: currency_USD
amount_unit: /1
threshold_period: year
type: single_amount
label: single saver's credit rate
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
brackets:
- threshold:
2019-01-01: 0
amount:
2019-01-01: 0.5
- threshold:
2019-01-01: 19_251
2020-01-01: 19_501
2021-01-01: 19_751
2022-01-01: 20_501
2023-01-01: 21_751
amount:
2019-01-01: 0.2
- threshold:
2019-01-01: 20_751
2020-01-01: 21_251
2021-01-01: 21_501
2022-01-01: 22_001
2023-01-01: 23_751
amount:
2019-01-01: 0.1
- threshold:
2019-01-01: 32_001
2020-01-01: 32_501
2021-01-01: 33_001
2022-01-01: 34_001
2023-01-01: 35_501
amount:
2019-01-01: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
description: widow saver's credit threshold and rate
metadata:
threshold_unit: currency_USD
amount_unit: /1
threshold_period: year
type: single_amount
label: window saver's credit rate
reference:
- title: IRS | Retirement Savings Contributions Credit (Saver’s Credit)
href: https://www.irs.gov/retirement-plans/plan-participant-employee/retirement-savings-contributions-savers-credit
- title: 2022 Publication 590-A
href: https://www.irs.gov/pub/irs-pdf/p590a.pdf#page=45
- title: Form 8880 - 2023 Credit for Qualified Retirement Savings Contributions
href: https://www.irs.gov/pub/irs-pdf/f8880.pdf
brackets:
- threshold:
2019-01-01: 0
amount:
2019-01-01: 0.5
- threshold:
2019-01-01: 19_251
2020-01-01: 19_501
2021-01-01: 19_751
2022-01-01: 20_501
2023-01-01: 21_751
amount:
2019-01-01: 0.2
- threshold:
2019-01-01: 20_751
2020-01-01: 21_251
2021-01-01: 21_501
2022-01-01: 22_001
2023-01-01: 23_751
amount:
2019-01-01: 0.1
- threshold:
2019-01-01: 32_001
2020-01-01: 32_501
2021-01-01: 33_001
2022-01-01: 34_001
2023-01-01: 35_501
amount:
2019-01-01: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
- name: joint with one eligible person
period: 2021
input:
people:
person1:
retirement_saving_eligible_person: ture
adjusted_gross_income_person: 39_000
traditional_ira_contributions: 3_000
roth_ira_contributions: 2_000
person2:
retirement_saving_eligible_person: false
adjusted_gross_income_person: 0
traditional_ira_contributions: 0
roth_ira_contributions: 0
tax_units:
tax_unit:
members: [person1, person2]
filing_status: JOINT
output:
retirement_saving_credit: 1_000

- name: joint with over agi
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
period: 2021
input:
people:
person1:
retirement_saving_eligible_person: ture
adjusted_gross_income_person: 39_000
traditional_ira_contributions: 3_000
roth_ira_contributions: 2_000
person2:
retirement_saving_eligible_person: ture
adjusted_gross_income_person: 50_000
traditional_ira_contributions: 3_000
roth_ira_contributions: 2_000
tax_units:
tax_unit:
members: [person1, person2]
filing_status: JOINT
output:
retirement_saving_credit: 0

- name: head of household with over agi but capped ira
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
period: 2023
input:
people:
person1:
retirement_saving_eligible_person: ture
adjusted_gross_income_person: 39_000
traditional_ira_contributions: 3_000
roth_ira_contributions: 2_000
person2:
retirement_saving_eligible_person: ture
adjusted_gross_income_person: 0
traditional_ira_contributions: 3_000
roth_ira_contributions: 2_000
tax_units:
tax_unit:
members: [person1, person2]
filing_status: HEAD_OF_HOUSEHOLD
output:
retirement_saving_credit: 400
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
- name: eligible person
period: 2021
input:
age: 20
is_tax_unit_head: true
claimed_as_dependent_on_another_return: false
is_full_time_student: false
output:
retirement_saving_eligible_person: true

- name: not eligible person
period: 2021
input:
age: 17
is_tax_unit_spouse: true
spouse_is_dependent_elsewhere: false
is_full_time_student: false

output:
retirement_saving_eligible_person: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from policyengine_us.model_api import *


class retirement_saving_credit(Variable):
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = TaxUnit
definition_period = YEAR
label = "Retirement Savings Credit"
unit = USD
reference = "https://www.irs.gov/pub/irs-pdf/f8880.pdf"

def formula(tax_unit, period, parameters):
p = parameters(period).gov.irs.credits.retirement_saving
person = tax_unit.members
person_eligible = person("retirement_saving_eligible_person", period)
agi_person = (
person("adjusted_gross_income_person", period) * person_eligible
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
)
total_agi = tax_unit.sum(agi_person)
ira_contributions = add(
person,
period,
["traditional_ira_contributions", "roth_ira_contributions"],
DianaShi5083 marked this conversation as resolved.
Show resolved Hide resolved
)
capped_ira_contributions = min_(ira_contributions, p.cap)
qualified_ira = tax_unit.sum(capped_ira_contributions)
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
filing_status = tax_unit("filing_status", period)
statuses = filing_status.possible_values

return select(
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
[
filing_status == statuses.SINGLE,
filing_status == statuses.SEPARATE,
filing_status == statuses.JOINT,
filing_status == statuses.WIDOW,
filing_status == statuses.HEAD_OF_HOUSEHOLD,
],
[
p.rate.single.calc(total_agi) * qualified_ira,
p.rate.separate.calc(total_agi) * qualified_ira,
p.rate.joint.calc(total_agi) * qualified_ira,
p.rate.widow.calc(total_agi) * qualified_ira,
p.rate.head_of_household.calc(total_agi) * qualified_ira,
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
],
)
PavelMakarchuk marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading