-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Mtr e26270 #987
Mtr e26270 #987
Conversation
Current coverage is 98.27% (diff: 100%)@@ master #987 diff @@
==========================================
Files 35 35
Lines 2085 2089 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 2049 2053 +4
Misses 36 36
Partials 0 0
|
I tested this with a reform of pass-through rates: reform_pt = { 2017: { I calculated average MTRs on e02000 and e26270 under the baseline and reform, weighting by the absolute value of the income type. |
@@ -322,6 +326,8 @@ def mtr(self, variable_str='e00200p', | |||
self.records.e00900 = seincome_var + finite_diff | |||
elif variable_str == 'e00650': | |||
self.records.e00600 = divincome_var + finite_diff | |||
elif variable_str == 'e26270': | |||
self.records.e02000 = schEincome_var + finite_diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codykallen Why add finite_diff to e02000 instead of e26270 here? Seems like adding to e26270 is what would help this MTR enter functions.SchXYZ()
in a way that accounts for potential differences between rates on ordinary income and pass-through income.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finite_diff is already being added to e26270 in the line:
setattr(self.records, variable_str, variable + finite_diff)
However, e26270 is included in e02000, so you have to increase e02000 as well. If not, then you would be calculating the MTR from adding finite_diff to e26270 but substracting it from rental income.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Thanks @codykallen, LGTM then.
@codykallen - thanks for opening this, it'll be helpful give the updated to pass-through income logic in taxcalc. |
@codkallen, Your pull request #987 looks fine except for one thing: you need to add a test to prevent a decline in code coverage. Adding something like this at the end of the
|
@codykallen, Thanks for adding the test of the new mtr logic in pull request #987. However, I don't understand why you have added the extra variables to the |
@codykallen, Thanks so much for pull request #987, which has been merged into master branch. |
Adds calculation of MTR on e26270 (partnership and S-corp income)