Repository: PolicyEngine/policyengine-us (language: python)

Issue:
Montana 2023 income tax rule updates
Standard deduction 
Exemptions
Tax thresholds



Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb2d..3d1e9398658 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Montana 2023 income tax rule updates.
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/rent_equivalent_tax_rate.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/rent_equivalent_tax_rate.yaml
index a864faccf81..420470e16b5 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/rent_equivalent_tax_rate.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/credits/elderly_homeowner_or_renter/rent_equivalent_tax_rate.yaml
@@ -17,4 +17,3 @@ metadata:
     href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=10
   - title: 2023 Form of Montana Individual Income Tax Return, Page 10, Line 17
     href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023.pdf#page=10
-
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/cap.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/cap.yaml
index b2e63f58940..82593ffb059 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/cap.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/cap.yaml
@@ -12,20 +12,26 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf#page=7
     - title: Montana Tax Form 2021 | Standard Deduction | Line 3
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=7
-
+    - title: Montana Tax Form 2023 | Exemptions | Standard Deduction Worksheet
+      href: https://wwwa.fileyourtaxes.com/www17/cgi-bin/static/displayBlankPDF.pl?form=MT-FORM2.pdf&year=2023
 
 JOINT:
   2021-01-01: 9_660
   2022-01-01: 10_180
+  2023-01-01: 11_080
 HEAD_OF_HOUSEHOLD:
   2021-01-01: 9_660
   2022-01-01: 10_180
+  2023-01-01: 11_080
 SURVIVING_SPOUSE:
   2021-01-01: 4_830
   2022-01-01: 5_090
+  2023-01-01: 5_540
 SINGLE:
   2021-01-01: 4_830
   2022-01-01: 5_090
+  2023-01-01: 5_540
 SEPARATE:
   2021-01-01: 4_830
   2022-01-01: 5_090
+  2023-01-01: 5_540
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/floor.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/floor.yaml
index e1996bb3341..732d819b82d 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/floor.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/deductions/standard/floor.yaml
@@ -12,19 +12,26 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf#page=7
     - title: Montana Tax Form 2021 | Standard Deduction | Line 5
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021.pdf#page=7
+    - title: Montana Tax Form 2023 | Exemptions | Standard Deduction Worksheet
+      href: https://wwwa.fileyourtaxes.com/www17/cgi-bin/static/displayBlankPDF.pl?form=MT-FORM2.pdf&year=2023
 
 JOINT:
   2021-01-01: 4_280
   2022-01-01: 4_520
+  2023-01-01: 4_920
 HEAD_OF_HOUSEHOLD:
   2021-01-01: 4_280
   2022-01-01: 4_520
+  2023-01-01: 4_920
 SURVIVING_SPOUSE:
   2021-01-01: 2_140
   2022-01-01: 2_260
+  2023-01-01: 2_460
 SINGLE:
   2021-01-01: 2_140
   2022-01-01: 2_260
+  2023-01-01: 2_460
 SEPARATE:
   2021-01-01: 2_140
   2022-01-01: 2_260
+  2023-01-01: 2_460
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml
index 282cb22bc60..a717fdccfc8 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/exemptions/amount.yaml
@@ -2,6 +2,7 @@ description: Montana deducts this amount for each eligible exemption when comput
 values:
   2021-01-01: 2_580
   2022-01-01: 2_710
+  2023-01-01: 2_960
 metadata:
   reference:
     - title: "Montana Tax Form 2021 | Exemptions | Line 16"
@@ -10,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/05/Montana-Idividiual-Income-Tax-Return-Form-2-2022v6.2.pdf#page=1
     - title: Rule 42.15.402 - Personal Exemptions (4) (b)
       href: https://regulations.justia.com/states/montana/department-42/chapter-42-15/subchapter-42-15-4/rule-42-15-402/
+    - title: Montana Tax Form 2023 | Exemptions | Line 16
+      href: https://wwwa.fileyourtaxes.com/www17/cgi-bin/static/displayBlankPDF.pl?form=MT-FORM2.pdf&year=2023
   unit: currency-USD
   period: year
   label: Montana income tax exemption amount
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml
index 1bb1878ff2a..811f106ce1c 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/head_of_household.yaml
@@ -11,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf#page=16
     - title: 2021 Montana income tax form 2 Instructions
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021%20instructions.pdf#page=15
+    - title: 2023 Montana income tax form 2 Instructions
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=18
 # Before 2024 Montana has a consistent tax rate for each filing status
 # After 2024 the tax rate depends on the filing status
 brackets:
@@ -22,6 +24,7 @@ brackets:
   - threshold:
       2021-01-01: 3_100
       2022-01-01: 3_300
+      2023-01-01: 3_600
       2024-01-01: 30_750
     rate:
       2021-01-01: 0.02
@@ -29,6 +32,7 @@ brackets:
   - threshold:
       2021-01-01: 5_500
       2022-01-01: 5_800
