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

Issue:
Montana 2022 / 2023 property tax rebates
[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..cab5a3cb350 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Montana property 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 7d3bbd0ad1c..33c1507c3d1 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
@@ -2,9 +2,13 @@ description: Montana provides the following non-refundable tax credits.
 values:
   2021-01-01:
     - mt_capital_gain_credit
+  2022-01-01:
+    - mt_capital_gain_credit
+    - mt_property_tax_rebate
   2023-01-01:
     - mt_capital_gain_credit
     - mt_income_tax_rebate
+    - mt_property_tax_rebate
   2024-01-01: []
 metadata:
   unit: list
diff --git a/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/property/amount.yaml b/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/property/amount.yaml
new file mode 100644
index 00000000000..bb92b75ab1d
--- /dev/null
+++ b/policyengine_us/parameters/gov/states/mt/tax/income/credits/rebate/property/amount.yaml
@@ -0,0 +1,15 @@
+description: Montana provides the following property tax rebate amount.
+values:
+  2022-01-01: 675
+metadata:
+  period: year
+  unit: currency-USD
+  label: Montana property tax rebate amount
+  reference:
+    - title: 2023 Montana Form 2 Individual Income Tax Instructions, What's New?, Property Tax Rebates
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=5
+    - title: 2022 Montana Property Tax Rebate Claim, Form MPTR22
+      href: https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/08/2022-Montana-Property-Tax-Rebate-Form-MPTR22.pdf
+    # The Legal code provides a lower rebate amount - applying the tax form instructions value
+    - title: 2023 Montana Legislature, House Bill 222
+      href: https://archive.legmt.gov/bills/2023/billhtml/HB0222.htm#:~:text=A%20BILL%20FOR%20AN%20ACT,providing%20a%20penalty%20for%20false
diff --git a/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_property_tax_rebate.py b/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_property_tax_rebate.py
new file mode 100644
index 00000000000..aed0c4e058e
--- /dev/null
+++ b/policyengine_us/variables/gov/states/mt/tax/income/credits/mt_property_tax_rebate.py
@@ -0,0 +1,18 @@
+from policyengine_us.model_api import *
+
+
+class mt_property_tax_rebate(Variable):
+    value_type = float
+    entity = TaxUnit
+    label = "Montana property tax rebate"
+    unit = USD
+    definition_period = YEAR
+    reference = "https://mtrevenue.gov/wp-content/uploads/dlm_uploads/2023/12/Form_2_2023_Instructions.pdf#page=5"
+    defined_for = StateCode.MT
+
+    def formula(tax_unit, period, parameters):
+        p = parameters(period).gov.states.mt.tax.income.credits.rebate.property
+        person = tax_unit.members
+        mt_property_tax = person("real_estate_taxes", period)
+        tax_unit_mt_property_tax = tax_unit.sum(mt_property_tax)
+        return min_(p.amount, tax_unit_mt_property_tax)


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_property_tax_rebate.yaml b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_property_tax_rebate.yaml
new file mode 100644
index 00000000000..972cd9e403c
--- /dev/null
+++ b/policyengine_us/tests/policy/baseline/gov/states/mt/tax/income/credits/rebate/mt_property_tax_rebate.yaml
@@ -0,0 +1,15 @@
+- name: Property tax less than rebate amount
+  period: 2023
+  input:
+    real_estate_taxes: 600
+    state_code: MT
+  output:
+    mt_property_tax_rebate: 600
+
+- name: Property tax less than rebate amount
+  period: 2023
+  input:
+    real_estate_taxes: 676
+    state_code: MT
+  output:
+    mt_property_tax_rebate: 675