policyengine-us 1.352.1__py3-none-any.whl → 1.354.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.
Potentially problematic release.
This version of policyengine-us might be problematic. Click here for more details.
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/amended_structure/applies.yaml +13 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/amended_structure/second_increment.yaml +19 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/amended_structure/second_min.yaml +11 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/amended_structure/second_start.yaml +21 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/max.yaml +2 -0
- policyengine_us/parameters/gov/irs/credits/cdcc/phase_out/min.yaml +2 -0
- policyengine_us/parameters/gov/irs/credits/ctc/adult_ssn_requirement_applies.yaml +11 -0
- policyengine_us/parameters/gov/irs/credits/ctc/child_ssn_requirement_applies.yaml +0 -1
- policyengine_us/parameters/gov/irs/credits/ctc/eligible_ssn_card_type.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/auto_loan_interest/cap.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/auto_loan_interest/phase_out/increment.yaml +11 -0
- policyengine_us/parameters/gov/irs/deductions/auto_loan_interest/phase_out/start.yaml +21 -0
- policyengine_us/parameters/gov/irs/deductions/auto_loan_interest/phase_out/step.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/deductions_if_itemizing.yaml +14 -0
- policyengine_us/parameters/gov/irs/deductions/deductions_if_not_itemizing.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/casualty/active.yaml +0 -1
- policyengine_us/parameters/gov/irs/deductions/itemized/charity/ceiling/all.yaml +0 -1
- policyengine_us/parameters/gov/irs/deductions/itemized/charity/ceiling/non_cash.yaml +2 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/charity/floor/amount.yaml +11 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/charity/floor/applies.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/charity/non_itemizers_amount.yaml +8 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/interest/mortgage/cap.yaml +0 -5
- policyengine_us/parameters/gov/irs/deductions/itemized/misc/applies.yaml +0 -1
- policyengine_us/parameters/gov/irs/deductions/itemized/reduction/amended_structure/applies.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/reduction/amended_structure/rate.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/cap.yaml +30 -5
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/floor/amount.yaml +21 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/floor/applies.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/in_effect.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/rate.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/itemized/salt_and_real_estate/phase_out/threshold.yaml +41 -0
- policyengine_us/parameters/gov/irs/deductions/overtime_income/cap.yaml +22 -0
- policyengine_us/parameters/gov/irs/deductions/overtime_income/eligible_ssn_card_type.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/overtime_income/phase_out/rate.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/overtime_income/phase_out/start.yaml +22 -0
- policyengine_us/parameters/gov/irs/deductions/qbi/deduction_floor/amount.yaml +21 -0
- policyengine_us/parameters/gov/irs/deductions/qbi/deduction_floor/in_effect.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/qbi/max/business_property/rate.yaml +1 -6
- policyengine_us/parameters/gov/irs/deductions/qbi/max/rate.yaml +1 -2
- policyengine_us/parameters/gov/irs/deductions/qbi/max/w2_wages/alt_rate.yaml +1 -6
- policyengine_us/parameters/gov/irs/deductions/qbi/max/w2_wages/rate.yaml +1 -6
- policyengine_us/parameters/gov/irs/deductions/qbi/phase_out/length.yaml +12 -10
- policyengine_us/parameters/gov/irs/deductions/qbi/phase_out/start.yaml +7 -5
- policyengine_us/parameters/gov/irs/deductions/senior_deduction/amount.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/senior_deduction/eligible_ssn_card_type.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/senior_deduction/phase_out_rate/joint.yaml +20 -0
- policyengine_us/parameters/gov/irs/deductions/senior_deduction/phase_out_rate/other.yaml +20 -0
- policyengine_us/parameters/gov/irs/deductions/tip_income/cap.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/tip_income/eligible_ssn_card_type.yaml +13 -0
- policyengine_us/parameters/gov/irs/deductions/tip_income/phase_out/rate.yaml +12 -0
- policyengine_us/parameters/gov/irs/deductions/tip_income/phase_out/start.yaml +22 -0
- policyengine_us/reforms/reconciliation/__init__.py +0 -27
- policyengine_us/reforms/reforms.py +0 -45
- policyengine_us/tests/policy/baseline/gov/irs/credits/cdcc/cdcc_rate.yaml +40 -0
- policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/filer_meets_ctc_identification_requirements.yaml +51 -0
- policyengine_us/tests/policy/baseline/gov/irs/credits/ctc/maximum/individual/meets_ctc_child_identification_requirements.yaml +2 -2
- policyengine_us/tests/policy/baseline/gov/irs/deductions/itemized/salt_and_real_estate/reported_salt.yaml +2 -4
- policyengine_us/tests/policy/baseline/gov/irs/deductions/itemized/salt_and_real_estate/salt_deduction.yaml +78 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/auto_loan_interest_deduction.yaml +26 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction.yaml +42 -6
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/itemized_taxable_income_deductions_reduction.yaml +18 -5
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/itemizing/misc_deduction.yaml +0 -18
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/overtime_income/overtime_income_deduction.yaml +39 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/overtime_income/overtime_income_deduction_ssn_requirement_met.yaml +53 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/qbid/qualified_business_income_deduction.yaml +33 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/senior_deduction/integration.yaml +107 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/senior_deduction/meets_additional_senior_deduction_identification_requirements.yaml +71 -0
- policyengine_us/tests/policy/{contrib/reconciliation/reconciled_tip_and_overtime_exempt.yaml → baseline/gov/irs/income/taxable_income/deductions/tip_and_overtime_income_deduction.yaml} +39 -114
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tip_income/tip_income_deduction.yaml +79 -0
- policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tip_income/tip_income_deduction_ineligible_cardholder_present.yaml +53 -0
- policyengine_us/tests/policy/baseline/gov/states/ca/cdss/state_supplement/integration.yaml +106 -0
- policyengine_us/variables/gov/irs/credits/cdcc/cdcc_rate.py +18 -0
- policyengine_us/variables/gov/irs/credits/ctc/ctc.py +1 -0
- policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/filer_meets_ctc_identification_requirements.py +20 -0
- policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/meets_ctc_child_identification_requirements.py +3 -6
- policyengine_us/variables/gov/irs/credits/ctc/maximum/individual/meets_ctc_identification_requirements.py +17 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/auto_loan_interest/auto_loan_interest_deduction.py +30 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction.py +18 -3
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/itemized_taxable_income_deductions_reduction.py +18 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/salt_cap.py +12 -2
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/overtime_income/overtime_income_deduction.py +24 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/overtime_income/overtime_income_deduction_ssn_requirement_met.py +25 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/qualified_business_income_deduction/qualified_business_income_deduction.py +10 -3
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/senior_deduction/additional_senior_deduction.py +31 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/senior_deduction/additional_senior_deduction_eligible_person.py +24 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py +0 -1
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/tip_income/tip_income_deduction.py +23 -0
- policyengine_us/variables/gov/irs/income/taxable_income/deductions/tip_income/tip_income_deduction_ssn_requirement_met.py +25 -0
- policyengine_us/variables/gov/states/ca/cdss/state_supplement/payment_standard/ca_state_supplement_dependent_amount.py +1 -7
- {policyengine_us-1.352.1.dist-info → policyengine_us-1.354.0.dist-info}/METADATA +1 -1
- {policyengine_us-1.352.1.dist-info → policyengine_us-1.354.0.dist-info}/RECORD +94 -106
- policyengine_us/parameters/gov/contrib/reconciliation/additional_senior_standard_deduction/amount.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/additional_senior_standard_deduction/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/additional_senior_standard_deduction/rate/joint.yaml +0 -20
- policyengine_us/parameters/gov/contrib/reconciliation/additional_senior_standard_deduction/rate/other.yaml +0 -20
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/cap.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/in_effect.yaml +0 -13
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/phase_out/increment.yaml +0 -11
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/phase_out/start.yaml +0 -21
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/phase_out/step.yaml +0 -11
- policyengine_us/parameters/gov/contrib/reconciliation/auto_loan_interest_ald/senate_version/applies.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/cdcc/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/cdcc/phase_out/second_increment.yaml +0 -19
- policyengine_us/parameters/gov/contrib/reconciliation/cdcc/phase_out/second_min.yaml +0 -11
- policyengine_us/parameters/gov/contrib/reconciliation/cdcc/phase_out/second_start.yaml +0 -19
- policyengine_us/parameters/gov/contrib/reconciliation/charitable_donations/floor.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/charitable_donations/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/ctc/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/ctc/one_person_ssn_req.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/overtime_income_exempt/cap.yaml +0 -22
- policyengine_us/parameters/gov/contrib/reconciliation/overtime_income_exempt/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/overtime_income_exempt/phase_out/applies.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/overtime_income_exempt/phase_out/rate.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/overtime_income_exempt/phase_out/start.yaml +0 -24
- policyengine_us/parameters/gov/contrib/reconciliation/pease/amended_structure/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/pease/amended_structure/salt_rate.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/pease/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/pease/rate.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/qbid/deduction_floor/amount.yaml +0 -21
- policyengine_us/parameters/gov/contrib/reconciliation/qbid/deduction_floor/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/qbid/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/qbid/phase_out_rate.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/qbid/use_bdc_income.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/tip_income_exempt/cap.yaml +0 -22
- policyengine_us/parameters/gov/contrib/reconciliation/tip_income_exempt/in_effect.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/tip_income_exempt/phase_out/applies.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/tip_income_exempt/phase_out/rate.yaml +0 -12
- policyengine_us/parameters/gov/contrib/reconciliation/tip_income_exempt/phase_out/start.yaml +0 -23
- policyengine_us/parameters/gov/contrib/salt_phase_out/floor/amount.yaml +0 -21
- policyengine_us/parameters/gov/contrib/salt_phase_out/floor/applies.yaml +0 -11
- policyengine_us/parameters/gov/contrib/salt_phase_out/in_effect.yaml +0 -8
- policyengine_us/parameters/gov/contrib/salt_phase_out/rate.yaml +0 -13
- policyengine_us/parameters/gov/contrib/salt_phase_out/threshold.yaml +0 -21
- policyengine_us/reforms/reconciliation/ctc_ssn.py +0 -86
- policyengine_us/reforms/reconciliation/reconciled_additional_senior_standard_deduction.py +0 -151
- policyengine_us/reforms/reconciliation/reconciled_auto_loan_interest_ald.py +0 -153
- policyengine_us/reforms/reconciliation/reconciled_pease.py +0 -85
- policyengine_us/reforms/reconciliation/reconciled_qbid.py +0 -78
- policyengine_us/reforms/reconciliation/reconciled_tip_and_overtime_exempt.py +0 -177
- policyengine_us/reforms/reconciliation/reconciliation_cdcc.py +0 -78
- policyengine_us/reforms/reconciliation/reconciliation_charitable_deduction.py +0 -78
- policyengine_us/reforms/reconciliation/reconciliation_qbid_with_floor.py +0 -72
- policyengine_us/reforms/salt_phase_out/__init__.py +0 -3
- policyengine_us/reforms/salt_phase_out/salt_phase_out_reform.py +0 -59
- policyengine_us/tests/policy/contrib/reconciliation/ctc_ssn.yaml +0 -150
- policyengine_us/tests/policy/contrib/reconciliation/reconciled_additional_senior_standard_deduction.yaml +0 -173
- policyengine_us/tests/policy/contrib/reconciliation/reconciled_auto_loan_interest_ald.yaml +0 -96
- policyengine_us/tests/policy/contrib/reconciliation/reconciled_pease.yaml +0 -85
- policyengine_us/tests/policy/contrib/reconciliation/reconciled_qbid.yaml +0 -31
- policyengine_us/tests/policy/contrib/reconciliation/reconciliation_cdcc.yaml +0 -59
- policyengine_us/tests/policy/contrib/reconciliation/reconciliation_charitable_deduction.yaml +0 -58
- policyengine_us/tests/policy/contrib/reconciliation/reconciliation_qbid_with_floor.yaml +0 -38
- policyengine_us/tests/policy/contrib/salt_phase_out/salt_phase_out_reform.yaml +0 -118
- {policyengine_us-1.352.1.dist-info → policyengine_us-1.354.0.dist-info}/WHEEL +0 -0
- {policyengine_us-1.352.1.dist-info → policyengine_us-1.354.0.dist-info}/entry_points.txt +0 -0
- {policyengine_us-1.352.1.dist-info → policyengine_us-1.354.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
from policyengine_us.model_api import *
|
|
2
|
-
from policyengine_core.periods import period as period_
|
|
3
|
-
from policyengine_core.periods import instant
|
|
4
|
-
import numpy as np
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def create_reconciled_additional_senior_standard_deduction() -> Reform:
|
|
8
|
-
class additional_senior_standard_deduction(Variable):
|
|
9
|
-
value_type = float
|
|
10
|
-
entity = TaxUnit
|
|
11
|
-
label = "Additional senior standard deduction"
|
|
12
|
-
unit = USD
|
|
13
|
-
definition_period = YEAR
|
|
14
|
-
defined_for = "filer_meets_additional_senior_standard_deduction_identification_requirements"
|
|
15
|
-
reference = "https://punchbowl.news/smitmo_017_xml/" # page 35
|
|
16
|
-
|
|
17
|
-
def formula(tax_unit, period, parameters):
|
|
18
|
-
p = parameters(
|
|
19
|
-
period
|
|
20
|
-
).gov.contrib.reconciliation.additional_senior_standard_deduction
|
|
21
|
-
aged_head = tax_unit("aged_head", period).astype(int)
|
|
22
|
-
aged_spouse = tax_unit("aged_spouse", period).astype(int)
|
|
23
|
-
aged_count = aged_spouse + aged_head
|
|
24
|
-
base_deduction = p.amount * aged_count
|
|
25
|
-
agi = tax_unit("adjusted_gross_income", period)
|
|
26
|
-
filing_status = tax_unit("filing_status", period)
|
|
27
|
-
joint = filing_status == filing_status.possible_values.JOINT
|
|
28
|
-
phase_out_amount = where(
|
|
29
|
-
joint, p.rate.joint.calc(agi), p.rate.other.calc(agi)
|
|
30
|
-
)
|
|
31
|
-
return max_(base_deduction - phase_out_amount, 0)
|
|
32
|
-
|
|
33
|
-
class filer_meets_additional_senior_standard_deduction_identification_requirements(
|
|
34
|
-
Variable
|
|
35
|
-
):
|
|
36
|
-
value_type = bool
|
|
37
|
-
entity = TaxUnit
|
|
38
|
-
definition_period = YEAR
|
|
39
|
-
label = "Filer meets additional senior standard deduction identification requirements"
|
|
40
|
-
|
|
41
|
-
def formula(tax_unit, period, parameters):
|
|
42
|
-
# Both head and spouse in the tax unit must have valid SSN card type to be eligible for the CTC
|
|
43
|
-
person = tax_unit.members
|
|
44
|
-
is_head_or_spouse = person("is_tax_unit_head_or_spouse", period)
|
|
45
|
-
eligible_ssn_card_type = person(
|
|
46
|
-
"meets_additional_senior_standard_deduction_identification_requirements",
|
|
47
|
-
period,
|
|
48
|
-
)
|
|
49
|
-
ineligible_head_or_spouse = (
|
|
50
|
-
is_head_or_spouse & ~eligible_ssn_card_type
|
|
51
|
-
)
|
|
52
|
-
return tax_unit.sum(ineligible_head_or_spouse) == 0
|
|
53
|
-
|
|
54
|
-
class meets_additional_senior_standard_deduction_identification_requirements(
|
|
55
|
-
Variable
|
|
56
|
-
):
|
|
57
|
-
value_type = bool
|
|
58
|
-
entity = Person
|
|
59
|
-
definition_period = YEAR
|
|
60
|
-
label = "Person meets additional standard deduction identification requirements"
|
|
61
|
-
reference = "https://punchbowl.news/smitmo_017_xml/" # page 35
|
|
62
|
-
|
|
63
|
-
def formula(person, period, parameters):
|
|
64
|
-
ssn_card_type = person("ssn_card_type", period)
|
|
65
|
-
ssn_card_types = ssn_card_type.possible_values
|
|
66
|
-
citizen = ssn_card_type == ssn_card_types.CITIZEN
|
|
67
|
-
non_citizen_valid_ead = (
|
|
68
|
-
ssn_card_type == ssn_card_types.NON_CITIZEN_VALID_EAD
|
|
69
|
-
)
|
|
70
|
-
return citizen | non_citizen_valid_ead
|
|
71
|
-
|
|
72
|
-
class taxable_income_deductions_if_itemizing(Variable):
|
|
73
|
-
value_type = float
|
|
74
|
-
entity = TaxUnit
|
|
75
|
-
label = "Deductions if itemizing"
|
|
76
|
-
unit = USD
|
|
77
|
-
reference = "https://www.law.cornell.edu/uscode/text/26/63"
|
|
78
|
-
definition_period = YEAR
|
|
79
|
-
|
|
80
|
-
def formula(tax_unit, period, parameters):
|
|
81
|
-
p = parameters(period).gov.irs.deductions
|
|
82
|
-
existing_deductions = add(
|
|
83
|
-
tax_unit, period, p.deductions_if_itemizing
|
|
84
|
-
)
|
|
85
|
-
additional_deduction = tax_unit(
|
|
86
|
-
"additional_senior_standard_deduction", period
|
|
87
|
-
)
|
|
88
|
-
return existing_deductions + additional_deduction
|
|
89
|
-
|
|
90
|
-
class taxable_income_deductions_if_not_itemizing(Variable):
|
|
91
|
-
value_type = float
|
|
92
|
-
entity = TaxUnit
|
|
93
|
-
label = "Deductions if not itemizing"
|
|
94
|
-
unit = USD
|
|
95
|
-
definition_period = YEAR
|
|
96
|
-
|
|
97
|
-
def formula(tax_unit, period, parameters):
|
|
98
|
-
p = parameters(period).gov.irs.deductions
|
|
99
|
-
existing_deductions = add(
|
|
100
|
-
tax_unit, period, p.deductions_if_not_itemizing
|
|
101
|
-
)
|
|
102
|
-
additional_deduction = tax_unit(
|
|
103
|
-
"additional_senior_standard_deduction", period
|
|
104
|
-
)
|
|
105
|
-
return existing_deductions + additional_deduction
|
|
106
|
-
|
|
107
|
-
class reform(Reform):
|
|
108
|
-
def apply(self):
|
|
109
|
-
self.update_variable(
|
|
110
|
-
meets_additional_senior_standard_deduction_identification_requirements
|
|
111
|
-
)
|
|
112
|
-
self.update_variable(
|
|
113
|
-
filer_meets_additional_senior_standard_deduction_identification_requirements
|
|
114
|
-
)
|
|
115
|
-
self.update_variable(additional_senior_standard_deduction)
|
|
116
|
-
self.update_variable(taxable_income_deductions_if_not_itemizing)
|
|
117
|
-
self.update_variable(taxable_income_deductions_if_itemizing)
|
|
118
|
-
|
|
119
|
-
return reform
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
def create_reconciled_additional_senior_standard_deduction_reform(
|
|
123
|
-
parameters, period, bypass: bool = False
|
|
124
|
-
):
|
|
125
|
-
if bypass:
|
|
126
|
-
return create_reconciled_additional_senior_standard_deduction()
|
|
127
|
-
|
|
128
|
-
p = (
|
|
129
|
-
parameters.gov.contrib.reconciliation.additional_senior_standard_deduction
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
reform_active = False
|
|
133
|
-
current_period = period_(period)
|
|
134
|
-
|
|
135
|
-
for i in range(5):
|
|
136
|
-
if p(current_period).in_effect:
|
|
137
|
-
reform_active = True
|
|
138
|
-
break
|
|
139
|
-
current_period = current_period.offset(1, "year")
|
|
140
|
-
|
|
141
|
-
if reform_active:
|
|
142
|
-
return create_reconciled_additional_senior_standard_deduction()
|
|
143
|
-
else:
|
|
144
|
-
return None
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
reconciled_additional_senior_standard_deduction = (
|
|
148
|
-
create_reconciled_additional_senior_standard_deduction_reform(
|
|
149
|
-
None, None, bypass=True
|
|
150
|
-
)
|
|
151
|
-
)
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
from policyengine_us.model_api import *
|
|
2
|
-
from policyengine_core.periods import period as period_
|
|
3
|
-
from policyengine_core.periods import instant
|
|
4
|
-
import numpy as np
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def create_reconciled_auto_loan_interest_ald() -> Reform:
|
|
8
|
-
class auto_loan_interest_ald(Variable):
|
|
9
|
-
value_type = float
|
|
10
|
-
entity = TaxUnit
|
|
11
|
-
label = "Auto loan interest ALD"
|
|
12
|
-
unit = USD
|
|
13
|
-
definition_period = YEAR
|
|
14
|
-
reference = "https://budget.house.gov/imo/media/doc/one_big_beautiful_bill_act_-_full_bill_text.pdf#page=765"
|
|
15
|
-
|
|
16
|
-
def formula(tax_unit, period, parameters):
|
|
17
|
-
auto_loan_interest = add(tax_unit, period, ["auto_loan_interest"])
|
|
18
|
-
p = parameters(
|
|
19
|
-
period
|
|
20
|
-
).gov.contrib.reconciliation.auto_loan_interest_ald
|
|
21
|
-
capped_interest = min_(auto_loan_interest, p.cap)
|
|
22
|
-
# Get filing status.
|
|
23
|
-
filing_status = tax_unit("filing_status", period)
|
|
24
|
-
|
|
25
|
-
# Get the phaseout start amount based on filing status (line 4).
|
|
26
|
-
phaseout_start = p.phase_out.start[filing_status]
|
|
27
|
-
agi_pre_ald = tax_unit(
|
|
28
|
-
"adjusted_gross_income_pre_auto_loan_interest_ald", period
|
|
29
|
-
)
|
|
30
|
-
# Get the excess amount, if any, in thousands of dollars (rounded up) [lines 5 and 6].
|
|
31
|
-
excess = max_(agi_pre_ald - phaseout_start, 0)
|
|
32
|
-
increments = np.ceil(excess / p.phase_out.increment)
|
|
33
|
-
|
|
34
|
-
# Calculate the excess part phase out amount (line 7).
|
|
35
|
-
phase_out_amount = increments * p.phase_out.step
|
|
36
|
-
return max_(capped_interest - phase_out_amount, 0)
|
|
37
|
-
|
|
38
|
-
class adjusted_gross_income_pre_auto_loan_interest_ald(Variable):
|
|
39
|
-
value_type = float
|
|
40
|
-
entity = TaxUnit
|
|
41
|
-
label = "Adjusted gross income before the Auto Loan Interest ALD"
|
|
42
|
-
unit = USD
|
|
43
|
-
definition_period = YEAR
|
|
44
|
-
reference = "https://budget.house.gov/imo/media/doc/one_big_beautiful_bill_act_-_full_bill_text.pdf#page=765"
|
|
45
|
-
|
|
46
|
-
# OBBBA phases out the auto loan interest ALD with respect to AGI.
|
|
47
|
-
# This creates a circular reference, since it also reduces AGI.
|
|
48
|
-
# To get around this drafting error, we phase out the auto loan interest ALD
|
|
49
|
-
# with respect to a version of AGI that excludes the auto loan interest ALD.
|
|
50
|
-
def formula(tax_unit, period, parameters):
|
|
51
|
-
gross_income = add(tax_unit, period, ["irs_gross_income"])
|
|
52
|
-
above_the_line_deductions = tax_unit(
|
|
53
|
-
"above_the_line_deductions", period
|
|
54
|
-
)
|
|
55
|
-
agi = gross_income - above_the_line_deductions
|
|
56
|
-
if parameters(period).gov.contrib.ubi_center.basic_income.taxable:
|
|
57
|
-
agi += add(tax_unit, period, ["basic_income"])
|
|
58
|
-
return agi
|
|
59
|
-
|
|
60
|
-
class adjusted_gross_income(Variable):
|
|
61
|
-
value_type = float
|
|
62
|
-
entity = TaxUnit
|
|
63
|
-
label = "Adjusted gross income"
|
|
64
|
-
unit = USD
|
|
65
|
-
definition_period = YEAR
|
|
66
|
-
reference = "https://www.law.cornell.edu/uscode/text/26/62"
|
|
67
|
-
|
|
68
|
-
def formula(tax_unit, period, parameters):
|
|
69
|
-
gross_income = add(tax_unit, period, ["irs_gross_income"])
|
|
70
|
-
above_the_line_deductions = tax_unit(
|
|
71
|
-
"above_the_line_deductions", period
|
|
72
|
-
)
|
|
73
|
-
auto_loan_interest_ald = tax_unit("auto_loan_interest_ald", period)
|
|
74
|
-
agi = gross_income - (
|
|
75
|
-
above_the_line_deductions + auto_loan_interest_ald
|
|
76
|
-
)
|
|
77
|
-
p = parameters(
|
|
78
|
-
period
|
|
79
|
-
).gov.contrib.reconciliation.auto_loan_interest_ald
|
|
80
|
-
if p.senate_version.applies:
|
|
81
|
-
agi = gross_income - above_the_line_deductions
|
|
82
|
-
if parameters(period).gov.contrib.ubi_center.basic_income.taxable:
|
|
83
|
-
agi += add(tax_unit, period, ["basic_income"])
|
|
84
|
-
return agi
|
|
85
|
-
|
|
86
|
-
class taxable_income_deductions(Variable):
|
|
87
|
-
value_type = float
|
|
88
|
-
entity = TaxUnit
|
|
89
|
-
label = "Taxable income deductions"
|
|
90
|
-
unit = USD
|
|
91
|
-
definition_period = YEAR
|
|
92
|
-
|
|
93
|
-
def formula(tax_unit, period, parameters):
|
|
94
|
-
itemizes = tax_unit("tax_unit_itemizes", period)
|
|
95
|
-
deductions_if_itemizing = tax_unit(
|
|
96
|
-
"taxable_income_deductions_if_itemizing", period
|
|
97
|
-
)
|
|
98
|
-
deductions_if_not_itemizing = tax_unit(
|
|
99
|
-
"taxable_income_deductions_if_not_itemizing", period
|
|
100
|
-
)
|
|
101
|
-
auto_loan_interest_ald = tax_unit("auto_loan_interest_ald", period)
|
|
102
|
-
p = parameters(
|
|
103
|
-
period
|
|
104
|
-
).gov.contrib.reconciliation.auto_loan_interest_ald
|
|
105
|
-
if p.senate_version.applies:
|
|
106
|
-
deductions_if_itemizing = (
|
|
107
|
-
deductions_if_itemizing + auto_loan_interest_ald
|
|
108
|
-
)
|
|
109
|
-
deductions_if_not_itemizing = (
|
|
110
|
-
deductions_if_not_itemizing + auto_loan_interest_ald
|
|
111
|
-
)
|
|
112
|
-
return where(
|
|
113
|
-
itemizes, deductions_if_itemizing, deductions_if_not_itemizing
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
class reform(Reform):
|
|
117
|
-
def apply(self):
|
|
118
|
-
self.update_variable(auto_loan_interest_ald)
|
|
119
|
-
self.update_variable(adjusted_gross_income)
|
|
120
|
-
self.update_variable(
|
|
121
|
-
adjusted_gross_income_pre_auto_loan_interest_ald
|
|
122
|
-
)
|
|
123
|
-
self.update_variable(taxable_income_deductions)
|
|
124
|
-
|
|
125
|
-
return reform
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def create_reconciled_auto_loan_interest_ald_reform(
|
|
129
|
-
parameters, period, bypass: bool = False
|
|
130
|
-
):
|
|
131
|
-
if bypass:
|
|
132
|
-
return create_reconciled_auto_loan_interest_ald()
|
|
133
|
-
|
|
134
|
-
p = parameters.gov.contrib.reconciliation.auto_loan_interest_ald
|
|
135
|
-
|
|
136
|
-
reform_active = False
|
|
137
|
-
current_period = period_(period)
|
|
138
|
-
|
|
139
|
-
for i in range(5):
|
|
140
|
-
if p(current_period).in_effect:
|
|
141
|
-
reform_active = True
|
|
142
|
-
break
|
|
143
|
-
current_period = current_period.offset(1, "year")
|
|
144
|
-
|
|
145
|
-
if reform_active:
|
|
146
|
-
return create_reconciled_auto_loan_interest_ald()
|
|
147
|
-
else:
|
|
148
|
-
return None
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
reconciled_auto_loan_interest_ald = (
|
|
152
|
-
create_reconciled_auto_loan_interest_ald_reform(None, None, bypass=True)
|
|
153
|
-
)
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
from policyengine_us.model_api import *
|
|
2
|
-
from policyengine_core.periods import period as period_
|
|
3
|
-
from policyengine_core.periods import instant
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def create_reconciled_pease() -> Reform:
|
|
7
|
-
class itemized_taxable_income_deductions_reduction(Variable):
|
|
8
|
-
value_type = float
|
|
9
|
-
entity = TaxUnit
|
|
10
|
-
label = "Itemized taxable income deductions reduction"
|
|
11
|
-
unit = USD
|
|
12
|
-
definition_period = YEAR
|
|
13
|
-
|
|
14
|
-
def formula(tax_unit, period, parameters):
|
|
15
|
-
p = parameters(period).gov.contrib.reconciliation.pease
|
|
16
|
-
if p.in_effect:
|
|
17
|
-
filing_status = tax_unit("filing_status", period)
|
|
18
|
-
top_rate_threshold = parameters(
|
|
19
|
-
period
|
|
20
|
-
).gov.irs.income.bracket.thresholds["6"][filing_status]
|
|
21
|
-
agi = tax_unit("adjusted_gross_income", period)
|
|
22
|
-
exemptions = tax_unit("exemptions", period)
|
|
23
|
-
taxable_income = max_(0, agi - exemptions)
|
|
24
|
-
taxable_income_excess = max_(
|
|
25
|
-
0, taxable_income - top_rate_threshold
|
|
26
|
-
)
|
|
27
|
-
total_itemized_deductions = tax_unit(
|
|
28
|
-
"total_itemized_taxable_income_deductions", period
|
|
29
|
-
)
|
|
30
|
-
lesser_of_deductions_or_excess = min_(
|
|
31
|
-
total_itemized_deductions, taxable_income_excess
|
|
32
|
-
)
|
|
33
|
-
if p.amended_structure.in_effect:
|
|
34
|
-
salt_deduction = tax_unit("salt_deduction", period)
|
|
35
|
-
lesser_of_salt_or_excess = min_(
|
|
36
|
-
salt_deduction, taxable_income_excess
|
|
37
|
-
)
|
|
38
|
-
salt_deduction_reduction = (
|
|
39
|
-
p.amended_structure.salt_rate
|
|
40
|
-
* lesser_of_salt_or_excess
|
|
41
|
-
)
|
|
42
|
-
remaining_deductions = max_(
|
|
43
|
-
total_itemized_deductions - salt_deduction, 0
|
|
44
|
-
)
|
|
45
|
-
lesser_of_remaining_or_excess = min_(
|
|
46
|
-
remaining_deductions, taxable_income_excess
|
|
47
|
-
)
|
|
48
|
-
other_deductions_reduction = (
|
|
49
|
-
p.rate * lesser_of_remaining_or_excess
|
|
50
|
-
)
|
|
51
|
-
return (
|
|
52
|
-
salt_deduction_reduction + other_deductions_reduction
|
|
53
|
-
)
|
|
54
|
-
return p.rate * lesser_of_deductions_or_excess
|
|
55
|
-
return 0
|
|
56
|
-
|
|
57
|
-
class reform(Reform):
|
|
58
|
-
def apply(self):
|
|
59
|
-
self.update_variable(itemized_taxable_income_deductions_reduction)
|
|
60
|
-
|
|
61
|
-
return reform
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
def create_reconciled_pease_reform(parameters, period, bypass: bool = False):
|
|
65
|
-
if bypass:
|
|
66
|
-
return create_reconciled_pease()
|
|
67
|
-
|
|
68
|
-
p = parameters.gov.contrib.reconciliation.pease
|
|
69
|
-
|
|
70
|
-
reform_active = False
|
|
71
|
-
current_period = period_(period)
|
|
72
|
-
|
|
73
|
-
for i in range(5):
|
|
74
|
-
if p(current_period).in_effect:
|
|
75
|
-
reform_active = True
|
|
76
|
-
break
|
|
77
|
-
current_period = current_period.offset(1, "year")
|
|
78
|
-
|
|
79
|
-
if reform_active:
|
|
80
|
-
return create_reconciled_pease()
|
|
81
|
-
else:
|
|
82
|
-
return None
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
reconciled_pease = create_reconciled_pease_reform(None, None, bypass=True)
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
from policyengine_us.model_api import *
|
|
2
|
-
from policyengine_core.periods import period as period_
|
|
3
|
-
from policyengine_core.periods import instant
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def create_reconciled_qbid() -> Reform:
|
|
7
|
-
class qbid_amount(Variable):
|
|
8
|
-
value_type = float
|
|
9
|
-
entity = Person
|
|
10
|
-
label = "Per‑cap qualified business income deduction amount for each person"
|
|
11
|
-
unit = USD
|
|
12
|
-
definition_period = YEAR
|
|
13
|
-
reference = (
|
|
14
|
-
"https://www.law.cornell.edu/uscode/text/26/199A#b_1"
|
|
15
|
-
"https://www.irs.gov/pub/irs-prior/p535--2018.pdf"
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
def formula(person, period, parameters):
|
|
19
|
-
p = parameters(period).gov.irs.deductions
|
|
20
|
-
|
|
21
|
-
# 1. Compute the new maximum QBID
|
|
22
|
-
qbi = person("qualified_business_income", period)
|
|
23
|
-
qbid_max = p.qbi.max.rate * qbi
|
|
24
|
-
|
|
25
|
-
# 2. Compute the wage/property cap (unchanged)
|
|
26
|
-
w2_wages = person("w2_wages_from_qualified_business", period)
|
|
27
|
-
b_property = person("unadjusted_basis_qualified_property", period)
|
|
28
|
-
wage_cap = w2_wages * p.qbi.max.w2_wages.rate
|
|
29
|
-
alt_cap = (
|
|
30
|
-
w2_wages * p.qbi.max.w2_wages.alt_rate
|
|
31
|
-
+ b_property * p.qbi.max.business_property.rate
|
|
32
|
-
)
|
|
33
|
-
full_cap = max_(wage_cap, alt_cap)
|
|
34
|
-
|
|
35
|
-
# 3. Phase‑out logic: 75% of each dollar above the threshold
|
|
36
|
-
taxinc_less_qbid = person.tax_unit(
|
|
37
|
-
"taxable_income_less_qbid", period
|
|
38
|
-
)
|
|
39
|
-
filing_status = person.tax_unit("filing_status", period)
|
|
40
|
-
threshold = p.qbi.phase_out.start[filing_status]
|
|
41
|
-
p_ref = parameters(period).gov.contrib.reconciliation.qbid
|
|
42
|
-
phase_out_rate = p_ref.phase_out_rate
|
|
43
|
-
excess_income = max_(0, taxinc_less_qbid - threshold)
|
|
44
|
-
reduction_amount = phase_out_rate * excess_income
|
|
45
|
-
# 4. Apply phase‑out to the 22% deduction
|
|
46
|
-
phased_deduction = max_(0, qbid_max - reduction_amount)
|
|
47
|
-
# 5. Final QBID is the lesser of the phased deduction or the wage/property cap
|
|
48
|
-
return min_(phased_deduction, full_cap)
|
|
49
|
-
|
|
50
|
-
class reform(Reform):
|
|
51
|
-
def apply(self):
|
|
52
|
-
self.update_variable(qbid_amount)
|
|
53
|
-
|
|
54
|
-
return reform
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
def create_reconciled_qbid_reform(parameters, period, bypass: bool = False):
|
|
58
|
-
if bypass:
|
|
59
|
-
return create_reconciled_qbid()
|
|
60
|
-
|
|
61
|
-
p = parameters.gov.contrib.reconciliation.qbid
|
|
62
|
-
|
|
63
|
-
reform_active = False
|
|
64
|
-
current_period = period_(period)
|
|
65
|
-
|
|
66
|
-
for i in range(5):
|
|
67
|
-
if p(current_period).in_effect:
|
|
68
|
-
reform_active = True
|
|
69
|
-
break
|
|
70
|
-
current_period = current_period.offset(1, "year")
|
|
71
|
-
|
|
72
|
-
if reform_active:
|
|
73
|
-
return create_reconciled_qbid()
|
|
74
|
-
else:
|
|
75
|
-
return None
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
reconciled_qbid = create_reconciled_qbid_reform(None, None, bypass=True)
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
from policyengine_us.model_api import *
|
|
2
|
-
from policyengine_core.periods import period as period_
|
|
3
|
-
from policyengine_core.periods import instant
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def create_reconciled_tip_and_overtime_exempt() -> Reform:
|
|
7
|
-
class tip_income_deduction(Variable):
|
|
8
|
-
value_type = float
|
|
9
|
-
entity = TaxUnit
|
|
10
|
-
label = "Tip income deduction"
|
|
11
|
-
unit = USD
|
|
12
|
-
definition_period = YEAR
|
|
13
|
-
|
|
14
|
-
def formula(tax_unit, period, parameters):
|
|
15
|
-
p = parameters(period).gov.contrib.reconciliation.tip_income_exempt
|
|
16
|
-
if p.in_effect:
|
|
17
|
-
person = tax_unit.members
|
|
18
|
-
ssn_card_type = person("ssn_card_type", period)
|
|
19
|
-
ssn_card_types = ssn_card_type.possible_values
|
|
20
|
-
citizen = ssn_card_type == ssn_card_types.CITIZEN
|
|
21
|
-
non_citizen_valid_ead = (
|
|
22
|
-
ssn_card_type == ssn_card_types.NON_CITIZEN_VALID_EAD
|
|
23
|
-
)
|
|
24
|
-
eligible_ssn_card_type = citizen | non_citizen_valid_ead
|
|
25
|
-
head = person("is_tax_unit_head", period)
|
|
26
|
-
spouse = person("is_tax_unit_spouse", period)
|
|
27
|
-
ineligible_head_exists = tax_unit.any(
|
|
28
|
-
head & ~eligible_ssn_card_type
|
|
29
|
-
)
|
|
30
|
-
ineligible_spouse_exists = tax_unit.any(
|
|
31
|
-
spouse & ~eligible_ssn_card_type
|
|
32
|
-
)
|
|
33
|
-
ineligible_cardholder_present = (
|
|
34
|
-
ineligible_head_exists | ineligible_spouse_exists
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
tip_income = person("tip_income", period)
|
|
38
|
-
if p.phase_out.applies:
|
|
39
|
-
agi = tax_unit("adjusted_gross_income", period)
|
|
40
|
-
filing_status = tax_unit("filing_status", period)
|
|
41
|
-
cap = p.cap[filing_status]
|
|
42
|
-
start = p.phase_out.start[filing_status]
|
|
43
|
-
agi_excess = max_(agi - start, 0)
|
|
44
|
-
phase_out_amount = agi_excess * p.phase_out.rate
|
|
45
|
-
total_tip_income = tax_unit.sum(tip_income)
|
|
46
|
-
capped_overtime_income = min_(cap, total_tip_income)
|
|
47
|
-
phased_out_overtime_income = max_(
|
|
48
|
-
0, capped_overtime_income - phase_out_amount
|
|
49
|
-
)
|
|
50
|
-
return (
|
|
51
|
-
phased_out_overtime_income
|
|
52
|
-
* ~ineligible_cardholder_present
|
|
53
|
-
)
|
|
54
|
-
eligible_ssn_card_holder = eligible_ssn_card_type & (
|
|
55
|
-
head | spouse
|
|
56
|
-
)
|
|
57
|
-
return tax_unit.sum(tip_income * eligible_ssn_card_holder)
|
|
58
|
-
return 0
|
|
59
|
-
|
|
60
|
-
class overtime_income_deduction(Variable):
|
|
61
|
-
value_type = float
|
|
62
|
-
entity = TaxUnit
|
|
63
|
-
label = "Overtime income deduction"
|
|
64
|
-
unit = USD
|
|
65
|
-
definition_period = YEAR
|
|
66
|
-
|
|
67
|
-
def formula(tax_unit, period, parameters):
|
|
68
|
-
p = parameters(
|
|
69
|
-
period
|
|
70
|
-
).gov.contrib.reconciliation.overtime_income_exempt
|
|
71
|
-
if p.in_effect:
|
|
72
|
-
person = tax_unit.members
|
|
73
|
-
ssn_card_type = person("ssn_card_type", period)
|
|
74
|
-
ssn_card_types = ssn_card_type.possible_values
|
|
75
|
-
citizen = ssn_card_type == ssn_card_types.CITIZEN
|
|
76
|
-
non_citizen_valid_ead = (
|
|
77
|
-
ssn_card_type == ssn_card_types.NON_CITIZEN_VALID_EAD
|
|
78
|
-
)
|
|
79
|
-
eligible_ssn_card_type = citizen | non_citizen_valid_ead
|
|
80
|
-
head = person("is_tax_unit_head", period)
|
|
81
|
-
spouse = person("is_tax_unit_spouse", period)
|
|
82
|
-
ineligible_head_exists = tax_unit.any(
|
|
83
|
-
head & ~eligible_ssn_card_type
|
|
84
|
-
)
|
|
85
|
-
ineligible_spouse_exists = tax_unit.any(
|
|
86
|
-
spouse & ~eligible_ssn_card_type
|
|
87
|
-
)
|
|
88
|
-
ineligible_cardholder_present = (
|
|
89
|
-
ineligible_head_exists | ineligible_spouse_exists
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
overtime_income = person("fsla_overtime_premium", period)
|
|
93
|
-
if p.phase_out.applies:
|
|
94
|
-
agi = tax_unit("adjusted_gross_income", period)
|
|
95
|
-
filing_status = tax_unit("filing_status", period)
|
|
96
|
-
cap = p.cap[filing_status]
|
|
97
|
-
start = p.phase_out.start[filing_status]
|
|
98
|
-
agi_excess = max_(agi - start, 0)
|
|
99
|
-
phase_out_amount = agi_excess * p.phase_out.rate
|
|
100
|
-
total_overtime_income = tax_unit.sum(overtime_income)
|
|
101
|
-
capped_overtime_income = min_(cap, total_overtime_income)
|
|
102
|
-
phased_out_overtime_income = max_(
|
|
103
|
-
0, capped_overtime_income - phase_out_amount
|
|
104
|
-
)
|
|
105
|
-
return (
|
|
106
|
-
phased_out_overtime_income
|
|
107
|
-
* ~ineligible_cardholder_present
|
|
108
|
-
)
|
|
109
|
-
eligible_ssn_card_holder = eligible_ssn_card_type & (
|
|
110
|
-
head | spouse
|
|
111
|
-
)
|
|
112
|
-
return tax_unit.sum(overtime_income * eligible_ssn_card_holder)
|
|
113
|
-
return 0
|
|
114
|
-
|
|
115
|
-
def modify_parameters(parameters):
|
|
116
|
-
parameters.gov.irs.deductions.deductions_if_itemizing.update(
|
|
117
|
-
start=instant("2026-01-01"),
|
|
118
|
-
stop=instant("2035-12-31"),
|
|
119
|
-
value=[
|
|
120
|
-
"tip_income_deduction",
|
|
121
|
-
"overtime_income_deduction",
|
|
122
|
-
"itemized_taxable_income_deductions",
|
|
123
|
-
"qualified_business_income_deduction",
|
|
124
|
-
"wagering_losses_deduction",
|
|
125
|
-
],
|
|
126
|
-
)
|
|
127
|
-
parameters.gov.irs.deductions.deductions_if_not_itemizing.update(
|
|
128
|
-
start=instant("2026-01-01"),
|
|
129
|
-
stop=instant("2035-12-31"),
|
|
130
|
-
value=[
|
|
131
|
-
"tip_income_deduction",
|
|
132
|
-
"overtime_income_deduction",
|
|
133
|
-
"charitable_deduction_for_non_itemizers",
|
|
134
|
-
"standard_deduction",
|
|
135
|
-
"qualified_business_income_deduction",
|
|
136
|
-
],
|
|
137
|
-
)
|
|
138
|
-
return parameters
|
|
139
|
-
|
|
140
|
-
class reform(Reform):
|
|
141
|
-
def apply(self):
|
|
142
|
-
self.update_variable(tip_income_deduction)
|
|
143
|
-
self.update_variable(overtime_income_deduction)
|
|
144
|
-
self.modify_parameters(modify_parameters)
|
|
145
|
-
|
|
146
|
-
return reform
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
def create_reconciled_tip_and_overtime_exempt_reform(
|
|
150
|
-
parameters, period, bypass: bool = False
|
|
151
|
-
):
|
|
152
|
-
if bypass:
|
|
153
|
-
return create_reconciled_tip_and_overtime_exempt()
|
|
154
|
-
|
|
155
|
-
p = parameters.gov.contrib.reconciliation
|
|
156
|
-
|
|
157
|
-
reform_active = False
|
|
158
|
-
current_period = period_(period)
|
|
159
|
-
|
|
160
|
-
for i in range(5):
|
|
161
|
-
if (
|
|
162
|
-
p(current_period).tip_income_exempt.in_effect
|
|
163
|
-
or p(current_period).overtime_income_exempt.in_effect
|
|
164
|
-
):
|
|
165
|
-
reform_active = True
|
|
166
|
-
break
|
|
167
|
-
current_period = current_period.offset(1, "year")
|
|
168
|
-
|
|
169
|
-
if reform_active:
|
|
170
|
-
return create_reconciled_tip_and_overtime_exempt()
|
|
171
|
-
else:
|
|
172
|
-
return None
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
reconciled_tip_and_overtime_exempt = (
|
|
176
|
-
create_reconciled_tip_and_overtime_exempt_reform(None, None, bypass=True)
|
|
177
|
-
)
|