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

Make TCJA current-law policy #1803

Merged
merged 24 commits into from
Jan 11, 2018
Merged

Make TCJA current-law policy #1803

merged 24 commits into from
Jan 11, 2018

Conversation

martinholmer
Copy link
Collaborator

@martinholmer martinholmer commented Jan 2, 2018

This pull request attempts to resolve issue #1787.

At the core of this pull request are the changes in the current_law_policy.json file to make it reflect TCJA policy and the new reforms/2017_law.json file that can be used to "reform" the new current-law policy into pre-TCJA policy. The methods used to ensure that these changes are accurate will be described in a subsequent comment to this pull request. Some new code was added to the Policy class to make a nonzero _cpi_offset parameter work when it is in current_law_policy.json (rather than in a JSON reform file). Also, in doing this work, one very minor change was made in the reforms/TCJA_Reconciliation.json file to make it more closely correspond to TCJA policy; this change in the first year of the 7.5% value for the _ID_Medical_frt parameter (from 2018 to 2017) was reviewed and approved by @codykallen, the author of the reforms/TCJA_Reconciliation.json file.

Because of the TCJA "reform-undo" in 2026, the 2019-2026 values of some inflation indexed policy parameters have been hard coded in the new current_law_policy.json file. As each year brings more recent known parameter values and when new economic assumptions are used, these hard-coded parameter values will need to be changed. This is not a desirable situation, but seems inevitable given TCJA's complexity and the current_law_policy.json file structure and associated logic. I will provide more details on this matter in a subsequent comment to this pull request.

In order to minimize changes in the extensive testing of reforms, this pull request adds a new "baseline" field to each of the 62 reforms in the tests/reforms.json file and adds a "// Reform_Baseline: ..." line in each of the reforms/*.json files. This new information is used in tests/test_reforms.py to implement a compound reform in which the first call to Policy class's implement_reform method is passed the "policy" dictionary from reforms/2017_law.json and the second call to implement_reform is passed the reform in question. I have also used this same compound-reform technique in three other test files in order to minimize the changes in this pull request. We can decide later whether of not the tests in these three other test files should be changed to use TCJA policy (rather than pre-TCJA policy).

This is a complex set of proposed changes, so review and comments will be very helpful.

Note that pull request #1821 contains changes that should have been included in this pull request.

@martinholmer martinholmer reopened this Jan 2, 2018
@codecov-io
Copy link

codecov-io commented Jan 2, 2018

Codecov Report

Merging #1803 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1803   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          37      37           
  Lines        3058    3064    +6     
======================================
+ Hits         3058    3064    +6
Impacted Files Coverage Δ
taxcalc/calculate.py 100% <ø> (ø) ⬆️
taxcalc/policy.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b74bab7...3694366. Read the comment docs.

@martinholmer
Copy link
Collaborator Author

martinholmer commented Jan 2, 2018

This comment on pull request #1803 describes how the content of the new current_law_policy.json and reforms/2017_law.json files have been checked. The strategy is to dump all the parameter values (for every year) to a file in two different ways, and then confirm that the two files are the same.

The first test compares a dump generated using taxcalc package 0.14.3 and reforms/TCJA_Reconciliation.json (called 0.14.3-tcja) and a dump generated using a local taxcalc package on the #1803 branch and no reform (called 0.15.0-tcja).

The second test compares a dump generated using taxcalc package 0.14.3 and no reform (called 0.14.3-2017) and a dump generated using a local taxcalc package on the #1803 branch and reforms/2017_law.json (called 0.15.0-2017).

As seen below (after showing the two scripts that execute these tests), the non-cpi_offset parameters are identical in the two dumps for both tests.

Both the scripts are located in the tax-calculator/../testing directory, which is outside of the Tax-Calculator directory tree.

Here is the Python script that dumps all the parameter values:

$ cat testing/polparams.py
from __future__ import print_function
import os
import sys
import taxcalc
from taxcalc import Policy, Calculator

if len(sys.argv) == 1:
    reform = 'clp'
else:
    if '0.14' in taxcalc.__version__:
        reform = '../tax-calculator/taxcalc/reforms/TCJA_Reconciliation.json'
    else:
        reform = '../tax-calculator/taxcalc/reforms/2017_law.json'
    assert os.path.isfile(reform)

print('taxcalc version', taxcalc.__version__)
print('policy regime', reform)

pol = Policy()
if reform != 'clp':
    params = Calculator.read_json_param_objects(reform, None)
    pol.implement_reform(params['policy'])
    if pol.reform_errors:
        print(pol.reform_errors)
        exit(1)
pnames = sorted([pname[1:] for pname in pol._vals.keys()])
start_yr = Policy.JSON_START_YEAR
final_yr = Policy.LAST_BUDGET_YEAR
for cyr in range(start_yr, final_yr + 1):
    pol.set_year(cyr)
    for pname in pnames:
        print(cyr, pname, getattr(pol, pname))

And here is the bash shell script that downloads/creates the taxcalc packages and calls polparams.py to dump the parameter values:

$ cat testing/testing.sh
#!/bin/bash
date
# stop if not on 2017-law-json branch
pushd ../tax-calculator
git branch | awk '$1~/\*/{if($2~/2017-law-json/){exit 0}else{exit 1}}'
if [ $? -ne 0 ]; then
    echo "STOPPING: not on 2017-law-json branch of local git repo"
    exit 1
