Skip to content

Conversation

@hua7450
Copy link
Collaborator

@hua7450 hua7450 commented Jan 15, 2026

Summary

Fixes #7177

Implements complete NY TANF modeling with both pre-October 2022 and post-October 2022 reform rules. The October 2022 reforms (22-ADM-11) significantly changed the earned income calculation methodology and eliminated the gross income test.

Regulatory Authority

Income Eligibility Tests

Gross Income Test (Pre-October 2022 Only)

Period Test
1997-08-20 to 2022-09-30 Gross income ≤ Need Standard × 185%
2022-10-01 onwards Eliminated

Source: 22-ADM-11 Section IV(B)

Needs Test (Always Applies)

Countable income < Need Standard

Income Deductions & Exemptions

Earned Income Disregard (EID) Rate

Effective Date Rate
1997-08-20 42%
2022-06-01 55%
2022-10-01 50%

Source: 97-ADM-23, 22-ADM-11 Section IV(B)

Work Expense Disregard

Effective Date Amount
1997-08-20 $90
2022-10-01 $150

Source: 22-ADM-11 Section IV(B)

Calculation Order Change (Critical)

Period Order
Pre-October 2022 Work expense FIRST, then EID: max(gross - $90, 0) × (1 - EID%)
Post-October 2022 EID FIRST, then work expense: max(gross × (1 - 50%) - $150, 0)

Source: 22-ADM-11 Section II

Resource Limits

Household Type Pre-October 2022 Post-October 2022
Standard $2,000 $2,500
Elderly/Disabled (60+) $3,000 $3,750

Source: 22-ADM-11 Section IV(A)

Implementation Details

Parameters Created

  • reform_2022/in_effect.yaml - Boolean controlling which rule set applies
  • gross_income_test/rate.yaml - 185% multiplier for pre-2022 gross income test

Parameters Modified

  • earned_income_deduction/percent.yaml - Historical EID rates (42%, 55%, 50%)
  • earned_income_deduction/flat.yaml - Work expense amounts ($90, $150)
  • Resource limit parameters backfilled to 1997

Variables Created

  • ny_tanf_gross_income_eligible.py - 185% gross income test (eliminated post-October 2022)

Variables Modified

  • ny_tanf_countable_earned_income.py - Conditional calculation order based on reform date
  • ny_tanf_income_eligible.py - Added gross income test
  • All NY TANF variables updated to definition_period = MONTH

Test Plan

  • Pre-reform tests (period: 2022-01) verify work expense first, then EID calculation
  • Post-reform tests (period: 2023-01) verify EID first, then work expense calculation
  • Gross income test verified for pre-2022 (185% threshold)
  • Gross income test verified as eliminated for post-2022
  • Resource limits verified for both periods
  • All 37 NY TANF tests pass

🤖 Generated with Claude Code

Fixes PolicyEngine#7177

- Resource limits: backfill $2,000/$3,000 to 1997, add $2,500/$3,750 at 2022-10-01
- Work expense disregard: backfill $90 to 1997, fix $150 effective date to 2022-10-01
- Income sources: backfill to 1997, fix references from SNAP to TANF regulations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f6b4cbb) to head (04598a6).
⚠️ Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7178    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            1        11    +10     
  Lines           22       144   +122     
  Branches         1         2     +1     
==========================================
+ Hits            22       144   +122     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hua7450 hua7450 marked this pull request as draft January 15, 2026 00:13
hua7450 and others added 3 commits January 14, 2026 19:15
- Descriptions: Use full program name "Temporary Assistance for Needy Families"
- Add missing period field to metadata
- Add missing label field to income source files
- Reference titles: Include section numbers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use employment_income_before_lsr and self_employment_income_before_lsr
instead of post-LSR variables to avoid circular dependency issues.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hua7450 hua7450 changed the title Backfill NY TANF parameters to 1997 and fix October 2022 effective dates Backfill NY TANF parameters to 1997 with pre-2022 and post-2022 reform rules Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NY TANF: Backfill historical parameter data and fix October 2022 effective dates

1 participant