Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/codex-7806-person-receives-aca.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `person_receives_aca` and `assigned_aca_ptc` variables, and keep `aca_ptc` as the pre-takeup ACA premium tax credit amount.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
- name: Case 1, eligible person receives ACA when the tax unit takes up ACA.
period: 2025
input:
people:
person1:
is_aca_ptc_eligible: true
tax_units:
tax_unit:
members: [person1]
takes_up_aca_if_eligible: true
output:
person_receives_aca: true

- name: Case 2, eligible person does not receive ACA when the tax unit does not take up ACA.
period: 2025
input:
people:
person1:
is_aca_ptc_eligible: true
tax_units:
tax_unit:
members: [person1]
takes_up_aca_if_eligible: false
output:
person_receives_aca: false

- name: Case 3, ineligible person does not receive ACA in a takeup tax unit.
period: 2025
input:
people:
person1:
is_aca_ptc_eligible: false
tax_units:
tax_unit:
members: [person1]
takes_up_aca_if_eligible: true
output:
person_receives_aca: false

- name: Case 4, only eligible members receive ACA in a mixed-eligibility takeup tax unit.
period: 2025
input:
people:
person1:
is_aca_ptc_eligible: true
person2:
is_aca_ptc_eligible: false
person3:
is_aca_ptc_eligible: true
tax_units:
tax_unit:
members: [person1, person2, person3]
takes_up_aca_if_eligible: true
output:
person_receives_aca: [true, false, true]

- name: Case 5, ACA takeup counts as receipt even when assigned ACA PTC is zero.
period: 2025
input:
people:
person1:
is_aca_ptc_eligible: true
tax_units:
tax_unit:
members: [person1]
takes_up_aca_if_eligible: true
assigned_aca_ptc: 0
output:
person_receives_aca: true
12 changes: 12 additions & 0 deletions policyengine_us/tests/policy/baseline/gov/aca/ptc/aca_ptc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@
aca_required_contribution_percentage: 0.04
output:
aca_ptc: 0

- name: ACA PTC remains available even when an eligible tax unit does not take it up
absolute_error_margin: 0.01
period: 2025
input:
is_aca_ptc_eligible: true
slcsp: 1_200
aca_magi: 25_000
aca_required_contribution_percentage: 0.04
takes_up_aca_if_eligible: false
output:
aca_ptc: 200
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- name: Case 1, assigned ACA PTC matches ACA PTC when an eligible tax unit takes up ACA.
absolute_error_margin: 0.01
period: 2025
input:
aca_ptc: 200
takes_up_aca_if_eligible: true
output:
assigned_aca_ptc: 200

- name: Case 2, assigned ACA PTC is zero when an eligible tax unit does not take up ACA.
absolute_error_margin: 0.01
period: 2025
input:
aca_ptc: 200
takes_up_aca_if_eligible: false
output:
assigned_aca_ptc: 0

- name: Case 3, assigned ACA PTC is zero when ACA PTC is zero.
absolute_error_margin: 0.01
period: 2025
input:
aca_ptc: 0
takes_up_aca_if_eligible: true
output:
assigned_aca_ptc: 0
17 changes: 17 additions & 0 deletions policyengine_us/variables/gov/aca/person_receives_aca.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from policyengine_us.model_api import *


class person_receives_aca(Variable):
value_type = bool
entity = Person
label = "Person receives ACA"
documentation = (
"Whether a person is eligible for ACA premium tax credits and is in a "
"tax unit that takes up ACA coverage."
)
definition_period = YEAR

def formula(person, period, parameters):
return person.tax_unit("takes_up_aca_if_eligible", period) & person(
"is_aca_ptc_eligible", period
)
5 changes: 1 addition & 4 deletions policyengine_us/variables/gov/aca/ptc/aca_ptc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,4 @@ def formula_2024(tax_unit, period, parameters):
plan_cost = tax_unit("slcsp", period)
income = tax_unit("aca_magi", period)
applicable_figure = tax_unit("aca_required_contribution_percentage", period)
takes_up_aca_if_eligible = tax_unit("takes_up_aca_if_eligible", period)
return (
max_(0, plan_cost - income * applicable_figure) * takes_up_aca_if_eligible
)
return max_(0, plan_cost - income * applicable_figure)
15 changes: 15 additions & 0 deletions policyengine_us/variables/gov/aca/ptc/assigned_aca_ptc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from policyengine_us.model_api import *


class assigned_aca_ptc(Variable):
value_type = float
entity = TaxUnit
label = "Assigned ACA premium tax credit for tax unit"
unit = USD
definition_period = YEAR
reference = "https://www.law.cornell.edu/uscode/text/26/36B"

def formula(tax_unit, period, parameters):
return tax_unit("aca_ptc", period) * tax_unit(
"takes_up_aca_if_eligible", period
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class premium_tax_credit(Variable):
unit = USD
definition_period = MONTH

adds = ["aca_ptc"]
adds = ["assigned_aca_ptc"]
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ class income_tax_excluding_ptc(Variable):
unit = USD
definition_period = YEAR
adds = ["income_tax"]
subtracts = ["aca_ptc"]
subtracts = ["assigned_aca_ptc"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class healthcare_benefit_value(Variable):
adds = [
"medicaid_cost",
"per_capita_chip",
"aca_ptc",
"assigned_aca_ptc",
"co_omnisalud",
"or_healthier_oregon_cost",
]
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def formula(spm_unit, period, parameters):
"ny_drive_clean_rebate",
]
if parameters(period).gov.contrib.ubi_center.flat_tax.deduct_ptc:
BENEFITS.append("aca_ptc")
BENEFITS.append("assigned_aca_ptc")
if not parameters(period).gov.hud.abolition:
BENEFITS.append("spm_unit_capped_housing_subsidy")
return add(spm_unit, period, BENEFITS)
Loading