-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
[WIP] Distributing the Corporate Income Tax #286
Conversation
…orporate income tax as well as a function to do so
@MattHJensen, I have it running now and outputting the share of the corporate income tax for individuals. Can you take a look at my design decisions and see if they look good to you? Also when printing some of the values, I noticed some of the are negative numbers. That has to do with the fact that the capital gains include net losses as well as gains and so does passthrough income. I am not sure how to deal with the negatives in these cases because we just want ownership, so I'm thinking that maybe I should just do the absolute value? Let me know what you think. |
I'll check out the substance soon. On the .xml file, it doesn't look like it will help us much on diff comparison. It would also be nice to have something that renders well in github so that people can edit from the github browser. @Amy-Xu and @mmessick, are you ok with using RST for the draft of this paper? We can move to something else if we don't like this experience. |
…by 2.2 and 1.2 respectively
this is a good editor for viewing previews of reStructuredText: http://rst.ninjs.org/ |
…corporate income tax
@MattHJensen, here is a basic format for the table you asked for. I can change it up to make it look better and include more or less columns as you see fit. Thought these were good ones to start out with though. I also included the Master version and this PR's version of the diagnostic table so that you could see there are no differences. |
@@ -183,10 +187,56 @@ def increment_year(self): | |||
self.records.increment_year() | |||
self.params.increment_year() | |||
|
|||
""" | |||
TODO: Corporate Income Tax |
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.
Is there something left to do here still?
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.
Yes, we haven't decided on how we are going to impute it for future years
(calc.records.e03600 * calc.records.s006).sum() + | ||
(calc.records.e07240 * calc.records.s006).sum()) | ||
|
||
assert abs(calc.records.agg_comp - agg_compensation) < .001 |
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.
the error bound seems a little loose here. Is it possible to tighten it up a bit?
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.
I've tried tightening it up, and haven't gotten good results. Not really sure why
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.
I am curious - where are these aggregates used? I don't recall them being
reported on the web interface. Also, I am concerned that if do a large
number of these (especially treating the sumation as a action on an
object) it will slow things down.
dan
On Wed, 1 Jul 2015, mmessick wrote:
In taxcalc/tests/test_calculate.py:
- agg_dividends = (calc.records.e00600 * calc.records.s006).sum()
- agg_capgains = ((calc.records.e23250 * calc.records.s006).sum() +
(calc.records.e22250 \* calc.records.s006).sum() +
(calc.records.e23660 \* calc.records.s006).sum())
- agg_bonds = ((calc.records.e00400 * calc.records.s006).sum()
+ (calc.records.e00300 \* calc.records.s006).sum())
- agg_compensation = ((calc.records.e00200 * calc.records.s006).sum() +
(calc.records.e00250 \* calc.records.s006).sum() +
(calc.records.e33420 \* calc.records.s006).sum() +
(calc.records.e03600 \* calc.records.s006).sum() +
(calc.records.e07240 \* calc.records.s006).sum())
- assert abs(calc.records.agg_comp - agg_compensation) < .001
I've tried tightening it up, and haven't gotten good results. Not really sure why
—
Reply to this email directly or view it on
GitHub.[AHvQVbIo7EN2cy-vTvCzib1ZbTKNLXn6ks5oZDJNgaJpZM4FES6E.gif]
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.
As far as I know, none of these aggregates are in the code at all right now. It looks like this is a proposed addition. I was going to ask @MattHJensen if this was a feature for the web app. If we accept these changes, the standard behavior would be to calculate these values for each year. We could set some kind of flag to indicate whether or not to do these calculations, but if you start down that path, it can get messy pretty quickly.
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.
On Thu, 2 Jul 2015, T.J. Alumbaugh wrote:
In taxcalc/tests/test_calculate.py:
- agg_dividends = (calc.records.e00600 * calc.records.s006).sum()
- agg_capgains = ((calc.records.e23250 * calc.records.s006).sum() +
(calc.records.e22250 \* calc.records.s006).sum() +
(calc.records.e23660 \* calc.records.s006).sum())
- agg_bonds = ((calc.records.e00400 * calc.records.s006).sum()
+ (calc.records.e00300 \* calc.records.s006).sum())
- agg_compensation = ((calc.records.e00200 * calc.records.s006).sum() +
(calc.records.e00250 \* calc.records.s006).sum() +
(calc.records.e33420 \* calc.records.s006).sum() +
(calc.records.e03600 \* calc.records.s006).sum() +
(calc.records.e07240 \* calc.records.s006).sum())
- assert abs(calc.records.agg_comp - agg_compensation) < .001
As far as I know, none of these aggregates are in the code at all right now. It looks like this
is a proposed addition. I was going to ask @MattHJensen if this was a feature for the web app.
If we accept these changes, the standard behavior would be to calculate these values for each
year. We could set some kind of flag to indicate whether or not to do these calculations, but if
you start down that path, it can get messy pretty quickly.—
Reply to this email directly or view it on
GitHub.[AHvQVVW6uim2zfFzMWR5c39R1mzGXvTIks5oZThtgaJpZM4FES6E.gif]
These don't change with changes to planx or plany, do they? We could run
it once and post the aggregates on a static page, if we feel it useful
to report these numbers.
dan
Is there a desire to add this output to the web application? |
Oh I just noticed the [WIP] marking on this PR. sorry for jumping in. |
|
||
# self-employment (E09400) and pass-through income (E02000) | ||
self.e_and_p = self.e09400 + self.e02000 | ||
|
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.
We might need to add more docstring/comments for this section.
200 - wages and salaries
250 - other dependent earned income
33420 - employer provided benefits for dependent care
3600 - Archer MSA deduction amount
7240 - retirement saving contribution
600 - ordinary dividends
23250 - net long term capital gain/loss
22250 - net short term gain/loss
23660 - short term plus long term gain/loss
400 - tax exempt interest
300 - taxable interest
9400 - self-employment tax
2000 - rental real estate, royalties, partnerships, s corporations
This PR adds a method to functions.py called Dist_Corp_Inc_Tax which distributes the corporate income tax to each Record object. The aggregate variables are calculated in calculate.py and use new attributes for Records objects that I have written in records.py.
This PR is relevant to issue #223.