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

Issue:
Montana 2023 income tax rebate
[Reference](https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=5)



Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb2d..a189239f2f1 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Montana 2023 income tax rebate.
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/credits/non_refundable.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/credits/non_refundable.yaml
index dfbb5b99437..7d3bbd0ad1c 100644
--- a/policyengine_us/parameters/gov/states/mt/tax/income/credits/non_refundable.yaml
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/credits/non_refundable.yaml
@@ -1,7 +1,10 @@
-description: Montana non-refundable tax credits.
+description: Montana provides the following non-refundable tax credits.
 values:
   2021-01-01:
     - mt_capital_gain_credit
+  2023-01-01:
+    - mt_capital_gain_credit
+    - mt_income_tax_rebate
   2024-01-01: []
 metadata:
   unit: list
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/amount.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/amount.yaml
new file mode 100644
index 00000000000..be565e3febb
--- /dev/null
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/amount.yaml
@@ -0,0 +1,21 @@
+description: Montana provides the following income tax rebate amount, based on filing status.
+metadata:
+  period: year
+  unit: currency-USD
+  label: Montana income tax rebate amount
+  reference:
+    - title: Montana Code Annotated 2023, Title 15, Chapter 30, Part 21, Section 15-30-2191 (b)
+      href: https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0910/0150-0300-0210-0910.html
+  breakdown:
+    - filing_status
+
+SINGLE:
+  2023-01-01: 1_250
+HEAD_OF_HOUSEHOLD:
+  2023-01-01: 1_250
+JOINT:
+  2023-01-01: 2_500
+SURVIVING_SPOUSE:
+  2023-01-01: 2_500
+SEPARATE:
+  2023-01-01: 1_250 
diff --git a/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_income_tax_rebate.py b/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_income_tax_rebate.py
new file mode 100644
index 00000000000..de2ae6fd837
--- /dev/null
+++ b/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_income_tax_rebate.py
@@ -0,0 +1,18 @@
+from policyengine_us.model_api import *
+
+
+class mt_income_tax_rebate(Variable):
+    value_type = float
+    entity = TaxUnit
+    label = "Montana 2023 income tax rebate"
+    unit = USD
+    definition_period = YEAR
+    reference = "https://archive.legmt.gov/bills/mca/title_0150/chapter_0300/part_0210/section_0910/0150-0300-0210-0910.html"
+    defined_for = StateCode.MT
+
+    # The rebate is based on 2021 income tax liability, but provided in 2023
+    # we assume that the tax liability does not change between 2021 and 2023
+    def formula(tax_unit, period, parameters):
+        p = parameters(period).gov.states.mt.tax.income.credits.rebate
+        filing_status = tax_unit("filing_status", period)
+        return p.amount[filing_status]


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_income_tax_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_income_tax_rebate.yaml
new file mode 100644
index 00000000000..f8b22b4ca3f
--- /dev/null
+++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_income_tax_rebate.yaml
@@ -0,0 +1,23 @@
+- name: Single filer
+  period: 2023
+  input:
+    filing_status: SINGLE
+    state_code: MT
+  output:
+    mt_income_tax_rebate: 1_250
+
+- name: Joint filers
+  period: 2023
+  input:
+    filing_status: JOINT
+    state_code: MT
+  output:
+    mt_income_tax_rebate: 2_500
+
+- name: Not in Montana
+  period: 2023
+  input:
+    filing_status: JOINT
+    state_code: AR
+  output:
+    mt_income_tax_rebate: 0