Skip to content

Commit

Permalink
Add nonrefundable credits to state dependent exemption reform
Browse files Browse the repository at this point in the history
  • Loading branch information
samantharudra committed Dec 17, 2024
1 parent 08a1650 commit 085c427
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 28 deletions.
4 changes: 0 additions & 4 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
- bump: minor
changes:
added:
- Change is_widowed to is_surviving_spouse.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
person1:
age: 64
is_tax_unit_head: 1
is_surviving_spouse: True
is_widowed: True
person2:
age: 64
is_tax_unit_spouse: 1
is_surviving_spouse: False
is_widowed: False
tax_units:
tax_unit:
members: [person1, person2]
Expand All @@ -27,11 +27,11 @@
person1:
age: 64
is_tax_unit_head: 1
is_surviving_spouse: False
is_widowed: False
person2:
age: 64
is_tax_unit_spouse: 1
is_surviving_spouse: False
is_widowed: False
tax_units:
tax_unit:
members: [person1, person2]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
- name: Surviving spouse head without dependents is not eligible to file as surviving spouse.
- name: Widowed head without dependents is not eligible to file as surviving spouse.
period: 2022
input:
people:
head:
is_surviving_spouse: true
is_widowed: true
tax_units:
tax_unit:
members: [head]
output:
surviving_spouse_eligible: false

- name: Surviving spouse head with one dependent is eligible.
- name: Widowed head with one dependent is eligible.
period: 2022
input:
people:
head:
is_tax_unit_head: true
is_surviving_spouse: true
is_widowed: true
child: {}
tax_units:
tax_unit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
output:
filing_status: SINGLE

- name: Remove head of household filing status for surviving spouse filers without children
- name: Remove head of household filing status for widowed filers without children
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:
is_tax_unit_head: true
is_surviving_spouse: true
is_widowed: true
tax_units:
tax_unit:
members: [head]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def formula(tax_unit, period, parameters):
blind = person("is_blind", period)
# Deaf filers get an additional personal tax credit amount
deaf = person("is_deaf", period)
# Surviving spouse and head of household filers receive an additional credit amount
# Widowed and head of household filers receive an additional credit amount
filing_status = tax_unit("filing_status", period)
statuses = filing_status.possible_values
surviving_spouse = filing_status == statuses.SURVIVING_SPOUSE
widow = filing_status == statuses.SURVIVING_SPOUSE
hoh = filing_status == statuses.HEAD_OF_HOUSEHOLD
filing_status_eligible = surviving_spouse | hoh
filing_status_eligible = widow | hoh

personal_credit_count = tax_unit.sum(
head_or_spouse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class la_widow_exemption(Variable):

def formula(tax_unit, period, parameters):
person = tax_unit.members
is_surviving_spouse = tax_unit.any(
person("is_surviving_spouse", period)
)
is_widowed = tax_unit.any(person("is_widowed", period))
p = parameters(period).gov.states.la.tax.income.exemptions
return is_surviving_spouse * p.widow
return is_widowed * p.widow
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from policyengine_us.model_api import *


class is_surviving_spouse(Variable):
class is_widowed(Variable):
value_type = bool
entity = Person
label = "Surviving Spouse"
documentation = "Whether the person is a surviving spouse."
label = "Widowed"
documentation = "Whether the person is widowed."
definition_period = YEAR
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ class surviving_spouse_eligible(Variable):
reference = "https://www.law.cornell.edu/uscode/text/26/2#a"

def formula(tax_unit, period, parameters):
# The surviving spouse filing status should only apply to surviving spouse heads
# The widowed filing status should only apply to widowed heads
# who maintain a household for at least one dependent
person = tax_unit.members
is_head = person("is_tax_unit_head", period)
is_surviving_spouse = person("is_surviving_spouse", period)
surviving_spouse_head = tax_unit.any(is_head & is_surviving_spouse)
is_widowed = person("is_widowed", period)
widowed_head = tax_unit.any(is_head & is_widowed)
has_child_dependents = (
tax_unit("tax_unit_child_dependents", period) > 0
)
married = tax_unit("tax_unit_married", period)
return surviving_spouse_head & has_child_dependents & ~married
return widowed_head & has_child_dependents & ~married

0 comments on commit 085c427

Please sign in to comment.