else
    echo "CONTINUE: on 2017-law-json branch of local git repo"
fi
popd
# generate results using taxcalc 0.14.3
conda install -c ospc taxcalc=0.14.3 --yes
python polparams.py     > 0.14.3-2017
python polparams.py ref > 0.14.3-tcja
# generate results using taxcalc 0.15.0
pushd ../tax-calculator/conda.recipe
./install_local_taxcalc_package.sh 
popd
python polparams.py     > 0.15.0-tcja
python polparams.py ref > 0.15.0-2017
date
exit 0

After executing the testing.sh script, the directory listing looks like this:

-rw-r--r--  1 mrh  staff  112173 Jan  2 11:10 0.14.3-2017
-rw-r--r--  1 mrh  staff  111550 Jan  2 11:10 0.14.3-tcja
-rw-r--r--  1 mrh  staff  112251 Jan  2 11:16 0.15.0-2017
-rw-r--r--  1 mrh  staff  111496 Jan  2 11:16 0.15.0-tcja
-rw-r--r--  1 mrh  staff     947 Jan  2 10:00:47 polparams.py
-rwxr-xr-x  1 mrh  staff     691 Jan  2 10:01:27 testing.sh

And finally, here is the first dump file comparison:

$ diff 0.14.3-tcja 0.15.0-tcja
1,2c1,2
< taxcalc version 0.14.3
< policy regime ../tax-calculator/taxcalc/reforms/TCJA_Reconciliation.json
---
> taxcalc version unknown
> policy regime clp

And here is the second dump file comparison:

$ diff 0.14.3-2017 0.15.0-2017
1,2c1,2
< taxcalc version 0.14.3
< policy regime clp
---
> taxcalc version unknown
> policy regime ../tax-calculator/taxcalc/reforms/2017_law.json
1067c1067
< 2017 cpi_offset 0.0
---
> 2017 cpi_offset 0.0025
1280c1280
< 2018 cpi_offset 0.0
---
> 2018 cpi_offset 0.0025
1493c1493
< 2019 cpi_offset 0.0
---
> 2019 cpi_offset 0.0025
1706c1706
< 2020 cpi_offset 0.0
---
> 2020 cpi_offset 0.0025
1919c1919
< 2021 cpi_offset 0.0
---
> 2021 cpi_offset 0.0025
2132c2132
< 2022 cpi_offset 0.0
---
> 2022 cpi_offset 0.0025
2345c2345
< 2023 cpi_offset 0.0
---
> 2023 cpi_offset 0.0025
2558c2558
< 2024 cpi_offset 0.0
---
> 2024 cpi_offset 0.0025
2771c2771
< 2025 cpi_offset 0.0
---
> 2025 cpi_offset 0.0025
2984c2984
< 2026 cpi_offset 0.0
---
> 2026 cpi_offset 0.0025
3197c3197
< 2027 cpi_offset 0.0
---
> 2027 cpi_offset 0.0025

@martinholmer
Copy link
Collaborator Author

This comment on pull request #1803 describes how the 2019-2026 values are generated for 12 tax rate brackets and 5 other policy parameters whose values are inflation indexed and revert back to pre-TCJA values (computed with chained-CPI indexing) in 2026.

Here is the Python script that generates the values used in the new current_law_policy.json file:

from __future__ import print_function
import os
from taxcalc import __version__, Calculator, Policy

assert __version__ == '0.14.3'

pol = Policy()
ref = os.path.join('..', 'tax-calculator', 'taxcalc', 'reforms',
                   'TCJA_Reconciliation.json')
param = Calculator.read_json_param_objects(ref, None)
pol.implement_reform(param['policy'])
if pol.reform_errors:
    print(pol.reform_errors)
    exit(1)
