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 _cpi_offset work like other policy parameters #1796

Merged
merged 4 commits into from
Dec 24, 2017
Merged

Make _cpi_offset work like other policy parameters #1796

merged 4 commits into from
Dec 24, 2017

Conversation

martinholmer
Copy link
Collaborator

This pull request makes the _cpi_offset policy parameter work like other policy parameters in that it can now revise history by changing the historically known values of policy parameters. These changes do not affect any results generated for the TCJA bills because those bills called for chained-CPI indexing of only unknown policy parameter values (that is, values for 2018 and beyond). These changes do affect results from hypothetical reforms that switch to chained-CPI indexing in earlier years, as was discussed in PolicyBrain pull request 790 here.

An example will help clarify the nature of the changes in this pull request. Consider this script:

from __future__ import print_function
from taxcalc import *

policyb = Policy()

policyr = Policy()
ref = {2015: {'_cpi_offset': [-0.005]}}
# ref = {2015: {'_II_em': [0]}}
print(ref)
policyr.implement_reform(ref)
if policyr.reform_errors:
    print(policyr.reform_errors)
    exit(1)

print('YEAR  EXMPb  EXMPr   STD0b  STD0r   STD4b  STD4r')
res = '{}  {:.0f}   {:.0f}    {:.0f}   {:.0f}    {:.0f}  {:.0f}'
syr = Policy.JSON_START_YEAR
for cyr in range(2014, 2026):
    policyb.set_year(cyr)
    policyr.set_year(cyr)
    print(res.format(cyr,
                     policyb.II_em, policyr.II_em,
                     policyb.STD[0], policyr.STD[0],
                     policyb.STD[4], policyr.STD[4]))
exit(0)

Before this pull request was merged, the script generates these results:

{2015: {'_cpi_offset': [-0.005]}}
YEAR  EXMPb  EXMPr   STD0b  STD0r   STD4b  STD4r
2014  3950   3950    6200   6200    12400  12400
2015  4000   4000    6300   6300    12600  12600
2016  4050   4050    6300   6300    12600  12600
2017  4050   4050    6350   6350    12700  12700
2018  4141   4121    6493   6461    12986  12922
2019  4234   4193    6638   6574    13277  13147
2020  4332   4268    6792   6693    13583  13385
2021  4435   4349    6953   6818    13907  13637
2022  4543   4433    7122   6950    14245  13900
2023  4650   4516    7291   7080    14582  14160
2024  4762   4601    7466   7214    14932  14429
2025  4875   4688    7644   7350    15287  14700

Notice that the reform values and the baseline values are the same for 2016 and 2017 because values for those years are known in the current_law_policy.json file.

After this pull request is merged, the script generates these results:

{2015: {'_cpi_offset': [-0.005]}}
YEAR  EXMPb  EXMPr   STD0b  STD0r   STD4b  STD4r
2014  3950   3950    6200   6200    12400  12400
2015  4000   4000    6300   6300    12600  12600
2016  4050   3985    6300   6277    12600  12553
2017  4050   4016    6350   6325    12700  12650
2018  4141   4086    6493   6436    12986  12871
2019  4234   4157    6638   6548    13277  13095
2020  4332   4233    6792   6666    13583  13332
2021  4435   4312    6953   6792    13907  13583
2022  4543   4395    7122   6923    14245  13845
2023  4650   4478    7291   7052    14582  14104
2024  4762   4563    7466   7186    14932  14372
2025  4875   4648    7644   7321    15287  14642

Notice that the reform values and the baseline values are now different for 2016 and 2017 even though values for those years are known in the current_law_policy.json file. And, of course, reform values in 2018+ are lower than before because chained-CPI indexing starts earlier after the changes in this pull request.

@codecov-io
Copy link

codecov-io commented Dec 24, 2017

Codecov Report

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

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1796   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          37      37           
  Lines        3035    3042    +7     
======================================
+ Hits         3035    3042    +7
Impacted Files Coverage Δ
taxcalc/parameters.py 100% <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 09edfcd...06e9607. Read the comment docs.

@martinholmer martinholmer merged commit 428a2a7 into PSLmodels:master Dec 24, 2017
@martinholmer martinholmer deleted the revise-cpi-offset-logic branch December 30, 2017 15:22
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.

2 participants