diff --git a/changelog.d/sc-tanf-earned-disregard-budgeted-months.fixed.md b/changelog.d/sc-tanf-earned-disregard-budgeted-months.fixed.md new file mode 100644 index 00000000000..f11089965c3 --- /dev/null +++ b/changelog.d/sc-tanf-earned-disregard-budgeted-months.fixed.md @@ -0,0 +1 @@ +Fixed the South Carolina TANF earned income disregard to use each person's budgeted earnings months when supplied. diff --git a/policyengine_us/tests/policy/baseline/gov/states/sc/tanf/sc_tanf_countable_earned_income_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/sc/tanf/sc_tanf_countable_earned_income_person.yaml index 4157a4b30f2..6f94cf387cc 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/sc/tanf/sc_tanf_countable_earned_income_person.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/sc/tanf/sc_tanf_countable_earned_income_person.yaml @@ -39,3 +39,124 @@ # Jan-Apr (4 months): 50 * 0.5 = 25/month → 100 # May-Dec (8 months): max(50 - 100, 0) = 0/month → 0 # Annual total: 100 + 0 = 100 + +- name: The first budgeted earnings month can be in November. + period: 2026-11 + input: + people: + parent: + age: + 2026: 40 + employment_income_before_lsr: + 2026: 7_200 + sc_tanf_budgeted_earnings_months: + 2026-11: 1 + child: + age: + 2026: 10 + is_tax_unit_dependent: + 2026: true + households: + household: + members: [parent, child] + state_code: + 2026: SC + output: + # Monthly wages are 7,200 / 12 = 600. Half counts in month one. + sc_tanf_countable_earned_income_person: [300, 0] + sc_tanf_countable_income: 300 + # Need standard for two is 901. floor((901 - 300) x 0.4046) = 243. + sc_tanf: 243 + +- name: The fourth budgeted earnings month still gets the percentage disregard in November. + period: 2026-11 + input: + people: + parent: + age: + 2026: 40 + employment_income_before_lsr: + 2026: 7_200 + sc_tanf_budgeted_earnings_months: + 2026-11: 4 + child: + age: + 2026: 10 + is_tax_unit_dependent: + 2026: true + households: + household: + members: [parent, child] + state_code: + 2026: SC + output: + # Month four counts (7,200 / 12) x 0.5 = 300. + sc_tanf_countable_earned_income_person: [300, 0] + sc_tanf_countable_income: 300 + # floor((901 - 300) x 0.4046) = 243. + sc_tanf: 243 + +- name: The disregard switches after the fourth budgeted earnings month. + period: 2026 + input: + people: + parent: + age: + 2026: 40 + employment_income_before_lsr: + 2026: 7_200 + sc_tanf_budgeted_earnings_months: + 2026-10: 4 + 2026-11: 5 + child: + age: + 2026: 10 + is_tax_unit_dependent: + 2026: true + households: + household: + members: [parent, child] + state_code: + 2026: SC + output: + # Monthly wages are 600. Month four counts 600 x 0.5 = 300. + # Month five counts 600 - 100 = 500. + sc_tanf_countable_earned_income_person: + 2026-10: [300, 0] + 2026-11: [500, 0] + sc_tanf_countable_income: + 2026-10: 300 + 2026-11: 500 + # floor((901 - 300) x 0.4046) = 243. + # floor((901 - 500) x 0.4046) = 162. + sc_tanf: + 2026-10: 243 + 2026-11: 162 + +- name: January can be the fifth budgeted earnings month. + period: 2026-01 + input: + people: + parent: + age: + 2026: 40 + employment_income_before_lsr: + 2026: 7_200 + sc_tanf_budgeted_earnings_months: + 2026-01: 5 + child: + age: + 2026: 10 + is_tax_unit_dependent: + 2026: true + households: + household: + members: [parent, child] + state_code: + 2026: SC + output: + # The first four months were in 2025. Month five counts 7,200 / 12 - 100 = 500. + sc_tanf_countable_earned_income_person: [500, 0] + sc_tanf_countable_income: 500 + # Need standard for two is 881. floor((881 - 500) x 0.4046) = 154. + sc_tanf: 154 diff --git a/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_budgeted_earnings_months.py b/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_budgeted_earnings_months.py new file mode 100644 index 00000000000..c85932498da --- /dev/null +++ b/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_budgeted_earnings_months.py @@ -0,0 +1,25 @@ +from policyengine_us.model_api import * + + +class sc_tanf_budgeted_earnings_months(Variable): + value_type = int + entity = Person + label = "South Carolina TANF budgeted earnings months" + definition_period = MONTH + defined_for = StateCode.SC + reference = ( + "https://www.scstatehouse.gov/coderegs/Chapter%20114.pdf#page=217", + "https://dss.sc.gov/media/3zzhudmx/tanf-policy-manual-volume-68.pdf#page=131", + ) + documentation = ( + "Enter the number of months in the person's applicable South Carolina " + "TANF budgeted earnings history, including the current month. " + "Enter a positive count separately for each budgeted earnings month. " + "The disregard uses the calendar month when the count is missing." + ) + + # Months without budgeted earnings leave the count unchanged. + # Starting a new disregard period after a break in receipt requires a + # separate eligibility determination under 114-1150(C)(1)'s 24-month limit. + def formula(person, period, parameters): + return period.start.month diff --git a/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_countable_earned_income_person.py b/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_countable_earned_income_person.py index 3534234348b..9885143296e 100644 --- a/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_countable_earned_income_person.py +++ b/policyengine_us/variables/gov/states/sc/tanf/income/sc_tanf_countable_earned_income_person.py @@ -14,13 +14,12 @@ class sc_tanf_countable_earned_income_person(Variable): def formula(person, period, parameters): p = parameters(period).gov.states.sc.tanf.income.earned.disregard gross_earned_income = person("sc_tanf_gross_earned_income", period) - month = period.start.month - - # First 4 months (Jan-Apr): 50% disregard - # Remaining 8 months (May-Dec): $100 flat disregard - # Use calendar months as a proxy. The actual policy refers to - # "first 4 months of employment" which cannot be tracked. - initial_period = month <= p.percentage.months + budgeted_months = person("sc_tanf_budgeted_earnings_months", period) + # When only some people supply counts, missing entries are zero. + budgeted_months = where( + budgeted_months > 0, budgeted_months, period.start.month + ) + initial_period = budgeted_months <= p.percentage.months initial_countable = gross_earned_income * (1 - p.percentage.rate) ongoing_countable = max_(gross_earned_income - p.amount, 0)