syr = Policy.JSON_START_YEAR
final_year = 2026
pnames = [
    '_II_brk1', '_II_brk2', '_II_brk3', '_II_brk4', '_II_brk5', '_II_brk6',
    '_PT_brk1', '_PT_brk2', '_PT_brk3', '_PT_brk4', '_PT_brk5', '_PT_brk6',
    '_STD', '_II_em',   '_AMT_em', '_AMT_em_ps',   '_ID_AllTaxes_c'
]
for pname in pnames:
    print('****', pname, '****')
    pval = getattr(pol, pname)
    if pname in ['_II_em']:
        length = 1
    else:
        length = len(pval[0])
    for cyr in range(syr, final_year + 1):
        if length == 1:
            line = '{:.2f},'.format(float(pval[cyr - syr]))
        else:
            line = ' ['
            for idx in range(0, length):
                pvalue = float(pval[cyr - syr][idx])
                if pvalue > 1e9:
                    line += '9e99, '
                else:
                    line += '{:.2f}, '.format(pvalue)
            line = line[:-2] + '],'
        print(line)

And here is the output generated by that script:

**** _II_brk1 ****
 [8925.00, 17850.00, 8925.00, 12750.00, 17850.00],
 [9075.00, 18150.00, 9075.00, 12950.00, 18150.00],
 [9225.00, 18450.00, 9225.00, 13150.00, 18450.00],
 [9275.00, 18550.00, 9275.00, 13250.00, 18550.00],
 [9325.00, 18650.00, 9325.00, 13350.00, 18650.00],
 [9525.00, 19050.00, 9525.00, 13600.00, 19050.00],
 [9714.55, 19429.10, 9714.55, 13870.64, 19429.10],
 [9914.67, 19829.34, 9914.67, 14156.38, 19829.34],
 [10125.85, 20251.70, 10125.85, 14457.91, 20251.70],
 [10346.59, 20693.19, 10346.59, 14773.09, 20693.19],
 [10565.94, 21131.89, 10565.94, 15086.28, 21131.89],
 [10793.11, 21586.23, 10793.11, 15410.64, 21586.23],
 [11023.00, 22046.02, 11023.00, 15738.89, 22046.02],
 [11242.00, 22484.00, 11242.00, 16094.00, 22484.00],
**** _II_brk2 ****
 [36250.00, 72500.00, 36250.00, 48600.00, 72500.00],
 [36900.00, 73800.00, 36900.00, 49400.00, 73800.00],
 [37450.00, 74900.00, 37450.00, 50200.00, 74900.00],
 [37650.00, 75300.00, 37650.00, 50400.00, 75300.00],
 [37950.00, 75900.00, 37950.00, 50800.00, 75900.00],
 [38700.00, 77400.00, 38700.00, 51800.00, 77400.00],
 [39470.13, 78940.26, 39470.13, 52830.82, 78940.26],
 [40283.21, 80566.43, 40283.21, 53919.13, 80566.43],
 [41141.24, 82282.49, 41141.24, 55067.61, 82282.49],
 [42038.12, 84076.25, 42038.12, 56268.08, 84076.25],
 [42929.33, 85858.67, 42929.33, 57460.96, 85858.67],
 [43852.31, 87704.63, 43852.31, 58696.37, 87704.63],
 [44786.36, 89572.74, 44786.36, 59946.60, 89572.74],
 [45751.00, 91502.00, 45751.00, 61242.00, 91502.00],
**** _II_brk3 ****
 [87850.00, 146400.00, 73200.00, 125450.00, 146400.00],
 [89350.00, 148850.00, 74425.00, 127550.00, 148850.00],
 [90750.00, 151200.00, 75600.00, 129600.00, 151200.00],
 [91150.00, 151900.00, 75950.00, 130150.00, 151900.00],
 [91900.00, 153100.00, 76550.00, 131200.00, 153100.00],
 [82500.00, 165000.00, 82500.00, 82500.00, 165000.00],
 [84141.75, 168283.50, 84141.75, 84141.75, 168283.50],
 [85875.07, 171750.14, 85875.07, 85875.07, 171750.14],
 [87704.21, 175408.42, 87704.21, 87704.21, 175408.42],
 [89616.16, 179232.32, 89616.16, 89616.16, 179232.32],
 [91516.02, 183032.05, 91516.02, 91516.02, 183032.05],
 [93483.61, 186967.24, 93483.61, 93483.61, 186967.24],
 [95474.81, 190949.64, 95474.81, 95474.81, 190949.64],
 [110791.00, 184571.00, 92286.00, 158169.00, 184571.00],