+      2023-01-01: 6_300
       2024-01-01: .inf
     rate:
       2021-01-01: 0.03
@@ -36,6 +40,7 @@ brackets:
   - threshold:
       2021-01-01: 8_400
       2022-01-01: 8_900
+      2023-01-01: 9_700
       2024-01-01: .inf
     rate:
       2021-01-01: 0.04
@@ -43,6 +48,7 @@ brackets:
   - threshold:
       2021-01-01: 11_400
       2022-01-01: 12_000
+      2023-01-01: 13_000
       2024-01-01: .inf
     rate:
       2021-01-01: 0.05
@@ -50,6 +56,7 @@ brackets:
   - threshold:
       2021-01-01: 14_600
       2022-01-01: 15_400
+      2023-01-01: 16_800
       2024-01-01: .inf
     rate:
       2021-01-01: 0.06
@@ -57,6 +64,7 @@ brackets:
   - threshold:
       2021-01-01: 18_800
       2022-01-01: 19_800
+      2023-01-01: 21_600
       2024-01-01: .inf
     rate:
       2021-01-01: 0.069
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml
index c75b9d337d6..519d324e3a8 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/joint.yaml
@@ -11,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf#page=16
     - title: 2021 Montana income tax form 2 Instructions
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021%20instructions.pdf#page=15
+    - title: 2023 Montana income tax form 2 Instructions
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=18
 # Before 2024 Montana has a consistent tax rate for each filing status
 # After 2024 the tax rate depends on the filing status
 brackets:
@@ -22,6 +24,7 @@ brackets:
   - threshold:
       2021-01-01: 3_100
       2022-01-01: 3_300
+      2023-01-01: 3_600
       2024-01-01: 41_000
     rate:
       2021-01-01: 0.02
@@ -29,6 +32,7 @@ brackets:
   - threshold:
       2021-01-01: 5_500
       2022-01-01: 5_800
+      2023-01-01: 6_300
       2024-01-01: .inf
     rate:
       2021-01-01: 0.03
@@ -36,6 +40,7 @@ brackets:
   - threshold:
       2021-01-01: 8_400
       2022-01-01: 8_900
+      2023-01-01: 9_700
       2024-01-01: .inf
     rate:
       2021-01-01: 0.04
@@ -43,6 +48,7 @@ brackets:
   - threshold:
       2021-01-01: 11_400
       2022-01-01: 12_000
+      2023-01-01: 13_000
       2024-01-01: .inf
     rate:
       2021-01-01: 0.05
@@ -50,6 +56,7 @@ brackets:
   - threshold:
       2021-01-01: 14_600
       2022-01-01: 15_400
+      2023-01-01: 16_800
       2024-01-01: .inf
     rate:
       2021-01-01: 0.06
@@ -57,6 +64,7 @@ brackets:
   - threshold:
       2021-01-01: 18_800
       2022-01-01: 19_800
+      2023-01-01: 21_600
       2024-01-01: .inf
     rate:
       2021-01-01: 0.069
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml
index 5c1b855288f..a9cdb4dd734 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/separate.yaml
@@ -11,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf#page=16
     - title: 2021 Montana income tax form 2 Instructions
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021%20instructions.pdf#page=15
+    - title: 2023 Montana income tax form 2 Instructions
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=18
 # Before 2024 Montana has a consistent tax rate for each filing status
 # After 2024 the tax rate depends on the filing status
 brackets:
@@ -22,6 +24,7 @@ brackets:
   - threshold:
       2021-01-01: 3_100
       2022-01-01: 3_300
+      2023-01-01: 3_600
       2024-01-01: 20_500
     rate:
       2021-01-01: 0.02
@@ -29,6 +32,7 @@ brackets:
   - threshold:
       2021-01-01: 5_500
       2022-01-01: 5_800
+      2023-01-01: 6_300
       2024-01-01: .inf
     rate:
       2021-01-01: 0.03
@@ -36,6 +40,7 @@ brackets:
   - threshold:
       2021-01-01: 8_400
       2022-01-01: 8_900
+      2023-01-01: 9_700
       2024-01-01: .inf
     rate:
       2021-01-01: 0.04
@@ -43,6 +48,7 @@ brackets:
   - threshold:
       2021-01-01: 11_400
       2022-01-01: 12_000
+      2023-01-01: 13_000
       2024-01-01: .inf
     rate:
       2021-01-01: 0.05
@@ -50,6 +56,7 @@ brackets:
   - threshold:
       2021-01-01: 14_600
       2022-01-01: 15_400
+      2023-01-01: 16_800
       2024-01-01: .inf
     rate:
       2021-01-01: 0.06
@@ -57,6 +64,7 @@ brackets:
   - threshold:
       2021-01-01: 18_800
       2022-01-01: 19_800
