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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
- name: Ineligible cardholder present
|
|
2
|
+
period: 2025
|
|
3
|
+
input:
|
|
4
|
+
tip_income_deduction_ssn_requirement_met: false
|
|
5
|
+
tip_income: 10_000
|
|
6
|
+
adjusted_gross_income: 100_000
|
|
7
|
+
filing_status: JOINT
|
|
8
|
+
output:
|
|
9
|
+
tip_income_deduction: 0
|
|
10
|
+
|
|
11
|
+
- name: AGI below phase out start
|
|
12
|
+
period: 2025
|
|
13
|
+
input:
|
|
14
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
15
|
+
tip_income: 10_000
|
|
16
|
+
adjusted_gross_income: 100_000
|
|
17
|
+
filing_status: JOINT
|
|
18
|
+
output:
|
|
19
|
+
tip_income_deduction: 10_000
|
|
20
|
+
|
|
21
|
+
- name: Fully phased out
|
|
22
|
+
period: 2025
|
|
23
|
+
input:
|
|
24
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
25
|
+
tip_income: 10_000
|
|
26
|
+
adjusted_gross_income: 1_000_000
|
|
27
|
+
filing_status: JOINT
|
|
28
|
+
output:
|
|
29
|
+
tip_income_deduction: 0
|
|
30
|
+
|
|
31
|
+
- name: Partially phased out
|
|
32
|
+
period: 2025
|
|
33
|
+
input:
|
|
34
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
35
|
+
tip_income: 10_000
|
|
36
|
+
adjusted_gross_income: 190_000
|
|
37
|
+
filing_status: JOINT
|
|
38
|
+
output:
|
|
39
|
+
tip_income_deduction: 10_000
|
|
40
|
+
|
|
41
|
+
- name: Ineligible cardholder present
|
|
42
|
+
period: 2025
|
|
43
|
+
input:
|
|
44
|
+
people:
|
|
45
|
+
person1:
|
|
46
|
+
ssn_card_type: CITIZEN
|
|
47
|
+
is_tax_unit_head: true
|
|
48
|
+
is_tax_unit_spouse: false
|
|
49
|
+
tip_income: 1_000
|
|
50
|
+
person2:
|
|
51
|
+
ssn_card_type: OTHER_NON_CITIZEN
|
|
52
|
+
is_tax_unit_head: false
|
|
53
|
+
is_tax_unit_spouse: true
|
|
54
|
+
tax_units:
|
|
55
|
+
tax_unit:
|
|
56
|
+
members: [person1, person2]
|
|
57
|
+
output:
|
|
58
|
+
tip_income_deduction_ssn_requirement_met: false
|
|
59
|
+
tip_income_deduction: 0
|
|
60
|
+
|
|
61
|
+
- name: Ineligible cardholder not present
|
|
62
|
+
period: 2025
|
|
63
|
+
input:
|
|
64
|
+
people:
|
|
65
|
+
person1:
|
|
66
|
+
ssn_card_type: CITIZEN
|
|
67
|
+
is_tax_unit_head: true
|
|
68
|
+
is_tax_unit_spouse: false
|
|
69
|
+
person2:
|
|
70
|
+
ssn_card_type: CITIZEN
|
|
71
|
+
is_tax_unit_head: true
|
|
72
|
+
is_tax_unit_spouse: false
|
|
73
|
+
tip_income: 1_000
|
|
74
|
+
tax_units:
|
|
75
|
+
tax_unit:
|
|
76
|
+
members: [person1, person2]
|
|
77
|
+
output:
|
|
78
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
79
|
+
tip_income_deduction: 1_000
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
- name: Ineligible cardholder present
|
|
2
|
+
period: 2025
|
|
3
|
+
input:
|
|
4
|
+
people:
|
|
5
|
+
person1:
|
|
6
|
+
ssn_card_type: CITIZEN
|
|
7
|
+
is_tax_unit_head: true
|
|
8
|
+
is_tax_unit_spouse: false
|
|
9
|
+
person2:
|
|
10
|
+
ssn_card_type: OTHER_NON_CITIZEN
|
|
11
|
+
is_tax_unit_head: false
|
|
12
|
+
is_tax_unit_spouse: true
|
|
13
|
+
tax_units:
|
|
14
|
+
tax_unit:
|
|
15
|
+
members: [person1, person2]
|
|
16
|
+
output:
|
|
17
|
+
tip_income_deduction_ssn_requirement_met: false
|
|
18
|
+
|
|
19
|
+
- name: Ineligible cardholder present, but not head or spouse
|
|
20
|
+
period: 2025
|
|
21
|
+
input:
|
|
22
|
+
people:
|
|
23
|
+
person1:
|
|
24
|
+
ssn_card_type: CITIZEN
|
|
25
|
+
is_tax_unit_head: true
|
|
26
|
+
is_tax_unit_spouse: false
|
|
27
|
+
person2:
|
|
28
|
+
ssn_card_type: OTHER_NON_CITIZEN
|
|
29
|
+
is_tax_unit_head: false
|
|
30
|
+
is_tax_unit_spouse: false
|
|
31
|
+
tax_units:
|
|
32
|
+
tax_unit:
|
|
33
|
+
members: [person1, person2]
|
|
34
|
+
output:
|
|
35
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
36
|
+
|
|
37
|
+
- name: Ineligible cardholder not present
|
|
38
|
+
period: 2025
|
|
39
|
+
input:
|
|
40
|
+
people:
|
|
41
|
+
person1:
|
|
42
|
+
ssn_card_type: CITIZEN
|
|
43
|
+
is_tax_unit_head: true
|
|
44
|
+
is_tax_unit_spouse: false
|
|
45
|
+
person2:
|
|
46
|
+
ssn_card_type: NON_CITIZEN_VALID_EAD
|
|
47
|
+
is_tax_unit_head: true
|
|
48
|
+
is_tax_unit_spouse: false
|
|
49
|
+
tax_units:
|
|
50
|
+
tax_unit:
|
|
51
|
+
members: [person1, person2]
|
|
52
|
+
output:
|
|
53
|
+
tip_income_deduction_ssn_requirement_met: true
|
|
@@ -47,3 +47,109 @@
|
|
|
47
47
|
living_arrangements_allow_for_food_preparation: false
|
|
48
48
|
output:
|
|
49
49
|
ca_state_supplement_payment_standard: 2_639
|
|
50
|
+
|
|
51
|
+
- name: Case A ,single disabled parent with non eligible dependent child.
|
|
52
|
+
period: 2025-01
|
|
53
|
+
input:
|
|
54
|
+
people:
|
|
55
|
+
person1:
|
|
56
|
+
age: 30
|
|
57
|
+
is_disabled: true
|
|
58
|
+
person2:
|
|
59
|
+
age: 4
|
|
60
|
+
is_tax_unit_dependent: true
|
|
61
|
+
spm_units:
|
|
62
|
+
spm_unit:
|
|
63
|
+
members: [person1, person2]
|
|
64
|
+
households:
|
|
65
|
+
household:
|
|
66
|
+
members: [person1, person2]
|
|
67
|
+
state_code: CA
|
|
68
|
+
living_arrangements_allow_for_food_preparation: true
|
|
69
|
+
output:
|
|
70
|
+
ca_state_supplement_payment_standard: 1_206.94
|
|
71
|
+
|
|
72
|
+
- name: Case A1, single disabled parent with a disabled child.
|
|
73
|
+
period: 2025-01
|
|
74
|
+
input:
|
|
75
|
+
people:
|
|
76
|
+
person1:
|
|
77
|
+
age: 30
|
|
78
|
+
is_disabled: true
|
|
79
|
+
person2:
|
|
80
|
+
age: 4
|
|
81
|
+
is_tax_unit_dependent: true
|
|
82
|
+
is_disabled: true
|
|
83
|
+
spm_units:
|
|
84
|
+
spm_unit:
|
|
85
|
+
members: [person1, person2]
|
|
86
|
+
households:
|
|
87
|
+
household:
|
|
88
|
+
members: [person1, person2]
|
|
89
|
+
state_code: CA
|
|
90
|
+
living_arrangements_allow_for_food_preparation: true
|
|
91
|
+
output:
|
|
92
|
+
ca_state_supplement_payment_standard: 2_271.21 # 1206.94 + 1064.27
|
|
93
|
+
|
|
94
|
+
- name: Case A2, single healthy parent with a disabled child.
|
|
95
|
+
period: 2025-01
|
|
96
|
+
input:
|
|
97
|
+
people:
|
|
98
|
+
person1:
|
|
99
|
+
age: 30
|
|
100
|
+
is_tax_unit_head: true
|
|
101
|
+
person2:
|
|
102
|
+
age: 4
|
|
103
|
+
is_tax_unit_dependent: true
|
|
104
|
+
is_disabled: true
|
|
105
|
+
spm_units:
|
|
106
|
+
spm_unit:
|
|
107
|
+
members: [person1, person2]
|
|
108
|
+
households:
|
|
109
|
+
household:
|
|
110
|
+
members: [person1, person2]
|
|
111
|
+
state_code: CA
|
|
112
|
+
living_arrangements_allow_for_food_preparation: true
|
|
113
|
+
output:
|
|
114
|
+
ca_state_supplement_payment_standard: 1_064.27
|
|
115
|
+
|
|
116
|
+
- name: Case B ,joint filers, one of them is disabled.
|
|
117
|
+
period: 2025-01
|
|
118
|
+
input:
|
|
119
|
+
people:
|
|
120
|
+
person1:
|
|
121
|
+
age: 30
|
|
122
|
+
is_disabled: true
|
|
123
|
+
person2:
|
|
124
|
+
age: 22
|
|
125
|
+
spm_units:
|
|
126
|
+
spm_unit:
|
|
127
|
+
members: [person1, person2]
|
|
128
|
+
households:
|
|
129
|
+
household:
|
|
130
|
+
members: [person1, person2]
|
|
131
|
+
state_code: CA
|
|
132
|
+
living_arrangements_allow_for_food_preparation: true
|
|
133
|
+
output:
|
|
134
|
+
ca_state_supplement_payment_standard: 1_206.94
|
|
135
|
+
|
|
136
|
+
- name: Case B1 ,joint filers, both of them are disabled.
|
|
137
|
+
period: 2025-01
|
|
138
|
+
input:
|
|
139
|
+
people:
|
|
140
|
+
person1:
|
|
141
|
+
age: 30
|
|
142
|
+
is_disabled: true
|
|
143
|
+
person2:
|
|
144
|
+
age: 22
|
|
145
|
+
is_disabled: true
|
|
146
|
+
spm_units:
|
|
147
|
+
spm_unit:
|
|
148
|
+
members: [person1, person2]
|
|
149
|
+
households:
|
|
150
|
+
household:
|
|
151
|
+
members: [person1, person2]
|
|
152
|
+
state_code: CA
|
|
153
|
+
living_arrangements_allow_for_food_preparation: true
|
|
154
|
+
output:
|
|
155
|
+
ca_state_supplement_payment_standard: 2_057.83
|
|
@@ -25,4 +25,22 @@ class cdcc_rate(Variable):
|
|
|
25
25
|
second_excess_agi = max_(0, agi - p.phase_out.second_start)
|
|
26
26
|
second_increments = np.ceil(second_excess_agi / p.phase_out.increment)
|
|
27
27
|
second_percentage_reduction = second_increments * p.phase_out.rate
|
|
28
|
+
if p.phase_out.amended_structure.applies:
|
|
29
|
+
# Second phase-out is amended post 2025
|
|
30
|
+
filing_status = tax_unit("filing_status", period)
|
|
31
|
+
second_phase_out_start = (
|
|
32
|
+
p.phase_out.amended_structure.second_start[filing_status]
|
|
33
|
+
)
|
|
34
|
+
second_excess_agi = max_(0, agi - second_phase_out_start)
|
|
35
|
+
second_phase_out_increment = (
|
|
36
|
+
p.phase_out.amended_structure.second_increment[filing_status]
|
|
37
|
+
)
|
|
38
|
+
second_increments = np.ceil(
|
|
39
|
+
second_excess_agi / second_phase_out_increment
|
|
40
|
+
)
|
|
41
|
+
second_percentage_reduction = second_increments * p.phase_out.rate
|
|
42
|
+
return max_(
|
|
43
|
+
p.phase_out.amended_structure.second_min,
|
|
44
|
+
phased_out_rate - second_percentage_reduction,
|
|
45
|
+
)
|
|
28
46
|
return max_(0, phased_out_rate - second_percentage_reduction)
|
|
@@ -8,6 +8,7 @@ class ctc(Variable):
|
|
|
8
8
|
unit = USD
|
|
9
9
|
documentation = "Total value of the non-refundable and refundable portions of the Child Tax Credit."
|
|
10
10
|
definition_period = YEAR
|
|
11
|
+
defined_for = "filer_meets_ctc_identification_requirements"
|
|
11
12
|
reference = "https://www.law.cornell.edu/uscode/text/26/24#a"
|
|
12
13
|
|
|
13
14
|
def formula(tax_unit, period, parameters):
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class filer_meets_ctc_identification_requirements(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Filer meets CTC identification requirements"
|
|
9
|
+
|
|
10
|
+
def formula(tax_unit, period, parameters):
|
|
11
|
+
# Both head and spouse in the tax unit must have valid SSN card type to be eligible for the CTC
|
|
12
|
+
p = parameters(period).gov.irs.credits.ctc
|
|
13
|
+
if p.adult_ssn_requirement_applies:
|
|
14
|
+
person = tax_unit.members
|
|
15
|
+
head_or_spouse = person("is_tax_unit_head_or_spouse", period)
|
|
16
|
+
eligible_ssn_card_type = person(
|
|
17
|
+
"meets_ctc_identification_requirements", period
|
|
18
|
+
)
|
|
19
|
+
return tax_unit.any(head_or_spouse & eligible_ssn_card_type)
|
|
20
|
+
return True
|
|
@@ -12,10 +12,7 @@ class meets_ctc_child_identification_requirements(Variable):
|
|
|
12
12
|
p = parameters(period).gov.irs.credits.ctc
|
|
13
13
|
if p.child_ssn_requirement_applies:
|
|
14
14
|
ssn_card_type = person("ssn_card_type", period)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
ssn_card_type == ssn_card_types.NON_CITIZEN_VALID_EAD
|
|
19
|
-
)
|
|
20
|
-
return citizen | non_citizen_valid_ead
|
|
15
|
+
ssn_card_str = ssn_card_type.decode_to_str()
|
|
16
|
+
p = parameters(period).gov.irs.credits.ctc
|
|
17
|
+
return np.isin(ssn_card_str, p.eligible_ssn_card_type)
|
|
21
18
|
return True
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class meets_ctc_identification_requirements(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Person meets CTC identification requirements"
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.congress.gov/bill/119th-congress/house-bill/1/text"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
def formula(person, period, parameters):
|
|
14
|
+
ssn_card_type = person("ssn_card_type", period)
|
|
15
|
+
ssn_card_str = ssn_card_type.decode_to_str()
|
|
16
|
+
p = parameters(period).gov.irs.credits.ctc
|
|
17
|
+
return np.isin(ssn_card_str, p.eligible_ssn_card_type)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class auto_loan_interest_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "Auto loan interest deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.congress.gov/bill/119th-congress/house-bill/1/text"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(tax_unit, period, parameters):
|
|
15
|
+
auto_loan_interest = add(tax_unit, period, ["auto_loan_interest"])
|
|
16
|
+
p = parameters(period).gov.irs.deductions.auto_loan_interest
|
|
17
|
+
capped_interest = min_(auto_loan_interest, p.cap)
|
|
18
|
+
# Get filing status.
|
|
19
|
+
filing_status = tax_unit("filing_status", period)
|
|
20
|
+
|
|
21
|
+
# Get the phaseout start amount based on filing status (line 4).
|
|
22
|
+
phaseout_start = p.phase_out.start[filing_status]
|
|
23
|
+
agi_pre_ald = tax_unit("adjusted_gross_income", period)
|
|
24
|
+
# Get the excess amount, if any, in thousands of dollars (rounded up) [lines 5 and 6].
|
|
25
|
+
excess = max_(agi_pre_ald - phaseout_start, 0)
|
|
26
|
+
increments = np.ceil(excess / p.phase_out.increment)
|
|
27
|
+
|
|
28
|
+
# Calculate the excess part phase out amount (line 7).
|
|
29
|
+
phase_out_amount = increments * p.phase_out.step
|
|
30
|
+
return max_(capped_interest - phase_out_amount, 0)
|
policyengine_us/variables/gov/irs/income/taxable_income/deductions/itemizing/charitable_deduction.py
CHANGED
|
@@ -16,10 +16,25 @@ class charitable_deduction(Variable):
|
|
|
16
16
|
tax_unit, period, ["charitable_non_cash_donations"]
|
|
17
17
|
)
|
|
18
18
|
positive_agi = tax_unit("positive_agi", period)
|
|
19
|
-
p = parameters(period).gov.irs.deductions.itemized.charity
|
|
19
|
+
p = parameters(period).gov.irs.deductions.itemized.charity
|
|
20
20
|
capped_non_cash_donations = min_(
|
|
21
|
-
non_cash_donations, p.non_cash * positive_agi
|
|
21
|
+
non_cash_donations, p.ceiling.non_cash * positive_agi
|
|
22
22
|
)
|
|
23
23
|
|
|
24
|
-
total_cap = p.all * positive_agi
|
|
24
|
+
total_cap = p.ceiling.all * positive_agi
|
|
25
|
+
if p.floor.applies:
|
|
26
|
+
deduction_floor = p.floor.amount * positive_agi
|
|
27
|
+
reduced_non_cash_donations = max_(
|
|
28
|
+
non_cash_donations - deduction_floor, 0
|
|
29
|
+
)
|
|
30
|
+
capped_reduced_non_cash_donations = min_(
|
|
31
|
+
reduced_non_cash_donations, p.ceiling.non_cash * positive_agi
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
remaining_floor = max_(deduction_floor - non_cash_donations, 0)
|
|
35
|
+
reduced_cash_donations = max_(cash_donations - remaining_floor, 0)
|
|
36
|
+
return min_(
|
|
37
|
+
capped_reduced_non_cash_donations + reduced_cash_donations,
|
|
38
|
+
total_cap,
|
|
39
|
+
)
|
|
25
40
|
return min_(capped_non_cash_donations + cash_donations, total_cap)
|
|
@@ -21,5 +21,23 @@ class itemized_taxable_income_deductions_reduction(Variable):
|
|
|
21
21
|
"total_itemized_taxable_income_deductions", period
|
|
22
22
|
)
|
|
23
23
|
maximum_deductions_reduction = maximum_deductions * p.rate.base
|
|
24
|
+
if p.amended_structure.applies:
|
|
25
|
+
top_rate_threshold = parameters(
|
|
26
|
+
period
|
|
27
|
+
).gov.irs.income.bracket.thresholds["6"][filing_status]
|
|
28
|
+
exemptions = tax_unit("exemptions", period)
|
|
29
|
+
taxable_income = max_(0, agi - exemptions)
|
|
30
|
+
taxable_income_excess = max_(
|
|
31
|
+
0, taxable_income - top_rate_threshold
|
|
32
|
+
)
|
|
33
|
+
total_itemized_deductions = tax_unit(
|
|
34
|
+
"total_itemized_taxable_income_deductions", period
|
|
35
|
+
)
|
|
36
|
+
lesser_of_deductions_or_excess = min_(
|
|
37
|
+
total_itemized_deductions, taxable_income_excess
|
|
38
|
+
)
|
|
39
|
+
return (
|
|
40
|
+
p.amended_structure.rate * lesser_of_deductions_or_excess
|
|
41
|
+
)
|
|
24
42
|
return min_(agi_excess_reduction, maximum_deductions_reduction)
|
|
25
43
|
return 0
|
|
@@ -10,6 +10,16 @@ class salt_cap(Variable):
|
|
|
10
10
|
reference = "https://www.law.cornell.edu/uscode/text/26/164"
|
|
11
11
|
|
|
12
12
|
def formula(tax_unit, period, parameters):
|
|
13
|
-
p = parameters(period).gov.irs.deductions.itemized.salt_and_real_estate
|
|
14
13
|
filing_status = tax_unit("filing_status", period)
|
|
15
|
-
|
|
14
|
+
p = parameters(period).gov.irs.deductions.itemized.salt_and_real_estate
|
|
15
|
+
max_cap = p.cap[filing_status]
|
|
16
|
+
if p.phase_out.in_effect:
|
|
17
|
+
agi = tax_unit("adjusted_gross_income", period)
|
|
18
|
+
agi_excess = max_(0, agi - p.phase_out.threshold[filing_status])
|
|
19
|
+
phase_out = p.phase_out.rate * agi_excess
|
|
20
|
+
phased_out_cap = max_(0, max_cap - phase_out)
|
|
21
|
+
if p.phase_out.floor.applies:
|
|
22
|
+
floor = p.phase_out.floor.amount[filing_status]
|
|
23
|
+
return max_(phased_out_cap, floor)
|
|
24
|
+
return phased_out_cap
|
|
25
|
+
return max_cap
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class overtime_income_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "Overtime income deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
defined_for = "overtime_income_deduction_ssn_requirement_met"
|
|
11
|
+
|
|
12
|
+
def formula(tax_unit, period, parameters):
|
|
13
|
+
person = tax_unit.members
|
|
14
|
+
overtime_income = person("fsla_overtime_premium", period)
|
|
15
|
+
agi = tax_unit("adjusted_gross_income", period)
|
|
16
|
+
filing_status = tax_unit("filing_status", period)
|
|
17
|
+
p = parameters(period).gov.irs.deductions.overtime_income
|
|
18
|
+
cap = p.cap[filing_status]
|
|
19
|
+
start = p.phase_out.start[filing_status]
|
|
20
|
+
agi_excess = max_(agi - start, 0)
|
|
21
|
+
phase_out_amount = agi_excess * p.phase_out.rate
|
|
22
|
+
total_overtime_income = tax_unit.sum(overtime_income)
|
|
23
|
+
capped_overtime_income = min_(cap, total_overtime_income)
|
|
24
|
+
return max_(0, capped_overtime_income - phase_out_amount)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class overtime_income_deduction_ssn_requirement_met(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "SSN requirement met for the overtime income deduction"
|
|
8
|
+
definition_period = YEAR
|
|
9
|
+
|
|
10
|
+
def formula(tax_unit, period, parameters):
|
|
11
|
+
person = tax_unit.members
|
|
12
|
+
ssn_card_type = person("ssn_card_type", period)
|
|
13
|
+
ssn_card_str = ssn_card_type.decode_to_str()
|
|
14
|
+
p = parameters(period).gov.irs.deductions.overtime_income
|
|
15
|
+
eligible_ssn_card_type = np.isin(
|
|
16
|
+
ssn_card_str, p.eligible_ssn_card_type
|
|
17
|
+
)
|
|
18
|
+
joint = tax_unit("tax_unit_is_joint", period)
|
|
19
|
+
head_or_spouse = person("is_tax_unit_head_or_spouse", period)
|
|
20
|
+
eligible_head_or_spouse = eligible_ssn_card_type & head_or_spouse
|
|
21
|
+
return where(
|
|
22
|
+
joint,
|
|
23
|
+
tax_unit.sum(eligible_head_or_spouse) == 2,
|
|
24
|
+
tax_unit.any(eligible_head_or_spouse),
|
|
25
|
+
)
|
|
@@ -22,6 +22,13 @@ class qualified_business_income_deduction(Variable):
|
|
|
22
22
|
# in 2018 IRS Publication 535, Worksheet 12-A, lines 32-37
|
|
23
23
|
taxinc_less_qbid = tax_unit("taxable_income_less_qbid", period)
|
|
24
24
|
netcg_qdiv = tax_unit("adjusted_net_capital_gain", period)
|
|
25
|
-
p = parameters(period).gov.irs.deductions.qbi
|
|
26
|
-
taxinc_cap = p.rate * max_(0, taxinc_less_qbid - netcg_qdiv)
|
|
27
|
-
|
|
25
|
+
p = parameters(period).gov.irs.deductions.qbi
|
|
26
|
+
taxinc_cap = p.max.rate * max_(0, taxinc_less_qbid - netcg_qdiv)
|
|
27
|
+
pre_floor_qbid = min_(uncapped_qbid, taxinc_cap)
|
|
28
|
+
if p.deduction_floor.in_effect:
|
|
29
|
+
qualified_business_income = tax_unit(
|
|
30
|
+
"qualified_business_income", period
|
|
31
|
+
)
|
|
32
|
+
floor = p.deduction_floor.amount.calc(qualified_business_income)
|
|
33
|
+
return max_(pre_floor_qbid, floor)
|
|
34
|
+
return pre_floor_qbid
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class additional_senior_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "Senior deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
reference = (
|
|
11
|
+
"https://www.congress.gov/bill/119th-congress/house-bill/1/text"
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
def formula(tax_unit, period, parameters):
|
|
15
|
+
p = parameters(period).gov.irs.deductions.senior_deduction
|
|
16
|
+
eligible_seniors = add(
|
|
17
|
+
tax_unit,
|
|
18
|
+
period,
|
|
19
|
+
["additional_senior_deduction_eligible_person"],
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
base_deduction = p.amount * eligible_seniors
|
|
23
|
+
agi = tax_unit("adjusted_gross_income", period)
|
|
24
|
+
filing_status = tax_unit("filing_status", period)
|
|
25
|
+
joint = filing_status == filing_status.possible_values.JOINT
|
|
26
|
+
phase_out_amount = where(
|
|
27
|
+
joint,
|
|
28
|
+
p.phase_out_rate.joint.calc(agi),
|
|
29
|
+
p.phase_out_rate.other.calc(agi),
|
|
30
|
+
)
|
|
31
|
+
return max_(base_deduction - phase_out_amount, 0)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class additional_senior_deduction_eligible_person(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = Person
|
|
7
|
+
definition_period = YEAR
|
|
8
|
+
label = "Person is eligible for the additional senior deduction"
|
|
9
|
+
reference = (
|
|
10
|
+
"https://www.congress.gov/bill/119th-congress/house-bill/1/text"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
def formula(person, period, parameters):
|
|
14
|
+
ssn_card_type = person("ssn_card_type", period)
|
|
15
|
+
ssn_card_str = ssn_card_type.decode_to_str()
|
|
16
|
+
p = parameters(period).gov.irs.deductions.senior_deduction
|
|
17
|
+
eligible_ssn_card_type = np.isin(
|
|
18
|
+
ssn_card_str, p.eligible_ssn_card_type
|
|
19
|
+
)
|
|
20
|
+
head_or_spouse = person("is_tax_unit_head_or_spouse", period)
|
|
21
|
+
age = person("age", period)
|
|
22
|
+
p_irs = parameters(period).gov.irs.deductions.standard.aged_or_blind
|
|
23
|
+
aged = age >= p_irs.age_threshold
|
|
24
|
+
return eligible_ssn_card_type & head_or_spouse & aged
|
|
@@ -22,7 +22,6 @@ class tax_unit_itemizes(Variable):
|
|
|
22
22
|
else:
|
|
23
23
|
# determine federal itemization behavior by comparing deductions
|
|
24
24
|
standard_deduction = tax_unit("standard_deduction", period)
|
|
25
|
-
p = parameters(period).gov.irs.deductions
|
|
26
25
|
itemized_deductions = tax_unit(
|
|
27
26
|
"itemized_taxable_income_deductions", period
|
|
28
27
|
)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tip_income_deduction(Variable):
|
|
5
|
+
value_type = float
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "Tip income deduction"
|
|
8
|
+
unit = USD
|
|
9
|
+
definition_period = YEAR
|
|
10
|
+
defined_for = "tip_income_deduction_ssn_requirement_met"
|
|
11
|
+
|
|
12
|
+
def formula(tax_unit, period, parameters):
|
|
13
|
+
person = tax_unit.members
|
|
14
|
+
tip_income = person("tip_income", period)
|
|
15
|
+
agi = tax_unit("adjusted_gross_income", period)
|
|
16
|
+
filing_status = tax_unit("filing_status", period)
|
|
17
|
+
p = parameters(period).gov.irs.deductions.tip_income
|
|
18
|
+
start = p.phase_out.start[filing_status]
|
|
19
|
+
agi_excess = max_(agi - start, 0)
|
|
20
|
+
phase_out_amount = agi_excess * p.phase_out.rate
|
|
21
|
+
total_tip_income = tax_unit.sum(tip_income)
|
|
22
|
+
capped_tip_income = min_(p.cap, total_tip_income)
|
|
23
|
+
return max_(0, capped_tip_income - phase_out_amount)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from policyengine_us.model_api import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class tip_income_deduction_ssn_requirement_met(Variable):
|
|
5
|
+
value_type = bool
|
|
6
|
+
entity = TaxUnit
|
|
7
|
+
label = "SSN requirement met for the tip income deduction"
|
|
8
|
+
definition_period = YEAR
|
|
9
|
+
|
|
10
|
+
def formula(tax_unit, period, parameters):
|
|
11
|
+
person = tax_unit.members
|
|
12
|
+
ssn_card_type = person("ssn_card_type", period)
|
|
13
|
+
ssn_card_str = ssn_card_type.decode_to_str()
|
|
14
|
+
p = parameters(period).gov.irs.deductions.tip_income
|
|
15
|
+
eligible_ssn_card_type = np.isin(
|
|
16
|
+
ssn_card_str, p.eligible_ssn_card_type
|
|
17
|
+
)
|
|
18
|
+
joint = tax_unit("tax_unit_is_joint", period)
|
|
19
|
+
head_or_spouse = person("is_tax_unit_head_or_spouse", period)
|
|
20
|
+
eligible_head_or_spouse = eligible_ssn_card_type & head_or_spouse
|
|
21
|
+
return where(
|
|
22
|
+
joint,
|
|
23
|
+
tax_unit.sum(eligible_head_or_spouse) == 2,
|
|
24
|
+
tax_unit.any(eligible_head_or_spouse),
|
|
25
|
+
)
|
|
@@ -25,10 +25,4 @@ class ca_state_supplement_dependent_amount(Variable):
|
|
|
25
25
|
dependent_count = spm_unit.sum(
|
|
26
26
|
dependent & dependent_age_eligible & (is_disabled | blind)
|
|
27
27
|
)
|
|
28
|
-
|
|
29
|
-
eligible_head_or_spouse_present = spm_unit.any(eligible_person)
|
|
30
|
-
return (
|
|
31
|
-
dependent_count
|
|
32
|
-
* p.dependent.amount
|
|
33
|
-
* eligible_head_or_spouse_present
|
|
34
|
-
)
|
|
28
|
+
return dependent_count * p.dependent.amount
|