**** _II_brk4 ****
 [183250.00, 223050.00, 111525.00, 203150.00, 223050.00],
 [186350.00, 226850.00, 113425.00, 206600.00, 226850.00],
 [189300.00, 230450.00, 115225.00, 209850.00, 230450.00],
 [190150.00, 231450.00, 115725.00, 210800.00, 231450.00],
 [191650.00, 233350.00, 116675.00, 212500.00, 233350.00],
 [157500.00, 315000.00, 157500.00, 157500.00, 315000.00],
 [160634.25, 321268.50, 160634.25, 160634.25, 321268.50],
 [163943.32, 327886.63, 163943.32, 163943.32, 327886.63],
 [167435.31, 334870.62, 167435.31, 167435.31, 334870.62],
 [171085.40, 342170.80, 171085.40, 171085.40, 342170.80],
 [174712.41, 349424.82, 174712.41, 174712.41, 349424.82],
 [178468.73, 356937.45, 178468.73, 178468.73, 356937.45],
 [182270.11, 364540.22, 182270.11, 182270.11, 364540.22],
 [231045.00, 281317.00, 140659.00, 256181.00, 281317.00],
**** _II_brk5 ****
 [398350.00, 398350.00, 199175.00, 398350.00, 398350.00],
 [405100.00, 405100.00, 202550.00, 405100.00, 405100.00],
 [411500.00, 411500.00, 205750.00, 411500.00, 411500.00],
 [413350.00, 413350.00, 206675.00, 413350.00, 413350.00],
 [416700.00, 416700.00, 208350.00, 416700.00, 416700.00],
 [200000.00, 400000.00, 200000.00, 200000.00, 400000.00],
 [203980.00, 407960.00, 203980.00, 203980.00, 407960.00],
 [208181.99, 416363.98, 208181.99, 208181.99, 416363.98],
 [212616.27, 425232.53, 212616.27, 212616.27, 425232.53],
 [217251.30, 434502.60, 217251.30, 217251.30, 434502.60],
 [221857.03, 443714.06, 221857.03, 221857.03, 443714.06],
 [226626.96, 453253.91, 226626.96, 226626.96, 453253.91],
 [231454.11, 462908.22, 231454.11, 231454.11, 462908.22],
 [502356.00, 502356.00, 251178.00, 502356.00, 502356.00],
**** _II_brk6 ****
 [400000.00, 450000.00, 225000.00, 425000.00, 450000.00],
 [406750.00, 457600.00, 228800.00, 432200.00, 457600.00],
 [413200.00, 464850.00, 232425.00, 439000.00, 464850.00],
 [415050.00, 466950.00, 233475.00, 441000.00, 466950.00],
 [418400.00, 470700.00, 235350.00, 444550.00, 470700.00],
 [500000.00, 600000.00, 300000.00, 500000.00, 500000.00],
 [509950.00, 611940.00, 305970.00, 509950.00, 509950.00],
 [520454.97, 624545.96, 312272.98, 520454.97, 520454.97],
 [531540.66, 637848.79, 318924.39, 531540.66, 531540.66],
 [543128.25, 651753.89, 325876.94, 543128.25, 543128.25],
 [554642.57, 665571.07, 332785.53, 554642.57, 554642.57],
 [566567.39, 679880.85, 339940.42, 566567.39, 566567.39],
 [578635.28, 694362.31, 347181.15, 578635.28, 578635.28],
 [504406.00, 567457.00, 283728.00, 535931.00, 567457.00],
**** _PT_brk1 ****
 [8925.00, 17850.00, 8925.00, 12750.00, 17850.00],
 [9075.00, 18150.00, 9075.00, 12950.00, 18150.00],
 [9225.00, 18450.00, 9225.00, 13150.00, 18450.00],
 [9275.00, 18550.00, 9275.00, 13250.00, 18550.00],
 [9325.00, 18650.00, 9325.00, 13350.00, 18650.00],
 [9525.00, 19050.00, 9525.00, 13600.00, 19050.00],
 [9714.55, 19429.10, 9714.55, 13870.64, 19429.10],
 [9914.67, 19829.34, 9914.67, 14156.38, 19829.34],
 [10125.85, 20251.70, 10125.85, 14457.91, 20251.70],
 [10346.59, 20693.19, 10346.59, 14773.09, 20693.19],
 [10565.94, 21131.89, 10565.94, 15086.28, 21131.89],
 [10793.11, 21586.23, 10793.11, 15410.64, 21586.23],
 [11023.00, 22046.02, 11023.00, 15738.89, 22046.02],
 [11242.00, 22484.00, 11242.00, 16094.00, 22484.00],
