Skip to content

Backfill NY TANF parameters to 1997 with pre-2022 and post-2022 reform rules#7178

Merged
PavelMakarchuk merged 11 commits intoPolicyEngine:mainfrom
hua7450:issue-7177-ny-tanf-historical-backfill
Feb 2, 2026
Merged

Backfill NY TANF parameters to 1997 with pre-2022 and post-2022 reform rules#7178
PavelMakarchuk merged 11 commits intoPolicyEngine:mainfrom
hua7450:issue-7177-ny-tanf-historical-backfill

Conversation

@hua7450
Copy link
Copy Markdown
Collaborator

@hua7450 hua7450 commented Jan 15, 2026

Summary

Fixes #7177
Fixes #6993

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
1998-01-01 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
1998-01-01 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
1998-01-01 $90
2022-10-01 $150

Source: 97-ADM-23, 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 - 42%)
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 (60+) $3,000 $3,750
Disabled $2,000 (standard) $3,750 (added by reform)

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

Need Standard (Monthly)

Household Size Amount
1 $158
2 $252
3 $336
4 $433
5 $534
6 $617
7+ $617 + $85 per additional

Source: NY TANF State Plan 2024-2026

Benefit Calculation

Benefit = max(Need Standard - Countable Income, 0)

Where:

  • Countable Income = Countable Earned Income + Gross Unearned Income
  • Countable Earned Income = calculated per EID order rules above

Implementation Structure

Parameters

tanf/
├── gross_income_test/
│   └── rate.yaml
├── income/
│   └── earned_income_deduction/
│       ├── flat.yaml
│       └── percent.yaml
├── need_standard/
│   ├── additional.yaml
│   ├── main.yaml
│   └── max_table_size.yaml
├── reform_2022/
│   └── in_effect.yaml
└── resource_limit/
    ├── higher/
    │   ├── age_threshold.yaml
    │   └── amount.yaml
    └── lower/
        └── amount.yaml

Variables

tanf/
├── eligibility/
│   ├── ny_tanf_eligible.py
│   ├── ny_tanf_gross_income_eligible.py
│   ├── ny_tanf_income_eligible.py
│   └── ny_tanf_resources_eligible.py
├── income/
│   ├── ny_tanf_countable_earned_income.py
│   └── ny_tanf_countable_income.py
├── ny_tanf_need_standard.py
└── ny_tanf.py

Key Implementation Details

  • reform_2022.in_effect parameter controls which rule set applies
  • ny_tanf_income_eligible uses where() for vectorized reform logic
  • ny_tanf_resources_eligible checks disability only when reform is in effect
  • ny_tanf_eligible includes immigration check via federal is_citizen_or_legal_immigrant
  • ny_tanf_countable_income uses adds to aggregate income (no formula needed)

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 (including disability qualifier)
  • Integration tests verify full eligibility and benefit chain
  • All 53 NY TANF tests pass (7 unit test files + 1 integration test)

🤖 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
Copy Markdown

codecov Bot commented Jan 15, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #7178    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files            1         8     +7     
  Lines           10       117   +107     
  Branches         0         1     +1     
==========================================
+ Hits            10       117   +107     
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
@hua7450 hua7450 marked this pull request as ready for review January 26, 2026 23:47
@PavelMakarchuk PavelMakarchuk merged commit e282b61 into PolicyEngine:main Feb 2, 2026
9 checks passed
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 New York TANF payment values 2017, 2018, 2019

2 participants