From 6788f202ba381c23d90c42b5280ef6a2b0965a7f Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Fri, 13 Nov 2026 09:01:31 -0500 Subject: [PATCH] Test Montana's joint-return deductions on the cases in rulespec-us#1520 Adds YAML cases for the companion tests in TheAxiomFoundation/rulespec-us#1520 that had no PolicyEngine test after #9903 merged: - a dependent child's U.S. Treasury interest stays off the parents' Montana AGI, for both the medical floor (6,250) and the standard deduction (10,000); - the joint 2021 maximum (9,660) and the single 2023 maximum (5,540), from the Form 2 Standard Deduction Worksheet; - a status 2a column on its own Montana AGI (5,500); - the 2026 federal floor (3,500), the case in rulespec-us us/statutes/26/213. Tests only; no model change. Co-Authored-By: Claude Opus 5.5 --- ...joint-deduction-companion-cases.changed.md | 1 + .../mt_medical_expense_deduction_indiv.yaml | 12 +++++ .../mt_medical_expense_deduction_joint.yaml | 49 ++++++++++++++++++ .../standard/mt_standard_deduction_joint.yaml | 50 +++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 changelog.d/test-mt-joint-deduction-companion-cases.changed.md diff --git a/changelog.d/test-mt-joint-deduction-companion-cases.changed.md b/changelog.d/test-mt-joint-deduction-companion-cases.changed.md new file mode 100644 index 00000000000..8ed6c05d178 --- /dev/null +++ b/changelog.d/test-mt-joint-deduction-companion-cases.changed.md @@ -0,0 +1 @@ +Add Montana 2021–2023 joint-return medical and standard deduction tests for a dependent's Treasury interest, the 2021 joint and 2023 single maximums, a separate-filing column and the 2026 federal floor. diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_indiv.yaml index da1d5b324d5..807e0f2110e 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_indiv.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_indiv.yaml @@ -320,3 +320,15 @@ mt_dependent_medical_expense_head_share: 1 mt_medical_and_dental_expenses_indiv: [4_000, 0, 0] mt_medical_expense_deduction_indiv: [3_000, 0, 0] + +- name: Each spouse filing separately on the same form uses their own column's Montana AGI + period: 2022 + input: + other_medical_expenses: 10_000 + mt_agi_indiv: 60_000 + state_code: MT + is_tax_unit_head_or_spouse: true + output: + # Itemized Deductions Schedule line 1 in that spouse's column: + # 10,000 - 7.5% x 60,000 = 5,500. + mt_medical_expense_deduction_indiv: 5_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_joint.yaml index 2bd044b3c36..a030793c766 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_joint.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/itemized/mt_medical_expense_deduction_joint.yaml @@ -756,3 +756,52 @@ # Line 1: (10,200 - 0 - 200) - 3,000 = 7,000. # Line 3: 400 - (6,200 - 6,000) = 200. mt_medical_expense_deduction_joint: 7_200 + +- name: A dependent's U.S. government interest does not lower the parents' Montana AGI + period: 2022 + absolute_error_margin: 1 + input: + people: + head: + age: 40 + employment_income: 50_000 + other_medical_expenses: 10_000 + spouse: + age: 40 + child: + age: 10 + taxable_interest_income: 10_000 + us_govt_interest_person: 10_000 + tax_units: + tax_unit: + members: [head, spouse, child] + households: + household: + members: [head, spouse, child] + state_code: MT + output: + # The child's interest is on the child's own return, so it is neither in + # the parents' federal AGI nor subtracted on their Montana return. + mt_agi_joint: 50_000 + # Itemized Deductions Schedule line 1: 10,000 - 7.5% x 50,000 = 6,250. + mt_medical_expense_deduction_joint: [6_250, 0, 0] + +- name: In 2026 the federal floor applies to federal AGI + period: 2026 + absolute_error_margin: 1 + input: + people: + person1: + age: 40 + employment_income: 100_000 + other_medical_expenses: 11_000 + tax_units: + tax_unit: + members: [person1] + households: + household: + members: [person1] + state_code: MT + output: + # Form 2 line 2 takes federal Schedule A: 11,000 - 7.5% x 100,000 = 3,500. + mt_medical_expense_deduction_joint: 3_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/standard/mt_standard_deduction_joint.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/standard/mt_standard_deduction_joint.yaml index 68ba1b89870..3cfca16b0fb 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/standard/mt_standard_deduction_joint.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/deductions/standard/mt_standard_deduction_joint.yaml @@ -122,3 +122,53 @@ # Standard Deduction Worksheet: 20% x 40,000 = 8,000, between the $4,520 # minimum and the $10,180 maximum for a joint return. mt_standard_deduction_joint: [8_000, 0] + +- name: A dependent's U.S. government interest does not lower the parents' Montana AGI + period: 2022 + absolute_error_margin: 1 + input: + people: + head: + age: 40 + employment_income: 50_000 + spouse: + age: 40 + child: + age: 10 + taxable_interest_income: 10_000 + us_govt_interest_person: 10_000 + tax_units: + tax_unit: + members: [head, spouse, child] + households: + household: + members: [head, spouse, child] + state_code: MT + output: + # The child's interest is on the child's own return, so it is neither in + # the parents' federal AGI nor subtracted on their Montana return. + mt_agi_joint: 50_000 + # 20% x 50,000 = 10,000, below the $10,180 maximum for a joint return. + mt_standard_deduction_joint: [10_000, 0, 0] + +- name: Joint return at the 2021 maximum + period: 2021 + input: + state_code: MT + mt_agi_joint: 80_000 + filing_status: JOINT + output: + # 2021 Form 2 Standard Deduction Worksheet: 20% x 80,000 = 16,000, above + # the $9,660 maximum for a joint return. + mt_standard_deduction_joint: 9_660 + +- name: Single return at the 2023 maximum + period: 2023 + input: + state_code: MT + mt_agi_joint: 40_000 + filing_status: SINGLE + output: + # 2023 Form 2 Standard Deduction Worksheet: 20% x 40,000 = 8,000, above + # the $5,540 maximum for a single return. + mt_standard_deduction_joint: 5_540