taxcalc 4.3.4__py3-none-any.whl → 4.3.5__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.
- taxcalc/__init__.py +1 -1
- taxcalc/assumptions/README.md +1 -1
- taxcalc/assumptions/economic_assumptions_template.json +1 -1
- taxcalc/calculator.py +7 -3
- taxcalc/cps_weights.csv.gz +0 -0
- taxcalc/growfactors.csv +25 -65
- taxcalc/parameters.py +5 -7
- taxcalc/policy.py +18 -30
- taxcalc/policy_current_law.json +87 -87
- taxcalc/puf_ratios.csv +14 -14
- taxcalc/puf_weights.csv.gz +0 -0
- taxcalc/records.py +6 -3
- taxcalc/reforms/2017_law.out.csv +9 -9
- taxcalc/reforms/BrownKhanna.out.csv +9 -9
- taxcalc/reforms/README.md +7 -6
- taxcalc/reforms/Renacci.out.csv +9 -9
- taxcalc/reforms/TCJA.out.csv +9 -9
- taxcalc/reforms/Trump2016.out.csv +9 -9
- taxcalc/reforms/Trump2017.out.csv +9 -9
- taxcalc/reforms/ext.json +21 -21
- taxcalc/reforms/ptaxes0.out.csv +9 -9
- taxcalc/reforms/ptaxes1.out.csv +9 -9
- taxcalc/reforms/ptaxes2.out.csv +9 -9
- taxcalc/reforms/ptaxes3.out.csv +9 -9
- taxcalc/taxcalcio.py +8 -3
- taxcalc/tests/cpscsv_agg_expect.csv +17 -17
- taxcalc/tests/puf_var_wght_means_by_year.csv +39 -39
- taxcalc/tests/pufcsv_agg_expect.csv +19 -19
- taxcalc/tests/reforms_expect.csv +19 -19
- taxcalc/tests/test_calculator.py +5 -3
- taxcalc/tests/test_parameters.py +3 -2
- taxcalc/tests/test_reforms.py +1 -1
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/METADATA +1 -1
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/RECORD +38 -38
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/LICENSE +0 -0
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/WHEEL +0 -0
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/entry_points.txt +0 -0
- {taxcalc-4.3.4.dist-info → taxcalc-4.3.5.dist-info}/top_level.txt +0 -0
taxcalc/__init__.py
CHANGED
taxcalc/assumptions/README.md
CHANGED
@@ -9,7 +9,7 @@ Such an economic assumption file can then be used by the `tc`
|
|
9
9
|
command-line interface to Tax-Calculator or be read in a Python
|
10
10
|
program that imports the Tax-Calculator `taxcalc` package, as
|
11
11
|
described in the [user
|
12
|
-
guide](https://
|
12
|
+
guide](https://taxcalc.pslmodels.org/guide/index.html#user-guide).
|
13
13
|
|
14
14
|
[This
|
15
15
|
document](https://github.com/PSLmodels/Tax-Calculator/blob/master/taxcalc/assumptions/ASSUMPTIONS.md#how-to-specify-economic-assumptions-in-a-json-assumption-file)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
// about how individuals and the overall economy respond to a tax reform.
|
5
5
|
//
|
6
6
|
// Detailed documentation on these parameters can be found at
|
7
|
-
// <
|
7
|
+
// <https://taxcalc.pslmodels.org/guide/assumption_params.html>.
|
8
8
|
{
|
9
9
|
"consumption": {
|
10
10
|
"MPC_e17500": {"2017": 0.0},
|
taxcalc/calculator.py
CHANGED
@@ -1110,7 +1110,7 @@ class Calculator():
|
|
1110
1110
|
return param_dict
|
1111
1111
|
|
1112
1112
|
@staticmethod
|
1113
|
-
def reform_documentation(params, policy_dicts=None):
|
1113
|
+
def reform_documentation(params, growfactors, policy_dicts=None):
|
1114
1114
|
"""
|
1115
1115
|
Generate reform documentation versus current-law policy.
|
1116
1116
|
|
@@ -1120,6 +1120,9 @@ class Calculator():
|
|
1120
1120
|
dictionary is structured like dict returned from
|
1121
1121
|
the static Calculator.read_json_param_objects() method
|
1122
1122
|
|
1123
|
+
growfactors: GrowFactors
|
1124
|
+
GrowFactors object used to construct Calculator Policy object
|
1125
|
+
|
1123
1126
|
policy_dicts : list of dict or None
|
1124
1127
|
each dictionary in list is a params['policy'] dictionary
|
1125
1128
|
representing second and subsequent elements of a compound
|
@@ -1255,13 +1258,14 @@ class Calculator():
|
|
1255
1258
|
# create Policy object with current-law-policy values
|
1256
1259
|
gdiff_base = GrowDiff()
|
1257
1260
|
gdiff_base.update_growdiff(params['growdiff_baseline'])
|
1258
|
-
|
1261
|
+
assert isinstance(growfactors, GrowFactors)
|
1262
|
+
gfactors_clp = copy.deepcopy(growfactors)
|
1259
1263
|
gdiff_base.apply_to(gfactors_clp)
|
1260
1264
|
clp = Policy(gfactors=gfactors_clp)
|
1261
1265
|
# create Policy object with post-reform values
|
1262
1266
|
gdiff_resp = GrowDiff()
|
1263
1267
|
gdiff_resp.update_growdiff(params['growdiff_response'])
|
1264
|
-
gfactors_ref =
|
1268
|
+
gfactors_ref = copy.deepcopy(growfactors)
|
1265
1269
|
gdiff_base.apply_to(gfactors_ref)
|
1266
1270
|
gdiff_resp.apply_to(gfactors_ref)
|
1267
1271
|
ref = Policy(gfactors=gfactors_ref)
|
taxcalc/cps_weights.csv.gz
CHANGED
Binary file
|
taxcalc/growfactors.csv
CHANGED
@@ -1,65 +1,25 @@
|
|
1
|
-
YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS,ACGNS,ASOCSEC,AUCOMP,AIPD,ABENOTHER,ABENMCARE,ABENMCAID,ABENSSI,ABENSNAP,ABENWIC,ABENHOUSING,ABENTANF,ABENVET
|
2
|
-
2011,1
|
3
|
-
2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359,1
|
4
|
-
2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515,1
|
5
|
-
2014,1.029476,0.931683,0.976566,1.015927,1.023917,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257,1
|
6
|
-
2015,1.043858,0.508206,0.999544,1.001235,1.026485,1.024119,1.038052,1.040061,1.04481,1.057257,1.013311,1.013846,1.004308,1.017188,0.81793,0.988666,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693
|
7
|
-
2016,1.021978,1.071198,0.984833,1.012621,1.037807,1.006659,0.984484,1.005593,0.982695,0.983807,0.999649,0.968237,0.881651,0.991403,0.933831,1.001764,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413
|
8
|
-
2017,1.049373,0.907035,1.018491,1.
|
9
|
-
2018,1.042394,0.976786,1.074059,1.
|
10
|
-
2019,1.032351,0.979401,1.019085,1.
|
11
|
-
2020,1.067957,1.167938,0.947032,1.
|
12
|
-
2021,1.065517,1.126248,1.216697,1.
|
13
|
-
2022,1.014347,1.742914,1.047552,1.
|
14
|
-
2023,1.050108,0.653145,1.091056,1.
|
15
|
-
2024,1.046242,0.895528,1.007166,1.
|
16
|
-
2025,1.040442,0.963117,1.020457,1.
|
17
|
-
2026,1.039294,0.987094,1.014705,1.
|
18
|
-
2027,1.037119,0.998822,1.017535,1.
|
19
|
-
2028,1.036799,1.006582,1.023966,1.
|
20
|
-
2029,1.035913,1.010333,1.028149,1.
|
21
|
-
2030,1.036423,1.01018,1.024121,1.
|
22
|
-
2031,1.036362,1.010259,1.024733,1.
|
23
|
-
2032,1.036409,1.009979,1.028,1.
|
24
|
-
2033,1.035793,1.008195,1.02813,1.
|
25
|
-
2034,1.035385,1.008203,1.02971,1.
|
26
|
-
2035,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
27
|
-
2036,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
28
|
-
2037,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
29
|
-
2038,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
30
|
-
2039,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
31
|
-
2040,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
32
|
-
2041,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
33
|
-
2042,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
34
|
-
2043,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
35
|
-
2044,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
36
|
-
2045,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
37
|
-
2046,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
38
|
-
2047,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
39
|
-
2048,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
40
|
-
2049,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
41
|
-
2050,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
42
|
-
2051,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
43
|
-
2052,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
44
|
-
2053,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
45
|
-
2054,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
46
|
-
2055,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
47
|
-
2056,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
48
|
-
2057,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
49
|
-
2058,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
50
|
-
2059,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
51
|
-
2060,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
52
|
-
2061,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
53
|
-
2062,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
54
|
-
2063,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
55
|
-
2064,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
56
|
-
2065,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
57
|
-
2066,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
58
|
-
2067,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
59
|
-
2068,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
60
|
-
2069,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
61
|
-
2070,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
62
|
-
2071,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
63
|
-
2072,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
64
|
-
2073,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
65
|
-
2074,1.035385,1.008203,1.02971,1.02,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
|
1
|
+
YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS,ACGNS,ASOCSEC,AUCOMP,AIPD,ABENOTHER,ABENMCARE,ABENMCAID,ABENSSI,ABENSNAP,ABENWIC,ABENHOUSING,ABENTANF,ABENVET
|
2
|
+
2011,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
3
|
+
2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359,1,1,1,1,1,1,1,1
|
4
|
+
2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515,1,1,1,1,1,1,1,1
|
5
|
+
2014,1.029476,0.931683,0.976566,1.015927,1.023917,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257,1,1,1,1,1,1,1,1
|
6
|
+
2015,1.043858,0.508206,0.999544,1.001235,1.026485,1.024119,1.038052,1.040061,1.04481,1.057257,1.013311,1.013846,1.004308,1.017188,0.81793,0.988666,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693
|
7
|
+
2016,1.021978,1.071198,0.984833,1.012621,1.037807,1.006659,0.984484,1.005593,0.982695,0.983807,0.999649,0.968237,0.881651,0.991403,0.933831,1.001764,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413
|
8
|
+
2017,1.049373,0.907035,1.018491,1.021273,1.025035,1.040577,1.060677,1.132498,1.093477,1.160123,1.088642,1.102389,1.344721,1.00723,0.94186,1.029301,1.011911,1.030968,1.014601,0.981621,1,0.998715,1.063959,1,1
|
9
|
+
2018,1.042394,0.976786,1.074059,1.0245,1.019707,1.041821,1.042769,1.042713,1.074048,1.074033,1.031272,1.076804,1.074755,1.018778,0.92284,1.050825,1.103035,1.045097,1.045897,1.005738,1,1.002574,1.034828,1,1
|
10
|
+
2019,1.032351,0.979401,1.019085,1.017913,1.028328,1.039292,1.004274,1.004387,1.019131,1.019122,1.014806,1.041751,0.925878,1.031182,0.940635,1.040577,1.054052,1.052158,1.045866,1.000751,1,1.002567,1.034809,1,1
|
11
|
+
2020,1.067957,1.167938,0.947032,1.012495,1.041121,1.006381,1.016054,1.015991,0.947016,0.94708,0.989319,1.091767,1.292516,1.023383,1.034222,1.076313,0.996727,1.050763,1.046106,1.00255,1,1.003841,1.034974,1,1
|
12
|
+
2021,1.065517,1.126248,1.216697,1.047189,1.012343,1.079707,1.057058,1.05708,1.216716,1.216644,0.999214,1.057982,1.792117,1.011965,8.619252,1.073809,1.03007,1.047248,1.047927,1.001796,1,1.002551,1.034869,1,1
|
13
|
+
2022,1.014347,1.742914,1.047552,1.08083,1.040311,1.076282,1.022527,1.022546,1.047553,1.047566,1.049118,1.042358,0.631565,1.04749,0.152665,1.022138,1.030159,1.048769,1.047573,0.999851,1,1.002545,1.034942,1,1
|
14
|
+
2023,1.050108,0.653145,1.091056,1.040233,1.004761,1.050035,1.013156,1.013121,1.091037,1.091047,1.026196,1.126711,1.0525,1.085497,0.748857,1.058072,1.030193,1.050822,1.048715,1.000448,1,1.003807,1.034968,1,1
|
15
|
+
2024,1.046242,0.895528,1.007166,1.025982,1.01407,1.040377,1.0397,1.03963,1.007187,1.007157,1.156028,1.023049,0.932271,1.052921,1.337549,1.054081,1.030334,1.048426,1.051767,0.99776,1,1.002528,1.034951,1,1
|
16
|
+
2025,1.040442,0.963117,1.020457,1.024892,0.958663,1.038977,1.037682,1.037745,1.020415,1.020444,1.091746,1.02538,0.97747,1.031721,1.154874,1.047914,1.030635,1.046248,1.052213,1.002245,1,1.003783,1.034897,1,1
|
17
|
+
2026,1.039294,0.987094,1.014705,1.023445,1.014023,1.035978,1.037783,1.037762,1.014711,1.014716,1.098184,1.019802,0.970235,1.030992,1.035291,1.046856,1.030633,1.072236,1,0.999552,1,1.002513,1.034808,1,1
|
18
|
+
2027,1.037119,0.998822,1.017535,1.021948,1.013312,1.033569,1.03414,1.034138,1.017568,1.017583,1.066606,1.013266,0.993714,1.031791,1.045541,1.044372,1.030788,1,1,1,1,1.002506,1.034863,1,1
|
19
|
+
2028,1.036799,1.006582,1.023966,1.021812,1.013356,1.033042,1.031594,1.03158,1.023985,1.02393,1.050716,1.021542,1.009158,1.03344,1.043558,1.043967,1.030942,1,1,1,1,1,1,1,1
|
20
|
+
2029,1.035913,1.010333,1.028149,1.022135,1.013612,1.033365,1.030869,1.030888,1.028085,1.028143,1.03013,1.032091,1.018962,1.033664,1.045739,1.042825,1.031131,1,1,1,1,1,1,1,1
|
21
|
+
2030,1.036423,1.01018,1.024121,1.022298,1.013855,1.03321,1.030563,1.030595,1.02417,1.024128,1.036979,1.032934,1.024538,1.034401,1.043738,1.043174,1.03133,1,1,1,1,1,1,1,1
|
22
|
+
2031,1.036362,1.010259,1.024733,1.022377,1.014016,1.032812,1.031233,1.03124,1.024699,1.024734,1.039197,1.032793,1.027842,1.036645,1.038241,1.042951,1.03151,1,1,1,1,1,1,1,1
|
23
|
+
2032,1.036409,1.009979,1.028,1.022687,1.014306,1.032126,1.032334,1.032295,1.028004,1.027983,1.04014,1.03261,1.029719,1.036435,1.031319,1.042807,1.031644,1,1,1,1,1,1,1,1
|
24
|
+
2033,1.035793,1.008195,1.02813,1.022484,1.014309,1.031481,1.033961,1.033991,1.028128,1.02811,1.031669,1.03246,1.030798,1.037554,1.028443,1.042009,1.031857,1,1,1,1,1,1,1,1
|
25
|
+
2034,1.035385,1.008203,1.02971,1.02246,1.014443,1.030912,1.033294,1.033253,1.029705,1.029722,1.027096,1.032231,1.031308,1.03748,1.029528,1.041408,1.032059,1,1,1,1,1,1,1,1
|
taxcalc/parameters.py
CHANGED
@@ -1,15 +1,12 @@
|
|
1
|
-
import copy
|
2
1
|
import os
|
3
|
-
import
|
2
|
+
import copy
|
4
3
|
from collections import defaultdict
|
5
4
|
from typing import Union, Mapping, Any, List
|
6
5
|
|
7
6
|
import marshmallow as ma
|
8
7
|
import paramtools as pt
|
9
8
|
import numpy as np
|
10
|
-
import requests
|
11
9
|
|
12
|
-
import taxcalc
|
13
10
|
from taxcalc.growfactors import GrowFactors
|
14
11
|
|
15
12
|
|
@@ -249,7 +246,6 @@ class Parameters(pt.Parameters):
|
|
249
246
|
label_to_extend = self.label_to_extend
|
250
247
|
array_first = self.array_first
|
251
248
|
self.array_first = False
|
252
|
-
self._gfactors = GrowFactors()
|
253
249
|
|
254
250
|
params = self.read_params(params_or_path)
|
255
251
|
|
@@ -508,12 +504,14 @@ class Parameters(pt.Parameters):
|
|
508
504
|
|
509
505
|
def wage_growth_rates(self, year=None):
|
510
506
|
if year is not None:
|
511
|
-
|
507
|
+
syr = max(self.start_year, self._gfactors.first_year)
|
508
|
+
return self._wage_growth_rates[year - syr]
|
512
509
|
return self._wage_growth_rates or []
|
513
510
|
|
514
511
|
def inflation_rates(self, year=None):
|
515
512
|
if year is not None:
|
516
|
-
|
513
|
+
syr = max(self.start_year, self._gfactors.first_year)
|
514
|
+
return self._inflation_rates[year - syr]
|
517
515
|
return self._inflation_rates or []
|
518
516
|
|
519
517
|
# alias methods below
|
taxcalc/policy.py
CHANGED
@@ -8,7 +8,6 @@ Tax-Calculator federal tax policy Policy class.
|
|
8
8
|
import os
|
9
9
|
import json
|
10
10
|
from pathlib import Path
|
11
|
-
import numpy as np
|
12
11
|
from taxcalc.parameters import Parameters
|
13
12
|
from taxcalc.growfactors import GrowFactors
|
14
13
|
|
@@ -53,7 +52,7 @@ class Policy(Parameters):
|
|
53
52
|
'DependentCredit_before_CTC': 'is a removed parameter name',
|
54
53
|
'FilerCredit_c': 'is a removed parameter name',
|
55
54
|
'ALD_InvInc_ec_base_RyanBrady': 'is a removed parameter name',
|
56
|
-
#
|
55
|
+
# following parameter renamed in PR 2292 merged on 2019-04-15
|
57
56
|
"cpi_offset": (
|
58
57
|
"was renamed parameter_indexing_CPI_offset. "
|
59
58
|
"See documentation for change in usage."
|
@@ -62,7 +61,7 @@ class Policy(Parameters):
|
|
62
61
|
"was renamed parameter_indexing_CPI_offset. "
|
63
62
|
"See documentation for change in usage."
|
64
63
|
),
|
65
|
-
#
|
64
|
+
# following parameters renamed in PR 2345 merged on 2019-06-24
|
66
65
|
'PT_excl_rt':
|
67
66
|
'was renamed PT_qbid_rt in release 2.4.0',
|
68
67
|
'PT_excl_wagelim_thd':
|
@@ -102,17 +101,18 @@ class Policy(Parameters):
|
|
102
101
|
Policy.WAGE_INDEXED_PARAMS, **kwargs)
|
103
102
|
|
104
103
|
@staticmethod
|
105
|
-
def tmd_constructor(
|
104
|
+
def tmd_constructor(growfactors: Path | GrowFactors): # pragma: no cover
|
106
105
|
"""
|
107
106
|
Static method returns a Policy object instantiated with TMD
|
108
107
|
input data. This convenience method works in a analogous way
|
109
108
|
to Policy(), which returns a Policy object instantiated with
|
110
109
|
non-TMD input data.
|
111
110
|
"""
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
111
|
+
if isinstance(growfactors, Path):
|
112
|
+
growfactors = GrowFactors(growfactors_filename=str(growfactors))
|
113
|
+
else:
|
114
|
+
assert isinstance(growfactors, GrowFactors)
|
115
|
+
return Policy(gfactors=growfactors)
|
116
116
|
|
117
117
|
@staticmethod
|
118
118
|
def read_json_reform(obj):
|
@@ -147,32 +147,20 @@ class Policy(Parameters):
|
|
147
147
|
return [k for k in defaults if k != "schema"]
|
148
148
|
|
149
149
|
def set_rates(self):
|
150
|
-
"""
|
150
|
+
"""
|
151
|
+
Initialize policy parameter indexing rates.
|
152
|
+
"""
|
151
153
|
cpi_vals = [
|
152
154
|
vo["value"] for
|
153
155
|
vo in self._data["parameter_indexing_CPI_offset"]["value"]
|
154
156
|
]
|
155
|
-
#
|
156
|
-
#
|
157
|
-
|
158
|
-
|
157
|
+
# policy_current_law.json should not specify any non-zero values
|
158
|
+
# for the parameter_indexing_CPI_offset parameter, so check this
|
159
|
+
assert any(cpi_vals) is False
|
160
|
+
syr = max(self.start_year, self._gfactors.first_year)
|
161
|
+
self._inflation_rates = self._gfactors.price_inflation_rates(
|
162
|
+
syr, self.end_year
|
159
163
|
)
|
160
|
-
cpi_offset = {
|
161
|
-
(self.start_year + ix): val
|
162
|
-
for ix, val in enumerate(cpi_vals)
|
163
|
-
}
|
164
|
-
|
165
|
-
self._gfactors = GrowFactors()
|
166
|
-
|
167
|
-
self._inflation_rates = [
|
168
|
-
np.round(rate + cpi_offset[self.start_year + ix], 4)
|
169
|
-
for ix, rate in enumerate(
|
170
|
-
self._gfactors.price_inflation_rates(
|
171
|
-
self.start_year, self.end_year
|
172
|
-
)
|
173
|
-
)
|
174
|
-
]
|
175
|
-
|
176
164
|
self._wage_growth_rates = self._gfactors.wage_growth_rates(
|
177
|
-
|
165
|
+
syr, self.end_year
|
178
166
|
)
|