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

Conversation

DianaShi5083
Copy link
Collaborator

Fixes #3841

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (388e825) to head (7335186).
Report is 28 commits behind head on master.

❗ Current head 7335186 differs from pull request most recent head 1555aa3. Consider uploading reports for the commit 1555aa3 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4015    +/-   ##
========================================
  Coverage   99.16%   99.17%            
========================================
  Files        2423     2408    -15     
  Lines       35074    34855   -219     
  Branches      171      163     -8     
========================================
- Hits        34782    34566   -216     
+ Misses        262      259     -3     
  Partials       30       30            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PavelMakarchuk PavelMakarchuk marked this pull request as draft February 28, 2024 04:50
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

@MaxGhenis
Copy link
Contributor

@PavelMakarchuk
Copy link
Collaborator

may be helpful: https://github.com/Budget-Lab-Yale/Tax-Simulator/blob/main/src/calc/functions/credits/savers_cred.R

@MaxGhenis Does Tax Simulator model all of the non-refundable credits or just the ones that are used in that formula? I don't think I see any other non-refundable credits. this makes me wonder whether the reduction of the tax liability by just the three credits here is accurate (we did not see that logic in the forms)

@PavelMakarchuk PavelMakarchuk requested a review from MaxGhenis April 8, 2024 23:49
@PavelMakarchuk PavelMakarchuk marked this pull request as ready for review April 8, 2024 23:49
Copy link
Contributor

@MaxGhenis MaxGhenis left a comment

Choose a reason for hiding this comment

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

Please replace the rate/threshold file pairs with a single scale parameter. You can then look up the AGI by dividing by the threshold adjustment factors (0.5 for single, etc.)

Copy link
Contributor

Choose a reason for hiding this comment

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

change this to tax unit level so it can be the defined_for

Copy link
Collaborator

@PavelMakarchuk PavelMakarchuk Apr 28, 2024

Choose a reason for hiding this comment

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

I am not sure if changing this to the tax unit level would be the most accurate representation since we want to check each head and spouse individually (whether they are a student etc.) - e.g. I believe if both made contributions but the head was a student, then the contributions of the spouse would still be eligible for this credit

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or we can make the main calculation person level to include this situation

Copy link
Contributor

Choose a reason for hiding this comment

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

ok i think i might have made that comment with respect to an older version of the code, doesn't seem relevant now

qualified_contributions = add(
person,
period,
[
Copy link
Contributor

Choose a reason for hiding this comment

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

make this a list parameter and cite https://www.law.cornell.edu/uscode/text/26/25B#d_1 and the relevant sections it sub-cites. this will include other variables we have like 403b contributions

Copy link
Collaborator

Choose a reason for hiding this comment

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

@PavelMakarchuk Is this required parameter the same as this one?
image
This parameter doesn't seem to be used in any variable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, exactly. We have other examples of list parameters

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, exactly. We have other examples of list parameters

Should I overwrite it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

make a new list parameter

"traditional_401k_contributions",
],
)
capped_qualified_contributions = min_(
Copy link
Contributor

Choose a reason for hiding this comment

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

],
default=1,
)
# Credit rate
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Credit rate
adjusted_agi = agi / threshold_adjustment
credit_rate = p.rate.joint.calc(adjusted_agi)

Copy link
Contributor

Choose a reason for hiding this comment

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

ok i think i might have made that comment with respect to an older version of the code, doesn't seem relevant now

@PavelMakarchuk
Copy link
Collaborator

Duplicate of newly created #4506

@PavelMakarchuk
Copy link
Collaborator

Duplicate of #4506

@PavelMakarchuk PavelMakarchuk marked this as a duplicate of #4506 May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saver's Credit
4 participants