policyengine-us 1.400.0__py3-none-any.whl → 1.400.2__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.

Files changed (55) hide show
  1. policyengine_us/parameters/gov/states/household/state_itemized_deductions.yaml +6 -6
  2. policyengine_us/parameters/gov/states/household/state_standard_deductions.yaml +6 -6
  3. policyengine_us/parameters/gov/states/la/tax/income/deductions/itemized/relevant_federal_deductions.yaml +1 -1
  4. policyengine_us/parameters/gov/states/mn/tax/income/credits/cdcc/reduced_base_amount.yaml +28 -0
  5. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/nonstudent.yaml +1 -1
  6. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/income_limit/student.yaml +1 -1
  7. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/personal.yaml +1 -1
  8. policyengine_us/parameters/gov/territories/pr/tax/income/taxable_income/exemptions/veteran.yaml +1 -1
  9. policyengine_us/tests/policy/baseline/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.yaml +109 -0
  10. policyengine_us/tests/policy/baseline/gov/states/la/tax/income/deductions/la_itemized_deductions.yaml +4 -2
  11. policyengine_us/tests/policy/baseline/gov/states/me/tax/income/taxable_income/deductions/me_deductions.yaml +15 -10
  12. policyengine_us/tests/policy/baseline/gov/states/me/tax/income/taxable_income/deductions/me_itemized_deductions_pre_phaseout.yaml +4 -1
  13. policyengine_us/tests/policy/baseline/gov/states/mn/tax/income/{mn_cdcc.yaml → credits/cdcc/mn_cdcc.yaml} +66 -0
  14. policyengine_us/tests/policy/baseline/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_dependent_count.yaml +51 -0
  15. policyengine_us/tests/policy/baseline/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_eligible.yaml +24 -0
  16. policyengine_us/tests/policy/baseline/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_phase_out.yaml +44 -0
  17. policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_federal_income_tax_deduction_for_federal_itemization.yaml +57 -0
  18. policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_federal_income_tax_deduction_for_federal_itemization_indiv.yaml +39 -0
  19. policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.yaml +76 -0
  20. policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_joint.yaml +76 -0
  21. policyengine_us/tests/policy/baseline/gov/states/nm/tax/income/deductions/nm_itemized_deductions.yaml +47 -0
  22. policyengine_us/tests/policy/baseline/gov/states/tax/income/state_itemized_deductions.yaml +180 -0
  23. policyengine_us/tests/policy/baseline/gov/states/tax/income/state_standard_deduction.yaml +178 -0
  24. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/credits/low_income/pr_low_income_credit_eligible.yaml +1 -1
  25. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_dependents_exemption.yaml +1 -1
  26. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_eligible_dependent_for_exemption.yaml +1 -1
  27. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/dependent/pr_exemptions_is_eligible_student.yaml +1 -1
  28. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_personal_exemption.yaml +1 -1
  29. policyengine_us/tests/policy/baseline/gov/territories/pr/tax/income/taxable_income/exemptions/pr_veteran_exemption.yaml +1 -1
  30. policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/integration.yaml +1 -1
  31. policyengine_us/tests/policy/baseline/gov/territories/pr/tax_unit_dependent/pr_is_tax_unit_dependent.yaml +1 -1
  32. policyengine_us/variables/gov/irs/income/taxable_income/deductions/tax_unit_itemizes.py +21 -2
  33. policyengine_us/variables/gov/states/ia/tax/income/including_married_filing_separately/deductions/ia_standard_deduction_indiv.py +0 -2
  34. policyengine_us/variables/gov/states/la/tax/income/deductions/la_standard_deduction.py +4 -2
  35. policyengine_us/variables/gov/states/me/tax/income/taxable_income/deductions/me_itemized_deductions_pre_phaseout.py +1 -3
  36. policyengine_us/variables/gov/states/me/tax/income/taxable_income/me_deductions.py +5 -2
  37. policyengine_us/variables/gov/states/mn/tax/income/credits/cdcc/mn_cdcc.py +47 -0
  38. policyengine_us/variables/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_dependent_count.py +27 -0
  39. policyengine_us/variables/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_eligible.py +23 -0
  40. policyengine_us/variables/gov/states/mn/tax/income/credits/cdcc/mn_cdcc_phase_out.py +25 -0
  41. policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/README.md +1 -0
  42. policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_federal_income_tax_deduction_for_federal_itemization.py +26 -0
  43. policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_federal_income_tax_deduction_for_federal_itemization_indiv.py +34 -0
  44. policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_indiv.py +41 -0
  45. policyengine_us/variables/gov/states/mt/tax/income/deductions/itemized/federal_itemization/mt_itemized_deductions_for_federal_itemization_joint.py +37 -0
  46. policyengine_us/variables/gov/states/nm/tax/income/deductions/nm_deductions.py +1 -1
  47. policyengine_us/variables/gov/states/nm/tax/income/deductions/nm_itemized_deductions.py +13 -0
  48. policyengine_us/variables/gov/states/tax/income/state_itemized_deductions.py +64 -0
  49. policyengine_us/variables/gov/states/tax/income/state_standard_deduction.py +68 -1
  50. {policyengine_us-1.400.0.dist-info → policyengine_us-1.400.2.dist-info}/METADATA +1 -1
  51. {policyengine_us-1.400.0.dist-info → policyengine_us-1.400.2.dist-info}/RECORD +54 -33
  52. policyengine_us/variables/gov/states/mn/tax/income/credits/mn_cdcc.py +0 -49
  53. {policyengine_us-1.400.0.dist-info → policyengine_us-1.400.2.dist-info}/WHEEL +0 -0
  54. {policyengine_us-1.400.0.dist-info → policyengine_us-1.400.2.dist-info}/entry_points.txt +0 -0
  55. {policyengine_us-1.400.0.dist-info → policyengine_us-1.400.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,76 @@
1
+ - name: Test case 1 # filing separate
2
+ period: 2021
3
+ input:
4
+ charitable_deduction: 800
5
+ investment_interest_expense: 265
6
+ mt_salt_deduction: 5_000
7
+ mt_medical_expense_deduction_indiv: 1_000
8
+ casualty_loss_deduction: 400
9
+ mt_child_dependent_care_expense_deduction: 123
10
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 2_000
11
+ state_code: MT
12
+ output:
13
+ mt_itemized_deductions_for_federal_itemization_indiv: 9_188
14
+
15
+ - name: Test case 2 #salt has a cap of 10000 for single, head of household and joint
16
+ period: 2022
17
+ input:
18
+ charitable_deduction: 0
19
+ investment_interest_expense: 1_234
20
+ mt_salt_deduction: 10_000
21
+ mt_medical_expense_deduction_indiv: 3_000
22
+ casualty_loss_deduction: 0
23
+ mt_child_dependent_care_expense_deduction: 0
24
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 2_000
25
+ state_code: MT
26
+ output:
27
+ mt_itemized_deductions_for_federal_itemization_indiv: 16_234
28
+
29
+ - name: Test case 3 #sum all terms
30
+ period: 2021
31
+ input:
32
+ charitable_deduction: 1_000
33
+ mortgage_interest: 34
34
+ mt_salt_deduction: 1_035
35
+ mt_medical_expense_deduction_indiv: 3_000
36
+ casualty_loss_deduction: 745
37
+ mt_child_dependent_care_expense_deduction: 1_004
38
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 2_000
39
+ state_code: MT
40
+ output:
41
+ mt_itemized_deductions_for_federal_itemization_indiv: 8_318
42
+
43
+ - name: Amount only distributed to the head and spouse
44
+ period: 2021
45
+ absolute_error_margin: 1
46
+ input:
47
+ people:
48
+ person1:
49
+ is_tax_unit_head_or_spouse: true
50
+ mt_misc_deductions: 100
51
+ mt_medical_expense_deduction_indiv: 200
52
+ mt_salt_deduction: 300
53
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 400
54
+ person2:
55
+ is_tax_unit_head_or_spouse: true
56
+ mt_misc_deductions: 100
57
+ mt_medical_expense_deduction_indiv: 200
58
+ mt_salt_deduction: 300
59
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 100
60
+ person3:
61
+ is_tax_unit_head_or_spouse: false
62
+ is_tax_unit_dependent: true
63
+ mt_misc_deductions: 100
64
+ mt_medical_expense_deduction_indiv: 12
65
+ mt_salt_deduction: 200
66
+ mt_federal_income_tax_deduction_for_federal_itemization_indiv: 100
67
+ tax_units:
68
+ tax_unit:
69
+ members: [person1, person2, person3]
70
+ charitable_deduction: 0
71
+ households:
72
+ household:
73
+ members: [person1, person2, person3]
74
+ state_code: MT
75
+ output:
76
+ mt_itemized_deductions_for_federal_itemization_indiv: [1_000, 700, 0]
@@ -0,0 +1,76 @@
1
+ - name: Test case 1 # filing separate
2
+ period: 2021
3
+ input:
4
+ filing_status: SEPARATE
5
+ charitable_deduction: 800
6
+ investment_interest_expense: 265
7
+ mt_salt_deduction: 5_000
8
+ mt_medical_expense_deduction_joint: 1_000
9
+ casualty_loss_deduction: 400
10
+ mt_child_dependent_care_expense_deduction: 123
11
+ mt_federal_income_tax_deduction_for_federal_itemization: 2_000
12
+ state_code: MT
13
+ output:
14
+ mt_itemized_deductions_for_federal_itemization_joint: 9_588
15
+
16
+ - name: Test case 2 #salt has a cap of 10000 for single, head of household and joint
17
+ period: 2022
18
+ input:
19
+ filing_status: HEAD_OF_HOUSEHOLD
20
+ charitable_deduction: 0
21
+ mortgage_interest: 1_234
22
+ mt_salt_deduction: 10_000
23
+ mt_medical_expense_deduction_joint: 3_000
24
+ casualty_loss_deduction: 0
25
+ mt_child_dependent_care_expense_deduction: 0
26
+ mt_federal_income_tax_deduction_for_federal_itemization: 2_000
27
+ state_code: MT
28
+ output:
29
+ mt_itemized_deductions_for_federal_itemization_joint: 16_234
30
+
31
+ - name: Test case 3 #sum all terms
32
+ period: 2021
33
+ input:
34
+ filing_status: SINGLE
35
+ charitable_deduction: 1_000
36
+ mortgage_interest: 34
37
+ mt_salt_deduction: 1_035
38
+ mt_medical_expense_deduction_joint: 3_000
39
+ casualty_loss_deduction: 745
40
+ mt_child_dependent_care_expense_deduction: 1_004
41
+ mt_federal_income_tax_deduction_for_federal_itemization: 2_000
42
+ state_code: MT
43
+ output:
44
+ mt_itemized_deductions_for_federal_itemization_joint: 8_818
45
+
46
+ - name: Amount only distributed to the head
47
+ period: 2021
48
+ absolute_error_margin: 1
49
+ input:
50
+ people:
51
+ person1:
52
+ is_tax_unit_head: true
53
+ mt_misc_deductions: 100
54
+ mt_medical_expense_deduction_joint: 200
55
+ mt_salt_deduction: 300
56
+ investment_interest_expense: 100
57
+ person2:
58
+ is_tax_unit_head: false
59
+ mt_misc_deductions: 100
60
+ mt_medical_expense_deduction_joint: 200
61
+ mt_salt_deduction: 300
62
+ person3:
63
+ is_tax_unit_head: false
64
+ mt_misc_deductions: 100
65
+ mt_medical_expense_deduction_joint: 12
66
+ mt_salt_deduction: 200
67
+ households:
68
+ household:
69
+ members: [person1, person2, person3]
70
+ state_code: MT
71
+ tax_units:
72
+ tax_unit:
73
+ members: [person1, person2, person3]
74
+ mt_federal_income_tax_deduction_for_federal_itemization: 600
75
+ output:
76
+ mt_itemized_deductions_for_federal_itemization_joint: [2_212, 0, 0]
@@ -0,0 +1,47 @@
1
+ - name: New Mexico adopts federal itemized deductions
2
+ period: 2023
3
+ input:
4
+ state_code: NM
5
+ filing_status: SINGLE
6
+ age_head: 35
7
+ charitable_deduction: 5_000
8
+ interest_deduction: 8_000
9
+ salt_deduction: 10_000
10
+ medical_expense_deduction: 2_000
11
+ output:
12
+ # Federal itemized deductions total
13
+ total_itemized_taxable_income_deductions: 25_000
14
+ # NM uses federal itemized deductions
15
+ nm_itemized_deductions: 25_000
16
+ # Should flow through to state_itemized_deductions
17
+ state_itemized_deductions: 25_000
18
+
19
+ - name: New Mexico itemized deductions for married couple
20
+ period: 2023
21
+ input:
22
+ state_code: NM
23
+ filing_status: JOINT
24
+ age_head: 45
25
+ age_spouse: 43
26
+ charitable_deduction: 10_000
27
+ interest_deduction: 15_000
28
+ salt_deduction: 10_000
29
+ output:
30
+ total_itemized_taxable_income_deductions: 35_000
31
+ nm_itemized_deductions: 35_000
32
+ state_itemized_deductions: 35_000
33
+
34
+ - name: New Mexico itemized deductions for head of household
35
+ period: 2023
36
+ input:
37
+ state_code: NM
38
+ filing_status: HEAD_OF_HOUSEHOLD
39
+ age_head: 38
40
+ charitable_deduction: 3_000
41
+ interest_deduction: 7_000
42
+ salt_deduction: 8_000
43
+ medical_expense_deduction: 1_500
44
+ output:
45
+ total_itemized_taxable_income_deductions: 19_500
46
+ nm_itemized_deductions: 19_500
47
+ state_itemized_deductions: 19_500
@@ -0,0 +1,180 @@
1
+ - name: Federal itemized deductions adopted for Connecticut
2
+ period: 2023
3
+ input:
4
+ state_code: CT
5
+ filing_status: SINGLE
6
+ age_head: 30
7
+ # Set the individual federal deduction components directly
8
+ charitable_deduction: 5_000
9
+ interest_deduction: 8_000
10
+ salt_deduction: 10_000
11
+ output:
12
+ # State should use sum of federal itemized deduction components
13
+ state_itemized_deductions: 23_000
14
+
15
+ - name: Federal itemized deductions adopted for Georgia
16
+ period: 2023
17
+ input:
18
+ state_code: GA
19
+ filing_status: JOINT
20
+ age_head: 40
21
+ age_spouse: 38
22
+ # Set the individual federal deduction components directly
23
+ charitable_deduction: 10_000
24
+ interest_deduction: 15_000
25
+ salt_deduction: 10_000
26
+ output:
27
+ # State should use sum of federal itemized deduction components
28
+ state_itemized_deductions: 35_000
29
+
30
+ - name: State-specific itemized deductions for New York
31
+ period: 2023
32
+ input:
33
+ state_code: NY
34
+ filing_status: SINGLE
35
+ age_head: 35
36
+ adjusted_gross_income: 80_000
37
+ # NY has its own calculation that we set directly
38
+ ny_itemized_deductions: 15_000
39
+ output:
40
+ state_itemized_deductions: 15_000
41
+
42
+ - name: Federal itemized deductions adopted for Utah
43
+ period: 2023
44
+ input:
45
+ state_code: UT
46
+ filing_status: JOINT
47
+ age_head: 45
48
+ age_spouse: 43
49
+ charitable_deduction: 7_500
50
+ interest_deduction: 12_000
51
+ salt_deduction: 8_000
52
+ output:
53
+ # State should use sum of federal itemized deduction components
54
+ state_itemized_deductions: 27_500
55
+
56
+ - name: New Mexico uses federal itemized deductions through its own implementation
57
+ period: 2023
58
+ input:
59
+ state_code: NM
60
+ filing_status: HEAD_OF_HOUSEHOLD
61
+ age_head: 38
62
+ charitable_deduction: 4_000
63
+ interest_deduction: 9_000
64
+ salt_deduction: 7_000
65
+ output:
66
+ # NM uses federal itemized deductions via nm_itemized_deductions
67
+ total_itemized_taxable_income_deductions: 20_000
68
+ nm_itemized_deductions: 20_000
69
+ state_itemized_deductions: 20_000
70
+
71
+ - name: Montana check for individual vs joint itemization
72
+ period: 2023
73
+ input:
74
+ state_code: MT
75
+ filing_status: HEAD_OF_HOUSEHOLD
76
+ age_head: 38
77
+ charitable_deduction: 4_000
78
+ interest_deduction: 9_000
79
+ salt_deduction: 7_000
80
+ output:
81
+ # NM uses federal itemized deductions via nm_itemized_deductions
82
+ total_itemized_taxable_income_deductions: 20_000
83
+ mt_itemized_deductions_for_federal_itemization_indiv: 2_000
84
+ mt_itemized_deductions_for_federal_itemization_joint: 4_000
85
+ state_itemized_deductions: 4_000
86
+
87
+ - name: Montana maximum logic - joint higher
88
+ period: 2023
89
+ input:
90
+ state_code: MT
91
+ filing_status: JOINT
92
+ age_head: 40
93
+ age_spouse: 38
94
+ # Set up scenario where joint calculation is higher
95
+ mt_itemized_deductions_for_federal_itemization_indiv: 8_000
96
+ mt_itemized_deductions_for_federal_itemization_joint: 12_000
97
+ output:
98
+ # Should take the maximum (joint in this case)
99
+ state_itemized_deductions: 12_000
100
+
101
+ - name: Montana maximum logic - individual higher
102
+ period: 2023
103
+ input:
104
+ state_code: MT
105
+ filing_status: SEPARATE
106
+ age_head: 35
107
+ # Set up scenario where individual calculation is higher
108
+ mt_itemized_deductions_for_federal_itemization_indiv: 15_000
109
+ mt_itemized_deductions_for_federal_itemization_joint: 10_000
110
+ output:
111
+ # Should take the maximum (individual in this case)
112
+ state_itemized_deductions: 15_000
113
+
114
+ - name: Iowa maximum logic - joint higher
115
+ period: 2023
116
+ input:
117
+ state_code: IA
118
+ filing_status: JOINT
119
+ age_head: 42
120
+ age_spouse: 40
121
+ # Set up scenario where joint calculation is higher
122
+ ia_itemized_deductions_indiv: 6_000
123
+ ia_itemized_deductions_joint: 9_000
124
+ output:
125
+ # Should take the maximum (joint in this case)
126
+ state_itemized_deductions: 9_000
127
+
128
+ - name: Iowa maximum logic - individual higher
129
+ period: 2023
130
+ input:
131
+ state_code: IA
132
+ filing_status: SEPARATE
133
+ age_head: 45
134
+ # Set up scenario where individual calculation is higher
135
+ ia_itemized_deductions_indiv: 11_000
136
+ ia_itemized_deductions_joint: 7_000
137
+ output:
138
+ # Should take the maximum (individual in this case)
139
+ state_itemized_deductions: 11_000
140
+
141
+ - name: Delaware maximum logic - joint higher
142
+ period: 2023
143
+ input:
144
+ state_code: DE
145
+ filing_status: JOINT
146
+ age_head: 38
147
+ age_spouse: 35
148
+ # Set up scenario where joint calculation is higher
149
+ de_itemized_deductions_indv: 4_500
150
+ de_itemized_deductions_joint: 8_200
151
+ output:
152
+ # Should take the maximum (joint in this case)
153
+ state_itemized_deductions: 8_200
154
+
155
+ - name: Delaware maximum logic - individual higher
156
+ period: 2023
157
+ input:
158
+ state_code: DE
159
+ filing_status: SEPARATE
160
+ age_head: 42
161
+ # Set up scenario where individual calculation is higher
162
+ de_itemized_deductions_indv: 12_500
163
+ de_itemized_deductions_joint: 9_800
164
+ output:
165
+ # Should take the maximum (individual in this case)
166
+ state_itemized_deductions: 12_500
167
+
168
+ - name: Arkansas maximum logic - joint higher
169
+ period: 2023
170
+ input:
171
+ state_code: AR
172
+ filing_status: JOINT
173
+ age_head: 46
174
+ age_spouse: 44
175
+ # Set up scenario where joint calculation is higher
176
+ ar_itemized_deductions_indiv: 3_800
177
+ ar_itemized_deductions_joint: 7_600
178
+ output:
179
+ # Should take the maximum (joint in this case)
180
+ state_itemized_deductions: 7_600
@@ -0,0 +1,178 @@
1
+ - name: Federal standard deduction adopted for Connecticut
2
+ period: 2023
3
+ input:
4
+ state_code: CT
5
+ filing_status: SINGLE
6
+ age_head: 30
7
+ output:
8
+ standard_deduction: 13_850
9
+ state_standard_deduction: 13_850
10
+
11
+ - name: Federal standard deduction adopted for Utah married couple
12
+ period: 2023
13
+ input:
14
+ state_code: UT
15
+ filing_status: JOINT
16
+ age_head: 35
17
+ age_spouse: 33
18
+ output:
19
+ standard_deduction: 27_700
20
+ state_standard_deduction: 27_700
21
+
22
+ - name: State-specific deduction for Georgia
23
+ period: 2023
24
+ input:
25
+ state_code: GA
26
+ filing_status: SINGLE
27
+ age_head: 30
28
+ adjusted_gross_income: 50_000
29
+ output:
30
+ ga_standard_deduction: 5_400
31
+ state_standard_deduction: 5_400
32
+
33
+ - name: State-specific deduction for New York
34
+ period: 2023
35
+ input:
36
+ state_code: NY
37
+ filing_status: JOINT
38
+ age_head: 40
39
+ age_spouse: 38
40
+ adjusted_gross_income: 100_000
41
+ output:
42
+ ny_standard_deduction: 16_050
43
+ state_standard_deduction: 16_050
44
+
45
+ - name: State-specific deduction for Montana
46
+ period: 2023
47
+ input:
48
+ state_code: MT
49
+ filing_status: JOINT
50
+ age_head: 40
51
+ age_spouse: 38
52
+ adjusted_gross_income: 20_000
53
+ output:
54
+ mt_standard_deduction_indiv: 2_460
55
+ mt_standard_deduction_joint: 4_920
56
+ state_standard_deduction: 4_920
57
+
58
+ - name: Montana standard deduction maximum logic - joint higher
59
+ period: 2023
60
+ input:
61
+ state_code: MT
62
+ filing_status: JOINT
63
+ age_head: 45
64
+ age_spouse: 43
65
+ # Set up scenario where joint calculation is higher
66
+ mt_standard_deduction_indiv: 3_000
67
+ mt_standard_deduction_joint: 5_000
68
+ output:
69
+ # Should take the maximum (joint in this case)
70
+ state_standard_deduction: 5_000
71
+
72
+ - name: Montana standard deduction maximum logic - individual higher
73
+ period: 2023
74
+ input:
75
+ state_code: MT
76
+ filing_status: SEPARATE
77
+ age_head: 35
78
+ # Set up scenario where individual calculation is higher
79
+ mt_standard_deduction_indiv: 8_000
80
+ mt_standard_deduction_joint: 6_000
81
+ output:
82
+ # Should take the maximum (individual in this case)
83
+ state_standard_deduction: 8_000
84
+
85
+ - name: Iowa standard deduction maximum logic - joint higher
86
+ period: 2023
87
+ input:
88
+ state_code: IA
89
+ filing_status: JOINT
90
+ age_head: 42
91
+ age_spouse: 40
92
+ # Set up scenario where joint calculation is higher
93
+ ia_standard_deduction_indiv: 2_500
94
+ ia_standard_deduction_joint: 4_000
95
+ output:
96
+ # Should take the maximum (joint in this case)
97
+ state_standard_deduction: 4_000
98
+
99
+ - name: Iowa standard deduction maximum logic - individual higher
100
+ period: 2023
101
+ input:
102
+ state_code: IA
103
+ filing_status: SEPARATE
104
+ age_head: 38
105
+ # Set up scenario where individual calculation is higher
106
+ ia_standard_deduction_indiv: 7_000
107
+ ia_standard_deduction_joint: 5_500
108
+ output:
109
+ # Should take the maximum (individual in this case)
110
+ state_standard_deduction: 7_000
111
+
112
+ - name: Delaware standard deduction maximum logic - joint higher
113
+ period: 2023
114
+ input:
115
+ state_code: DE
116
+ filing_status: JOINT
117
+ age_head: 40
118
+ age_spouse: 37
119
+ # Set up scenario where joint calculation is higher
120
+ de_standard_deduction_indv: 3_200
121
+ de_standard_deduction_joint: 6_400
122
+ output:
123
+ # Should take the maximum (joint in this case)
124
+ state_standard_deduction: 6_400
125
+
126
+ - name: Delaware standard deduction maximum logic - individual higher
127
+ period: 2023
128
+ input:
129
+ state_code: DE
130
+ filing_status: SEPARATE
131
+ age_head: 45
132
+ # Set up scenario where individual calculation is higher
133
+ de_standard_deduction_indv: 8_500
134
+ de_standard_deduction_joint: 7_000
135
+ output:
136
+ # Should take the maximum (individual in this case)
137
+ state_standard_deduction: 8_500
138
+
139
+ - name: Arkansas standard deduction maximum logic - joint higher
140
+ period: 2023
141
+ input:
142
+ state_code: AR
143
+ filing_status: JOINT
144
+ age_head: 44
145
+ age_spouse: 41
146
+ # Set up scenario where joint calculation is higher
147
+ ar_standard_deduction_indiv: 2_340
148
+ ar_standard_deduction_joint: 4_680
149
+ output:
150
+ # Should take the maximum (joint in this case)
151
+ state_standard_deduction: 4_680
152
+
153
+ - name: Mississippi standard deduction maximum logic - joint higher
154
+ period: 2023
155
+ input:
156
+ state_code: MS
157
+ filing_status: JOINT
158
+ age_head: 39
159
+ age_spouse: 36
160
+ # Set up scenario where joint calculation is higher
161
+ ms_standard_deduction_indiv: 2_300
162
+ ms_standard_deduction_joint: 4_600
163
+ output:
164
+ # Should take the maximum (joint in this case)
165
+ state_standard_deduction: 4_600
166
+
167
+ - name: Kentucky standard deduction maximum logic - individual higher
168
+ period: 2023
169
+ input:
170
+ state_code: KY
171
+ filing_status: SEPARATE
172
+ age_head: 41
173
+ # Set up scenario where individual calculation is higher
174
+ ky_standard_deduction_indiv: 3_400
175
+ ky_standard_deduction_joint: 2_650
176
+ output:
177
+ # Should take the maximum (individual in this case)
178
+ state_standard_deduction: 3_400
@@ -73,4 +73,4 @@
73
73
  household:
74
74
  state_code: PR
75
75
  output:
76
- pr_low_income_credit_eligible: false
76
+ pr_low_income_credit_eligible: false
@@ -57,4 +57,4 @@
57
57
  members: [person1, person2, person3, person4]
58
58
  state_code: PR
59
59
  output:
60
- pr_dependents_exemption: 5_000
60
+ pr_dependents_exemption: 5_000
@@ -23,4 +23,4 @@
23
23
  pr_exemptions_is_eligible_nonstudent: false
24
24
  state_code: PR
25
25
  output:
26
- pr_eligible_dependent_for_exemption: false
26
+ pr_eligible_dependent_for_exemption: false
@@ -51,4 +51,4 @@
51
51
  age: 30
52
52
  state_code: PR
53
53
  output:
54
- pr_exemptions_is_eligible_student: false
54
+ pr_exemptions_is_eligible_student: false
@@ -12,4 +12,4 @@
12
12
  state_code: PR
13
13
  filing_status: SINGLE
14
14
  output:
15
- pr_personal_exemption: 3_500
15
+ pr_personal_exemption: 3_500
@@ -34,4 +34,4 @@
34
34
  state_code: PR
35
35
  members: [person1, person2]
36
36
  output:
37
- pr_veteran_exemption: [1_500, 0]
37
+ pr_veteran_exemption: [1_500, 0]
@@ -31,4 +31,4 @@
31
31
  members: [person1, person2, person3, person4]
32
32
  state_code: PR
33
33
  output:
34
- pr_is_tax_unit_dependent: [false, true, true, true]
34
+ pr_is_tax_unit_dependent: [false, true, true, true]
@@ -62,4 +62,4 @@
62
62
  is_incapable_of_self_care: false
63
63
  is_full_time_college_student: false
64
64
  output:
65
- pr_is_tax_unit_dependent: false
65
+ pr_is_tax_unit_dependent: false
@@ -10,6 +10,7 @@ class tax_unit_itemizes(Variable):
10
10
  definition_period = YEAR
11
11
 
12
12
  def formula(tax_unit, period, parameters):
13
+
13
14
  if parameters(period).gov.simulation.branch_to_determine_itemization:
14
15
  # determine federal itemization behavior by comparing tax liability
15
16
  tax_liability_if_itemizing = tax_unit(
@@ -18,11 +19,29 @@ class tax_unit_itemizes(Variable):
18
19
  tax_liability_if_not_itemizing = tax_unit(
19
20
  "tax_liability_if_not_itemizing", period
20
21
  )
21
- return tax_liability_if_itemizing < tax_liability_if_not_itemizing
22
+ state_standard_deduction = tax_unit(
23
+ "state_standard_deduction", period
24
+ )
25
+ state_itemized_deductions = tax_unit(
26
+ "state_itemized_deductions", period
27
+ )
28
+ # Use a small tolerance for floating-point comparison due to floating point imprecision
29
+ TOLERANCE = 0.0001
30
+ federal_tax_equal = (
31
+ np.abs(
32
+ tax_liability_if_itemizing - tax_liability_if_not_itemizing
33
+ )
34
+ <= TOLERANCE
35
+ )
36
+ return where(
37
+ federal_tax_equal,
38
+ state_standard_deduction < state_itemized_deductions,
39
+ tax_liability_if_itemizing < tax_liability_if_not_itemizing,
40
+ )
22
41
  else:
23
- # determine federal itemization behavior by comparing deductions
24
42
  standard_deduction = tax_unit("standard_deduction", period)
25
43
  itemized_deductions = tax_unit(
26
44
  "itemized_taxable_income_deductions", period
27
45
  )
46
+ # determine federal itemization behavior by comparing deductions
28
47
  return itemized_deductions > standard_deduction
@@ -34,8 +34,6 @@ class ia_standard_deduction_indiv(Variable):
34
34
  fsvals.SURVIVING_SPOUSE,
35
35
  ],
36
36
  )