+      2023-01-01: 21_600
       2024-01-01: .inf
     rate:
       2021-01-01: 0.069
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml
index 4ac40416477..5e54aae8ba2 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/single.yaml
@@ -11,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf#page=16
     - title: 2021 Montana income tax form 2 Instructions
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021%20instructions.pdf#page=15
+    - title: 2023 Montana income tax form 2 Instructions
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=18
 # Before 2024 Montana has a consistent tax rate for each filing status
 # After 2024 the tax rate depends on the filing status
 brackets:
@@ -22,6 +24,7 @@ brackets:
   - threshold:
       2021-01-01: 3_100
       2022-01-01: 3_300
+      2023-01-01: 3_600
       2024-01-01: 20_500
     rate:
       2021-01-01: 0.02
@@ -29,6 +32,7 @@ brackets:
   - threshold:
       2021-01-01: 5_500
       2022-01-01: 5_800
+      2023-01-01: 6_300
       2024-01-01: .inf
     rate:
       2021-01-01: 0.03
@@ -36,6 +40,7 @@ brackets:
   - threshold:
       2021-01-01: 8_400
       2022-01-01: 8_900
+      2023-01-01: 9_700
       2024-01-01: .inf
     rate:
       2021-01-01: 0.04
@@ -43,6 +48,7 @@ brackets:
   - threshold:
       2021-01-01: 11_400
       2022-01-01: 12_000
+      2023-01-01: 13_000
       2024-01-01: .inf
     rate:
       2021-01-01: 0.05
@@ -50,6 +56,7 @@ brackets:
   - threshold:
       2021-01-01: 14_600
       2022-01-01: 15_400
+      2023-01-01: 16_800
       2024-01-01: .inf
     rate:
       2021-01-01: 0.06
@@ -57,6 +64,7 @@ brackets:
   - threshold:
       2021-01-01: 18_800
       2022-01-01: 19_800
+      2023-01-01: 21_600
       2024-01-01: .inf
     rate:
       2021-01-01: 0.069
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/main/widow.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/main/widow.yaml
index 9606bc3a83e..7b42efe8a9d 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/main/widow.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/main/widow.yaml
@@ -11,6 +11,8 @@ metadata:
       href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2022/12/Form-2-2022-Instructions.pdf#page=16
     - title: 2021 Montana income tax form 2 Instructions
       href: https://mtrevenue.gov/wp-content/uploads/mdocs/form%202%202021%20instructions.pdf#page=15
+    - title: 2023 Montana income tax form 2 Instructions
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=18
 # Before 2024 Montana has a consistent tax rate for each filing status
 # After 2024 the tax rate depends on the filing status
 brackets:
@@ -22,6 +24,7 @@ brackets:
   - threshold:
       2021-01-01: 3_100
       2022-01-01: 3_300
+      2023-01-01: 3_600
       2024-01-01: 41_000
     rate:
       2021-01-01: 0.02
@@ -29,13 +32,15 @@ brackets:
   - threshold:
       2021-01-01: 5_500
       2022-01-01: 5_800
+      2023-01-01: 6_300
       2024-01-01: .inf
     rate:
       2021-01-01: 0.03
       2024-01-01: 0.065
   - threshold:
       2021-01-01: 8_400
-      2022-01-01: 8_900
+      2022-01-01: 8_900 
+      2023-01-01: 9_700
       2024-01-01: .inf
     rate:
       2021-01-01: 0.04
@@ -43,6 +48,7 @@ brackets:
   - threshold:
       2021-01-01: 11_400
       2022-01-01: 12_000
+      2023-01-01: 13_000
       2024-01-01: .inf
     rate:
       2021-01-01: 0.05
@@ -50,6 +56,7 @@ brackets:
   - threshold:
       2021-01-01: 14_600
       2022-01-01: 15_400
+      2023-01-01: 16_800
       2024-01-01: .inf
     rate:
       2021-01-01: 0.06
@@ -57,6 +64,7 @@ brackets:
   - threshold:
       2021-01-01: 18_800
       2022-01-01: 19_800
+      2023-01-01: 21_600
       2024-01-01: .inf
     rate:
       2021-01-01: 0.069


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/exemptions/mt_personal_exemptions_indiv.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/exemptions/mt_personal_exemptions_indiv.yaml
index e2f348beb85..24ecdb2cbe9 100644
--- a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/exemptions/mt_personal_exemptions_indiv.yaml
+++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/exemptions/mt_personal_exemptions_indiv.yaml
@@ -1,5 +1,5 @@
 - name: Four exemptions total
-  period: 2023
+  period: 2022
   input:
     is_tax_unit_head: true
     is_blind: false
@@ -9,7 +9,7 @@
     mt_personal_exemptions_indiv: 5_420
 
 - name: No exemptions for the dependent 
-  period: 2023
+  period: 2022
   input:
     is_tax_unit_head: false
     is_blind: false