**** _PT_brk2 ****
 [36250.00, 72500.00, 36250.00, 48600.00, 72500.00],
 [36900.00, 73800.00, 36900.00, 49400.00, 73800.00],
 [37450.00, 74900.00, 37450.00, 50200.00, 74900.00],
 [37650.00, 75300.00, 37650.00, 50400.00, 75300.00],
 [37950.00, 75900.00, 37950.00, 50800.00, 75900.00],
 [38700.00, 77400.00, 38700.00, 51800.00, 77400.00],
 [39470.13, 78940.26, 39470.13, 52830.82, 78940.26],
 [40283.21, 80566.43, 40283.21, 53919.13, 80566.43],
 [41141.24, 82282.49, 41141.24, 55067.61, 82282.49],
 [42038.12, 84076.25, 42038.12, 56268.08, 84076.25],
 [42929.33, 85858.67, 42929.33, 57460.96, 85858.67],
 [43852.31, 87704.63, 43852.31, 58696.37, 87704.63],
 [44786.36, 89572.74, 44786.36, 59946.60, 89572.74],
 [45751.00, 91502.00, 45751.00, 61242.00, 91502.00],
**** _PT_brk3 ****
 [87850.00, 146400.00, 73200.00, 125450.00, 146400.00],
 [89350.00, 148850.00, 74425.00, 127550.00, 148850.00],
 [90750.00, 151200.00, 75600.00, 129600.00, 151200.00],
 [91150.00, 151900.00, 75950.00, 130150.00, 151900.00],
 [91900.00, 153100.00, 76550.00, 131200.00, 153100.00],
 [82500.00, 165000.00, 82500.00, 82500.00, 165000.00],
 [84141.75, 168283.50, 84141.75, 84141.75, 168283.50],
 [85875.07, 171750.14, 85875.07, 85875.07, 171750.14],
 [87704.21, 175408.42, 87704.21, 87704.21, 175408.42],
 [89616.16, 179232.32, 89616.16, 89616.16, 179232.32],
 [91516.02, 183032.05, 91516.02, 91516.02, 183032.05],
 [93483.61, 186967.24, 93483.61, 93483.61, 186967.24],
 [95474.81, 190949.64, 95474.81, 95474.81, 190949.64],
 [110791.00, 184571.00, 92286.00, 158169.00, 184571.00],
**** _PT_brk4 ****
 [183250.00, 223050.00, 111525.00, 203150.00, 223050.00],
 [186350.00, 226850.00, 113425.00, 206600.00, 226850.00],
 [189300.00, 230450.00, 115225.00, 209850.00, 230450.00],
 [190150.00, 231450.00, 115725.00, 210800.00, 231450.00],
 [191650.00, 233350.00, 116675.00, 212500.00, 233350.00],
 [157500.00, 315000.00, 157500.00, 157500.00, 315000.00],
 [160634.25, 321268.50, 160634.25, 160634.25, 321268.50],
 [163943.32, 327886.63, 163943.32, 163943.32, 327886.63],
 [167435.31, 334870.62, 167435.31, 167435.31, 334870.62],
 [171085.40, 342170.80, 171085.40, 171085.40, 342170.80],
 [174712.41, 349424.82, 174712.41, 174712.41, 349424.82],
 [178468.73, 356937.45, 178468.73, 178468.73, 356937.45],
 [182270.11, 364540.22, 182270.11, 182270.11, 364540.22],
 [231045.00, 281317.00, 140659.00, 256181.00, 281317.00],
**** _PT_brk5 ****
 [398350.00, 398350.00, 199175.00, 398350.00, 398350.00],
 [405100.00, 405100.00, 202550.00, 405100.00, 405100.00],
 [411500.00, 411500.00, 205750.00, 411500.00, 411500.00],
 [413350.00, 413350.00, 206675.00, 413350.00, 413350.00],
 [416700.00, 416700.00, 208350.00, 416700.00, 416700.00],
 [200000.00, 400000.00, 200000.00, 200000.00, 400000.00],
 [203980.00, 407960.00, 203980.00, 203980.00, 407960.00],
 [208181.99, 416363.98, 208181.99, 208181.99, 416363.98],
 [212616.27, 425232.53, 212616.27, 212616.27, 425232.53],
 [217251.30, 434502.60, 217251.30, 217251.30, 434502.60],
 [221857.03, 443714.06, 221857.03, 221857.03, 443714.06],
 [226626.96, 453253.91, 226626.96, 226626.96, 453253.91],
 [231454.11, 462908.22, 231454.11, 231454.11, 462908.22],
 [502356.00, 502356.00, 251178.00, 502356.00, 502356.00],