37
- is_head = person("is_tax_unit_head", period)
38
- is_spouse = person("is_tax_unit_spouse", period)
39
37
  p = parameters(period).gov.states.ia.tax.income.deductions.standard
40
38
 
41
39
  if p.applies_federal:
@@ -11,5 +11,7 @@ class la_standard_deduction(Variable):
11
11
 
12
12
  def formula(tax_unit, period, parameters):
13
13
  p = parameters(period).gov.states.la.tax.income.deductions.standard
14
- filing_status = tax_unit("filing_status", period)
15
- return p.amount[filing_status]
14
+ if p.applies:
15
+ filing_status = tax_unit("filing_status", period)
16
+ return p.amount[filing_status]
17
+ return 0
@@ -14,8 +14,6 @@ class me_itemized_deductions_pre_phaseout(Variable):
14
14
  defined_for = StateCode.ME
15
15
 
16
16
  def formula(tax_unit, period, parameters):
17
- # Whether or not the taxpayer itemized for federal taxes.
18
- us_itemizing = tax_unit("tax_unit_itemizes", period)
19
17
 
20
18
  # Get the Maine itemizing deduction parameters.
21
19
  p = parameters(period).gov.states.me.tax.income.deductions.itemized
@@ -36,4 +34,4 @@ class me_itemized_deductions_pre_phaseout(Variable):
36
34
  capped_deduction_no_med = min_(deduction_no_med, p.cap)
37
35
 
38
36
  # Add back medical and dental expenses (which are not capped).
39
- return us_itemizing * (capped_deduction_no_med + medical_expenses)
37
+ return capped_deduction_no_med + medical_expenses