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

Nonrefundable credit for dependents #1069

Merged
merged 10 commits into from
Nov 17, 2016

Conversation

codykallen
Copy link
Contributor

@codykallen codykallen commented Nov 17, 2016

Per the Ryan-Brady plan, this is structured to phase-out as though added to the Child Tax Credit. For example, for a head of household with one child, the $1000 CTC would phase out between $75k and $95k, and the additional $500 dependent credit would phase out at the same rate between $95k and $105k. For a head of household with two children, the $2000 CTC would phase out between $75k and $115k, and the $1000 of dependent credit would phase out between $115k and $135k.

I used the existing parameters for the Child Tax Credit because that is the structure of this credit. Alternatively, we could add a phase-out rate and threshold specific to this credit, but implementation of the Ryan-Brady plan would require setting these parameters to the same as those for the CTC.

This pull request resolves the second part of issue #1068

@MattHJensen @martinholmer @andersonfrailey @GoFroggyRun @feenberg @Amy-Xu

@codecov-io
Copy link

codecov-io commented Nov 17, 2016

Current coverage is 98.76% (diff: 100%)

Merging #1069 into master will not change coverage

@@             master      #1069   diff @@
==========================================
  Files            38         38          
  Lines          2761       2761          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2727       2727          
  Misses           34         34          
  Partials          0          0          

Powered by Codecov. Last update c52217c...8a7e06b

@martinholmer
Copy link
Collaborator

martinholmer commented Nov 17, 2016

@codykallen, I don't understand why the new dependent credit is computed in the AGI function in your pull request #1069. How is it related to the calculation of AGI? If it is so closely related to the current-law CTC (with respect to its phase out), then why not move the code that calculates the new dependent credit to the ChildTaxCredit function? That would seem to make more sense, but maybe I'm missing something.

@MattHJensen @feenberg

@codykallen
Copy link
Contributor Author

@martinholmer
I put it in the AGI function because the personal credit is calculated in the AGI function (which I had previously used to implement the credit). If you prefer, I can easily switch the calculation to the ChildTaxCredit function.

@martinholmer
Copy link
Collaborator

@codykallen said:

I put it in the AGI function because the personal credit is calculated in the AGI function (which I had previously used to implement the credit). If you prefer, I can easily switch the calculation to the ChildTaxCredit function.

OK, I see your thought process. But yes, I think it would be a big improvement to move the calculation of this new dependent credit to the ChildTaxCredit function. Thanks for doing this.

@codykallen
Copy link
Contributor Author

@martinholmer
I have switched the calculation to the ChildTaxCredit function.

@martinholmer
Copy link
Collaborator

@codykallen, Thanks. Moving the calculation of the new dependent credit into the ChildTaxCredit function is a big improvement. Now we can focus on the details of the calculation. Here is what you're proposing:

    # calculate dependent credit
    if MARS == 2:
        dep_count = XTOT - 2
    else:
        dep_count = XTOT - 1
    dep_credit = DependentCredit_c * dep_count
    # phase-out dependent credit
    if CTC_prt > 0. and c00100 > CTC_ps[MARS - 1]:
        thresh = CTC_ps[MARS - 1] + n24 * CTC_c / CTC_prt
        excess = c00100 - thresh
        if _exact == 1:
            excess = 1000. * math.ceil(excess / 1000.)
        dep_phaseout = dep_phaseout = CTC_prt * (c00100 - excess)
        dep_credit = max(0., dep_credit - dep_phaseout)

All this looks good after a quick glance except for the first if-else statement. There is one inelegance and one problem with this:

    if MARS == 2:
        dep_count = XTOT - 2
    else:
        dep_count = XTOT - 1

The inelegance is that we already have a calculated variable called _num that has a value of 2 for MARS==2 and a value of 1 for other MARS values. It is defined in the records.py file as follows:

        self._num[:] = np.where(self.MARS == 2, 2, 1)

But more importantly, there is a substantive problem here. This code will produce negative dep_count values for many filing units with DSI==1. What does the Blueprint say about this reform provision? Are filing units who are dependents on another return really going to be able to get this new dependent tax credit? That would seem pretty weird, but there are plenty of weird things in publicly-released tax reform proposals. If DSI==1 makes you ineligible for this new dependent credit, then you need to build that logic into your proposed code. If these dependent filers are eligible for the new dependent credit, then you need to prevent the value of dep_count from going negative. Of the 219,814 records in puf.csv, 8,389 will have a negative value for dep_count in your proposed code.

@codykallen
Copy link
Contributor Author

@martinholmer
Thanks for catching the DSI special case. I modified the code to:
dep_credit = DependentCredit_c * max(0, dep_count)

@martinholmer
Copy link
Collaborator

martinholmer commented Nov 17, 2016

@codykallen, Thanks for that code correction, so now we don't calculate any negative credits.
Now your code is (in part) like this:

    # calculate dependent credit
    if MARS == 2:
        dep_count = XTOT - 2
    else:
        dep_count = XTOT - 1
    dep_credit = DependentCredit_c * max(0, dep_count)
    ...

Why not simplify to the following code?

    # calculate dependent credit
    dep_credit = DependentCredit_c * max(0, XTOT - _num)
    ...

Sometimes it really helps to use if-else statements in the function.py code, but I don't think is one of those cases.

@martinholmer
Copy link
Collaborator

@codykallen, Thanks for your contribution in #1069. I'm merging it now.

@martinholmer martinholmer merged commit 0572552 into PSLmodels:master Nov 17, 2016
@martinholmer martinholmer mentioned this pull request Nov 20, 2016
@codykallen codykallen deleted the dep_credit branch November 10, 2017 20:06
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.

4 participants