**** _PT_brk6 ****
 [400000.00, 450000.00, 225000.00, 425000.00, 450000.00],
 [406750.00, 457600.00, 228800.00, 432200.00, 457600.00],
 [413200.00, 464850.00, 232425.00, 439000.00, 464850.00],
 [415050.00, 466950.00, 233475.00, 441000.00, 466950.00],
 [418400.00, 470700.00, 235350.00, 444550.00, 470700.00],
 [500000.00, 600000.00, 300000.00, 500000.00, 500000.00],
 [509950.00, 611940.00, 305970.00, 509950.00, 509950.00],
 [520454.97, 624545.96, 312272.98, 520454.97, 520454.97],
 [531540.66, 637848.79, 318924.39, 531540.66, 531540.66],
 [543128.25, 651753.89, 325876.94, 543128.25, 543128.25],
 [554642.57, 665571.07, 332785.53, 554642.57, 554642.57],
 [566567.39, 679880.85, 339940.42, 566567.39, 566567.39],
 [578635.28, 694362.31, 347181.15, 578635.28, 578635.28],
 [504406.00, 567457.00, 283728.00, 535931.00, 567457.00],
**** _STD ****
 [6100.00, 12200.00, 6100.00, 8950.00, 12200.00],
 [6200.00, 12400.00, 6200.00, 9100.00, 12400.00],
 [6300.00, 12600.00, 6300.00, 9250.00, 12600.00],
 [6300.00, 12600.00, 6300.00, 9300.00, 12600.00],
 [6350.00, 12700.00, 6350.00, 9350.00, 12700.00],
 [12000.00, 24000.00, 12000.00, 18000.00, 24000.00],
 [12238.80, 24477.60, 12238.80, 18358.20, 24477.60],
 [12490.92, 24981.84, 12490.92, 18736.38, 24981.84],
 [12756.98, 25513.95, 12756.98, 19135.46, 25513.95],
 [13035.08, 26070.15, 13035.08, 19552.61, 26070.15],
 [13311.42, 26622.84, 13311.42, 19967.13, 26622.84],
 [13597.62, 27195.23, 13597.62, 20396.42, 27195.23],
 [13887.25, 27774.49, 13887.25, 20830.86, 27774.49],
 [7655.00, 15311.00, 7655.00, 11272.00, 15311.00],
**** _II_em ****
3900.00,
3950.00,
4000.00,
4050.00,
4050.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
0.00,
4883.00,
**** _AMT_em ****
 [51900.00, 80800.00, 40400.00, 51900.00, 80800.00],
 [52800.00, 82100.00, 41050.00, 52800.00, 82100.00],
 [53600.00, 83400.00, 41700.00, 53600.00, 83400.00],
 [53900.00, 83800.00, 41900.00, 53900.00, 83800.00],
 [54300.00, 84500.00, 42250.00, 54300.00, 84500.00],
 [70300.00, 109400.00, 54700.00, 70300.00, 109400.00],
 [71698.97, 111577.06, 55788.53, 71698.97, 111577.06],
 [73175.97, 113875.55, 56937.77, 73175.97, 113875.55],
 [74734.62, 116301.10, 58150.54, 74734.62, 116301.10],
 [76363.83, 118836.46, 59418.22, 76363.83, 118836.46],
 [77982.74, 121355.79, 60677.89, 77982.74, 121355.79],
 [79659.37, 123964.94, 61982.46, 79659.37, 123964.94],
 [81356.11, 126605.39, 63302.69, 81356.11, 126605.39],
 [65462.00, 101870.00, 50935.00, 65461.00, 101870.00],
**** _AMT_em_ps ****
 [115400.00, 153900.00, 76950.00, 115400.00, 153900.00],
 [117300.00, 156500.00, 78250.00, 117300.00, 156500.00],
 [119200.00, 158900.00, 79450.00, 119200.00, 158900.00],
 [119700.00, 159700.00, 79850.00, 119700.00, 159700.00],
 [120700.00, 160900.00, 80450.00, 120700.00, 160900.00],
 [500000.00, 1000000.00, 500000.00, 500000.00, 1000000.00],
 [509950.00, 1019900.00, 509950.00, 509950.00, 1019900.00],
 [520454.97, 1040909.94, 520454.97, 520454.97, 1040909.94],
 [531540.66, 1063081.32, 531540.66, 531540.66, 1063081.32],
 [543128.25, 1086256.49, 543128.25, 543128.25, 1086256.49],
 [554642.57, 1109285.13, 554642.57, 554642.57, 1109285.13],
 [566567.39, 1133134.76, 566567.39, 566567.39, 1133134.76],
 [578635.28, 1157270.53, 578635.28, 578635.28, 1157270.53],
 [145511.00, 193974.00, 96987.00, 145511.00, 193974.00],
