taxcalc 4.3.4__py3-none-any.whl → 4.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. taxcalc/__init__.py +1 -1
  2. taxcalc/assumptions/README.md +1 -1
  3. taxcalc/assumptions/economic_assumptions_template.json +1 -1
  4. taxcalc/calculator.py +7 -3
  5. taxcalc/consumption.py +5 -5
  6. taxcalc/cps_weights.csv.gz +0 -0
  7. taxcalc/growdiff.py +5 -10
  8. taxcalc/growfactors.csv +25 -65
  9. taxcalc/parameters.py +12 -13
  10. taxcalc/policy.py +38 -34
  11. taxcalc/policy_current_law.json +87 -87
  12. taxcalc/puf_ratios.csv +14 -14
  13. taxcalc/puf_weights.csv.gz +0 -0
  14. taxcalc/records.py +6 -3
  15. taxcalc/reforms/2017_law.out.csv +9 -9
  16. taxcalc/reforms/BrownKhanna.out.csv +9 -9
  17. taxcalc/reforms/README.md +7 -6
  18. taxcalc/reforms/Renacci.out.csv +9 -9
  19. taxcalc/reforms/TCJA.out.csv +9 -9
  20. taxcalc/reforms/Trump2016.out.csv +9 -9
  21. taxcalc/reforms/Trump2017.out.csv +9 -9
  22. taxcalc/reforms/ext.json +21 -21
  23. taxcalc/reforms/ptaxes0.out.csv +9 -9
  24. taxcalc/reforms/ptaxes1.out.csv +9 -9
  25. taxcalc/reforms/ptaxes2.out.csv +9 -9
  26. taxcalc/reforms/ptaxes3.out.csv +9 -9
  27. taxcalc/taxcalcio.py +47 -32
  28. taxcalc/tests/cpscsv_agg_expect.csv +17 -17
  29. taxcalc/tests/puf_var_wght_means_by_year.csv +39 -39
  30. taxcalc/tests/pufcsv_agg_expect.csv +19 -19
  31. taxcalc/tests/reforms_expect.csv +19 -19
  32. taxcalc/tests/test_4package.py +42 -0
  33. taxcalc/tests/test_calculator.py +8 -7
  34. taxcalc/tests/test_consumption.py +5 -6
  35. taxcalc/tests/test_cpscsv.py +49 -1
  36. taxcalc/tests/test_growdiff.py +5 -7
  37. taxcalc/tests/test_parameters.py +3 -2
  38. taxcalc/tests/test_policy.py +2 -2
  39. taxcalc/tests/test_reforms.py +1 -1
  40. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/METADATA +5 -7
  41. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/RECORD +45 -45
  42. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/LICENSE +0 -0
  43. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/WHEEL +0 -0
  44. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/entry_points.txt +0 -0
  45. {taxcalc-4.3.4.dist-info → taxcalc-4.4.0.dist-info}/top_level.txt +0 -0
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,6723.42,18988.43,-930.89,4590.00
3
- 12,60000.00,6723.42,48988.43,5935.27,9180.00
4
- 13,460000.00,6723.42,453276.58,135058.27,30414.80
5
- 21,60000.00,13446.83,29400.57,-6296.60,9180.00
6
- 22,120000.00,13446.83,89400.57,8226.47,18360.00
7
- 23,240000.00,13446.83,209400.57,44745.39,36720.00
8
- 31,30000.00,9899.84,11523.86,-6868.57,4590.00
9
- 32,60000.00,9899.84,41523.86,2294.87,9180.00
10
- 33,120000.00,9899.84,101523.86,17870.48,18360.00
2
+ 11,30000.00,6812.86,18841.93,-1042.99,4590.00
3
+ 12,60000.00,6812.86,48841.93,5838.62,9180.00
4
+ 13,460000.00,6812.86,453187.14,134400.50,30414.80
5
+ 21,60000.00,13625.73,28993.43,-6593.73,9180.00
6
+ 22,120000.00,13625.73,88993.43,8004.64,18360.00
7
+ 23,240000.00,13625.73,208993.43,44446.65,36720.00
8
+ 31,30000.00,10031.54,11278.04,-7026.40,4590.00
9
+ 32,60000.00,10031.54,41278.04,2115.35,9180.00
10
+ 33,120000.00,10031.54,101278.04,17728.06,18360.00
taxcalc/reforms/README.md CHANGED
@@ -8,15 +8,16 @@ are stored on your local computer.
8
8
  Such policy reform files can be analyzed on your local computer by
9
9
  using the `tc` command-line interface to Tax-Calculator as described
