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

Fix value of CTC_new_c_under6_bonus #2609

Merged
merged 8 commits into from
Jul 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion taxcalc/policy_current_law.json
Original file line number Diff line number Diff line change
Expand Up @@ -16177,7 +16177,7 @@
},
{
"year": 2021,
"value": 1000.00
"value": 600.00
},
{
"year": 2022,
Expand Down
10 changes: 5 additions & 5 deletions taxcalc/tests/cpscsv_agg_expect.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ AMT Income ($b),8320.5,10279.2,10758.3,10790.2,11608.1,11932.3,12377.4,12890.2,1
AMT Liability ($b),8.2,0.8,1.0,0.9,1.2,1.1,1.0,1.0,1.0,15.8
AMT Filers (#m),2.6,0.2,0.4,0.4,0.5,0.4,0.4,0.4,0.4,4.4
Tax before Credits ($b),1116.1,1384.7,1461.0,1451.5,1588.4,1643.8,1718.5,1803.3,1894.5,2118.1
Refundable Credits ($b),70.7,102.4,102.4,657.5,835.9,102.7,102.9,102.9,103.7,88.3
Refundable Credits ($b),70.7,102.4,102.4,657.5,824.3,102.7,102.9,102.9,103.7,88.3
Nonrefundable Credits ($b),32.6,97.2,99.2,98.7,4.0,104.2,106.1,108.1,110.0,33.4
Reform Surtaxes ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Other Taxes ($b),5.5,11.0,11.1,11.0,11.8,12.3,13.1,13.7,14.5,15.3
Ind Income Tax ($b),1018.2,1196.1,1270.5,706.3,760.3,1449.2,1522.6,1606.0,1695.3,2011.7
Ind Income Tax ($b),1018.2,1196.1,1270.5,706.3,771.9,1449.2,1522.6,1606.0,1695.3,2011.7
Payroll Taxes ($b),1041.0,1141.5,1195.6,1206.9,1261.9,1318.3,1375.2,1436.8,1501.1,1564.4
Combined Liability ($b),2059.2,2337.6,2466.1,1913.2,2022.1,2767.4,2897.7,3042.8,3196.4,3576.1
With Income Tax <= 0 (#m),88.0,96.2,96.7,136.2,130.7,99.0,99.8,100.2,100.7,97.8
With Combined Tax <= 0 (#m),62.7,65.3,66.2,98.6,100.0,69.2,70.2,71.0,71.8,71.1
Combined Liability ($b),2059.2,2337.6,2466.1,1913.2,2033.8,2767.4,2897.7,3042.8,3196.4,3576.1
With Income Tax <= 0 (#m),88.0,96.2,96.7,136.2,130.5,99.0,99.8,100.2,100.7,97.8
With Combined Tax <= 0 (#m),62.7,65.3,66.2,98.6,99.8,69.2,70.2,71.0,71.8,71.1
UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
"Total Benefits, Consumption Value ($b)",2790.9,3225.5,3428.6,3617.9,4011.6,4064.2,4306.0,4560.9,4830.4,5105.8
Total Benefits Cost ($b),2790.9,3225.5,3428.6,3617.9,4011.6,4064.2,4306.0,4560.9,4830.4,5105.8
2 changes: 1 addition & 1 deletion taxcalc/tests/puf_var_wght_means_by_year.csv
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ e87530,Adjusted qualified lifetime learning expenses for all students, 93,
eitc,Federal EITC, 376, 369, 364, 352, 342, 341, 344, 353, 341, 347, 348, 350, 352, 356, 361, 366, 372, 379, 385
elderly_dependents,number of dependents age 65+ in filing unit excluding taxpayer and spouse, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
g20500,Itemizable gross (before 10% AGI disregard) casualty or theft loss, 29, 30, 31, 32, 34, 35, 36, 38, 38, 38, 39, 41, 42, 43, 45, 47, 50, 52, 55
iitax,Federal income tax liability, 6550, 7474, 7521, 7477, 8279, 8719, 9042, 5959, 7140, 9701, 9946, 10290, 10664, 10992, 11274, 11567, 11852, 12141, 12463
iitax,Federal income tax liability, 6550, 7474, 7521, 7477, 8279, 8719, 9042, 5959, 7170, 9701, 9946, 10290, 10664, 10992, 11274, 11567, 11852, 12141, 12463
k1bx14p,Partner self-employment earnings/loss for taxpayer (included in e26270 total), -213, -239, -187, -162, -144, -136, -127, -116, -129, -133, -142, -148, -152, -151, -146, -136, -121, -102, -86
k1bx14s,Partner self-employment earnings/loss for spouse (included in e26270 total), -7, -9, 0, 2, 8, 10, 11, 9, 11, 11, 11, 12, 13, 15, 17, 19, 21, 25, 26
nu06,Number of dependents under 6 years old, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Expand Down
10 changes: 5 additions & 5 deletions taxcalc/tests/pufcsv_agg_expect.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ AMT Income ($b),10514.1,11420.4,11944.1,11859.8,12863.0,13213.5,13671.1,14230.8,
AMT Liability ($b),51.8,23.4,24.5,25.9,26.8,27.0,27.6,28.7,30.1,80.3
AMT Filers (#m),5.7,0.6,1.0,1.0,1.0,1.0,1.0,1.1,1.1,7.9
Tax before Credits ($b),1707.8,1731.3,1819.3,1768.0,1956.9,2024.7,2104.9,2205.3,2314.0,2575.8
Refundable Credits ($b),103.0,117.6,118.9,645.2,769.8,122.1,123.1,124.2,126.4,111.7
Refundable Credits ($b),103.0,117.6,118.9,645.2,760.6,122.1,123.1,124.2,126.4,111.7
Nonrefundable Credits ($b),66.9,126.9,128.3,126.0,51.2,132.1,134.9,137.8,140.4,75.4
Reform Surtaxes ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
Other Taxes ($b),40.0,45.0,48.3,45.5,53.5,54.5,52.6,52.2,52.8,53.7
Ind Income Tax ($b),1577.9,1531.8,1620.4,1042.3,1189.4,1825.0,1899.5,1995.4,2099.9,2442.4
Ind Income Tax ($b),1577.9,1531.8,1620.4,1042.3,1198.6,1825.0,1899.5,1995.4,2099.9,2442.4
Payroll Taxes ($b),1083.8,1133.1,1186.2,1198.2,1250.8,1306.3,1362.3,1422.8,1486.2,1548.8
Combined Liability ($b),2661.7,2664.9,2806.6,2240.5,2440.3,3131.3,3261.8,3418.2,3586.1,3991.2
With Income Tax <= 0 (#m),92.8,98.5,99.2,132.6,126.4,102.3,103.3,104.1,105.1,101.1
With Combined Tax <= 0 (#m),63.3,65.5,66.6,102.7,95.7,69.9,71.0,72.0,73.0,72.6
Combined Liability ($b),2661.7,2664.9,2806.6,2240.5,2449.5,3131.3,3261.8,3418.2,3586.1,3991.2
With Income Tax <= 0 (#m),92.8,98.5,99.2,132.6,126.2,102.3,103.3,104.1,105.1,101.1
With Combined Tax <= 0 (#m),63.3,65.5,66.6,102.7,95.5,69.9,71.0,72.0,73.0,72.6
UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
"Total Benefits, Consumption Value ($b)",1052.3,1104.9,1174.1,1244.8,1494.0,1406.5,1489.3,1579.4,1672.9,1772.0
Total Benefits Cost ($b),1052.3,1104.9,1174.1,1244.8,1494.0,1406.5,1489.3,1579.4,1672.9,1772.0
135 changes: 66 additions & 69 deletions taxcalc/tests/test_reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,92 +72,89 @@ def test_2017_law_reform(tests_path):
assert act == exp, '{} a={} != e={}'.format(name, act, exp)


def test_round_trip_tcja_reform(tests_path):
@pytest.mark.parametrize('fyear', [2019, 2020, 2021, 2022, 2023])
def test_round_trip_reforms(fyear, tests_path):
"""
Check that current-law policy has the same policy parameter values in
a future year as does a compound reform that first implements the
reform specified in the 2017_law.json file and then implements the
reform specified in the TCJA.json file. This test checks that the
future-year parameter values for current-law policy (which incorporates
TCJA) are the same as future-year parameter values for the compound
round-trip reform. Doing this check ensures that the 2017_law.json
and TCJA.json reform files are specified in a consistent manner.
2017 tax law as specified in the 2017_law.json file and then implements
reforms that represents new tax legislation since 2017.
This test checks that the future-year parameter values for
current-law policy (which incorporates recent legislation such as
the TCJA, CARES Act, and ARPA) are the same as future-year
parameter values for the compound round-trip reform.
Doing this check ensures that the 2017_law.json
and subsequent reform files that represent recent legislation are
specified in a consistent manner.
"""
# pylint: disable=too-many-locals
fyear = 2020
# create clp metadata dictionary for current-law policy in fyear
pol = Policy()
pol.set_year(fyear)
clp_mdata = dict(pol.items())
clp_pol = Policy()
clp_pol.set_year(fyear)
clp_mdata = dict(clp_pol.items())
# create rtr metadata dictionary for round-trip reform in fyear
pol = Policy()
rtr_pol = Policy()
# Revert to 2017 law
reform_file = os.path.join(tests_path, '..', 'reforms', '2017_law.json')
with open(reform_file, 'r') as rfile:
rtext = rfile.read()
pol.implement_reform(Policy.read_json_reform(rtext))
assert not pol.parameter_warnings
assert not pol.errors
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
assert not rtr_pol.parameter_warnings
assert not rtr_pol.errors
# Layer on TCJA
reform_file = os.path.join(tests_path, '..', 'reforms', 'TCJA.json')
with open(reform_file, 'r') as rfile:
rtext = rfile.read()
pol.implement_reform(Policy.read_json_reform(rtext))
assert not pol.parameter_warnings
assert not pol.errors
rtr_pol.implement_reform(Policy.read_json_reform(rtext))
assert not rtr_pol.parameter_warnings
assert not rtr_pol.errors
# Layer on the CARES Act
pol.implement_reform({'ID_Charity_crt_all': {2020: 1.0, 2021: 0.6},
'STD_allow_charity_ded_nonitemizers':
{2020: True, 2021: False},
'STD_charity_ded_nonitemizers_max':
{2020: 300.0, 2021: 0.0}})
assert not pol.parameter_warnings
assert not pol.errors
pol.set_year(fyear)
rtr_mdata = dict(pol.items())
rtr_pol.implement_reform(
{'ID_Charity_crt_all': {2020: 1.0, 2021: 0.6},
'STD_allow_charity_ded_nonitemizers': {2020: True, 2021: False},
'STD_charity_ded_nonitemizers_max': {2020: 300.0, 2021: 0.0}})
assert not rtr_pol.parameter_warnings
assert not rtr_pol.errors
# Layer on ARPA
pol.implement_reform({'RRC_c': {2021: 1400, 2022: 0},
'RRC_ps': {2021: [75000, 150000, 75000, 112500,
150000], 2022: [0, 0, 0, 0, 0]},
'RRC_pe': {2021: [80000, 160000, 80000, 120000,
160000], 2022: [0, 0, 0, 0, 0]},
'UI_em': {2020: 10200, 2021: 0},
'UI_thd': {2020: [150000, 150000, 150000, 150000,
150000], 2021: [0, 0, 0, 0, 0]},
'CTC_refundable': {2021: True, 2022: False},
'CTC_include17': {2021: True, 2022: False},
'CTC_new_c': {2021: 1000, 2022: 0},
'CTC_new_c_under6_bonus': {2021: 600, 2022: 0},
'CTC_new_for_all': {2021: True, 2022: False},
'CTC_new_ps': {2021: [75000, 150000, 75000, 112500,
150000], 2022: [0, 0, 0, 0, 0]},
'CTC_new_prt': {2021: 0.05, 2022: 0},
'EITC_c': {2021: [1502.46, 3606.44, 5960.95,
6706.58], 2022: [546.21, 3640.7, 6017.58,
6770.29]},
'EITC_rt': {2021: [0.153, 0.34, 0.4, 0.45],
2022: [0.0765, 0.34, 0.4, 0.45]},
'EITC_ps': {2021: [11610, 19464.12, 19464.12,
19464.12], 2022: [8931.38, 19649.03,
19649.03, 19649.03]},
'EITC_MinEligAge': {2021: 19, 2022: 25},
'EITC_MaxEligAge': {2021: 125, 2022: 64},
'EITC_InvestIncome_c': {2021: 10000},
'EITC_sep_filers_elig': {2021: True},
'CDCC_c': {2021: 8000, 2022: 3000},
'CDCC_ps': {2021: 125000, 2022: 15000},
'CDCC_ps2': {2021: 400000, 2022: 9e+99},
'CDCC_crt': {2021: 50.0, 2022: 35.0},
'CDCC_refundable': {2021: True, 2022: False},
'ALD_BusinessLosses_c': {2026: [283535.22, 567070.42,
283535.22, 283535.22,
567070.42], 2027: [9e+99,
9e+99, 9e+99, 9e+99,
9e+99]}})
assert not pol.parameter_warnings
assert not pol.errors
pol.set_year(fyear)
rtr_mdata = dict(pol.items())
rtr_pol.implement_reform(
{'RRC_c': {2021: 1400, 2022: 0},
'RRC_ps': {2021: [75000, 150000, 75000, 112500,150000],
2022: [0, 0, 0, 0, 0]},
'RRC_pe': {2021: [80000, 160000, 80000, 120000, 160000],
2022: [0, 0, 0, 0, 0]},
'UI_em': {2020: 10200, 2021: 0},
'UI_thd': {2020: [150000, 150000, 150000, 150000, 150000],
2021: [0, 0, 0, 0, 0]},
'CTC_refundable': {2021: True, 2022: False},
'CTC_include17': {2021: True, 2022: False},
'CTC_new_c': {2021: 1000, 2022: 0},
'CTC_new_c_under6_bonus': {2021: 600, 2022: 0},
'CTC_new_for_all': {2021: True, 2022: False},
'CTC_new_ps': {2021: [75000, 150000, 75000, 112500, 150000],
2022: [0, 0, 0, 0, 0]},
'CTC_new_prt': {2021: 0.05, 2022: 0},
'EITC_c': {2021: [1502.46, 3606.44, 5960.95, 6706.58],
2022: [546.21, 3640.7, 6017.58, 6770.29]},
'EITC_rt': {2021: [0.153, 0.34, 0.4, 0.45],
2022: [0.0765, 0.34, 0.4, 0.45]},
'EITC_ps': {2021: [11610, 19464.12, 19464.12, 19464.12],
2022: [8931.38, 19649.03, 19649.03, 19649.03]},
'EITC_MinEligAge': {2021: 19, 2022: 25},
'EITC_MaxEligAge': {2021: 125, 2022: 64},
'EITC_InvestIncome_c': {2021: 10000},
'EITC_sep_filers_elig': {2021: True},
'CDCC_c': {2021: 8000, 2022: 3000},
'CDCC_ps': {2021: 125000, 2022: 15000},
'CDCC_ps2': {2021: 400000, 2022: 9e+99},
'CDCC_crt': {2021: 50.0, 2022: 35.0},
'CDCC_refundable': {2021: True, 2022: False},
'ALD_BusinessLosses_c': {
2026: [283535.22, 567070.42, 283535.22, 283535.22, 567070.42],
2027: [9e+99, 9e+99, 9e+99, 9e+99, 9e+99]}})
assert not rtr_pol.parameter_warnings
assert not rtr_pol.errors
rtr_pol.set_year(fyear)
rtr_mdata = dict(rtr_pol.items())
# compare fyear policy parameter values
assert clp_mdata.keys() == rtr_mdata.keys()
fail_dump = False
Expand Down