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

Issue:
Make Maine dependent exemption credit refundable beginning in 2024
See subsection 4: https://legislature.maine.gov/statutes/36/title36sec5219-SS.html


Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb2d..de6f774be9a 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    changed:
+      - Made Maine dependent exemption credit refundable in 2024.
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/amount.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/amount.yaml
similarity index 90%
rename from policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/amount.yaml
rename to policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/amount.yaml
index 11a58863b94..b5d23103ac7 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/amount.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/amount.yaml
@@ -1,8 +1,8 @@
-description: Maine dependent exemption amount
+description: Maine provides up to this dependent exemption credit amount.
 metadata:
   unit: currency-USD
   period: year
-  label: Maine Dependent Exemption Amount
+  label: Maine dependent exemption credit amount
   reference:
     - title: §5219-SS. Dependent exemption tax credit (1) 
       href: https://www.mainelegislature.org/legis/statutes/36/title36sec5219-SS.html
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/increment.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/increment.yaml
similarity index 88%
rename from policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/increment.yaml
rename to policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/increment.yaml
index 7409694af73..32c59438d19 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/increment.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/increment.yaml
@@ -1,4 +1,4 @@
-description: Phaseout increment of the Maine dependent exemption.
+description: Maine reduces the dependent exemption credit by an amount for each of these increments of Maine adjusted gross income exceeding the threshold.
 metadata:
   label: Maine dependent exemption phaseout increment
   period: year
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/start.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/start.yaml
similarity index 92%
rename from policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/start.yaml
rename to policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/start.yaml
index 4c5160d7cc7..2e86d498ade 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/start.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/start.yaml
@@ -1,4 +1,4 @@
-description: Maine starts phasing out its dependents exemption for filers with Maine AGI above this threshold.
+description: Maine reduces its dependent exemption credit for filers with Maine adjusted gross income above this threshold.
 metadata:
   unit: currency-USD
   period: year
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/step.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/step.yaml
similarity index 89%
rename from policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/step.yaml
rename to policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/step.yaml
index 985c5a64ad0..2739053f825 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/deductions/dependent_exemption/phaseout/step.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/dependent_exemption/phase_out/step.yaml
@@ -1,4 +1,4 @@
-description: Maine reduces the dependent exemption by this amount for every phaseout increment in AGI above phaseout start.
+description: Maine reduces the dependent exemption credit by this amount for each increment in of Maine adjusted gross income above the threshold.
 metadata:
   type: single_amount
   unit: currency-USD
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/credits/non_refundable.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/non_refundable.yaml
index f55a1a78f46..d057dca39ad 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/credits/non_refundable.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/non_refundable.yaml
@@ -1,7 +1,10 @@
 description: Maine non-refundable tax credits.
 values:
   2021-01-01:
-    - me_dependent_exemption
+    - me_dependent_exemption_credit
+    - me_non_refundable_child_care_credit
+  # Dependent exemption credit made refundable in 2024.
+  2024-01-01:
     - me_non_refundable_child_care_credit
 metadata:
   unit: list
diff --git a/policyengine_us/parameters/gov/states/me/tax/income/credits/refundable.yaml b/policyengine_us/parameters/gov/states/me/tax/income/credits/refundable.yaml
index d7f7a881b1d..168b1863751 100644
--- a/policyengine_us/parameters/gov/states/me/tax/income/credits/refundable.yaml
+++ b/policyengine_us/parameters/gov/states/me/tax/income/credits/refundable.yaml
@@ -5,6 +5,13 @@ values:
     - me_eitc
     - me_sales_tax_fairness_credit
     - me_property_tax_fairness_credit
+  # Dependent exemption credit made refundable in 2024.
+  2024-01-01:
+    - me_refundable_child_care_credit
+    - me_eitc
+    - me_sales_tax_fairness_credit
+    - me_property_tax_fairness_credit
+    - me_dependent_exemption_credit
 metadata:
   unit: list
   label: Maine refundable tax credits
diff --git a/policyengine_us/variables/gov/states/me/tax/income/deductions/dependent_exemption/me_dependent_exemption.py b/policyengine_us/variables/gov/states/me/tax/income/credits/dependent_exemption/me_dependent_exemption_credit.py
similarity index 72%
rename from policyengine_us/variables/gov/states/me/tax/income/deductions/dependent_exemption/me_dependent_exemption.py
rename to policyengine_us/variables/gov/states/me/tax/income/credits/dependent_exemption/me_dependent_exemption_credit.py
index 8b6480a8758..a6b761c28ba 100644
--- a/policyengine_us/variables/gov/states/me/tax/income/deductions/dependent_exemption/me_dependent_exemption.py
+++ b/policyengine_us/variables/gov/states/me/tax/income/credits/dependent_exemption/me_dependent_exemption_credit.py
@@ -2,10 +2,10 @@
 from numpy import ceil
 
 
