From 53d8ed20480be5bc33c0dae97f16f2e286ba1f66 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Wed, 4 Dec 2024 18:23:14 -0500 Subject: [PATCH 1/5] Add multiple state dependent exemptions to the repeal state dependent exemptions reform --- changelog_entry.yaml | 4 +++ .../credits/taxpayer/personal_exemption.yaml | 1 - .../state_dependent_exemptions/README.md | 7 +++- .../repeal_state_dependent_exemptions.py | 36 +++++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..c307b2bc89a 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Add multiple state exemptions to the repeal of state dependent exemptions reform. diff --git a/policyengine_us/parameters/gov/states/ut/tax/income/credits/taxpayer/personal_exemption.yaml b/policyengine_us/parameters/gov/states/ut/tax/income/credits/taxpayer/personal_exemption.yaml index eb83e1c4eb6..b4ba9255f7f 100644 --- a/policyengine_us/parameters/gov/states/ut/tax/income/credits/taxpayer/personal_exemption.yaml +++ b/policyengine_us/parameters/gov/states/ut/tax/income/credits/taxpayer/personal_exemption.yaml @@ -15,4 +15,3 @@ metadata: href: https://www.taxformfinder.org/forms/2021/2021-utah-tc-40-full-packet.pdf#page=9 - title: 2023 TC-40 Utah Individual Income Tax Form (Line 11) href: https://tax.utah.gov/forms/current/tc-40inst.pdf#page=10 - diff --git a/policyengine_us/reforms/state_dependent_exemptions/README.md b/policyengine_us/reforms/state_dependent_exemptions/README.md index 3f8da28f236..9d0697095d3 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/README.md +++ b/policyengine_us/reforms/state_dependent_exemptions/README.md @@ -22,4 +22,9 @@ Minnesota: Neutralize dependent exemptions Mississippi: Neutralize dependent exemptions New Jersey: Neutralize dependent exemptions New York: Neutralize dependent exemptions -South Carolina: Neutralize dependent exemptions \ No newline at end of file +South Carolina: Neutralize dependent exemptions +Utah: Neutralize the personal exemption amount +Wisconsin: Change the `tax_unit_size` to `head_spouse_count` +North Carolina: Neutralize the child deduction +New Mexico: Neutralize the deduction for certain dependents +Montana: Neutralize the dependent exemptions person diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index 812b39fc3f6..642b56f96c4 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -371,6 +371,37 @@ def formula(tax_unit, period, parameters): exempt_status.base[filing_status] + personal_exemptions_added ) + class wi_exemption(Variable): + value_type = float + entity = TaxUnit + label = "Wisconsin exemption" + unit = USD + definition_period = YEAR + reference = ( + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1-Inst.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1-Inst.pdf" + "https://docs.legis.wisconsin.gov/misc/lfb/informational_papers/january_2023/0002_individual_income_tax_informational_paper_2.pdf" + ) + defined_for = StateCode.WI + + def formula(tax_unit, period, parameters): + # compute base exemption amount + p = parameters(period).gov.states.wi.tax.income + base_amount = tax_unit("head_spouse_count", period) * p.exemption.base + # compute extra exemption amount + elderly_head = ( + tax_unit("age_head", period) >= p.exemption.old_age + ).astype(int) + elderly_spouse = ( + tax_unit("age_spouse", period) >= p.exemption.old_age + ).astype(int) + extra_amount = (elderly_head + elderly_spouse) * p.exemption.extra + # return total exemption amount + return base_amount + extra_amount + + class reform(Reform): def apply(self): self.neutralize_variable("al_dependent_exemption") @@ -381,6 +412,10 @@ def apply(self): self.neutralize_variable("nj_dependents_exemption") self.neutralize_variable("ny_exemptions") self.neutralize_variable("sc_dependent_exemption") + self.neutralize_variable("ut_personal_exemption") + self.neutralize_variable("nc_child_deduction") + self.neutralize_variable("nm_deduction_for_certain_dependents") + self.neutralize_variable("mt_dependent_exemptions_person") self.update_variable(hi_regular_exemptions) self.update_variable(md_total_personal_exemptions) self.update_variable(mi_personal_exemptions) @@ -397,6 +432,7 @@ def apply(self): self.update_variable(ia_exemption_credit) self.update_variable(ks_count_exemptions) self.update_variable(ma_income_tax_exemption_threshold) + self.update_variable(wi_exemption) return reform From 369bba4c9047ca09d54cdf5abbb5df14e63e5889 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Wed, 4 Dec 2024 18:23:32 -0500 Subject: [PATCH 2/5] format --- .../repeal_state_dependent_exemptions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index 642b56f96c4..abb7986985a 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -389,7 +389,9 @@ class wi_exemption(Variable): def formula(tax_unit, period, parameters): # compute base exemption amount p = parameters(period).gov.states.wi.tax.income - base_amount = tax_unit("head_spouse_count", period) * p.exemption.base + base_amount = ( + tax_unit("head_spouse_count", period) * p.exemption.base + ) # compute extra exemption amount elderly_head = ( tax_unit("age_head", period) >= p.exemption.old_age @@ -401,7 +403,6 @@ def formula(tax_unit, period, parameters): # return total exemption amount return base_amount + extra_amount - class reform(Reform): def apply(self): self.neutralize_variable("al_dependent_exemption") From f2a311afc226b225b63ef7585117e3e1441133ec Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 5 Dec 2024 10:00:17 -0500 Subject: [PATCH 3/5] format and refactor wisconsin --- .../state_dependent_exemptions/README.md | 34 +++++++++---------- .../repeal_state_dependent_exemptions.py | 21 +++--------- .../tax/income/wi_additional_exemption.yaml | 25 ++++++++++++++ .../wi/tax/income/wi_base_exemption.yaml | 7 ++++ .../wi_additional_exemption.py} | 11 ++---- .../income/exemptions/wi_base_exemption.py | 22 ++++++++++++ .../wi/tax/income/exemptions/wi_exemption.py | 19 +++++++++++ 7 files changed, 98 insertions(+), 41 deletions(-) create mode 100644 policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_additional_exemption.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml rename policyengine_us/variables/gov/states/wi/tax/income/{wi_exemption.py => exemptions/wi_additional_exemption.py} (69%) create mode 100644 policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_base_exemption.py create mode 100644 policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_exemption.py diff --git a/policyengine_us/reforms/state_dependent_exemptions/README.md b/policyengine_us/reforms/state_dependent_exemptions/README.md index 9d0697095d3..e7f75fecef4 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/README.md +++ b/policyengine_us/reforms/state_dependent_exemptions/README.md @@ -1,30 +1,30 @@ The following adjustments have been made in this reform: -Hawaii: Change the `exemptions_count` to `head_spouse_count` -Maryland: Change the `tax_unit_size` to `head_spouse_count` -Michigan: Change the `tax_unit_size` to `head_spouse_count` -Nebraska: Change the `tax_unit_size` to `head_spouse_count` -Ohio: Remove `is_tax_unit_dependent` from the exemption eligibility criteria -Oklahoma: Remove the dependents from the total exemptions -Rhode Island: Change the `exemptions_count` to `head_spouse_count` -Vermont: Remove the dependents from the personal exemptions -Virginia: Only apply the personal exemptions to the head and spouse -West Virginia: Change the `tax_unit_size` to `head_spouse_count` +Alabama: Neutralize dependent exemptions California: Remove the dependent exemption structure from `ca_exemptions` Georgia: Remove the dependent exemption structure from `ga_exemptions` -Indiana: Change the `tax_unit_size` to `head_spouse_count` +Hawaii: Change the `exemptions_count` to `head_spouse_count` +Illinois: Neutralize dependent exemptions +Indiana: Change the `tax_unit_size` to `head_spouse_count` Iowa: Remove the dependent exemption structure from `ia_exemption_credit` Kansas: Remove the dependents from the exemption count -Massachusetts: Remove the dependent exemption structure from `ma_income_tax_exemption_threshold` -Alabama: Neutralize dependent exemptions -Illinois: Neutralize dependent exemptions Louisiana: Neutralize dependent exemptions +Maryland: Change the `tax_unit_size` to `head_spouse_count` +Massachusetts: Remove the dependent exemption structure from `ma_income_tax_exemption_threshold` +Michigan: Change the `tax_unit_size` to `head_spouse_count` Minnesota: Neutralize dependent exemptions Mississippi: Neutralize dependent exemptions +Montana: Neutralize the dependent exemptions person +Nebraska: Change the `tax_unit_size` to `head_spouse_count` New Jersey: Neutralize dependent exemptions +New Mexico: Neutralize the deduction for certain dependents New York: Neutralize dependent exemptions +North Carolina: Neutralize the child deduction +Ohio: Remove `is_tax_unit_dependent` from the exemption eligibility criteria +Oklahoma: Remove the dependents from the total exemptions +Rhode Island: Change the `exemptions_count` to `head_spouse_count` South Carolina: Neutralize dependent exemptions Utah: Neutralize the personal exemption amount +Vermont: Remove the dependents from the personal exemptions +Virginia: Only apply the personal exemptions to the head and spouse +West Virginia: Change the `tax_unit_size` to `head_spouse_count` Wisconsin: Change the `tax_unit_size` to `head_spouse_count` -North Carolina: Neutralize the child deduction -New Mexico: Neutralize the deduction for certain dependents -Montana: Neutralize the dependent exemptions person diff --git a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py index abb7986985a..32930ae4f6c 100644 --- a/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py +++ b/policyengine_us/reforms/state_dependent_exemptions/repeal_state_dependent_exemptions.py @@ -371,10 +371,11 @@ def formula(tax_unit, period, parameters): exempt_status.base[filing_status] + personal_exemptions_added ) - class wi_exemption(Variable): + # Using head and spouse count instead of exemptions count + class wi_base_exemption(Variable): value_type = float entity = TaxUnit - label = "Wisconsin exemption" + label = "Wisconsin base exemption" unit = USD definition_period = YEAR reference = ( @@ -389,19 +390,7 @@ class wi_exemption(Variable): def formula(tax_unit, period, parameters): # compute base exemption amount p = parameters(period).gov.states.wi.tax.income - base_amount = ( - tax_unit("head_spouse_count", period) * p.exemption.base - ) - # compute extra exemption amount - elderly_head = ( - tax_unit("age_head", period) >= p.exemption.old_age - ).astype(int) - elderly_spouse = ( - tax_unit("age_spouse", period) >= p.exemption.old_age - ).astype(int) - extra_amount = (elderly_head + elderly_spouse) * p.exemption.extra - # return total exemption amount - return base_amount + extra_amount + return tax_unit("head_spouse_count", period) * p.exemption.base class reform(Reform): def apply(self): @@ -433,7 +422,7 @@ def apply(self): self.update_variable(ia_exemption_credit) self.update_variable(ks_count_exemptions) self.update_variable(ma_income_tax_exemption_threshold) - self.update_variable(wi_exemption) + self.update_variable(wi_base_exemption) return reform diff --git a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_additional_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_additional_exemption.yaml new file mode 100644 index 00000000000..c97d3f5d799 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_additional_exemption.yaml @@ -0,0 +1,25 @@ +- name: Aged head + period: 2022 + input: + age_head: 65 + state_code: WI + output: + wi_additional_exemption: 250 + +- name: Aged head and aged spouse + period: 2022 + input: + age_head: 65 + age_spouse: 65 + state_code: WI + output: + wi_additional_exemption: 500 + +- name: No aged head or aged spouse + period: 2022 + input: + age_head: 64 + age_spouse: 64 + state_code: WI + output: + wi_additional_exemption: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml new file mode 100644 index 00000000000..79bd57fd351 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml @@ -0,0 +1,7 @@ +- name: WI exemption unit test 1 + period: 2021 + input: + exemptions_count: 5 + state_code: WI + output: + wi_additional_exemption: 5 * 700 diff --git a/policyengine_us/variables/gov/states/wi/tax/income/wi_exemption.py b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py similarity index 69% rename from policyengine_us/variables/gov/states/wi/tax/income/wi_exemption.py rename to policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py index 5a970e46f67..01adeb7df6d 100644 --- a/policyengine_us/variables/gov/states/wi/tax/income/wi_exemption.py +++ b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py @@ -1,10 +1,10 @@ from policyengine_us.model_api import * -class wi_exemption(Variable): +class wi_additional_exemption(Variable): value_type = float entity = TaxUnit - label = "Wisconsin exemption" + label = "Wisconsin additional exemption" unit = USD definition_period = YEAR reference = ( @@ -17,9 +17,6 @@ class wi_exemption(Variable): defined_for = StateCode.WI def formula(tax_unit, period, parameters): - # compute base exemption amount - p = parameters(period).gov.states.wi.tax.income - base_amount = tax_unit("exemptions_count", period) * p.exemption.base # compute extra exemption amount elderly_head = ( tax_unit("age_head", period) >= p.exemption.old_age @@ -27,6 +24,4 @@ def formula(tax_unit, period, parameters): elderly_spouse = ( tax_unit("age_spouse", period) >= p.exemption.old_age ).astype(int) - extra_amount = (elderly_head + elderly_spouse) * p.exemption.extra - # return total exemption amount - return base_amount + extra_amount + return (elderly_head + elderly_spouse) * p.exemption.extra diff --git a/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_base_exemption.py b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_base_exemption.py new file mode 100644 index 00000000000..87f3b253eb6 --- /dev/null +++ b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_base_exemption.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class wi_base_exemption(Variable): + value_type = float + entity = TaxUnit + label = "Wisconsin base exemption" + unit = USD + definition_period = YEAR + reference = ( + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1-Inst.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1-Inst.pdf" + "https://docs.legis.wisconsin.gov/misc/lfb/informational_papers/january_2023/0002_individual_income_tax_informational_paper_2.pdf" + ) + defined_for = StateCode.WI + + def formula(tax_unit, period, parameters): + # compute base exemption amount + p = parameters(period).gov.states.wi.tax.income + return tax_unit("exemptions_count", period) * p.exemption.base diff --git a/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_exemption.py b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_exemption.py new file mode 100644 index 00000000000..f207e917134 --- /dev/null +++ b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_exemption.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class wi_exemption(Variable): + value_type = float + entity = TaxUnit + label = "Wisconsin exemption" + unit = USD + definition_period = YEAR + reference = ( + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2021/2021-Form1-Inst.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1f.pdf" + "https://www.revenue.wi.gov/TaxForms2022/2022-Form1-Inst.pdf" + "https://docs.legis.wisconsin.gov/misc/lfb/informational_papers/january_2023/0002_individual_income_tax_informational_paper_2.pdf" + ) + defined_for = StateCode.WI + + adds = ["wi_base_exemption", "wi_additional_exemption"] From d1a6a18667a36679655ad0b2bd2ab079e946b791 Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 5 Dec 2024 10:26:22 -0500 Subject: [PATCH 4/5] add p --- .../states/wi/tax/income/exemptions/wi_additional_exemption.py | 1 + 1 file changed, 1 insertion(+) diff --git a/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py index 01adeb7df6d..7e8a816efbc 100644 --- a/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py +++ b/policyengine_us/variables/gov/states/wi/tax/income/exemptions/wi_additional_exemption.py @@ -18,6 +18,7 @@ class wi_additional_exemption(Variable): def formula(tax_unit, period, parameters): # compute extra exemption amount + p = parameters(period).gov.states.wi.tax.income elderly_head = ( tax_unit("age_head", period) >= p.exemption.old_age ).astype(int) From 5672d7f22afddd481661a64cfbb0fe807695bc6c Mon Sep 17 00:00:00 2001 From: PavelMakarchuk Date: Thu, 5 Dec 2024 10:29:20 -0500 Subject: [PATCH 5/5] base test --- .../baseline/gov/states/wi/tax/income/wi_base_exemption.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml index 79bd57fd351..9e54d8bd87f 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/wi/tax/income/wi_base_exemption.yaml @@ -4,4 +4,4 @@ exemptions_count: 5 state_code: WI output: - wi_additional_exemption: 5 * 700 + wi_base_exemption: 5 * 700