**** _ID_AllTaxes_c ****
 [9e99, 9e99, 9e99, 9e99, 9e99],
 [9e99, 9e99, 9e99, 9e99, 9e99],
 [9e99, 9e99, 9e99, 9e99, 9e99],
 [9e99, 9e99, 9e99, 9e99, 9e99],
 [9e99, 9e99, 9e99, 9e99, 9e99],
 [10000.00, 10000.00, 5000.00, 10000.00, 10000.00],
 [10199.00, 10199.00, 5099.50, 10199.00, 10199.00],
 [10409.10, 10409.10, 5204.55, 10409.10, 10409.10],
 [10630.81, 10630.81, 5315.41, 10630.81, 10630.81],
 [10862.56, 10862.56, 5431.29, 10862.56, 10862.56],
 [11092.85, 11092.85, 5546.43, 11092.85, 11092.85],
 [11331.35, 11331.35, 5665.68, 11331.35, 11331.35],
 [11572.71, 11572.71, 5786.36, 11572.71, 11572.71],
 [9e99, 9e99, 9e99, 9e99, 9e99],

@MattHJensen
Copy link
Contributor

Thanks @martinholmer! I have yet to review this carefully, but wanted to mention an idea:

What about adding a sunset_year attribute to parameters in current_law_policy.json that would revert the parameter back to its projected baseline value at the given sunset year?

@feenberg
Copy link
Contributor

feenberg commented Jan 10, 2018 via email

@codykallen
Copy link
Contributor

@feenberg said:

Don't we also need the entity wage bill and assets. I don't see us ever getting that until SOI releases some data. Perhaps someone at JCT would give us a hint about what they did, perhaps we could copy them. I don't see how they would have any actual data on this either.

Technically, the business income exclusion and the wage limitation apply on a per income source basis, rather than overall per filer. For example, suppose a filer has $100 of partnership income and $80 of wage income from business A, and $50 of sole proprietorship income and $10 of wage income from business B. The filer calculates the exclusion first for income from business A, and then separately for income from business B. The exclusion for income from business A is $20 (0.2 * 100). Since this is less than $40 (0.5 * 80), the wage limitation is not binding. The gross exclusion for income from business B is $10 (0.2 * 50), but the wage limitation is only $5 (0.5 * 10). If the filer's taxable income is below the wage limitation threshold, the exclusion for business B is $10. If the filer's taxable income is high enough that the wage limitation is fully phased in, then the exclusion for business B is $5. The total exclusion is the sum of the exclusions for business A and business B.

However, we don't have data on business income source and wage income source, nor is it likely that we can get it. Therefore, I have decided to apply the wage limitation overall, rather than on a per business income source basis.

@martinholmer
Copy link
Collaborator Author

@codykallen, Thanks for your enumeration of what needs to be added to TCJA in this comment.

The changes in pull request #1803 are already complex enough that I think it is best to handle your observations in other pull requests that immediately follow #1803.

I'm going to split up your #1803 comment into individual issues, which will then resolved by subsequent pull requests.

Since what has been done in #1803 seems to be correct (although incomplete), I still plan to merge it on Thursday unless someone can point out a mistake.

@martinholmer
Copy link
Collaborator Author

@martinholmer said two days ago in #1803:

Thanks, @codykallen, for your enumeration of what needs to be added to TCJA in this comment.

The changes in pull request #1803 are already complex enough that I think it is best to handle your observations in other pull requests that immediately follow #1803.

I'm going to split up your #1803 comment into individual issues, which will then resolved by subsequent pull requests.

Since what has been done in #1803 seems to be correct (although incomplete), I still plan to merge it on Thursday unless someone can point out a mistake.

Here's what's happened since I made the above comment:

  1. Pull requests Add _ALD_AlimonyReceived_hc policy parameter and logic #1818 and Modify pass-through exclusion calculation #1819, which have been merged into the master branch, solve the alimony-received issue and the pass-through issues.

  2. The tip of the master branch has been merged into this 2017-law-json branch.

  3. This branch has updated current_law_policy.json and reforms/2017_law.json to reflect the Add _ALD_AlimonyReceived_hc policy parameter and logic #1818 and Modify pass-through exclusion calculation #1819 changes.

  4. Because we currently have no data to address issue TCJA treatment of PT income from service businesses #1817, that issue remains open and unresolved.

So, thanks to the contributions from @codykallen, we remain on schedule to merge #1803 at the end of the day on Thursday, January 11th.

@ernietedeschi
Copy link
Contributor

Why does the 2017_law.json file not include parameters for the standard deduction or the personal exemption?

@martinholmer
Copy link
Collaborator Author