-class me_dependent_exemption(Variable):
+class me_dependent_exemption_credit(Variable):
     value_type = float
     entity = TaxUnit
-    label = "Maine dependents exemption deduction"
+    label = "Maine dependent exemption credit"
     reference = "https://www.mainelegislature.org/legis/statutes/36/title36sec5219-SS.html"
     unit = USD
     definition_period = YEAR
@@ -13,7 +13,7 @@ class me_dependent_exemption(Variable):
 
     def formula(tax_unit, period, parameters):
         # First get total the number of dependents (line 1).
-        num_dependents = tax_unit("tax_unit_dependents", period)
+        dependents = tax_unit("tax_unit_dependents", period)
 
         # Get their Maine AGI (line 3).
         me_agi = tax_unit("me_agi", period)
@@ -21,23 +21,23 @@ def formula(tax_unit, period, parameters):
         # Then get the Maine Dependents Exemptions part of the parameter tree.
         p = parameters(
             period
-        ).gov.states.me.tax.income.deductions.dependent_exemption
+        ).gov.states.me.tax.income.credits.dependent_exemption
 
         # Calculate the maximum dependents exemption amount (line 2).
-        max_amount = num_dependents * p.amount
+        max_amount = dependents * p.amount
 
         # Get filing status.
         filing_status = tax_unit("filing_status", period)
 
         # Get the phaseout start amount based on filing status (line 4).
-        phaseout_start = p.phaseout.start[filing_status]
+        phaseout_start = p.phase_out.start[filing_status]
 
         # Get the excess amount, if any, in thousands of dollars (rounded up) [lines 5 and 6].
         excess = max_(me_agi - phaseout_start, 0)
-        increments = ceil(excess / p.phaseout.increment)
+        increments = ceil(excess / p.phase_out.increment)
 
         # Calculate the excess part phase out amount (line 7).
-        phase_out_amount = increments * p.phaseout.step
+        phase_out_amount = increments * p.phase_out.step
 
         # Return the max exemption amount minus the phaseout amount (line 8).
         return max_(max_amount - phase_out_amount, 0)


Test patch:
diff --git a/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/taxable_income/deductions/me_dependent_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/credits/me_dependent_exemption_credit.yaml
similarity index 84%
rename from policyengine_us/tests/policy/baseline/gov/states/me/tax/income/taxable_income/deductions/me_dependent_exemption.yaml
rename to policyengine_us/tests/policy/baseline/gov/states/me/tax/income/credits/me_dependent_exemption_credit.yaml
index 55dd9baf2b3..80db4db4ed6 100644
--- a/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/taxable_income/deductions/me_dependent_exemption.yaml
+++ b/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/credits/me_dependent_exemption_credit.yaml
@@ -6,7 +6,7 @@
     filing_status: JOINT
     tax_unit_dependents: 2
   output:
-    me_dependent_exemption: 225
+    me_dependent_exemption_credit: 225
 
 - name: Married filing jointly with two dependents, earning $449.50K gets $225 exemption.
   period: 2022
@@ -16,7 +16,7 @@
     filing_status: JOINT
     tax_unit_dependents: 2
   output:
-    me_dependent_exemption: 225
+    me_dependent_exemption_credit: 225
 
 - name: Single filer with one dependent, earning $450K gets $0 exemption.
   period: 2022
@@ -26,7 +26,7 @@
     filing_status: SINGLE
     tax_unit_dependents: 1
   output:
-    me_dependent_exemption: 0
+    me_dependent_exemption_credit: 0
 
 - name: Joint filer with no dependent gets $0 exemption.
   period: 2022
@@ -36,7 +36,7 @@
     filing_status: JOINT
     tax_unit_dependents: 0
   output:
-    me_dependent_exemption: 0
+    me_dependent_exemption_credit: 0
 
 - name: Single filer with two dependents, earning $190K gets $600 exemption.
   period: 2022
@@ -46,7 +46,7 @@
     filing_status: SINGLE
     tax_unit_dependents: 2
   output:
-    me_dependent_exemption: 600
+    me_dependent_exemption_credit: 600
 
 - name: Single filer with two dependents, earning $220k gets $450 exemption.
   period: 2022
@@ -56,4 +56,4 @@
     filing_status: SINGLE
     tax_unit_dependents: 2
   output:
-    me_dependent_exemption: 450
+    me_dependent_exemption_credit: 450
diff --git a/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/me_non_refundable_credits.yaml b/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/me_non_refundable_credits.yaml
deleted file mode 100644
index f78d78f259d..00000000000
--- a/policyengine_us/tests/policy/baseline/gov/states/me/tax/income/me_non_refundable_credits.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-- name:
-  period: 2022
-  absolute_error_margin: 0
-  input:
-    me_dependent_exemption: 1
-    me_non_refundable_child_care_credit: 2
-    state_code: ME
-  output:
-    me_non_refundable_credits: 3