Skip to content

Commit

Permalink
Merge pull request #2231 from martinholmer/1-0-0
Browse files Browse the repository at this point in the history
Update RELEASES/CHANGES info for next release
  • Loading branch information
martinholmer authored Feb 22, 2019
2 parents 8dc4281 + 7114266 commit e2f7204
Show file tree
Hide file tree
Showing 30 changed files with 634 additions and 618 deletions.
21 changes: 21 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ TAX-CALCULATOR CHANGE HISTORY
=============================


Changes in release 1.0.0 on 2019-02-22
--------------------------------------

**This is a major release with changes that make Tax-Calculator
incompatible with earlier releases.**

- Redefine the meaning of the `_CTC_c` policy parameter and remove five old reform parameters that are incompatible with current law

- Remove the Behavior class from Tax-Calculator and rely instead on the `response` function in the Behavioral-Responses behresp package

- Move the `quantity_response` function to the Behavioral-Responses behresp package

- Add new economic-variable growth factors and sample weights based on using the August-2018 CBO ten-year projection

- Fix logic of computing nonrefundable tax credits for children under 17 and for other dependents in years starting with 2018

- Add actual 2018 values for all tax policy parameters

- Add a [reform file](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/reforms/Larson2019.json) that characterizes the payroll and income tax aspects of the Larson Social Security 2100 Act


Changes in release 0.24.0 on 2018-12-14
---------------------------------------

