taxcalc 5.1.0__py3-none-any.whl → 5.2.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.
taxcalc/__init__.py CHANGED
@@ -14,6 +14,6 @@ from taxcalc.taxcalcio import *
14
14
  from taxcalc.utils import *
15
15
  from taxcalc.cli import *
16
16
 
17
- __version__ = '5.1.0'
17
+ __version__ = '5.2.0'
18
18
  __min_python3_version__ = 10
19
19
  __max_python3_version__ = 12
taxcalc/calcfunctions.py CHANGED
@@ -943,8 +943,9 @@ def ItemDed(e17500, e18400, e18500, e19200,
943
943
  ID_Medical_c, ID_StateLocalTax_c, ID_RealEstate_c,
944
944
  ID_InterestPaid_c, ID_Charity_c, ID_Casualty_c,
945
945
  ID_Miscellaneous_c, ID_AllTaxes_c, ID_AllTaxes_hc,
946
+ ID_AllTaxes_c_ps, ID_AllTaxes_c_po_rate, ID_AllTaxes_c_po_floor,
946
947
  ID_StateLocalTax_crt, ID_RealEstate_crt, ID_Charity_f,
947
- ID_reduction_salt_rate, ID_reduction_other_rate):
948
+ ID_reduction_rate):
948
949
  """
949
950
  Calculates itemized deductions, Form 1040, Schedule A.
950
951
 
@@ -1057,10 +1058,16 @@ def ItemDed(e17500, e18400, e18500, e19200,
1057
1058
  Ceiling on the amount of miscellaneous expense deduction
1058
1059
  allowed (dollars)
1059
1060
  ID_AllTaxes_c: list
1060
- Ceiling on the amount of state and local income, stales, and
1061
+ Cap on the amount of state and local income, sales, and
1061
1062
  real estate deductions allowed (dollars)
1062
1063
  ID_AllTaxes_hc: float
1063
1064
  State and local income, sales, and real estate tax deduciton haircut
1065
+ ID_AllTaxes_c_ps: float
1066
+ AGI level above which ID_AllTaxes_c is reduced
1067
+ ID_AllTaxes_c_po_rate: float
1068
+ ID_AllTaxes_c reduction rate when AGI is above ID_AllTaxes_c_ps
1069
+ ID_AllTaxes_c_po_floor: float
1070
+ Floor below which ID_AllTaxes_c cannot be reduced
1064
1071
  ID_StateLocalTax_crt: float
1065
1072
  Ceiling (as decimal fraction of AGI) for the combination of all
1066
1073
  state and local income and sales tax deductions
@@ -1069,10 +1076,8 @@ def ItemDed(e17500, e18400, e18500, e19200,
1069
1076
  state, local, and foreign real estate tax deductions
1070
1077
  ID_Charity_f: list
1071
1078
  Floor on the amount of charity expense deduction allowed (dollars)
1072
- ID_reduction_salt_rate: float
1073
- OBBBA reduction rate for SALT deductions
1074
- ID_reduction_other_rate: float
1075
- OBBBA reduction rate for other deductions
1079
+ ID_reduction_rate: float
1080
+ OBBBA reduction rate for all itemized deductions
1076
1081
 
1077
1082
  Returns
1078
1083
  -------
@@ -1115,7 +1120,12 @@ def ItemDed(e17500, e18400, e18500, e19200,
1115
1120
  c18400 = min(c18400, ID_StateLocalTax_crt * max(c00100, 0.0001))
1116
1121
  c18500 = min(c18500, ID_RealEstate_crt * max(c00100, 0.0001))
1117
1122
  c18300 = (c18400 + c18500) * (1. - ID_AllTaxes_hc)
1118
- c18300 = min(c18300, ID_AllTaxes_c[MARS - 1])
1123
+ cap = ID_AllTaxes_c[MARS - 1]
1124
+ if posagi > ID_AllTaxes_c_ps[MARS - 1]:
1125
+ excess_agi = posagi - ID_AllTaxes_c_ps[MARS - 1]
1126
+ cap = max(0., cap - excess_agi * ID_AllTaxes_c_po_rate)
1127
+ cap = max(cap, ID_AllTaxes_c_po_floor[MARS - 1])
1128
+ c18300 = min(c18300, cap)
1119
1129
  # Interest paid
1120
1130
  c19200 = e19200 * (1. - ID_InterestPaid_hc)
1121
1131
  c19200 = min(c19200, ID_InterestPaid_c[MARS - 1])
@@ -1154,16 +1164,11 @@ def ItemDed(e17500, e18400, e18500, e19200,
1154
1164
  # OBBBA limitation on total itemized deductions
1155
1165
  # (no attempt to adjust c04470 components for limitation)
1156
1166
  reduction = 0.
1157
- if ID_reduction_salt_rate > 0. or ID_reduction_other_rate > 0.:
1167
+ if ID_reduction_rate > 0.:
1158
1168
  assert c21040 <= 0.0, "Pease and OBBBA cannot both be in effect"
1159
1169
  tincome = max(0., c00100 - c04600)
1160
1170
  texcess = max(0., tincome - II_brk6[MARS - 1])
1161
- smaller_salt = min(c18300, texcess)
1162
- salt_reduction = ID_reduction_salt_rate * smaller_salt
1163
- other_deds = max(0, c04470 - c18300)
1164
- smaller_other = min(other_deds, texcess)
1165
- other_reduction = ID_reduction_other_rate * smaller_other
1166
- reduction = salt_reduction + other_reduction
1171
+ reduction = ID_reduction_rate * texcess
1167
1172
  c04470 = max(0., c04470 - reduction)
1168
1173
  # Cap total itemized deductions
1169
1174
  # (no attempt to adjust c04470 components for limitation)
taxcalc/policy.py CHANGED
@@ -103,6 +103,13 @@ class Policy(Parameters):
103
103
  'ID_Charity_crt_cash': (
104
104
  'was renamed ID_Charity_crt_all in Tax-Calculator 5.1.0'
105
105
  ),
106
+ # following parameters were renamed in PR 2939
107
+ 'ID_reduction_salt_rate': (
108
+ 'was renamed ID_reduction_rate in Tax-Calculator 5.1.0'
109
+ ),
110
+ 'ID_reduction_other_rate': (
111
+ 'was renamed ID_reduction_rate in Tax-Calculator 5.1.0'
112
+ ),
106
113
  }
107
114
  # (2) specify which Policy parameters have been redefined recently
108
115
  # where "recently" means in the last major release