Skip to content

Commit

Permalink
Reform to remove head of household filing status (#3163)
Browse files Browse the repository at this point in the history
* Reform standard deduction remove head of household filing status
Fixes #3162

Co-authored-by: Pavel Makarchuk <[email protected]>

* Fill in __init__.py; Change name of functions
Fixes #3162

* Add reform to reform lists and add unit test; Hoh formula still incomplete.
Fixes #3162

* Use fix amount as temp
Fixes #3162

* Small fix
Fixes #3162

* Fix

* Fix

* debug purpose

* debug

* Fix

* small fix

* Suggested change
Fixes #3162

* Suggested change
Fixes #3162

* Small fix

* Change to Romney

* add readme

* add FilingStatus enum

* formatting nit

* add remove_head_of_household reform to test

* add to reform

---------

Co-authored-by: Pavel Makarchuk <[email protected]>
Co-authored-by: Max Ghenis <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2023
1 parent 2e56e8c commit 508da35
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- Reform for repealing head of household filing status, as Senator Romney proposed in his Family Security Act.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Senator Mitt Romney
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Family Security Act
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: The head of household filing status will be eliminated if this is true.
values:
2000-01-01: False
metadata:
unit: bool
label: Repeal head of household filing status
reference:
- title: Family Security Act
href: https://cdn.vox-cdn.com/uploads/chorus_asset/file/22279576/family_security_act_one_pager_appendix.pdf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .remove_head_of_household import create_remove_head_of_household_reform
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from policyengine_us.model_api import *


def create_remove_head_of_household() -> Reform:
class FilingStatus(Enum):
SINGLE = "Single"
JOINT = "Joint"
SEPARATE = "Separate"
WIDOW = "Widow(er)"

class filing_status(Variable):
value_type = Enum
entity = TaxUnit
possible_values = FilingStatus
default_value = FilingStatus.SINGLE
definition_period = YEAR
label = "Filing status"

def formula(tax_unit, period, parameters):
has_spouse = add(tax_unit, period, ["is_tax_unit_spouse"]) > 0
person = tax_unit.members
is_separated = tax_unit.any(person("is_separated", period))
is_widowed = tax_unit.any(person("is_widowed", period))
return select(
[has_spouse, is_separated, is_widowed],
[
FilingStatus.JOINT,
FilingStatus.SEPARATE,
FilingStatus.WIDOW,
],
default=FilingStatus.SINGLE,
)

class reform(Reform):
def apply(self):
self.update_variable(filing_status)

return reform


def create_remove_head_of_household_reform(
parameters, period, bypass: bool = False
):
if bypass:
return create_remove_head_of_household()

p = parameters(period).gov.contrib.congress.romney.family_security_act

if p.remove_head_of_household is True:
return create_remove_head_of_household()
else:
return None


remove_head_of_household = create_remove_head_of_household_reform(
None, None, bypass=True
)
7 changes: 7 additions & 0 deletions policyengine_us/reforms/reforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
from .dc_tax_threshold_joint_ratio import (
create_dc_tax_threshold_joint_ratio_reform,
)
from .congress.romney.family_security_act import (
create_remove_head_of_household_reform,
)
from .cbo.payroll import (
create_increase_taxable_earnings_for_social_security_reform,
)
Expand All @@ -20,6 +23,9 @@ def create_structural_reforms_from_parameters(parameters, period):
dc_tax_threshold_joint_ratio_reform = (
create_dc_tax_threshold_joint_ratio_reform(parameters, period)
)
remove_head_of_household = create_remove_head_of_household_reform(
parameters, period
)
increase_taxable_earnings_for_social_security_reform = (
create_increase_taxable_earnings_for_social_security_reform(
parameters, period
Expand All @@ -31,6 +37,7 @@ def create_structural_reforms_from_parameters(parameters, period):
winship_reform,
dc_kccatc_reform,
dc_tax_threshold_joint_ratio_reform,
remove_head_of_household,
increase_taxable_earnings_for_social_security_reform,
]
reforms = tuple(filter(lambda x: x is not None, reforms))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
- name: Remove head of household filing status
period: 2023
reforms: policyengine_us.reforms.congress.romney.family_security_act.remove_head_of_household.remove_head_of_household
input:
gov.contrib.congress.romney.family_security_act.remove_head_of_household : true
people:
head: {}
child:
is_tax_unit_spouse: false
tax_units:
tax_unit:
members: [head, child]
output:
filing_status: SINGLE

0 comments on commit 508da35

Please sign in to comment.