10
10
  in the [user
11
- guide](https://PSLmodels.github.io/Tax-Calculator/uguide.html) or by
12
- writing your own Python programs that import the Tax-Calculator
13
- `taxcalc` package as described in the
14
- [cookbook](https://PSLmodels.github.io/Tax-Calculator/cookbook.html).
11
+ guide](https://taxcalc.pslmodels.org/guide/cli.html#command-line-interface)
12
+ or by writing your own Python programs that import the Tax-Calculator
13
+ `taxcalc` package as described in the [cookbook
14
+ recipes](https://taxcalc.pslmodels.org/recipes/index.html#recipes).
15
15
 
16
16
  [This
17
17
  document](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/reforms/REFORMS.md#how-to-specify-a-tax-reform-in-a-json-policy-reform-file)
18
18
  provides access to several reform files that represent recent tax
19
19
  reform proposals and guidelines about how to prepare your own reform
20
- files. Look in particular at the
20
+ files. Look in particular at the older
21
21
  [FAQ](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/reforms/TCJA.md#tcja-faq)
22
- on TCJA-related reforms.
22
+ on TCJA-related reforms and the newer section on [TCJA after
23
+ 2025](https://taxcalc.pslmodels.org/usage/tcja_after_2025.html#tcja-after-2025).
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,15882.08,8823.89,-917.61,4590.00
3
- 12,60000.00,15882.08,38823.89,2082.39,9180.00
4
- 13,460000.00,15882.08,444117.92,105428.44,30414.80
5
- 21,60000.00,31764.18,7059.70,-5920.62,9180.00
6
- 22,120000.00,31764.18,67059.70,1605.97,18360.00
7
- 23,240000.00,31764.18,187059.70,30882.84,36720.00
8
- 31,30000.00,15882.08,3529.86,-5796.01,4590.00
9
- 32,60000.00,15882.08,33529.86,552.99,9180.00
10
- 33,120000.00,15882.08,93529.86,14016.42,18360.00
2
+ 11,30000.00,16093.38,8542.16,-945.78,4590.00
3
+ 12,60000.00,16093.38,38542.16,2054.22,9180.00
4
+ 13,460000.00,16093.38,443906.62,105269.97,30414.80
5
+ 21,60000.00,32186.76,6355.40,-6172.82,9180.00
6
+ 22,120000.00,32186.76,66355.40,1535.54,18360.00
7
+ 23,240000.00,32186.76,186355.40,30495.47,36720.00
8
+ 31,30000.00,16093.38,3177.70,-5939.56,4590.00
9
+ 32,60000.00,16093.38,33177.70,517.77,9180.00
10
+ 33,120000.00,16093.38,93177.70,13822.74,18360.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,12404.02,17595.98,114.60,4590.00
3
- 12,60000.00,12404.02,47595.98,4473.91,9180.00
4
- 13,460000.00,12404.02,447595.98,133869.61,30414.80
5
- 21,60000.00,24808.03,35191.97,-3770.79,9180.00
6
- 22,120000.00,24808.03,95191.97,4947.82,18360.00
7
- 23,240000.00,24808.03,215191.97,35840.55,36720.00
8
- 31,30000.00,18606.02,11393.98,-4526.38,4590.00
9
- 32,60000.00,18606.02,41393.98,886.12,9180.00
10
- 33,120000.00,18606.02,101393.98,13568.45,18360.00
2
+ 11,30000.00,12514.06,17485.94,99.65,4590.00
3
+ 12,60000.00,12514.06,47485.94,4412.46,9180.00
4
+ 13,460000.00,12514.06,447485.94,133608.15,30414.80
5
+ 21,60000.00,25028.13,34971.87,-3800.70,9180.00
6
+ 22,120000.00,25028.13,94971.87,4824.92,18360.00
7
+ 23,240000.00,25028.13,214971.87,35682.99,36720.00
8
+ 31,30000.00,18771.09,11228.91,-4601.98,4590.00
9
+ 32,60000.00,18771.09,41228.91,863.82,9180.00
10
+ 33,120000.00,18771.09,101228.91,13463.70,18360.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,15882.08,14117.92,-105.85,4590.00
3
- 12,60000.00,15882.08,44117.92,4067.80,9180.00
4
- 13,460000.00,15882.08,444117.92,134207.98,30414.80
5
- 21,60000.00,31764.18,28235.82,-2211.70,9180.00
6
- 22,120000.00,31764.18,88235.82,6635.60,18360.00
7
- 23,240000.00,31764.18,208235.82,41735.60,36720.00
8
- 31,30000.00,15882.08,14117.92,-3014.86,4590.00
9
- 32,60000.00,15882.08,44117.92,3067.80,9180.00
10
- 33,120000.00,15882.08,104117.92,19442.80,18360.00
2
+ 11,30000.00,16093.38,13906.62,-131.21,4590.00
3
+ 12,60000.00,16093.38,43906.62,3946.31,9180.00
4
+ 13,460000.00,16093.38,443906.62,133942.81,30414.80
5
+ 21,60000.00,32186.76,27813.24,-2262.41,9180.00
6
+ 22,120000.00,32186.76,87813.24,6392.61,18360.00
7
+ 23,240000.00,32186.76,207813.24,41492.61,36720.00
8
+ 31,30000.00,16093.38,13906.62,-3129.39,4590.00
9
+ 32,60000.00,16093.38,43906.62,2946.31,9180.00
10
+ 33,120000.00,16093.38,103906.62,19321.31,18360.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,13446.83,12265.02,-573.50,4590.00
3
- 12,60000.00,13446.83,42265.02,2739.00,9180.00
4
- 13,460000.00,13446.83,446553.17,108485.92,30414.80
5
- 21,60000.00,26893.67,15953.73,-4004.63,9180.00
6
- 22,120000.00,26893.67,75953.73,2495.37,18360.00
7
- 23,240000.00,26893.67,195953.73,36933.93,36720.00
8
- 31,30000.00,19799.67,1624.03,-4546.61,4590.00
9
- 32,60000.00,19799.67,31624.03,362.40,9180.00
10
- 33,120000.00,19799.67,91624.03,13412.91,18360.00
2
+ 11,30000.00,13625.73,12029.06,-597.09,4590.00
3
+ 12,60000.00,13625.73,42029.06,2599.83,9180.00
4
+ 13,460000.00,13625.73,446374.27,107826.13,30414.80
5
+ 21,60000.00,27251.46,15367.70,-4063.23,9180.00
6
+ 22,120000.00,27251.46,75367.70,2436.77,18360.00
7
+ 23,240000.00,27251.46,195367.70,36627.05,36720.00
8
+ 31,30000.00,20063.08,1246.50,-4673.54,4590.00
9
+ 32,60000.00,20063.08,31246.50,324.65,9180.00
10
+ 33,120000.00,20063.08,91246.50,13211.19,18360.00
taxcalc/reforms/ext.json CHANGED
@@ -1,32 +1,32 @@
1
1
  // REFORM TO EXTEND TEMPORARY TCJA PROVISIONS BEYOND 2025
2
- // USING TAX-CALCULATOR 4.3.4
3
- // WITH 2025-to-2026 INDEXING FACTOR = 1.022000
4
- // AND 2028-to-2029 INDEXING FACTOR = 1.019400
2
+ // USING TAX-CALCULATOR 4.4.0
3
+ // WITH 2025-to-2026 INDEXING FACTOR = 1.024900
4
+ // AND 2028-to-2029 INDEXING FACTOR = 1.021800
5
5
  {
6
6
  "II_rt1": {"2026": 0.10},
7
- "II_brk1": {"2026": [12187.35, 24374.7, 12187.35, 17374.0, 24374.7]},
7
+ "II_brk1": {"2026": [12221.93, 24443.86, 12221.93, 17423.3, 24443.86]},
8
8
  "PT_rt1": {"2026": 0.10},
9
- "PT_brk1": {"2026": [12187.35, 24374.7, 12187.35, 17374.0, 24374.7]},
9
+ "PT_brk1": {"2026": [12221.93, 24443.86, 12221.93, 17423.3, 24443.86]},
10
10
  "II_rt2": {"2026": 0.12},
11
- "II_brk2": {"2026": [49541.45, 99082.9, 49541.45, 66276.7, 99082.9]},
11
+ "II_brk2": {"2026": [49682.03, 99364.06, 49682.03, 66464.76, 99364.06]},
12
12
  "PT_rt2": {"2026": 0.12},
13
- "PT_brk2": {"2026": [49541.45, 99082.9, 49541.45, 66276.7, 99082.9]},
13
+ "PT_brk2": {"2026": [49682.03, 99364.06, 49682.03, 66464.76, 99364.06]},
14
14
  "II_rt3": {"2026": 0.22},
15
- "II_brk3": {"2026": [105623.7, 211247.4, 105623.7, 105623.7, 211247.4]},
15
+ "II_brk3": {"2026": [105923.42, 211846.83, 105923.42, 105923.42, 211846.83]},
16
16
  "PT_rt3": {"2026": 0.22},
17
- "PT_brk3": {"2026": [105623.7, 211247.4, 105623.7, 105623.7, 211247.4]},
17
+ "PT_brk3": {"2026": [105923.42, 211846.83, 105923.42, 105923.42, 211846.83]},
18
18
  "II_rt4": {"2026": 0.24},
19
- "II_brk4": {"2026": [201640.6, 403281.2, 201640.6, 201640.6, 403281.2]},
19
+ "II_brk4": {"2026": [202212.77, 404425.54, 202212.77, 202212.77, 404425.54]},
20
20
  "PT_rt4": {"2026": 0.24},
21
- "PT_brk4": {"2026": [201640.6, 403281.2, 201640.6, 201640.6, 403281.2]},
21
+ "PT_brk4": {"2026": [202212.77, 404425.54, 202212.77, 202212.77, 404425.54]},
22
22
  "II_rt5": {"2026": 0.32},
23
- "II_brk5": {"2026": [256036.55, 512073.1, 256036.55, 256011.0, 512073.1]},
23
+ "II_brk5": {"2026": [256763.07, 513526.14, 256763.07, 256737.45, 513526.14]},
24
24
  "PT_rt5": {"2026": 0.32},
25
- "PT_brk5": {"2026": [256036.55, 512073.1, 256036.55, 256011.0, 512073.1]},
25
+ "PT_brk5": {"2026": [256763.07, 513526.14, 256763.07, 256737.45, 513526.14]},
26
26
  "II_rt6": {"2026": 0.35},
27
- "II_brk6": {"2026": [640129.7, 768135.2, 384067.6, 640129.7, 768135.2]},
27
+ "II_brk6": {"2026": [641946.12, 770314.84, 385157.42, 641946.12, 770314.84]},
28
28
  "PT_rt6": {"2026": 0.35},
29
- "PT_brk6": {"2026": [640129.7, 768135.2, 384067.6, 640129.7, 768135.2]},
29
+ "PT_brk6": {"2026": [641946.12, 770314.84, 385157.42, 641946.12, 770314.84]},
30
30
  "II_rt7": {"2026": 0.37},
31
31
  "II_brk7": {"2026": [9e+99, 9e+99, 9e+99, 9e+99, 9e+99]},
32
32
  "PT_rt7": {"2026": 0.37},
@@ -36,10 +36,10 @@
36
36
  "ODC_c": {"2026": 500.00},
37
37
  "CTC_ps": {"2026": [200000.0, 400000.0, 200000.0, 200000.0, 400000.0]},
38
38
  "ACTC_Income_thd": {"2026": 2500.00},
39
- "AMT_em": {"2026": [90038.2, 140014.0, 70007.0, 90038.2, 140014.0]},
40
- "AMT_em_ps": {"2026": [640129.7, 1280259.4, 640129.7, 640129.7, 1280259.4]},
41
- "AMT_em_pe": {"2026": 940401.17},
42
- "STD": {"2026": [15330.0, 30660.0, 15330.0, 22995.0, 30660.0]},
39
+ "AMT_em": {"2026": [90293.69, 140411.3, 70205.65, 90293.69, 140411.3]},
40
+ "AMT_em_ps": {"2026": [641946.12, 1283892.23, 641946.12, 641946.12, 1283892.23]},
41
+ "AMT_em_pe": {"2026": 945745.66},
42
+ "STD": {"2026": [15373.5, 30747.0, 15373.5, 23060.25, 30747.0]},
43
43
  "ID_AllTaxes_c": {"2026": [10000.0, 10000.0, 5000.0, 10000.0, 10000.0]},
44
44
  "ID_Charity_crt_cash": {"2026": 0.60},
45
45
  "ID_Casualty_hc": {"2026": 1.00},
@@ -50,10 +50,10 @@
50
50
  "II_em": {"2026": 0.00},
51
51
  "II_em_ps": {"2026": [9e+99, 9e+99, 9e+99, 9e+99, 9e+99]},
52
52
  "PT_qbid_rt": {"2026": 0.20},
53
- "PT_qbid_taxinc_thd": {"2026": [201640.6, 403281.2, 201640.6, 201640.6, 201640.6]},
53
+ "PT_qbid_taxinc_thd": {"2026": [202212.77, 404425.54, 202212.77, 202212.77, 202212.77]},
54
54
  "PT_qbid_taxinc_gap": {"2026": [50000.0, 100000.0, 50000.0, 50000.0, 100000.0]},
55
55
  "PT_qbid_w2_wages_rt": {"2026": 0.50},
56
56
  "PT_qbid_alt_w2_wages_rt": {"2026": 0.25},
57
57
  "PT_qbid_alt_property_rt": {"2026": 0.03},
58
- "ALD_BusinessLosses_c": {"2029": [339332.31, 678664.61, 339332.31, 339332.31, 678664.61]}
58
+ "ALD_BusinessLosses_c": {"2029": [342803.73, 685607.47, 342803.73, 342803.73, 685607.47]}
59
59
  }
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,6723.42,18988.43,554.60,5100.00
3
- 12,60000.00,6723.42,48988.43,5935.27,10200.00
4
- 13,460000.00,6723.42,453276.58,135058.27,33078.00
5
- 21,60000.00,13446.83,29400.57,-2177.25,10200.00
6
- 22,120000.00,13446.83,89400.57,8226.47,20400.00
7
- 23,240000.00,13446.83,209400.57,44745.39,40800.00
8
- 31,30000.00,9899.84,11523.86,-3556.63,5100.00
9
- 32,60000.00,9899.84,41523.86,2721.83,10200.00
10
- 33,120000.00,9899.84,101523.86,17870.48,20400.00
2
+ 11,30000.00,6812.86,18841.93,526.05,5100.00
3
+ 12,60000.00,6812.86,48841.93,5838.62,10200.00
4
+ 13,460000.00,6812.86,453187.14,134400.50,33078.00
5
+ 21,60000.00,13625.73,28993.43,-2251.46,10200.00
6
+ 22,120000.00,13625.73,88993.43,8004.64,20400.00
7
+ 23,240000.00,13625.73,208993.43,44446.65,40800.00
8
+ 31,30000.00,10031.54,11278.04,-3670.39,5100.00
9
+ 32,60000.00,10031.54,41278.04,2675.55,10200.00
10
+ 33,120000.00,10031.54,101278.04,17728.06,20400.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,6723.42,18988.43,554.60,4590.00
3
- 12,60000.00,6723.42,48988.43,5935.27,9180.00
4
- 13,460000.00,6723.42,453276.58,135058.27,44340.00
5
- 21,60000.00,13446.83,29400.57,-2177.25,9180.00
6
- 22,120000.00,13446.83,89400.57,8226.47,18360.00
7
- 23,240000.00,13446.83,209400.57,44745.39,36720.00
8
- 31,30000.00,9899.84,11523.86,-3556.63,4590.00
9
- 32,60000.00,9899.84,41523.86,2721.83,9180.00
10
- 33,120000.00,9899.84,101523.86,17870.48,18360.00
2
+ 11,30000.00,6812.86,18841.93,526.05,4590.00
3
+ 12,60000.00,6812.86,48841.93,5838.62,9180.00
4
+ 13,460000.00,6812.86,453187.14,134400.50,44340.00
5
+ 21,60000.00,13625.73,28993.43,-2251.46,9180.00
6
+ 22,120000.00,13625.73,88993.43,8004.64,18360.00
7
+ 23,240000.00,13625.73,208993.43,44446.65,36720.00
8
+ 31,30000.00,10031.54,11278.04,-3670.39,4590.00
9
+ 32,60000.00,10031.54,41278.04,2675.55,9180.00
10
+ 33,120000.00,10031.54,101278.04,17728.06,18360.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,6723.42,18988.43,554.60,4590.00
3
- 12,60000.00,6723.42,48988.43,5935.27,9180.00
4
- 13,460000.00,6723.42,453276.58,135058.27,70380.00
5
- 21,60000.00,13446.83,29400.57,-2177.25,9180.00
6
- 22,120000.00,13446.83,89400.57,8226.47,18360.00
7
- 23,240000.00,13446.83,209400.57,44745.39,36720.00
8
- 31,30000.00,9899.84,11523.86,-3556.63,4590.00
9
- 32,60000.00,9899.84,41523.86,2721.83,9180.00
10
- 33,120000.00,9899.84,101523.86,17870.48,18360.00
2
+ 11,30000.00,6812.86,18841.93,526.05,4590.00
3
+ 12,60000.00,6812.86,48841.93,5838.62,9180.00
4
+ 13,460000.00,6812.86,453187.14,134400.50,70380.00
5
+ 21,60000.00,13625.73,28993.43,-2251.46,9180.00
6
+ 22,120000.00,13625.73,88993.43,8004.64,18360.00
7
+ 23,240000.00,13625.73,208993.43,44446.65,36720.00
8
+ 31,30000.00,10031.54,11278.04,-3670.39,4590.00
9
+ 32,60000.00,10031.54,41278.04,2675.55,9180.00
10
+ 33,120000.00,10031.54,101278.04,17728.06,18360.00
@@ -1,10 +1,10 @@
1
1
  RECID,c00100,standard,c04800,iitax,payrolltax
2
- 11,30000.00,6723.42,18988.43,554.60,4590.00
3
- 12,60000.00,6723.42,48988.43,5935.27,9180.00
4
- 13,460000.00,6723.42,453276.58,134778.52,30414.80
5
- 21,60000.00,13446.83,29400.57,-2177.25,9180.00
6
- 22,120000.00,13446.83,89400.57,8226.47,18360.00
7
- 23,240000.00,13446.83,209400.57,44745.39,36720.00
8
- 31,30000.00,9899.84,11523.86,-3556.63,4590.00
9
- 32,60000.00,9899.84,41523.86,2721.83,9180.00
10
- 33,120000.00,9899.84,101523.86,17870.48,18360.00
2
+ 11,30000.00,6812.86,18841.93,526.05,4590.00
3
+ 12,60000.00,6812.86,48841.93,5838.62,9180.00
4
+ 13,460000.00,6812.86,453187.14,134109.50,30414.80
5
+ 21,60000.00,13625.73,28993.43,-2251.46,9180.00
6
+ 22,120000.00,13625.73,88993.43,8004.64,18360.00
7
+ 23,240000.00,13625.73,208993.43,44446.65,36720.00
8
+ 31,30000.00,10031.54,11278.04,-3670.39,4590.00
9
+ 32,60000.00,10031.54,41278.04,2675.55,9180.00
10
+ 33,120000.00,10031.54,101278.04,17728.06,18360.00
taxcalc/taxcalcio.py CHANGED
@@ -68,6 +68,7 @@ class TaxCalcIO():
68
68
  outdir=None):
69
69
  # pylint: disable=too-many-arguments,too-many-locals
70
70
  # pylint: disable=too-many-branches,too-many-statements
71
+ self.gf_reform = None
71
72
  self.errmsg = ''
72
73
  # check name and existence of INPUT file
73
74
  inp = 'x'
@@ -248,6 +249,35 @@ class TaxCalcIO():
248
249
  # pylint: disable=too-many-arguments,too-many-locals
249
250
  # pylint: disable=too-many-statements,too-many-branches
250
251
  self.errmsg = ''
252
+ # instantiate base and reform GrowFactors objects
253
+ if self.tmd_input_data:
254
+ gfactors_base = GrowFactors(self.tmd_gfactor) # pragma: no cover
255
+ gfactors_ref = GrowFactors(self.tmd_gfactor) # pragma: no cover
256
+ else:
257
+ gfactors_base = GrowFactors()
258
+ gfactors_ref = GrowFactors()
259
+ # check tax_year validity
260
+ max_tax_year = gfactors_base.last_year
261
+ if tax_year > max_tax_year:
262
+ msg = f'TAXYEAR={tax_year} is greater than {max_tax_year}'
263
+ self.errmsg += f'ERROR: {msg}\n'
264
+ if self.puf_input_data:
265
+ min_tax_year = max( # pragma: no cover
266
+ Policy.JSON_START_YEAR, Records.PUFCSV_YEAR)
267
+ elif self.cps_input_data:
268
+ min_tax_year = max(
269
+ Policy.JSON_START_YEAR, Records.CPSCSV_YEAR)
270
+ elif self.tmd_input_data:
271
+ min_tax_year = max( # pragma: no cover
272
+ Policy.JSON_START_YEAR, Records.TMDCSV_YEAR)
273
+ else:
274
+ min_tax_year = Policy.JSON_START_YEAR
275
+ if tax_year < min_tax_year:
276
+ msg = f'TAXYEAR={tax_year} is less than {min_tax_year}'
277
+ self.errmsg += f'ERROR: {msg}\n'
278
+ # tax_year out of valid range means cannot proceed with calculations
279
+ if self.errmsg:
280
+ return
251
281
  # get policy parameter dictionary from --baseline file
252
282
  basedict = Calculator.read_json_param_objects(baseline, None)
253
283
  # get assumption sub-dictionaries
@@ -263,34 +293,29 @@ class TaxCalcIO():
263
293
  # remember parameters for reform documentation
264
294
  self.param_dict = paramdict
265
295
  self.policy_dicts = policydicts
296
+ # set last_b_year
297
+ last_b_year = max(tax_year, Policy.LAST_BUDGET_YEAR)
266
298
  # create gdiff_baseline object
267
- gdiff_baseline = GrowDiff()
299
+ gdiff_baseline = GrowDiff(last_budget_year=last_b_year)
268
300
  try:
269
301
  gdiff_baseline.update_growdiff(paramdict['growdiff_baseline'])
270
302
  except paramtools.ValidationError as valerr_msg:
271
303
  self.errmsg += valerr_msg.__str__()
272
- # create GrowFactors base object that incorporates gdiff_baseline
273
- if self.tmd_input_data:
274
- gfactors_base = GrowFactors(self.tmd_gfactor) # pragma: no cover
275
- else:
276
- gfactors_base = GrowFactors()
304
+ # apply gdiff_baseline to gfactor_base
277
305
  gdiff_baseline.apply_to(gfactors_base)
278
306
  # specify gdiff_response object
279
- gdiff_response = GrowDiff()
307
+ gdiff_response = GrowDiff(last_budget_year=last_b_year)
280
308
  try:
281
309
  gdiff_response.update_growdiff(paramdict['growdiff_response'])
282
310
  except paramtools.ValidationError as valerr_msg:
283
311
  self.errmsg += valerr_msg.__str__()
284
- # create GrowFactors ref object that has all gdiff objects applied
285
- if self.tmd_input_data:
286
- gfactors_ref = GrowFactors(self.tmd_gfactor) # pragma: no cover
287
- else:
288
- gfactors_ref = GrowFactors()
312
+ # apply gdiff_baseline and gdiff_response to gfactor_ref
289
313
  gdiff_baseline.apply_to(gfactors_ref)
290
314
  gdiff_response.apply_to(gfactors_ref)
315
+ self.gf_reform = copy.deepcopy(gfactors_ref)
291
316
  # create Policy objects:
292
317
  # ... the baseline Policy object
293
- base = Policy(gfactors=gfactors_base)
318
+ base = Policy(gfactors=gfactors_base, last_budget_year=last_b_year)
294
319
  try:
295
320
  base.implement_reform(basedict['policy'],
296
321
  print_warnings=True,
@@ -301,7 +326,7 @@ class TaxCalcIO():
301
326
  self.errmsg += valerr_msg.__str__()
302
327
  # ... the reform Policy object
303
328
  if self.specified_reform:
304
- pol = Policy(gfactors=gfactors_ref)
329
+ pol = Policy(gfactors=gfactors_ref, last_budget_year=last_b_year)
305
330
  for poldict in policydicts:
306
331
  try:
307
332
  pol.implement_reform(poldict,
@@ -314,22 +339,13 @@ class TaxCalcIO():
314
339
  except paramtools.ValidationError as valerr_msg:
315
340
  self.errmsg += valerr_msg.__str__()
316
341
  else:
317
- pol = Policy(gfactors=gfactors_base)
342
+ pol = Policy(gfactors=gfactors_base, last_budget_year=last_b_year)
318
343
  # create Consumption object
319
- con = Consumption()
344
+ con = Consumption(last_budget_year=last_b_year)
320
345
  try:
321
346
  con.update_consumption(paramdict['consumption'])
322
347
  except paramtools.ValidationError as valerr_msg:
323
348
  self.errmsg += valerr_msg.__str__()
324
- # check for valid tax_year value
325
- if tax_year < pol.start_year:
326
- msg = 'tax_year {} less than policy.start_year {}'
327
- msg = msg.format(tax_year, pol.start_year)
328
- self.errmsg += 'ERROR: {}\n'.format(msg)
329
- if tax_year > pol.end_year:
330
- msg = 'tax_year {} greater than policy.end_year {}'
331
- msg = msg.format(tax_year, pol.end_year)
332
- self.errmsg += 'ERROR: {}\n'.format(msg)
333
349
  # any errors imply cannot proceed with calculations
334
350
  if self.errmsg:
335
351
  return
@@ -386,10 +402,6 @@ class TaxCalcIO():
386
402
  adjust_ratios=None,
387
403
  exact_calculations=exact_calculations)
388
404
  recs_base = copy.deepcopy(recs)
389
- if tax_year < recs.data_year:
390
- msg = 'tax_year {} less than records.data_year {}'
391
- msg = msg.format(tax_year, recs.data_year)
392
- self.errmsg += 'ERROR: {}\n'.format(msg)
393
405
  # create Calculator objects
394
406
  self.calc = Calculator(policy=pol, records=recs,
395
407
  verbose=True,
@@ -571,10 +583,13 @@ class TaxCalcIO():
571
583
  Write reform documentation to text file.
572
584
  """
573
585
  if len(self.policy_dicts) <= 1:
574
- doc = Calculator.reform_documentation(self.param_dict)
586
+ doc = Calculator.reform_documentation(
587
+ self.param_dict, self.gf_reform
588
+ )
575
589
  else:
576
- doc = Calculator.reform_documentation(self.param_dict,
577
- self.policy_dicts[1:])
590
+ doc = Calculator.reform_documentation(
591
+ self.param_dict, self.gf_reform, self.policy_dicts[1:]
592
+ )
578
593
  doc_fname = self._output_filename.replace('.csv', '-doc.text')
579
594
  with open(doc_fname, 'w', encoding='utf-8') as dfile:
580
595
  dfile.write(doc)
@@ -1,26 +1,26 @@
1
1
  ,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026
2
2
  Returns (#m),187.1,199.2,201.9,204.5,207.1,209.7,212.3,214.9,217.5,220.1
3
3
  AGI ($b),9087.6,10714.8,11167.0,11573.2,13174.9,13543.8,14390.3,15077.5,15785.2,16487.0
4
- Itemizers (#m),62.8,23.9,25.0,27.5,31.2,31.2,30.0,29.6,30.4,81.1
5
- Itemized Deduction ($b),1218.6,612.0,655.1,745.4,862.7,881.9,891.8,917.9,964.3,2181.4
6
- Standard Deduction Filers (#m),124.3,175.3,176.9,176.9,175.8,178.5,182.3,185.3,187.1,139.0
7
- Standard Deduction ($b),1092.1,2951.3,3026.1,3080.8,3091.9,3231.4,3534.5,3791.7,3933.0,1610.8
8
- Personal Exemption ($b),1383.6,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2081.5
9
- Taxable Income ($b),6230.6,7959.2,8322.8,8615.4,10049.9,10332.2,10954.0,11432.4,11991.8,11810.0
10
- Regular Tax ($b),1108.0,1380.0,1449.0,1497.4,1762.8,1837.4,1939.0,2018.1,2122.8,2347.6
11
- AMT Income ($b),8319.8,10212.6,10630.3,10965.7,12473.9,12821.8,13655.8,14315.8,14983.7,15102.7
12
- AMT Liability ($b),8.1,0.4,0.4,0.5,1.4,0.7,0.7,0.6,0.6,17.1
13
- AMT Filers (#m),2.6,0.1,0.1,0.1,0.2,0.1,0.1,0.1,0.1,4.1
14
- Tax before Credits ($b),1116.0,1380.4,1449.4,1497.9,1764.3,1838.0,1939.7,2018.7,2123.4,2364.7
15
- Refundable Credits ($b),70.8,102.5,102.7,655.0,827.1,98.5,106.2,111.9,112.8,97.8
16
- Nonrefundable Credits ($b),32.7,97.2,99.2,99.2,0.0,107.7,108.4,109.4,111.2,30.0
4
+ Itemizers (#m),62.8,23.9,25.0,27.5,31.2,31.2,30.0,29.6,30.4,79.7
5
+ Itemized Deduction ($b),1218.6,612.0,655.1,745.4,862.7,881.9,891.8,917.9,964.3,2163.0
6
+ Standard Deduction Filers (#m),124.3,175.3,176.9,176.9,175.8,178.5,182.3,185.3,187.1,140.4
7
+ Standard Deduction ($b),1092.1,2951.3,3026.1,3080.8,3091.9,3231.4,3534.5,3791.7,3933.0,1659.4
8
+ Personal Exemption ($b),1383.6,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2125.0
9
+ Taxable Income ($b),6230.6,7959.2,8322.8,8615.4,10049.9,10332.2,10954.0,11432.4,11991.8,11766.1
10
+ Regular Tax ($b),1108.0,1380.0,1449.0,1497.4,1762.8,1837.4,1939.0,2018.1,2122.8,2327.3
11
+ AMT Income ($b),8319.8,10212.6,10630.3,10965.7,12473.9,12821.8,13655.8,14315.8,14983.7,15116.4
12
+ AMT Liability ($b),8.1,0.4,0.4,0.5,1.4,0.7,0.7,0.6,0.6,16.8
13
+ AMT Filers (#m),2.6,0.1,0.1,0.1,0.2,0.1,0.1,0.1,0.1,4.0
14
+ Tax before Credits ($b),1116.0,1380.4,1449.4,1497.9,1764.3,1838.0,1939.7,2018.7,2123.4,2344.1
15
+ Refundable Credits ($b),70.8,102.5,102.7,655.0,827.1,98.5,106.2,111.9,112.8,98.7
16
+ Nonrefundable Credits ($b),32.7,97.2,99.2,99.2,0.0,107.7,108.4,109.4,111.2,29.5
17
17
  Reform Surtaxes ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
18
18
  Other Taxes ($b),61.3,70.4,72.7,75.9,82.3,87.9,91.9,97.0,102.3,107.8
19
- Ind Income Tax ($b),1073.9,1251.1,1320.2,819.6,1019.4,1719.7,1817.1,1894.4,2001.7,2344.7
19
+ Ind Income Tax ($b),1073.9,1251.1,1320.2,819.6,1019.4,1719.7,1817.1,1894.4,2001.7,2323.7
20
20
  Payroll Taxes ($b),985.0,1081.8,1133.6,1154.6,1250.3,1348.0,1433.8,1505.8,1577.3,1647.1
21
- Combined Liability ($b),2059.0,2333.0,2453.8,1974.2,2269.7,3067.8,3250.9,3400.2,3578.9,3991.9
22
- With Income Tax <= 0 (#m),86.2,94.6,95.3,133.1,126.0,94.5,96.1,97.4,97.9,95.7
23
- With Combined Tax <= 0 (#m),62.8,65.4,66.4,98.2,97.7,67.9,69.3,70.4,71.3,70.7
21
+ Combined Liability ($b),2059.0,2333.0,2453.8,1974.2,2269.7,3067.8,3250.9,3400.2,3578.9,3970.8
22
+ With Income Tax <= 0 (#m),86.2,94.6,95.3,133.1,126.0,94.5,96.1,97.4,97.9,96.2
23
+ With Combined Tax <= 0 (#m),62.8,65.4,66.4,98.2,97.7,67.9,69.3,70.4,71.3,70.8
24
24
  UBI Benefits ($b),0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
25
25
  "Total Benefits, Consumption Value ($b)",2790.7,3225.5,3429.9,3617.0,3993.0,4069.6,4390.5,4696.3,4983.2,5266.5
26
26
  Total Benefits Cost ($b),2790.7,3225.5,3429.9,3617.0,3993.0,4069.6,4390.5,4696.3,4983.2,5266.5