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

add under5 bonus to ctc_new #1055

Merged
merged 3 commits into from
Nov 14, 2016

Conversation

MattHJensen
Copy link
Contributor

fixes #1054

Leaving WIP tag until I have a chance to generate and post reform results.

@codecov-io
Copy link

codecov-io commented Nov 11, 2016

Current coverage is 98.76% (diff: 100%)

Merging #1055 into master will not change coverage

@@             master      #1055   diff @@
==========================================
  Files            38         38          
  Lines          2745       2745          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2711       2711          
  Misses           34         34          
  Partials          0          0          

Powered by Codecov. Last update cee11b0...3693ce8

@MattHJensen
Copy link
Contributor Author

@martinholmer, could you please review these changes that address your recent comment on #1054:
image

I added a boolean for applying a refund limit to ctc_new in order to allow users to turn off the refund limit. An alternative approach would have been to add a tiny amount to payroll taxes when the limit is calculated, but I think that would have been counterintuitive for users who are savvy enough to expect the refund_limit_payroll_rt to have no effect on taxpayers with no payroll tax liability.

The boolean approach also allows for other forms of limits to be added in the future.

I renamed _CTC_new_refund_limit_rt to _CTC_new_refund_limit_payroll_rt to account for that possibility as well and generally to be more explicit about the purpose of the param.

I also turned _CG_nodiff into a boolean to match _ID_BenefitSurtax_Switch. I'm not aware of any strong benefits of using booleans versus 1/0 indicators in these cases.

cc @talumbau in case he has some input on the boolean vs. 1/0 indicator issue.

@MattHJensen
Copy link
Contributor Author

Here are a few reform results

Test CTC_new Expansion Capabilities

Import taxcalc package and other useful packages

import sys
sys.path.append("../../")
from taxcalc import *

Create Plan X and Plan Y Policy objects containing current law policy and then implement reforms

# The baseline includes AMT repeal. 
p_xx = Policy()

p_y1 = Policy()
reform1 = {2016: {
'_CTC_new_rt': [1],
'_CTC_new_c': [2000],
'_CTC_new_prt': [0.05],
'_CTC_new_ps': [[75000, 110000, 55000, 75000, 75000, 55000]]
}}
p_y1.implement_reform(reform1)

p_y2 = Policy()
reform2 = {2016: {
'_CTC_new_rt': [1],
'_CTC_new_c_under5_bonus': [1000],
'_CTC_new_c': [1000],
'_CTC_new_prt': [0.05],
'_CTC_new_ps': [[75000, 110000, 55000, 75000, 75000, 55000]]
}}
p_y2.implement_reform(reform2)

p_y3 = Policy()
reform3 = {2016: {
'_CTC_c': [0],
'_CTC_new_rt': [1],
'_CTC_new_c': [2000],
'_CTC_new_prt': [0.05],
'_CTC_new_ps': [[75000, 110000, 55000, 75000, 75000, 55000]]
}}
p_y3.implement_reform(reform3)

Create calculator objects with default tax data and advance the calculator to 2020

c_xx = Calculator(policy=p_xx, records=Records("../../puf.csv"))
c_xx.advance_to_year(2020)
c_y1 = Calculator(policy=p_y1, records=Records("../../puf.csv"))
c_y1.advance_to_year(2020)
c_y2 = Calculator(policy=p_y2, records=Records("../../puf.csv"))
c_y2.advance_to_year(2020)
c_y3 = Calculator(policy=p_y3, records=Records("../../puf.csv"))
c_y3.advance_to_year(2020)
You loaded data for 2009.
Your data include the following unused variables that will be ignored:
  filer
Your data have been extrapolated to 2013.
You loaded data for 2009.
Your data include the following unused variables that will be ignored:
  filer
Your data have been extrapolated to 2013.
You loaded data for 2009.
Your data include the following unused variables that will be ignored:
  filer
Your data have been extrapolated to 2013.
You loaded data for 2009.
Your data include the following unused variables that will be ignored:
  filer
Your data have been extrapolated to 2013.

Calculate taxes under the baseline and under the reform.

c_xx.calc_all()
c_y1.calc_all()
c_y2.calc_all()
c_y3.calc_all()

Calculate the change in combined payroll and individual income tax revenue between the baseline and reform

Reform 1

((c_y1.records._combined - c_xx.records._combined)*c_xx.records.s006).sum() /1000000000
-115.39106270768052

Reform 2

((c_y2.records._combined - c_xx.records._combined)*c_xx.records.s006).sum() /1000000000
-69.016541081597936

Reform 3

((c_y3.records._combined - c_xx.records._combined)*c_xx.records.s006).sum() /1000000000
-66.470615899204333

@MattHJensen MattHJensen changed the title [WIP] add under5 bonus to ctc_new add under5 bonus to ctc_new Nov 14, 2016
@martinholmer
Copy link
Collaborator

martinholmer commented Nov 14, 2016

@MattHJensen, I like the use of boolean policy parameters in the current_law_policy.json file. But some of your new descriptions should probably use true (rather than True) and false (rather than False) in order to eliminate possible confusion between how JSON booleans are named and how Python booleans are named.

@martinholmer martinholmer mentioned this pull request Nov 14, 2016
@MattHJensen
Copy link
Contributor Author

But some of your new descriptions should probably use true (rather than True) and false (rather than False) in order to eliminate possible confusion between how JSON booleans are named and how Python booleans are named.

Thanks, resolved by 3693ce8

@martinholmer
Copy link
Collaborator

@MattHJensen said:

Thanks, resolved by 3693ce8

Pull request #1055 looks good to me.

@MattHJensen
Copy link
Contributor Author

Thanks a lot @martinholmer. Merging.

@MattHJensen MattHJensen merged commit ddd1120 into PSLmodels:master Nov 14, 2016
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.

expand CTC_new to include an under5_bonus
3 participants