@evtedeschi3 asked in merged pull request #1803:

Why does the 2017_law.json file not include parameters for the standard deduction or the personal exemption?

Because when the reform is implemented in 2017 --- or typically before 2017 as in this Cookbook advanced recipe or as in the answer to question 1 of this FAQ --- the standard deduction and personal exemption values are at their pre-TCJA values, and those values are projected forward using the unchained CPI, a part of the 2017_law.json reform that triggers a recalculation of all indexed policy parameters.

For proof that this is what happens, see the TCJA and pre-TCJA Comparisons section of the FAQ.

@ernietedeschi
Copy link
Contributor

That is interesting and informative since it's contrary to my prior understanding of how tax-calculator worked.

Let me ask the same question differently: if, in the CLI, I run the 2017_law.json file as a reform with the simulation year set as, say, 2020, what in this process constrains tax-calculator to use the pre-TCJA base values of the standard deduction and personal exemptions? The fact that _cpi_offset is called?

@martinholmer
Copy link
Collaborator Author

@evtedeschi3 asked:

That is interesting and informative since it's contrary to my prior understanding of how Tax-Calculator worked.

Let me ask the same question differently: if, in the CLI, I run the 2017_law.json file as a reform with the simulation year set as, say, 2020, what in this process constrains Tax-Calculator to use the pre-TCJA base values of the standard deduction and personal exemptions? The fact that _cpi_offset is [part of the reform]?

Good question! I haven't used --reform 2017_law.json in any tc runs with taxyear equal to 2020. I would be interested in what you get when you do that. You are correct that the key aspect of the 2017_law.json reform is the _cpi_offset reform provision in 2017, which is supposed to trigger the recalculation of 2018 values for all indexed policy parameters based off their 2017 values. We all look forward to the results of your experiment using the --reform 2017_law.json option when the tc taxyear equals 2020.

@ernietedeschi
Copy link
Contributor

I will certainly post the results when I have them later.

Doesn't this imply that theoretically a user would be unable to simulate repealing chained CPI against current TCJA law -- but keeping all other aspects of TCJA -- simply by running a reform file calling "_cpi_offset": {"2017": [0.0025]}?

@martinholmer
Copy link
Collaborator Author

martinholmer commented Jan 22, 2018

@evtedeschi3 said:

I will certainly post the results when I have them later.

Great!

Doesn't this imply that [...] a user would be unable to simulate repealing chained CPI against current TCJA law -- but keeping all other aspects of TCJA -- simply by running a reform file calling "_cpi_offset": {"2017": [0.0025]}?

That's right. If you want to do that kind of reform you would have to go back to pre-TCJA law (using the 2017_law.json reform file) and then implement a custom reform that has exactly the same provisions as in the TCJA_Reconciliation.json reform file except for one thing: the _cpi_offset provision would not be included in the custom reform.

The use of such a compound reform --- that is, applying two reforms sequentially to a Policy object --- is discussed in the answer to question 3 of this FAQ and in this advanced Python cookbook recipe. But we have not yet implemented the compound-reform capability in the tc tool. Is having this compound-reform ability in the tc tool important to you right now?

@ernietedeschi
Copy link
Contributor

@martinholmer said:

The use of such a compound reform --- that is, applying two reforms sequentially to a Policy object --- is discussed in the answer to question 3 of this FAQ and in this advanced Python cookbook recipe. But we have not yet implemented the compound-reform capability in the tc tool. Is having this compound-reform ability in the tc tool important to you right now?

Thanks for all the clarification Martin. Yes, there's going to be debate and analysis over the TCJA from the perspective of pre-TCJA law for some time, so it would be very helpful to be able to implement compound reforms in tc.

@martinholmer
Copy link
Collaborator Author

@evtedeschi3 said:

Thanks for all the clarification Martin. Yes, there's going to be debate and analysis over the TCJA from the perspective of pre-TCJA law for some time, so it would be very helpful to be able to implement compound reforms in tc.

OK, I'll see what I can do about moving this enhancement up from its early February scheduled implementation.

Going back to basic understanding. The tc tool (and almost all Python scripts) do things in this order:

  1. Create a Policy object that incorporates the 2013+ policy in current_law_policy.json and leaves the Policy object's current_year attribute at 2013
  2. Implement one (or two) reforms leaving the Policy object's current_year attribute at 2013
  3. Advance the Policy object's current_year attribute to the specified year for tax calculation (e.g., 2020)

Note that Step 2 implements the reform(s) over the whole analysis period, which in the current version of Tax-Calculator is 2013 through 2027.

I hope this explanation helps in understanding what's going on "under the hood".

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.

6 participants