Expand Down
54 changes: 54 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,60 @@ Go [here](https://github.com/PSLmodels/Tax-Calculator/pulls?q=is%3Apr+is%3Aclose
for a complete commit history.


2019-02-22 Release 1.0.0
------------------------
(last merged pull request is
[#2241](https://github.com/PSLmodels/Tax-Calculator/pull/2241))

**This is a major release with changes that make Tax-Calculator
incompatible with earlier releases.**

**API Changes**
- Remove from Tax-Calculator the Behavior class; same capabilities now in Behavioral-Responses
[[#2182](https://github.com/PSLmodels/Tax-Calculator/pull/2182)
by Martin Holmer]
- Redefine the meaning of the `_CTC_c` policy parameter and remove five old reform parameters that are incompatible with current law
[[#2223](https://github.com/PSLmodels/Tax-Calculator/pull/2223)
by Martin Holmer with the assistance of Cody Kallen]
- Remove from Tax-Calculator the `quantity_response` function, which is now in Behavioral-Responses
[[#2233](https://github.com/PSLmodels/Tax-Calculator/pull/2233)
by Martin Holmer]

**New Features**
- Add `ppp.py` developer-only script and create FAQ issue #2183 to describe its use
[[#2181](https://github.com/PSLmodels/Tax-Calculator/pull/2181)
by Martin Holmer]
- Move read-the-docs documentation into several Tax-Calculator/*.md files
[[#2184](https://github.com/PSLmodels/Tax-Calculator/pull/2184)
by Martin Holmer]
- Incorporate slightly different CPS and PUF input data files
[[#2185](https://github.com/PSLmodels/Tax-Calculator/pull/2185)
by Martin Holmer with data from Anderson Frailey], which requires new `puf.csv` input file (see [taxdata pull request 296](https://github.com/PSLmodels/taxdata/pull/296) for details) with this information:
* Byte size: 56415704
* MD5 checksum: 4aa15435c319bf5e4d3427faf52384c0
- Add new data files generated in [taxdata pull request 297](https://github.com/PSLmodels/taxdata/pull/297) using the August-2018 CBO ten-year projection
[[#2196](https://github.com/PSLmodels/Tax-Calculator/pull/2196)
by Martin Holmer with data from Anderson Frailey]
- Add actual 2018 values for all policy parameters
[[#2212](https://github.com/PSLmodels/Tax-Calculator/pull/2212)
by Peter Metz]
- Revise specification of `2017_law.json` and `TCJA.json` reform files to work when last known parameter values are for 2018
[[#2218](https://github.com/PSLmodels/Tax-Calculator/pull/2218)
by Martin Holmer]
- Add policy parameter that allows specification of the payroll tax aspects of the Larson Social Security 2100 Act
[[#2222](https://github.com/PSLmodels/Tax-Calculator/pull/2222)
by Anderson Frailey]

**Bug Fixes**
- Fix negative/zero/positive split of bottom decile in distribution and difference tables
[[#2192](https://github.com/PSLmodels/Tax-Calculator/pull/2192)
by Martin Holmer]
- Fix CTC+ODC logic for 2018+
[[#2211](https://github.com/PSLmodels/Tax-Calculator/pull/2211)
[#2205](https://github.com/PSLmodels/Tax-Calculator/pull/2205)
by Martin Holmer with need pointed out by Peter Metz]


2018-12-14 Release 0.24.0
-------------------------
(last merged pull request is
Expand Down
Binary file modified docs/atr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions docs/cookbook.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ <h1 id="toc">Cookbook of Tested Recipes for Python Programming with
<p>This document tells you how to use Tax-Calculator, an open-source
federal income and payroll tax simulation model, in Python scripts
that you can run on your own computer. Note that these recipes
require either (1) Tax-Calculator release 0.23.4 or higher running on
Python 3.6, or (2) Tax-Calculator release 0.24.0 or higher running on
Python 3.7. For other ways of using Tax-Calculator, see the
require Tax-Calculator release 1.0.0 or higher running on Python 3.6
or Python 3.7. For other ways of using Tax-Calculator, see the
<a href="https://PSLmodels.github.io/Tax-Calculator/index.html">user
guide</a>, which this Cookbook assumes you have read.</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/cookbook/recipe00.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
print(Calculator.reform_documentation(params))

# print total revenue estimates for cyr
# (estimates in billons of dollars rounded to nearest hundredth of a billion)
# (estimates in billons of dollars)
print('{}_CLP_itax_rev($B)= {:.3f}'.format(cyr, itax_rev1 * 1e-9))
print('{}_REF_itax_rev($B)= {:.3f}'.format(cyr, itax_rev2 * 1e-9))
print('')
Expand Down
150 changes: 73 additions & 77 deletions docs/cookbook/recipe00.res
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
You loaded data for 2014.
Your data include the following unused variables that will be ignored:
filer
Tax-Calculator startup automatically extrapolated your data to 2014.
You loaded data for 2014.
Your data include the following unused variables that will be ignored:
filer
Tax-Calculator startup automatically extrapolated your data to 2014.

REFORM DOCUMENTATION
Expand Down Expand Up @@ -51,93 +47,93 @@ Policy Reform Parameter Values by Year:
and above tax bracket 6.
baseline_value: 0.37

2020_CLP_itax_rev($B)= 1413.014
2020_REF_itax_rev($B)= 1410.347
2020_CLP_itax_rev($B)= 1432.600
2020_REF_itax_rev($B)= 1428.017

CLP diagnostic table:
2020
Returns (#m) 167.510
AGI ($b) 11946.468
Itemizers (#m) 31.010
Itemized Deduction ($b) 872.622
Standard Deduction Filers (#m) 136.500
Standard Deduction ($b) 2438.667
AGI ($b) 12041.458
Itemizers (#m) 31.240
Itemized Deduction ($b) 878.287
Standard Deduction Filers (#m) 136.270
Standard Deduction ($b) 2440.766
Personal Exemption ($b) 0.000
Taxable Income ($b) 9126.133
Regular Tax ($b) 1574.241
AMT Income ($b) 11332.222
AMT Liability ($b) 1.421
AMT Filers (#m) 0.270
Tax before Credits ($b) 1575.663
Refundable Credits ($b) 78.598
Nonrefundable Credits ($b) 93.678
Taxable Income ($b) 9216.525
Regular Tax ($b) 1592.841
AMT Income ($b) 11424.323
AMT Liability ($b) 1.374
AMT Filers (#m) 0.260
Tax before Credits ($b) 1594.215
Refundable Credits ($b) 78.050
Nonrefundable Credits ($b) 93.997
Reform Surtaxes ($b) 0.000
Other Taxes ($b) 9.627
Ind Income Tax ($b) 1413.014
Payroll Taxes ($b) 1316.606
Combined Liability ($b) 2729.619
With Income Tax <= 0 (#m) 60.380
With Combined Tax <= 0 (#m) 39.230
Other Taxes ($b) 10.432
Ind Income Tax ($b) 1432.600
Payroll Taxes ($b) 1327.653
Combined Liability ($b) 2760.253
With Income Tax <= 0 (#m) 60.120
With Combined Tax <= 0 (#m) 39.120

REF diagnostic table:
2020
Returns (#m) 167.510
AGI ($b) 11946.468
Itemizers (#m) 30.930
Itemized Deduction ($b) 870.299
Standard Deduction Filers (#m) 136.580
Standard Deduction ($b) 2440.097
Personal Exemption ($b) 327.446
Taxable Income ($b) 8879.639
Regular Tax ($b) 1569.173
AMT Income ($b) 11334.179
AMT Liability ($b) 1.356
AMT Filers (#m) 0.270
Tax before Credits ($b) 1570.530
Refundable Credits ($b) 81.346
Nonrefundable Credits ($b) 88.463
AGI ($b) 12041.458
Itemizers (#m) 31.170
Itemized Deduction ($b) 876.211
Standard Deduction Filers (#m) 136.340
Standard Deduction ($b) 2442.096
Personal Exemption ($b) 333.334
Taxable Income ($b) 8963.931
Regular Tax ($b) 1585.819
AMT Income ($b) 11426.046
AMT Liability ($b) 1.376
AMT Filers (#m) 0.260
Tax before Credits ($b) 1587.196
Refundable Credits ($b) 80.781
Nonrefundable Credits ($b) 88.829
Reform Surtaxes ($b) 0.000
Other Taxes ($b) 9.627
Ind Income Tax ($b) 1410.347
Payroll Taxes ($b) 1316.606
Combined Liability ($b) 2726.953
With Income Tax <= 0 (#m) 62.590
With Combined Tax <= 0 (#m) 39.570
Other Taxes ($b) 10.432
Ind Income Tax ($b) 1428.017
Payroll Taxes ($b) 1327.653
Combined Liability ($b) 2755.670
With Income Tax <= 0 (#m) 62.370
With Combined Tax <= 0 (#m) 39.450

Extract of 2020 distribution table by baseline expanded-income decile:
funits(#m) itax1($b) itax2($b) aftertax_inc1($b) aftertax_inc2($b)
0-10n 0.00 0.000 0.000 0.000 0.000
0-10z 0.00 0.000 0.000 0.000 0.000
0-10p 16.75 -4.253 -4.619 162.917 163.283
10-20 16.75 -1.739 -2.816 413.293 414.370
20-30 16.75 3.460 2.226 551.423 552.656
30-40 16.75 9.875 8.189 679.057 680.743
40-50 16.75 18.822 16.491 836.906 839.237
50-60 16.75 32.389 29.325 1028.539 1031.603
60-70 16.75 61.360 57.428 1263.665 1267.597
70-80 16.75 106.617 101.306 1584.030 1589.341
80-90 16.75 213.706 205.454 2108.779 2117.031
90-100 16.75 972.777 997.363 4309.822 4285.237
ALL 167.51 1413.014 1410.347 12938.431 12941.098
90-95 8.38 214.444 210.125 1438.241 1442.561
95-99 6.70 327.050 326.019 1668.490 1669.521
Top 1% 1.68 431.283 461.219 1203.091 1173.155
0-10n 0.05 0.006 0.007 -13.155 -13.155
0-10z 0.93 0.000 0.000 -0.000 -0.000
0-10p 15.77 -4.280 -4.640 176.760 177.120
10-20 16.75 -1.652 -2.722 414.305 415.375
20-30 16.75 3.181 1.960 552.887 554.108
30-40 16.75 10.215 8.523 680.590 682.281
40-50 16.75 19.433 17.080 839.476 841.829
50-60 16.75 33.452 30.355 1031.334 1034.432
60-70 16.75 62.384 58.428 1269.639 1273.595
70-80 16.75 108.746 103.384 1592.696 1598.057
80-90 16.75 217.842 209.539 2121.011 2129.315
90-100 16.75 983.272 1006.102 4335.353 4312.523
ALL 167.51 1432.600 1428.017 13000.897 13005.480
90-95 8.38 217.863 213.571 1449.125 1453.417
95-99 6.70 331.552 330.100 1680.139 1681.591
Top 1% 1.68 433.857 462.431 1206.090 1177.515

Extract of 2020 income-tax difference table by expanded-income decile:
funits(#m) agg_diff($b) mean_diff($) aftertaxinc_diff(%)
0-10n 0.00 0.000 0.0 NaN
0-10z 0.00 0.000 0.0 NaN
0-10p 16.75 -0.366 -21.8 0.2
10-20 16.75 -1.077 -64.3 0.3
20-30 16.75 -1.233 -73.6 0.2
30-40 16.75 -1.686 -100.7 0.2
40-50 16.75 -2.331 -139.1 0.3
50-60 16.75 -3.064 -182.9 0.3
60-70 16.75 -3.932 -234.7 0.3
70-80 16.75 -5.311 -317.0 0.3
80-90 16.75 -8.252 -492.6 0.4
90-100 16.75 24.585 1467.7 -0.6
ALL 167.51 -2.667 -15.9 0.0
90-95 8.38 -4.320 -515.7 0.3
95-99 6.70 -1.031 -153.9 0.1
Top 1% 1.68 29.936 17871.1 -2.5
0-10n 0.05 0.000 2.9 0.0
0-10z 0.93 0.000 0.0 0.0
0-10p 15.77 -0.360 -22.8 0.2
10-20 16.75 -1.070 -63.9 0.3
20-30 16.75 -1.220 -72.9 0.2
30-40 16.75 -1.691 -101.0 0.2
40-50 16.75 -2.353 -140.4 0.3
50-60 16.75 -3.098 -184.9 0.3
60-70 16.75 -3.957 -236.2 0.3
70-80 16.75 -5.361 -320.0 0.3
80-90 16.75 -8.303 -495.7 0.4
90-100 16.75 22.830 1362.9 -0.5
ALL 167.51 -4.583 -27.4 0.0
90-95 8.38 -4.292 -512.5 0.3
95-99 6.70 -1.452 -216.7 0.1
Top 1% 1.68 28.574 17057.9 -2.4
36 changes: 20 additions & 16 deletions docs/cookbook/recipe01.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
REFORMS_URL = ('https://raw.githubusercontent.com/'
'PSLmodels/Tax-Calculator/master/taxcalc/reforms/')

baseline_name = '2017_law.json' # pre-TCJA policy
baseline_url = REFORMS_URL + baseline_name
baseline = Calculator.read_json_param_objects(baseline_url, None)
reform1_name = '2017_law.json' # pre-TCJA policy
reform1_url = REFORMS_URL + reform1_name
reform1 = Calculator.read_json_param_objects(reform1_url, None)

reform_name = 'TCJA.json' # TCJA as passed by Congress
reform_url = REFORMS_URL + reform_name
reform2_name = 'TCJA.json' # TCJA as passed by Congress
reform2_url = REFORMS_URL + reform2_name

# specify Policy object for pre-TCJA baseline
# specify Policy object for pre-TCJA policy
bpolicy = Policy()
bpolicy.implement_reform(baseline['policy'], print_warnings=False)
bpolicy.implement_reform(reform1['policy'], print_warnings=False)
assert not bpolicy.parameter_errors

# specify Policy object for static analysis of reform relative to pre-TCJA
reform = Calculator.read_json_param_objects(reform_url, None)
reform2 = Calculator.read_json_param_objects(reform2_url, None)
rpolicy = Policy()
rpolicy.implement_reform(baseline['policy'], print_warnings=False)
rpolicy.implement_reform(reform1['policy'], print_warnings=False)
assert not rpolicy.parameter_errors
rpolicy.implement_reform(reform['policy'], print_warnings=False)
rpolicy.implement_reform(reform2['policy'], print_warnings=False)
assert not rpolicy.parameter_errors

cyr = 2018
Expand All @@ -42,7 +42,7 @@
iitax_rev2 = calc2.weighted_total('iitax')

# construct reform-vs-baseline difference table with results for income deciles
diff_table = calc2.difference_table(calc1, 'weighted_deciles', 'iitax')
diff_table = calc1.difference_table(calc2, 'weighted_deciles', 'iitax')
assert isinstance(diff_table, pd.DataFrame)
diff_extract = pd.DataFrame()
dif_colnames = ['count', 'tax_cut', 'tax_inc',
Expand All @@ -53,10 +53,14 @@
diff_extract[ename] = diff_table[dname]

# print total revenue estimates for cyr
# (estimates in billons of dollars rounded to nearest tenth of a billion)
print('{}_BASELINE_iitax_rev($B)= {:.3f}'.format(cyr, iitax_rev1 * 1e-9))
print('{}_REFORM___iitax_rev($B)= {:.3f}'.format(cyr, iitax_rev2 * 1e-9))
# (estimates in billons of dollars)
print('{}_REFORM1_iitax_rev($B)= {:.3f}'.format(cyr, iitax_rev1 * 1e-9))
print('{}_REFORM2_iitax_rev($B)= {:.3f}'.format(cyr, iitax_rev2 * 1e-9))
print('')

# print reform-vs-baseline difference table
print(diff_extract)
# print reform2-vs-reform1 difference table
title = 'Extract of {} income-tax difference table by expanded-income decile'
print(title.format(cyr))
print('(taxfall is count of funits with cut in income tax in reform 2 vs 1)')
print('(taxrise is count of funits with rise in income tax in reform 2 vs 1)')
print(diff_extract.to_string())
Loading

0 comments on commit e2f7204

Please sign in to comment.