From c100c11cd549e44380af6f191a9137d11f159f19 Mon Sep 17 00:00:00 2001 From: Ziming Date: Wed, 14 Jan 2026 18:59:51 -0500 Subject: [PATCH 1/9] Backfill NY TANF parameters to 1997 and fix October 2022 effective dates Fixes #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 --- changelog_entry.yaml | 4 ++++ .../otda/tanf/eligibility/resources/higher_limit.yaml | 11 ++++++----- .../higher_resource_limit_age_threshold.yaml | 10 +++++----- .../otda/tanf/eligibility/resources/lower_limit.yaml | 7 ++++--- .../gov/states/ny/otda/tanf/income/earned.yaml | 6 +++--- .../tanf/income/earned_income_deduction/flat.yaml | 11 ++++++----- .../gov/states/ny/otda/tanf/income/unearned.yaml | 6 +++--- 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..6a1fdfd4b5e 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + changed: + - NY TANF parameters backfilled to 1997 and updated with October 2022 changes per 22-ADM-11. diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml index 83d9c777cc4..063e8644d75 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml @@ -1,11 +1,12 @@ -description: New York limits TANF to households with up to this resource amount if they have elderly members. +description: New York limits TANF to households with up to this resource amount if they have elderly or disabled members. metadata: unit: currency-USD - label: New York TANF resource limit for households with elderly people + label: New York TANF resource limit for households with elderly or disabled people reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7 + - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: - 2021-10-01: 3_000 + 1997-01-01: 3_000 + 2022-10-01: 3_750 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml index ca7f7c6100b..e39711cbbd3 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml @@ -1,11 +1,11 @@ -description: New York provide higher limit for amount of asset to households with family members over this age. +description: New York provides a higher resource limit for households with family members over this age. metadata: unit: year - label: New York TANF asset limit elderly age + label: New York TANF resource limit elderly age threshold reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7 + - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: - 2021-10-01: 60 + 1997-01-01: 60 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml index 10a7ce8d59e..adf637d4085 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml @@ -4,8 +4,9 @@ metadata: unit: currency-USD label: New York TANF resource limit for households without elderly people reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7 + - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: - 2021-10-01: 2_000 + 1997-01-01: 2_000 + 2022-10-01: 2_500 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml index d10cddc7fcb..1cdbc3e1e47 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml @@ -1,10 +1,10 @@ description: New York TANF counts these income sources as earned income. values: - 2023-03-22: + 1997-01-01: - employment_income - self_employment_income metadata: unit: list reference: - title: CODE OF New York | Title 18 | 387.10 - href: https://casetext.com/regulation/new-york-codes-rules-and-regulations/title-18-department-of-social-services/chapter-ii-regulations-of-the-department-of-social-services/subchapter-b-public-assistance/article-4-services-to-individuals/part-387-supplemental-nutrition-assistance-program/section-38710-income-standards + title: 18 NYCRR 352.17 - Computation of available income + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml index 9e16893c400..9f0a19883f3 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml @@ -1,12 +1,13 @@ -description: New York excludes this amount of earned income for the purposes of its TANF program, after the percentage deduction. +description: New York excludes this amount of earned income for the purposes of its TANF program, as a work expense disregard. values: - 2022-03-01: 150 + 1997-01-01: 90 + 2022-10-01: 150 metadata: unit: currency-USD period: month - label: New York TANF flat earnings exclusion + label: New York TANF work expense disregard reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/gis/2022/22DC085.pdf#page=1 + - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=6 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml index 80d31a751de..06001751833 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml @@ -1,6 +1,6 @@ description: New York TANF counts these income sources as unearned income. values: - 2021-01-01: + 1997-01-01: - veterans_benefits - rental_income - alimony_income @@ -15,5 +15,5 @@ values: metadata: unit: list reference: - title: CODE OF New York | Department of Social Service | 387.10 - href: https://casetext.com/regulation/new-york-codes-rules-and-regulations/title-18-department-of-social-services/chapter-ii-regulations-of-the-department-of-social-services/subchapter-b-public-assistance/article-4-services-to-individuals/part-387-supplemental-nutrition-assistance-program/section-38710-income-standards + title: 18 NYCRR 352.17 - Computation of available income + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 From 97df9ac4e162f8d65d7a49d547df33355f162748 Mon Sep 17 00:00:00 2001 From: Ziming Date: Wed, 14 Jan 2026 19:15:37 -0500 Subject: [PATCH 2/9] Fix parameter files to follow PolicyEngine parameter patterns - 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 --- .../otda/tanf/eligibility/resources/higher_limit.yaml | 7 ++++--- .../resources/higher_resource_limit_age_threshold.yaml | 7 ++++--- .../otda/tanf/eligibility/resources/lower_limit.yaml | 7 ++++--- .../gov/states/ny/otda/tanf/income/earned.yaml | 10 +++++++--- .../otda/tanf/income/earned_income_deduction/flat.yaml | 4 ++-- .../gov/states/ny/otda/tanf/income/unearned.yaml | 10 +++++++--- 6 files changed, 28 insertions(+), 17 deletions(-) diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml index 063e8644d75..1945753db6e 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml @@ -1,10 +1,11 @@ -description: New York limits TANF to households with up to this resource amount if they have elderly or disabled members. +description: New York limits resources to this amount for households with elderly or disabled members under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD - label: New York TANF resource limit for households with elderly or disabled people + period: year + label: New York TANF resource limit for elderly or disabled households reference: - - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml index e39711cbbd3..2d5a9ae682a 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml @@ -1,10 +1,11 @@ -description: New York provides a higher resource limit for households with family members over this age. +description: New York sets this age threshold for higher resource limits under the Temporary Assistance for Needy Families program. metadata: unit: year - label: New York TANF resource limit elderly age threshold + period: year + label: New York TANF elderly age threshold reference: - - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml index adf637d4085..67549d2f360 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml @@ -1,10 +1,11 @@ -description: New York limits its TANF eligibility to households with up to this amount of resources, if they have no elderly members. +description: New York limits resources to this amount under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD - label: New York TANF resource limit for households without elderly people + period: year + label: New York TANF resource limit reference: - - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 values: diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml index 1cdbc3e1e47..53ed070dc28 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml @@ -1,10 +1,14 @@ -description: New York TANF counts these income sources as earned income. +description: New York uses these income sources as earned income under the Temporary Assistance for Needy Families program. + values: 1997-01-01: - employment_income - self_employment_income + metadata: unit: list + period: year + label: New York TANF earned income sources reference: - title: 18 NYCRR 352.17 - Computation of available income - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 + - title: 18 NYCRR 352.17 - Computation of available income + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml index 9f0a19883f3..bb768d359c2 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml @@ -1,4 +1,4 @@ -description: New York excludes this amount of earned income for the purposes of its TANF program, as a work expense disregard. +description: New York deducts this amount as a work expense under the Temporary Assistance for Needy Families program. values: 1997-01-01: 90 @@ -9,5 +9,5 @@ metadata: period: month label: New York TANF work expense disregard reference: - - title: 22-ADM-11 Public Assistance Policy Changes Included in the SFY 2022-23 New York State Budget + - title: 22-ADM-11 Section IV(B) Work Expense Disregard href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=6 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml index 06001751833..f602da9f83d 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml @@ -1,4 +1,5 @@ -description: New York TANF counts these income sources as unearned income. +description: New York uses these income sources as unearned income under the Temporary Assistance for Needy Families program. + values: 1997-01-01: - veterans_benefits @@ -12,8 +13,11 @@ values: - gi_cash_assistance - social_security - ssi + metadata: unit: list + period: year + label: New York TANF unearned income sources reference: - title: 18 NYCRR 352.17 - Computation of available income - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 + - title: 18 NYCRR 352.17 - Computation of available income + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 From ec48a50d476db1185f1eeec6a234bb29387ffd37 Mon Sep 17 00:00:00 2001 From: Ziming Date: Thu, 15 Jan 2026 10:20:06 -0500 Subject: [PATCH 3/9] Use _before_lsr income variables in NY TANF earned income parameter 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 --- .../parameters/gov/states/ny/otda/tanf/income/earned.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml index 53ed070dc28..b93fcc9e9b9 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml @@ -2,8 +2,8 @@ description: New York uses these income sources as earned income under the Tempo values: 1997-01-01: - - employment_income - - self_employment_income + - employment_income_before_lsr + - self_employment_income_before_lsr metadata: unit: list From 92a289564b806939ddf8d45036852835c9650578 Mon Sep 17 00:00:00 2001 From: Ziming Date: Thu, 15 Jan 2026 15:01:01 -0500 Subject: [PATCH 4/9] draft --- .../otda/tanf/grant_standard/additional.yaml | 10 ++++---- .../ny/otda/tanf/grant_standard/main.yaml | 10 ++++---- .../states/ny/otda/tanf/income/earned.yaml | 14 ----------- .../earned_income_deduction/percent.yaml | 9 ++++---- .../states/ny/otda/tanf/income/unearned.yaml | 23 ------------------- .../otda/tanf/need_standard/additional.yaml | 8 ++++--- .../ny/otda/tanf/need_standard/main.yaml | 10 +++++--- ...ny_tanf_countable_gross_unearned_income.py | 2 +- .../income/ny_tanf_gross_earned_income.py | 2 +- 9 files changed, 31 insertions(+), 57 deletions(-) delete mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml delete mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml index ad61cef045c..6d53856aa9e 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml @@ -1,12 +1,14 @@ -description: New York limits its TANF grant standard to households with up to this income level for people beyond size. +description: New York provides this amount for each additional person under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD period: month - label: New York TANF monthly income limit per additional person + label: New York TANF grant standard per additional person reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=67 + - title: New York TANF State Plan 2024-2026 + href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=79 + - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 values: 2012-10-01: 85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml index ca58d5cdd00..fc7b4987891 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml @@ -1,14 +1,16 @@ -description: New York limits its TANF grant standard to households with up to this income level, by household size. +description: New York provides this amount as the grant standard under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD period: month breakdown: - range(1, 7) - label: New York TANF monthly income limit + label: New York TANF grant standard reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=67 + - title: New York TANF State Plan 2024-2026 + href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=79 + - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 1: 2012-10-01: 158 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml deleted file mode 100644 index b93fcc9e9b9..00000000000 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: New York uses these income sources as earned income under the Temporary Assistance for Needy Families program. - -values: - 1997-01-01: - - employment_income_before_lsr - - self_employment_income_before_lsr - -metadata: - unit: list - period: year - label: New York TANF earned income sources - reference: - - title: 18 NYCRR 352.17 - Computation of available income - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml index da399c3d4a4..d1b74dabe54 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml @@ -1,11 +1,12 @@ -description: New York excludes this percentage of earned income for the purposes of its TANF program. +description: New York excludes this share of earned income under the Temporary Assistance for Needy Families program. metadata: unit: /1 - label: New York TANF earned income deduction + period: year + label: New York TANF earned income disregard rate reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/gis/2022/22DC085.pdf#page=1 + - title: 22-ADM-11 Section IV(B) Earned Income Disregard + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=6 values: 2022-10-01: 0.5 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml deleted file mode 100644 index f602da9f83d..00000000000 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/unearned.yaml +++ /dev/null @@ -1,23 +0,0 @@ -description: New York uses these income sources as unearned income under the Temporary Assistance for Needy Families program. - -values: - 1997-01-01: - - veterans_benefits - - rental_income - - alimony_income - - dividend_income - - interest_income - - miscellaneous_income - - pension_income - - unemployment_compensation - - gi_cash_assistance - - social_security - - ssi - -metadata: - unit: list - period: year - label: New York TANF unearned income sources - reference: - - title: 18 NYCRR 352.17 - Computation of available income - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.17 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/additional.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/additional.yaml index 46ff19c03e7..5f9a5b3e3d9 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/additional.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/additional.yaml @@ -1,12 +1,14 @@ -description: New York limits its TANF program to households with up to this income level for people beyond size. +description: New York provides this amount for each additional person under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD period: month label: New York TANF monthly income limit per additional person reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=65 + - title: New York TANF State Plan 2024-2026 + href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=77 + - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 values: 2012-10-01: 85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/main.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/main.yaml index 6d86b177fa9..4324b9b2b4d 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/main.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/main.yaml @@ -1,14 +1,18 @@ -description: New York limits its TANF program to households with up to this income level, by household size. +description: New York sets this amount as the need standard under the Temporary Assistance for Needy Families program. metadata: unit: currency-USD period: month breakdown: - range(1, 7) + breakdown_label: + - Assistance unit size label: New York TANF monthly income limit reference: - - title: New York State Plan and Executive Certification | Administration of the Block Grant for Temporary Assistance for Needy Families - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=65 + - title: New York TANF State Plan 2024-2026 + href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=77 + - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility + href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 1: 2012-10-01: 158 diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py index 148b72e267c..b92f7e00f9e 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py @@ -9,4 +9,4 @@ class ny_tanf_countable_gross_unearned_income(Variable): definition_period = YEAR defined_for = StateCode.NY - adds = "gov.states.ny.otda.tanf.income.unearned" + adds = "gov.hhs.tanf.cash.income.sources.unearned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py index ba1720cd4cf..b277bd7244d 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py @@ -9,4 +9,4 @@ class ny_tanf_gross_earned_income(Variable): definition_period = YEAR defined_for = StateCode.NY - adds = "gov.states.ny.otda.tanf.income.earned" + adds = "gov.hhs.tanf.cash.income.sources.earned" From 04598a622f3ba6d839d3c5193193530657c3aa87 Mon Sep 17 00:00:00 2001 From: Ziming Date: Thu, 15 Jan 2026 18:45:06 -0500 Subject: [PATCH 5/9] draft --- .../ny/otda/tanf/gross_income_test/rate.yaml | 12 ++++ .../income/earned_income_deduction/flat.yaml | 2 +- .../earned_income_deduction/percent.yaml | 10 ++- .../ny/otda/tanf/reform_2022/in_effect.yaml | 13 ++++ .../gov/states/ny/otda/tanf/ny_tanf.yaml | 34 ++++++---- .../tanf/ny_tanf_countable_earned_income.yaml | 65 +++++++++++++++++-- ..._tanf_countable_gross_unearned_income.yaml | 53 +++++---------- .../states/ny/otda/tanf/ny_tanf_eligible.yaml | 28 +++----- .../ny/otda/tanf/ny_tanf_grant_standard.yaml | 29 ++++++--- .../tanf/ny_tanf_gross_income_eligible.yaml | 60 +++++++++++++++++ .../ny/otda/tanf/ny_tanf_income_eligible.yaml | 61 +++++++++++++---- .../ny/otda/tanf/ny_tanf_need_standard.yaml | 29 ++++++--- .../otda/tanf/ny_tanf_resources_eligible.yaml | 28 ++++---- .../income/ny_tanf_countable_earned_income.py | 33 ++++++---- ...ny_tanf_countable_gross_unearned_income.py | 2 +- .../income/ny_tanf_gross_earned_income.py | 2 +- .../gov/states/ny/otda/tanf/ny_tanf.py | 2 +- .../otda/tanf/ny_tanf_countable_resources.py | 2 +- .../states/ny/otda/tanf/ny_tanf_eligible.py | 3 +- .../ny/otda/tanf/ny_tanf_grant_standard.py | 14 +--- .../tanf/ny_tanf_gross_income_eligible.py | 32 +++++++++ .../ny/otda/tanf/ny_tanf_income_eligible.py | 12 +++- .../ny/otda/tanf/ny_tanf_need_standard.py | 14 +--- .../otda/tanf/ny_tanf_resources_eligible.py | 19 +++--- 24 files changed, 386 insertions(+), 173 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml create mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml create mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml new file mode 100644 index 00000000000..1b334ceebdb --- /dev/null +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml @@ -0,0 +1,12 @@ +description: New York limits gross income to this multiplier of the need standard under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: month + label: New York TANF gross income test rate + reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf + +values: + 1997-08-20: 1.85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml index bb768d359c2..c061f3feb7b 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml @@ -1,7 +1,7 @@ description: New York deducts this amount as a work expense under the Temporary Assistance for Needy Families program. values: - 1997-01-01: 90 + 1997-08-20: 90 2022-10-01: 150 metadata: diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml index d1b74dabe54..c414c8c9980 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml @@ -2,11 +2,15 @@ description: New York excludes this share of earned income under the Temporary A metadata: unit: /1 - period: year + period: month label: New York TANF earned income disregard rate reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf - title: 22-ADM-11 Section IV(B) Earned Income Disregard - href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=6 + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3 values: - 2022-10-01: 0.5 + 1997-08-20: 0.42 + 2022-06-01: 0.55 + 2022-10-01: 0.50 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml new file mode 100644 index 00000000000..76640163d97 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml @@ -0,0 +1,13 @@ +description: New York applies the October 2022 TANF reforms when this is true. + +metadata: + unit: bool + period: month + label: New York TANF October 2022 reform in effect + reference: + - title: 22-ADM-11 Public Assistance Policy Changes Section II + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=2 + +values: + 1997-08-20: false + 2022-10-01: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml index 1455ede11c1..8b307e2f33b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml @@ -1,5 +1,5 @@ -- name: If ineligible, they get zero. - period: 2023 +- name: Case 1, ineligible household gets zero. + period: 2023-01 input: ny_tanf_eligible: false ny_tanf_grant_standard: 100 @@ -8,22 +8,34 @@ output: ny_tanf: 0 -- name: If eligible, they get difference between grant standard and countable income. - period: 2023 +- name: Case 2, eligible household gets grant minus income. + period: 2023-01 input: ny_tanf_eligible: true - ny_tanf_grant_standard: 100 + ny_tanf_grant_standard: 336 + ny_tanf_countable_earned_income: 100 + ny_tanf_countable_gross_unearned_income: 0 + output: + # $336 - $100 = $236 + ny_tanf: 236 + +- name: Case 3, eligible household with no income gets full grant. + period: 2023-01 + input: + ny_tanf_eligible: true + ny_tanf_grant_standard: 336 ny_tanf_countable_earned_income: 0 ny_tanf_countable_gross_unearned_income: 0 output: - ny_tanf: 100 + ny_tanf: 336 -- name: If countable income exceeds grant standard they get 0. - period: 2023 +- name: Case 4, countable income exceeds grant floors at zero. + period: 2023-01 input: ny_tanf_eligible: true - ny_tanf_grant_standard: 100 - ny_tanf_countable_earned_income: 90 - ny_tanf_countable_gross_unearned_income: 11 + ny_tanf_grant_standard: 336 + ny_tanf_countable_earned_income: 200 + ny_tanf_countable_gross_unearned_income: 200 output: + # $336 - $400 = -$64 → floors at $0 ny_tanf: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml index 42592b40528..013a39189c2 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml @@ -1,15 +1,66 @@ -- name: NY countable earned income = gross earned income*50% - 150*12 as of 2023-01-01. - period: 2023 +# Post-reform tests (2023-01): EID first, then work expense +# Formula: max(gross × (1 - 0.5) - 150, 0) + +- name: Case 1, post-reform with moderate income. + period: 2023-01 input: state_code: NY - ny_tanf_gross_earned_income: 6000 + ny_tanf_gross_earned_income: 500 output: - ny_tanf_countable_earned_income: 1200 + # $500 × 0.5 = $250 + # $250 - $150 = $100 + ny_tanf_countable_earned_income: 100 -- name: NY countable earned income = gross earned income*50% - 150, max(200*50%-150*12,0)=0 - period: 2023 +- name: Case 2, post-reform with low income floors at zero. + period: 2023-01 input: state_code: NY - ny_tanf_gross_earned_income: 2000 + ny_tanf_gross_earned_income: 200 output: + # $200 × 0.5 = $100 + # $100 - $150 = -$50 → floors at $0 ny_tanf_countable_earned_income: 0 + +- name: Case 3, post-reform with higher income. + period: 2023-01 + input: + state_code: NY + ny_tanf_gross_earned_income: 1_000 + output: + # $1,000 × 0.5 = $500 + # $500 - $150 = $350 + ny_tanf_countable_earned_income: 350 + +# Pre-reform tests (2022-01): Work expense first, then EID +# Formula: max(gross - 90, 0) × (1 - 0.42) +# Note: EID = 42% for 2022-01 (1997 value, before June 2022 update) + +- name: Case 4, pre-reform with moderate income. + period: 2022-01 + input: + state_code: NY + ny_tanf_gross_earned_income: 500 + output: + # $500 - $90 = $410 + # $410 × 0.58 = $237.80 + ny_tanf_countable_earned_income: 237.8 + +- name: Case 5, pre-reform with low income floors at zero. + period: 2022-01 + input: + state_code: NY + ny_tanf_gross_earned_income: 50 + output: + # $50 - $90 = -$40 → floors at $0 + # $0 × 0.58 = $0 + ny_tanf_countable_earned_income: 0 + +- name: Case 6, pre-reform with higher income. + period: 2022-01 + input: + state_code: NY + ny_tanf_gross_earned_income: 1_000 + output: + # $1,000 - $90 = $910 + # $910 × 0.58 = $527.80 + ny_tanf_countable_earned_income: 527.8 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml index abc5ea3e270..7bc7d6afdb3 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml @@ -1,5 +1,5 @@ -- name: No unearned income, $0 per year - period: 2023 +- name: Case 1, no unearned income. + period: 2023-01 input: state_code: NY veterans_benefits: 0 @@ -11,43 +11,24 @@ unemployment_compensation: 0 gi_cash_assistance: 0 social_security: 0 - ssi: 0 - is_tanf_enrolled: false output: ny_tanf_countable_gross_unearned_income: 0 -- name: No unearned income and TANF enrolled, $0 per year - period: 2023 +- name: Case 2, various unearned income sources. + period: 2023-01 input: state_code: NY - veterans_benefits: 0 - rental_income: 0 - alimony_income: 0 - dividend_income: 0 - interest_income: 0 - pension_income: 0 - unemployment_compensation: 0 - gi_cash_assistance: 0 - social_security: 0 - ssi: 0 - is_tanf_enrolled: true - output: - ny_tanf_countable_gross_unearned_income: 0 - -- name: $1,000 of each unearned income, $10,000 per year - period: 2023 - input: - state_code: NY - veterans_benefits: 1_000 - rental_income: 1_000 - alimony_income: 1_000 - dividend_income: 1_000 - interest_income: 1_000 - pension_income: 1_000 - unemployment_compensation: 1_000 - gi_cash_assistance: 1_000 - social_security: 1_000 - ssi: 1_000 - is_tanf_enrolled: false + veterans_benefits: 1_200 + rental_income: 1_200 + alimony_income: 1_200 + dividend_income: 1_200 + interest_income: 1_200 + pension_income: 1_200 + unemployment_compensation: 1_200 + gi_cash_assistance: 1_200 + social_security: 1_200 output: - ny_tanf_countable_gross_unearned_income: 10_000 + # Each source = $1,200/yr = $100/month + # 9 sources × $100 = $900/month + # Note: SSI is NOT counted as unearned income for TANF + ny_tanf_countable_gross_unearned_income: 900 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_eligible.yaml index b77a2adcb12..35d4441c826 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_eligible.yaml @@ -1,5 +1,5 @@ -- name: Is demographic eligible, income eligible and asset eligible. - period: 2023 +- name: Case 1, passes all eligibility tests. + period: 2023-01 input: state_code: NY is_demographic_tanf_eligible: true @@ -8,9 +8,8 @@ output: ny_tanf_eligible: true - -- name: Is demographic eligible and asset eligible but not income eligible. - period: 2023 +- name: Case 2, fails income test. + period: 2023-01 input: state_code: NY is_demographic_tanf_eligible: true @@ -19,9 +18,8 @@ output: ny_tanf_eligible: false - -- name: Is not demographic eligible but is income eligible and asset eligible. - period: 2023 +- name: Case 3, fails demographic test. + period: 2023-01 input: state_code: NY is_demographic_tanf_eligible: false @@ -30,8 +28,8 @@ output: ny_tanf_eligible: false -- name: Is not asset eligible but is income eligible and demographic eligible. - period: 2023 +- name: Case 4, fails resources test. + period: 2023-01 input: state_code: NY is_demographic_tanf_eligible: true @@ -39,13 +37,3 @@ ny_tanf_resources_eligible: false output: ny_tanf_eligible: false - -- name: Is not demographic eligible, income eligible and asset eligible. - period: 2023 - input: - state_code: NY - is_demographic_tanf_eligible: false - ny_tanf_income_eligible: false - ny_tanf_resources_eligible: false - output: - ny_tanf_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml index 43c967064aa..1ea1080f51e 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml @@ -1,23 +1,36 @@ -- name: If no children and one adult, grant standard is $158/mo. - period: 2023 +- name: Case 1, one person household. + period: 2023-01 input: state_code: NY spm_unit_size: 1 output: - ny_tanf_grant_standard: 158 * 12 + # Grant standard for 1 person = $158/month + ny_tanf_grant_standard: 158 -- name: If not eligible, we don't calculate it. - period: 2023 +- name: Case 2, non-NY state returns zero. + period: 2023-01 input: state_code: CA spm_unit_size: 1 output: ny_tanf_grant_standard: 0 -- name: If 10 people, grant standard is $617 + 4 * $85 = $957 per month. - period: 2023 +- name: Case 3, three person household. + period: 2023-01 + input: + state_code: NY + spm_unit_size: 3 + output: + # Grant standard for 3 people = $336/month + ny_tanf_grant_standard: 336 + +- name: Case 4, ten person household. + period: 2023-01 input: state_code: NY spm_unit_size: 10 output: - ny_tanf_grant_standard: 957 * 12 + # Grant standard for 6 people = $617 + # Additional 4 people at $85 each = $340 + # Total = $617 + $340 = $957/month + ny_tanf_grant_standard: 957 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml new file mode 100644 index 00000000000..05dcbd4c5f0 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml @@ -0,0 +1,60 @@ +# Post-reform tests (2023-01): Gross income test eliminated +# All households pass automatically + +- name: Case 1, post-reform always passes gross income test. + period: 2023-01 + input: + state_code: NY + ny_tanf_gross_earned_income: 10_000 + ny_tanf_countable_gross_unearned_income: 5_000 + output: + ny_tanf_gross_income_eligible: true + +# Pre-reform tests (2022-01): 185% gross income test applies +# Gross income <= Need Standard × 1.85 + +- name: Case 2, pre-reform gross income below 185% threshold. + period: 2022-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + ny_tanf_gross_earned_income: 400 + ny_tanf_countable_gross_unearned_income: 0 + output: + # Need standard for 2 people = $252/month + # 185% threshold = $252 × 1.85 = $466.20 + # Gross income = $400 <= $466.20 → passes + ny_tanf_gross_income_eligible: true + +- name: Case 3, pre-reform gross income above 185% threshold. + period: 2022-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + ny_tanf_gross_earned_income: 500 + ny_tanf_countable_gross_unearned_income: 0 + output: + # Need standard for 2 people = $252/month + # 185% threshold = $252 × 1.85 = $466.20 + # Gross income = $500 > $466.20 → fails + ny_tanf_gross_income_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml index d1024484bbc..b87cb45c76d 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml @@ -1,31 +1,66 @@ -- name: Household with no income is eligible. (0+0<1) - period: 2023 +# Post-reform tests (2023-01): Only needs test applies + +- name: Case 1, post-reform household with no income is eligible. + period: 2023-01 input: state_code: NY - ny_tanf_need_standard: 1 + ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 0 ny_tanf_countable_gross_unearned_income: 0 output: ny_tanf_income_eligible: true +- name: Case 2, post-reform household with income below need standard. + period: 2023-01 + input: + state_code: NY + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 100 + ny_tanf_countable_gross_unearned_income: 100 + output: + ny_tanf_income_eligible: true -- name: Household with income exceeding need standard is ineligible. (1+1>1) - period: 2023 +- name: Case 3, post-reform household with income exceeds need standard. + period: 2023-01 input: state_code: NY - ny_tanf_need_standard: 1 - ny_tanf_countable_earned_income: 1 - ny_tanf_countable_gross_unearned_income: 1 + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 200 + ny_tanf_countable_gross_unearned_income: 200 output: ny_tanf_income_eligible: false +# Pre-reform tests (2022-01): Both gross income test and needs test apply -- name: Household with income equals need standard is ineligible. (1+0=1) - period: 2023 +- name: Case 4, pre-reform passes both tests. + period: 2022-01 input: state_code: NY - ny_tanf_need_standard: 1 - ny_tanf_countable_earned_income: 1 - ny_tanf_countable_gross_unearned_income: 0 + ny_tanf_gross_income_eligible: true + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 100 + ny_tanf_countable_gross_unearned_income: 100 + output: + ny_tanf_income_eligible: true + +- name: Case 5, pre-reform fails gross income test. + period: 2022-01 + input: + state_code: NY + ny_tanf_gross_income_eligible: false + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 100 + ny_tanf_countable_gross_unearned_income: 100 + output: + ny_tanf_income_eligible: false + +- name: Case 6, pre-reform fails needs test. + period: 2022-01 + input: + state_code: NY + ny_tanf_gross_income_eligible: true + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 200 + ny_tanf_countable_gross_unearned_income: 200 output: ny_tanf_income_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_need_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_need_standard.yaml index 93e90b13577..704cdb351fb 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_need_standard.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_need_standard.yaml @@ -1,23 +1,36 @@ -- name: If no children and one adult, need standard is $158/mo. - period: 2023 +- name: Case 1, one person household. + period: 2023-01 input: state_code: NY spm_unit_size: 1 output: - ny_tanf_need_standard: 158 * 12 + # Need standard for 1 person = $158/month + ny_tanf_need_standard: 158 -- name: If not eligible, we don't calculate it. - period: 2023 +- name: Case 2, non-NY state returns zero. + period: 2023-01 input: state_code: CA spm_unit_size: 1 output: ny_tanf_need_standard: 0 -- name: If 10 people, need standard is $617 + 4 * $85 = $957 per month. - period: 2023 +- name: Case 3, three person household. + period: 2023-01 + input: + state_code: NY + spm_unit_size: 3 + output: + # Need standard for 3 people = $336/month + ny_tanf_need_standard: 336 + +- name: Case 4, ten person household. + period: 2023-01 input: state_code: NY spm_unit_size: 10 output: - ny_tanf_need_standard: 957 * 12 + # Need standard for 6 people = $617 + # Additional 4 people at $85 each = $340 + # Total = $617 + $340 = $957/month + ny_tanf_need_standard: 957 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml index 43787b827ae..b3d22862f10 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml @@ -1,37 +1,37 @@ -- name: Households with any member over 60 who have $3,000 assets are eligible. - period: 2023 +- name: Case 1, elderly household at higher limit. + period: 2023-01 input: state_code: NY age: 61 - ny_tanf_countable_resources: 3000 + ny_tanf_countable_resources: 3_000 output: + # $3,000 limit for households with member 60+ ny_tanf_resources_eligible: true - -- name: Households with any member over 60 who have assets exceeding $3,000 are ineligible. - period: 2023 +- name: Case 2, elderly household exceeds higher limit. + period: 2023-01 input: state_code: NY age: 61 - ny_tanf_countable_resources: 4000 + ny_tanf_countable_resources: 4_000 output: ny_tanf_resources_eligible: false - -- name: Households with all members under 60 who have assets exceeding $2,000 are ineligible. - period: 2023 +- name: Case 3, non-elderly household exceeds lower limit. + period: 2023-01 input: state_code: NY age: 59 - ny_tanf_countable_resources: 2500 + ny_tanf_countable_resources: 3_000 output: + # $2,500 limit for non-elderly households (post-October 2022) ny_tanf_resources_eligible: false -- name: Households with all members under 60 who have assets under $2,000 are eligible. - period: 2023 +- name: Case 4, non-elderly household under lower limit. + period: 2023-01 input: state_code: NY age: 59 - ny_tanf_countable_resources: 1500 + ny_tanf_countable_resources: 1_500 output: ny_tanf_resources_eligible: true diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py index 689e9c0e41b..d4c56f102fc 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py @@ -6,19 +6,26 @@ class ny_tanf_countable_earned_income(Variable): entity = SPMUnit label = "New York TANF countable earned income" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf", + "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=2", + ) def formula(spm_unit, period, parameters): - # Get gross earned income. - gross_earned_income = spm_unit("ny_tanf_gross_earned_income", period) - # Multiply by 100% minus the EID. - p = parameters( - period - ).gov.states.ny.otda.tanf.income.earned_income_deduction - # https://otda.ny.gov/policy/gis/2022/22DC085.pdf Section 2 - # Effective October 1, 2022, the EID will be applied prior to the work expense disregard. - return max_( - gross_earned_income * (1 - p.percent) - p.flat * MONTHS_IN_YEAR, - 0, - ) + gross_earned = spm_unit("ny_tanf_gross_earned_income", period) + p = parameters(period).gov.states.ny.otda.tanf + + eid_rate = p.income.earned_income_deduction.percent + work_expense = p.income.earned_income_deduction.flat + + if p.reform_2022.in_effect: + # Post-October 2022: EID first, then work expense + # https://otda.ny.gov/policy/gis/2022/22DC085.pdf Section 2 + return max_(gross_earned * (1 - eid_rate) - work_expense, 0) + + # Pre-October 2022: Work expense first, then EID + # https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf + after_work_expense = max_(gross_earned - work_expense, 0) + return after_work_expense * (1 - eid_rate) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py index b92f7e00f9e..513ecd00ddf 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py @@ -6,7 +6,7 @@ class ny_tanf_countable_gross_unearned_income(Variable): entity = SPMUnit label = "New York TANF countable gross unearned income" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY adds = "gov.hhs.tanf.cash.income.sources.unearned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py index b277bd7244d..d47c223dd7a 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py @@ -6,7 +6,7 @@ class ny_tanf_gross_earned_income(Variable): entity = SPMUnit label = "New York TANF gross earned income" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY adds = "gov.hhs.tanf.cash.income.sources.earned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py index 1c029f6e30f..9d534477bcb 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py @@ -6,7 +6,7 @@ class ny_tanf(Variable): entity = SPMUnit label = "New York TANF" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = "ny_tanf_eligible" def formula(spm_unit, period, parameters): diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py index 8b9586f06a2..443ec51fbd3 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py @@ -6,5 +6,5 @@ class ny_tanf_countable_resources(Variable): entity = SPMUnit label = "Countable resources for New York TANF" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py index 543d29ef49a..3ea2953950a 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py @@ -5,11 +5,10 @@ class ny_tanf_eligible(Variable): value_type = bool entity = SPMUnit label = "New York TANF eligible" - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY def formula(spm_unit, period, parameters): - # Assume federal demographic eligibility given consistency. demographic_eligible = spm_unit("is_demographic_tanf_eligible", period) income_eligible = spm_unit("ny_tanf_income_eligible", period) asset_eligible = spm_unit("ny_tanf_resources_eligible", period) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py index 591d312752f..67e31312de8 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py @@ -6,22 +6,14 @@ class ny_tanf_grant_standard(Variable): entity = SPMUnit label = "New York TANF grant standard" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY def formula(spm_unit, period, parameters): - # Get number of people in SPM unit. - people = spm_unit("spm_unit_size", period) - # Cap them at the maximum specified in the tables. + people = spm_unit("spm_unit_size", period.this_year) capped_people = min_(people, 6).astype(int) - # Calculate additional people beyond the maximum in tables. additional_people = people - capped_people - # Get the relevant part of the parameter tree. p = parameters(period).gov.states.ny.otda.tanf.grant_standard - # Look up the main grant standard for the number of (capped) people. base = p.main[capped_people] - # Add the additional grant standard for the additional people. additional_grant_standard = p.additional * additional_people - monthly = base + additional_grant_standard - # Return annual value. - return monthly * MONTHS_IN_YEAR + return base + additional_grant_standard diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py new file mode 100644 index 00000000000..df0a6ebd388 --- /dev/null +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + + +class ny_tanf_gross_income_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "New York TANF gross income eligible" + definition_period = MONTH + defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf", + "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3", + ) + + def formula(spm_unit, period, parameters): + p = parameters(period).gov.states.ny.otda.tanf + + # Gross income test eliminated after October 2022 reform + if p.reform_2022.in_effect: + return True + + # Pre-October 2022: 185% gross income test + gross_income = add( + spm_unit, + period, + [ + "ny_tanf_gross_earned_income", + "ny_tanf_countable_gross_unearned_income", + ], + ) + need_standard = spm_unit("ny_tanf_need_standard", period) + return gross_income <= need_standard * p.gross_income_test.rate diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py index c9189058d34..08501835b9d 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py @@ -5,10 +5,16 @@ class ny_tanf_income_eligible(Variable): value_type = bool entity = SPMUnit label = "New York TANF income eligible" - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY def formula(spm_unit, period, parameters): + # Gross income test (only applies pre-Oct 2022) + gross_income_eligible = spm_unit( + "ny_tanf_gross_income_eligible", period + ) + + # Needs test (always applies) income = add( spm_unit, period, @@ -18,4 +24,6 @@ def formula(spm_unit, period, parameters): ], ) need_standard = spm_unit("ny_tanf_need_standard", period) - return income < need_standard + needs_test_eligible = income < need_standard + + return gross_income_eligible & needs_test_eligible diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py index 7f037e5094d..5e4b545466e 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py @@ -6,22 +6,14 @@ class ny_tanf_need_standard(Variable): entity = SPMUnit label = "New York TANF need standard" unit = USD - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY def formula(spm_unit, period, parameters): - # Get number of people in SPM unit. - people = spm_unit("spm_unit_size", period) - # Cap them at the maximum specified in the tables. + people = spm_unit("spm_unit_size", period.this_year) capped_people = min_(people, 6).astype(int) - # Calculate additional people beyond the maximum in tables. additional_people = people - capped_people - # Get the relevant part of the parameter tree. p = parameters(period).gov.states.ny.otda.tanf.need_standard - # Look up the main need standard for the number of (capped) people. base = p.main[capped_people] - # Add the additional need standard for the additional people. additional_need_standard = p.additional * additional_people - monthly = base + additional_need_standard - # Return annual value. - return monthly * MONTHS_IN_YEAR + return base + additional_need_standard diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py index 236bea17a1a..2f7ae5c64a1 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py @@ -5,23 +5,24 @@ class ny_tanf_resources_eligible(Variable): value_type = bool entity = SPMUnit label = "New York TANF resources eligible" - definition_period = YEAR + definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7" + ) def formula(spm_unit, period, parameters): - # The amount of assets that a family may own and qualify for FA is $2,000 - # except for households in which any member is age 60 or over in which case $3,000 in assets can be owned. - # https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7, #10 person = spm_unit.members p = parameters(period).gov.states.ny.otda.tanf.eligibility.resources - person_meets_higher_resource_limit_age = ( - person("age", period) >= p.higher_resource_limit_age_threshold + person_meets_higher_limit_age = ( + person("age", period.this_year) + >= p.higher_resource_limit_age_threshold ) - has_anyone_with_higher_resource_limit_age = spm_unit.any( - person_meets_higher_resource_limit_age + has_anyone_with_higher_limit_age = spm_unit.any( + person_meets_higher_limit_age ) resource_limit = where( - has_anyone_with_higher_resource_limit_age, + has_anyone_with_higher_limit_age, p.higher_limit, p.lower_limit, ) From 91c00e264c67b1c14700780e304eb193586796ce Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 26 Jan 2026 15:27:37 -0500 Subject: [PATCH 6/9] minor --- docs/gov/states/dc/dc_ctc.ipynb | 1 - docs/gov/states/ny/eitc.ipynb | 5 ++--- .../credits/working-families-tax-credit.ipynb | 1 - policyengine_us/entities.py | 1 - .../states/ny/otda/tanf/grant_standard/main.yaml | 2 ++ .../states/ny/otda/tanf/gross_income_test/rate.yaml | 2 +- .../income/earned_income_deduction/percent.yaml | 2 +- .../gov/states/ny/otda/tanf/max_table_size.yaml | 12 ++++++++++++ .../{eligibility => }/resources/higher_limit.yaml | 0 .../higher_resource_limit_age_threshold.yaml | 0 .../{eligibility => }/resources/lower_limit.yaml | 0 policyengine_us/system.py | 1 - policyengine_us/tools/variables.py | 6 ++---- policyengine_us/variables/gov/puf.py | 1 - .../ny_tanf_countable_gross_unearned_income.py | 3 +++ .../otda/tanf/income/ny_tanf_gross_earned_income.py | 3 +++ .../gov/states/ny/otda/tanf/ny_tanf_eligible.py | 3 +++ .../states/ny/otda/tanf/ny_tanf_grant_standard.py | 13 +++++++++---- .../states/ny/otda/tanf/ny_tanf_income_eligible.py | 4 ++++ .../states/ny/otda/tanf/ny_tanf_need_standard.py | 13 +++++++++---- .../ny/otda/tanf/ny_tanf_resources_eligible.py | 2 +- 21 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml rename policyengine_us/parameters/gov/states/ny/otda/tanf/{eligibility => }/resources/higher_limit.yaml (100%) rename policyengine_us/parameters/gov/states/ny/otda/tanf/{eligibility => }/resources/higher_resource_limit_age_threshold.yaml (100%) rename policyengine_us/parameters/gov/states/ny/otda/tanf/{eligibility => }/resources/lower_limit.yaml (100%) diff --git a/docs/gov/states/dc/dc_ctc.ipynb b/docs/gov/states/dc/dc_ctc.ipynb index 1967ae1a93a..cef3f98225e 100644 --- a/docs/gov/states/dc/dc_ctc.ipynb +++ b/docs/gov/states/dc/dc_ctc.ipynb @@ -9,7 +9,6 @@ "from policyengine_us import Microsimulation\n", "from policyengine_core.reforms import Reform\n", "\n", - "\n", "baseline = Microsimulation()\n", "baseline_person = baseline.calculate(\n", " \"household_net_income\", period=2025, map_to=\"person\"\n", diff --git a/docs/gov/states/ny/eitc.ipynb b/docs/gov/states/ny/eitc.ipynb index 52d0868c0d3..e25821c7044 100644 --- a/docs/gov/states/ny/eitc.ipynb +++ b/docs/gov/states/ny/eitc.ipynb @@ -15709,7 +15709,6 @@ "import pandas as pd\n", "import plotly.express as px\n", "\n", - "\n", "LIGHT_GRAY = \"#F5F5F5\"\n", "GRAY = \"#BDBDBD\"\n", "BLUE = \"#5091cc\"\n", @@ -18877,7 +18876,7 @@ 0, 0, 0, - -7.629394360719743e-8, + -7.629394360719743e-08, -0.11999992281198502, -0.11999999731779099, -0.11999999731779099, @@ -23777,7 +23776,7 @@ 0, 0, 0, - -7.629394360719743e-8, + -7.629394360719743e-08, -0.11999992281198502, -0.11999999731779099, -0.11999999731779099, diff --git a/docs/gov/states/wa/tax/income/credits/working-families-tax-credit.ipynb b/docs/gov/states/wa/tax/income/credits/working-families-tax-credit.ipynb index 10ec67e69b0..cb898c659a3 100644 --- a/docs/gov/states/wa/tax/income/credits/working-families-tax-credit.ipynb +++ b/docs/gov/states/wa/tax/income/credits/working-families-tax-credit.ipynb @@ -15708,7 +15708,6 @@ "import pandas as pd\n", "import plotly.express as px\n", "\n", - "\n", "LIGHT_GRAY = \"#F5F5F5\"\n", "GRAY = \"#BDBDBD\"\n", "BLUE = \"#5091cc\"\n", diff --git a/policyengine_us/entities.py b/policyengine_us/entities.py index a1a2c3154cb..b5df0552859 100644 --- a/policyengine_us/entities.py +++ b/policyengine_us/entities.py @@ -1,6 +1,5 @@ from policyengine_core.entities import build_entity - Household = build_entity( key="household", plural="households", diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml index fc7b4987891..f42dbe2f2df 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml @@ -5,6 +5,8 @@ metadata: period: month breakdown: - range(1, 7) + breakdown_label: + - Assistance unit size label: New York TANF grant standard reference: - title: New York TANF State Plan 2024-2026 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml index 1b334ceebdb..42b91fdecb6 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml @@ -6,7 +6,7 @@ metadata: label: New York TANF gross income test rate reference: - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes - href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3 values: 1997-08-20: 1.85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml index c414c8c9980..e696fc70e1f 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml @@ -6,7 +6,7 @@ metadata: label: New York TANF earned income disregard rate reference: - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes - href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3 - title: 22-ADM-11 Section IV(B) Earned Income Disregard href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml new file mode 100644 index 00000000000..e78c87a715b --- /dev/null +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml @@ -0,0 +1,12 @@ +description: New York sets this amount as the maximum household size with defined payment standards under the Temporary Assistance for Needy Families program. + +metadata: + unit: person + period: year + label: New York TANF maximum table size + reference: + - title: New York TANF State Plan 2024-2026 + href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=79 + +values: + 2012-10-01: 6 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_limit.yaml similarity index 100% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_limit.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_limit.yaml diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_resource_limit_age_threshold.yaml similarity index 100% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/higher_resource_limit_age_threshold.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_resource_limit_age_threshold.yaml diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml similarity index 100% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/eligibility/resources/lower_limit.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml diff --git a/policyengine_us/system.py b/policyengine_us/system.py index 135529126f2..3eb94b66d86 100644 --- a/policyengine_us/system.py +++ b/policyengine_us/system.py @@ -30,7 +30,6 @@ from typing import Annotated - COUNTRY_DIR = Path(__file__).parent CURRENT_YEAR = 2024 diff --git a/policyengine_us/tools/variables.py b/policyengine_us/tools/variables.py index fe9805cec7d..2ae0e45eb64 100644 --- a/policyengine_us/tools/variables.py +++ b/policyengine_us/tools/variables.py @@ -13,9 +13,7 @@ def add_n(word): def print_variable_summary(variable_name: str): variable = variables.get(variable_name) - return Markdown( - f""" + return Markdown(f""" ## {variable.name} This variable models a{add_n(variable.entity.label)}**{variable.entity.label}**'s **{variable.label}**. - """ - ) + """) diff --git a/policyengine_us/variables/gov/puf.py b/policyengine_us/variables/gov/puf.py index f52a7714344..a59c979a289 100644 --- a/policyengine_us/variables/gov/puf.py +++ b/policyengine_us/variables/gov/puf.py @@ -1,6 +1,5 @@ from policyengine_us.model_api import * - EXTRA_PUF_VARIABLES = [ "e02000", "e26270", diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py index 513ecd00ddf..6fbdccbbcc4 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py @@ -8,5 +8,8 @@ class ny_tanf_countable_gross_unearned_income(Variable): unit = USD definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3" + ) adds = "gov.hhs.tanf.cash.income.sources.unearned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py index d47c223dd7a..ceaa41b0028 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py @@ -8,5 +8,8 @@ class ny_tanf_gross_earned_income(Variable): unit = USD definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3" + ) adds = "gov.hhs.tanf.cash.income.sources.earned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py index 3ea2953950a..3d3f8870e28 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py @@ -7,6 +7,9 @@ class ny_tanf_eligible(Variable): label = "New York TANF eligible" definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=7" + ) def formula(spm_unit, period, parameters): demographic_eligible = spm_unit("is_demographic_tanf_eligible", period) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py index 67e31312de8..a63af397297 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py @@ -8,12 +8,17 @@ class ny_tanf_grant_standard(Variable): unit = USD definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1" + ) def formula(spm_unit, period, parameters): people = spm_unit("spm_unit_size", period.this_year) - capped_people = min_(people, 6).astype(int) + p = parameters(period).gov.states.ny.otda.tanf + capped_people = min_(people, p.max_table_size).astype(int) additional_people = people - capped_people - p = parameters(period).gov.states.ny.otda.tanf.grant_standard - base = p.main[capped_people] - additional_grant_standard = p.additional * additional_people + base = p.grant_standard.main[capped_people] + additional_grant_standard = ( + p.grant_standard.additional * additional_people + ) return base + additional_grant_standard diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py index 08501835b9d..75f2768c602 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py @@ -7,6 +7,10 @@ class ny_tanf_income_eligible(Variable): label = "New York TANF income eligible" definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3", + "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=2", + ) def formula(spm_unit, period, parameters): # Gross income test (only applies pre-Oct 2022) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py index 5e4b545466e..c5951b40de8 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py @@ -8,12 +8,17 @@ class ny_tanf_need_standard(Variable): unit = USD definition_period = MONTH defined_for = StateCode.NY + reference = ( + "https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1" + ) def formula(spm_unit, period, parameters): people = spm_unit("spm_unit_size", period.this_year) - capped_people = min_(people, 6).astype(int) + p = parameters(period).gov.states.ny.otda.tanf + capped_people = min_(people, p.max_table_size).astype(int) additional_people = people - capped_people - p = parameters(period).gov.states.ny.otda.tanf.need_standard - base = p.main[capped_people] - additional_need_standard = p.additional * additional_people + base = p.need_standard.main[capped_people] + additional_need_standard = ( + p.need_standard.additional * additional_people + ) return base + additional_need_standard diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py index 2f7ae5c64a1..fbb1d9c2a58 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py @@ -13,7 +13,7 @@ class ny_tanf_resources_eligible(Variable): def formula(spm_unit, period, parameters): person = spm_unit.members - p = parameters(period).gov.states.ny.otda.tanf.eligibility.resources + p = parameters(period).gov.states.ny.otda.tanf.resources person_meets_higher_limit_age = ( person("age", period.this_year) >= p.higher_resource_limit_age_threshold From 03cf9bff6e37e6d3ae15540b586ab6ff3050d83d Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 26 Jan 2026 15:38:57 -0500 Subject: [PATCH 7/9] Trigger CI From 6ec5df3e209636c63e6ea7250b302640c7cf784e Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 26 Jan 2026 18:32:18 -0500 Subject: [PATCH 8/9] a lot of changes --- .../otda/tanf/grant_standard/additional.yaml | 14 -- .../ny/otda/tanf/grant_standard/main.yaml | 28 --- .../ny/otda/tanf/gross_income_test/rate.yaml | 2 +- .../income/earned_income_deduction/flat.yaml | 6 +- .../earned_income_deduction/percent.yaml | 4 +- .../{ => need_standard}/max_table_size.yaml | 0 .../ny/otda/tanf/reform_2022/in_effect.yaml | 4 +- .../higher/age_threshold.yaml} | 2 +- .../higher/amount.yaml} | 4 +- .../tanf/resource_limit/lower/amount.yaml | 15 ++ .../ny/otda/tanf/resources/lower_limit.yaml | 13 -- .../gov/states/ny/otda/tanf/integration.yaml | 197 ++++++++++++++++++ .../gov/states/ny/otda/tanf/ny_tanf.yaml | 47 +++-- .../tanf/ny_tanf_countable_earned_income.yaml | 12 +- ..._tanf_countable_gross_unearned_income.yaml | 34 --- .../ny/otda/tanf/ny_tanf_grant_standard.yaml | 36 ---- .../tanf/ny_tanf_gross_income_eligible.yaml | 48 +++-- .../ny/otda/tanf/ny_tanf_income_eligible.yaml | 36 +++- .../otda/tanf/ny_tanf_resources_eligible.yaml | 148 ++++++++++++- .../{ => eligibility}/ny_tanf_eligible.py | 10 +- .../ny_tanf_gross_income_eligible.py | 14 +- .../ny_tanf_income_eligible.py | 25 ++- .../eligibility/ny_tanf_resources_eligible.py | 41 ++++ .../income/ny_tanf_countable_earned_income.py | 22 +- ...ny_tanf_countable_gross_unearned_income.py | 15 -- .../tanf/income/ny_tanf_countable_income.py | 18 ++ .../income/ny_tanf_gross_earned_income.py | 15 -- .../gov/states/ny/otda/tanf/ny_tanf.py | 13 +- .../otda/tanf/ny_tanf_countable_resources.py | 10 - .../ny/otda/tanf/ny_tanf_grant_standard.py | 24 --- .../ny/otda/tanf/ny_tanf_need_standard.py | 14 +- .../otda/tanf/ny_tanf_resources_eligible.py | 30 --- 32 files changed, 567 insertions(+), 334 deletions(-) delete mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml delete mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml rename policyengine_us/parameters/gov/states/ny/otda/tanf/{ => need_standard}/max_table_size.yaml (100%) rename policyengine_us/parameters/gov/states/ny/otda/tanf/{resources/higher_resource_limit_age_threshold.yaml => resource_limit/higher/age_threshold.yaml} (95%) rename policyengine_us/parameters/gov/states/ny/otda/tanf/{resources/higher_limit.yaml => resource_limit/higher/amount.yaml} (73%) create mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml delete mode 100644 policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml create mode 100644 policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml delete mode 100644 policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml rename policyengine_us/variables/gov/states/ny/otda/tanf/{ => eligibility}/ny_tanf_eligible.py (68%) rename policyengine_us/variables/gov/states/ny/otda/tanf/{ => eligibility}/ny_tanf_gross_income_eligible.py (61%) rename policyengine_us/variables/gov/states/ny/otda/tanf/{ => eligibility}/ny_tanf_income_eligible.py (62%) create mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py delete mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py create mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_income.py delete mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py delete mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py delete mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py delete mode 100644 policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml deleted file mode 100644 index 6d53856aa9e..00000000000 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/additional.yaml +++ /dev/null @@ -1,14 +0,0 @@ -description: New York provides this amount for each additional person under the Temporary Assistance for Needy Families program. - -metadata: - unit: currency-USD - period: month - label: New York TANF grant standard per additional person - reference: - - title: New York TANF State Plan 2024-2026 - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=79 - - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 - -values: - 2012-10-01: 85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml deleted file mode 100644 index f42dbe2f2df..00000000000 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/grant_standard/main.yaml +++ /dev/null @@ -1,28 +0,0 @@ -description: New York provides this amount as the grant standard under the Temporary Assistance for Needy Families program. - -metadata: - unit: currency-USD - period: month - breakdown: - - range(1, 7) - breakdown_label: - - Assistance unit size - label: New York TANF grant standard - reference: - - title: New York TANF State Plan 2024-2026 - href: https://otda.ny.gov/policy/tanf/TANF-State-Plan-2024-2026.pdf#page=79 - - title: N.Y. Comp. Codes R. & Regs. Tit. 18 § 352.1 - Standard of need for determining eligibility - href: https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1 - -1: - 2012-10-01: 158 -2: - 2012-10-01: 252 -3: - 2012-10-01: 336 -4: - 2012-10-01: 433 -5: - 2012-10-01: 534 -6: - 2012-10-01: 617 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml index 42b91fdecb6..c67490ecf55 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/gross_income_test/rate.yaml @@ -9,4 +9,4 @@ metadata: href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3 values: - 1997-08-20: 1.85 + 1998-01-01: 1.85 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml index c061f3feb7b..d8bc6e64a2d 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/flat.yaml @@ -1,7 +1,7 @@ description: New York deducts this amount as a work expense under the Temporary Assistance for Needy Families program. values: - 1997-08-20: 90 + 1998-01-01: 90 2022-10-01: 150 metadata: @@ -9,5 +9,7 @@ metadata: period: month label: New York TANF work expense disregard reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3 - title: 22-ADM-11 Section IV(B) Work Expense Disregard - href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=6 + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml index e696fc70e1f..77b3a385d63 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/income/earned_income_deduction/percent.yaml @@ -7,10 +7,12 @@ metadata: reference: - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3 + - title: GIS 22TA/DC052 Earned Income Disregard Changes + href: https://otda.ny.gov/policy/gis/2022/22DC052.pdf#page=2 - title: 22-ADM-11 Section IV(B) Earned Income Disregard href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3 values: - 1997-08-20: 0.42 + 1998-01-01: 0.42 2022-06-01: 0.55 2022-10-01: 0.50 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/max_table_size.yaml similarity index 100% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/max_table_size.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/need_standard/max_table_size.yaml diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml index 76640163d97..7316f8d3751 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/reform_2022/in_effect.yaml @@ -1,4 +1,4 @@ -description: New York applies the October 2022 TANF reforms when this is true. +description: New York uses post-October 2022 Temporary Assistance for Needy Families rules when this is true. metadata: unit: bool @@ -9,5 +9,5 @@ metadata: href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=2 values: - 1997-08-20: false + 1998-01-01: false 2022-10-01: true diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_resource_limit_age_threshold.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml similarity index 95% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_resource_limit_age_threshold.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml index 2d5a9ae682a..07f412d4f12 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_resource_limit_age_threshold.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml @@ -6,7 +6,7 @@ metadata: label: New York TANF elderly age threshold reference: - title: 22-ADM-11 Section IV(A) Resource Limit Changes - href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 values: 1997-01-01: 60 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml similarity index 73% rename from policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_limit.yaml rename to policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml index 1945753db6e..c3bc5048128 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/higher_limit.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml @@ -5,8 +5,10 @@ metadata: period: year label: New York TANF resource limit for elderly or disabled households reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=4 - title: 22-ADM-11 Section IV(A) Resource Limit Changes - href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 values: 1997-01-01: 3_000 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml new file mode 100644 index 00000000000..913dec730a2 --- /dev/null +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml @@ -0,0 +1,15 @@ +description: New York limits resources to this amount for non-elderly, non-disabled households under the Temporary Assistance for Needy Families program. + +metadata: + unit: currency-USD + period: year + label: New York TANF resource limit + reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=4 + - title: 22-ADM-11 Section IV(A) Resource Limit Changes + href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 + +values: + 1997-01-01: 2_000 + 2022-10-01: 2_500 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml deleted file mode 100644 index 67549d2f360..00000000000 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resources/lower_limit.yaml +++ /dev/null @@ -1,13 +0,0 @@ -description: New York limits resources to this amount under the Temporary Assistance for Needy Families program. - -metadata: - unit: currency-USD - period: year - label: New York TANF resource limit - reference: - - title: 22-ADM-11 Section IV(A) Resource Limit Changes - href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=5 - -values: - 1997-01-01: 2_000 - 2022-10-01: 2_500 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml new file mode 100644 index 00000000000..60518510f9d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml @@ -0,0 +1,197 @@ +# NY TANF Integration Tests +# Tests full eligibility and benefit calculation chain + +- name: Case 1, post-reform eligible family receives benefit. + period: 2023-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 + person2: + age: 5 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + output: + # Employment income: $6,000/year = $500/month + tanf_gross_earned_income: [500, 0] + + # Post-reform EID: 50% first, then $150 work expense + # $500 × 0.50 = $250, then $250 - $150 = $100 + ny_tanf_countable_earned_income: [100, 0] + + # Countable income = $100 (no unearned) + ny_tanf_countable_income: 100 + + # Need standard for 2 people = $252 + ny_tanf_need_standard: 252 + + # Resource limit: $2,500 (non-elderly), assets $1,000 → eligible + ny_tanf_resources_eligible: true + + # Income test: $100 < $252 → eligible + ny_tanf_income_eligible: true + + # Overall eligible + ny_tanf_eligible: true + + # Benefit: $252 - $100 = $152 + ny_tanf: 152 + +- name: Case 2, pre-reform family with gross income test. + period: 2022-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 4_800 + person2: + age: 8 + person3: + age: 6 + households: + household: + members: [person1, person2, person3] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_500 + output: + # Employment income: $4,800/year = $400/month + tanf_gross_earned_income: [400, 0, 0] + + # Pre-reform EID: $90 work expense first, then 42% + # $400 - $90 = $310, then $310 × 0.42 = $130.20 disregard + # Countable: $310 - $130.20 = $179.80 + ny_tanf_countable_earned_income: [179.8, 0, 0] + + # Countable income = $179.80 + ny_tanf_countable_income: 179.8 + + # Need standard for 3 people = $336 + ny_tanf_need_standard: 336 + + # Gross income test: $400 <= $336 × 1.85 = $621.60 → passes + ny_tanf_gross_income_eligible: true + + # Income test: $179.80 < $336 → eligible + ny_tanf_income_eligible: true + + # Resource limit: $2,000 (pre-reform), assets $1,500 → eligible + ny_tanf_resources_eligible: true + + # Benefit: $336 - $179.80 = $156.20 + ny_tanf: 156.2 + +- name: Case 3, elderly household qualifies for higher resource limit. + period: 2023-01 + input: + people: + person1: + age: 62 + employment_income_before_lsr: 0 + social_security: 2_400 + person2: + age: 8 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 + output: + # No earned income + ny_tanf_countable_earned_income: [0, 0] + + # Unearned: $2,400/year = $200/month + tanf_gross_unearned_income: [200, 0] + + # Countable income = $200 + ny_tanf_countable_income: 200 + + # Need standard for 2 people = $252 + ny_tanf_need_standard: 252 + + # Higher resource limit ($3,750) for age 60+ → $3,000 eligible + ny_tanf_resources_eligible: true + + # Income test: $200 < $252 → eligible + ny_tanf_income_eligible: true + + # Benefit: $252 - $200 = $52 + ny_tanf: 52 + +- name: Case 4, income exceeds needs test. + period: 2023-01 + input: + people: + person1: + age: 35 + employment_income_before_lsr: 12_000 + person2: + age: 10 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 500 + output: + # Employment income: $12,000/year = $1,000/month + tanf_gross_earned_income: [1000, 0] + + # Post-reform EID: $1,000 × 0.50 = $500, then $500 - $150 = $350 + ny_tanf_countable_earned_income: [350, 0] + + # Countable income = $350 + ny_tanf_countable_income: 350 + + # Need standard for 2 people = $252 + ny_tanf_need_standard: 252 + + # Income test: $350 >= $252 → NOT eligible + ny_tanf_income_eligible: false + + # Not eligible overall + ny_tanf_eligible: false + + # No benefit + ny_tanf: 0 + +- name: Case 5, resources exceed limit. + period: 2023-01 + input: + people: + person1: + age: 40 + employment_income_before_lsr: 3_600 + person2: + age: 7 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 + output: + # Resources: $3,000 > $2,500 limit → NOT eligible + ny_tanf_resources_eligible: false + + # Not eligible overall + ny_tanf_eligible: false + + # No benefit + ny_tanf: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml index 8b307e2f33b..6dd330eceeb 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf.yaml @@ -1,20 +1,20 @@ - name: Case 1, ineligible household gets zero. period: 2023-01 input: + state_code: NY ny_tanf_eligible: false - ny_tanf_grant_standard: 100 - ny_tanf_countable_earned_income: 0 - ny_tanf_countable_gross_unearned_income: 0 + ny_tanf_need_standard: 100 + ny_tanf_countable_income: 0 output: ny_tanf: 0 - name: Case 2, eligible household gets grant minus income. period: 2023-01 input: + state_code: NY ny_tanf_eligible: true - ny_tanf_grant_standard: 336 - ny_tanf_countable_earned_income: 100 - ny_tanf_countable_gross_unearned_income: 0 + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 100 output: # $336 - $100 = $236 ny_tanf: 236 @@ -22,20 +22,43 @@ - name: Case 3, eligible household with no income gets full grant. period: 2023-01 input: + state_code: NY ny_tanf_eligible: true - ny_tanf_grant_standard: 336 - ny_tanf_countable_earned_income: 0 - ny_tanf_countable_gross_unearned_income: 0 + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 0 output: ny_tanf: 336 - name: Case 4, countable income exceeds grant floors at zero. period: 2023-01 input: + state_code: NY ny_tanf_eligible: true - ny_tanf_grant_standard: 336 - ny_tanf_countable_earned_income: 200 - ny_tanf_countable_gross_unearned_income: 200 + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 400 output: # $336 - $400 = -$64 → floors at $0 ny_tanf: 0 + +# Pre-reform tests (2022-01) + +- name: Case 5, pre-reform eligible household gets grant minus income. + period: 2022-01 + input: + state_code: NY + ny_tanf_eligible: true + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 150 + output: + # $336 - $150 = $186 + ny_tanf: 186 + +- name: Case 6, pre-reform eligible household with no income. + period: 2022-01 + input: + state_code: NY + ny_tanf_eligible: true + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 0 + output: + ny_tanf: 336 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml index 013a39189c2..2600bf84a3b 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_earned_income.yaml @@ -5,7 +5,7 @@ period: 2023-01 input: state_code: NY - ny_tanf_gross_earned_income: 500 + tanf_gross_earned_income: 500 output: # $500 × 0.5 = $250 # $250 - $150 = $100 @@ -15,7 +15,7 @@ period: 2023-01 input: state_code: NY - ny_tanf_gross_earned_income: 200 + tanf_gross_earned_income: 200 output: # $200 × 0.5 = $100 # $100 - $150 = -$50 → floors at $0 @@ -25,7 +25,7 @@ period: 2023-01 input: state_code: NY - ny_tanf_gross_earned_income: 1_000 + tanf_gross_earned_income: 1_000 output: # $1,000 × 0.5 = $500 # $500 - $150 = $350 @@ -39,7 +39,7 @@ period: 2022-01 input: state_code: NY - ny_tanf_gross_earned_income: 500 + tanf_gross_earned_income: 500 output: # $500 - $90 = $410 # $410 × 0.58 = $237.80 @@ -49,7 +49,7 @@ period: 2022-01 input: state_code: NY - ny_tanf_gross_earned_income: 50 + tanf_gross_earned_income: 50 output: # $50 - $90 = -$40 → floors at $0 # $0 × 0.58 = $0 @@ -59,7 +59,7 @@ period: 2022-01 input: state_code: NY - ny_tanf_gross_earned_income: 1_000 + tanf_gross_earned_income: 1_000 output: # $1,000 - $90 = $910 # $910 × 0.58 = $527.80 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml deleted file mode 100644 index 7bc7d6afdb3..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_countable_gross_unearned_income.yaml +++ /dev/null @@ -1,34 +0,0 @@ -- name: Case 1, no unearned income. - period: 2023-01 - input: - state_code: NY - veterans_benefits: 0 - rental_income: 0 - alimony_income: 0 - dividend_income: 0 - interest_income: 0 - pension_income: 0 - unemployment_compensation: 0 - gi_cash_assistance: 0 - social_security: 0 - output: - ny_tanf_countable_gross_unearned_income: 0 - -- name: Case 2, various unearned income sources. - period: 2023-01 - input: - state_code: NY - veterans_benefits: 1_200 - rental_income: 1_200 - alimony_income: 1_200 - dividend_income: 1_200 - interest_income: 1_200 - pension_income: 1_200 - unemployment_compensation: 1_200 - gi_cash_assistance: 1_200 - social_security: 1_200 - output: - # Each source = $1,200/yr = $100/month - # 9 sources × $100 = $900/month - # Note: SSI is NOT counted as unearned income for TANF - ny_tanf_countable_gross_unearned_income: 900 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml deleted file mode 100644 index 1ea1080f51e..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_grant_standard.yaml +++ /dev/null @@ -1,36 +0,0 @@ -- name: Case 1, one person household. - period: 2023-01 - input: - state_code: NY - spm_unit_size: 1 - output: - # Grant standard for 1 person = $158/month - ny_tanf_grant_standard: 158 - -- name: Case 2, non-NY state returns zero. - period: 2023-01 - input: - state_code: CA - spm_unit_size: 1 - output: - ny_tanf_grant_standard: 0 - -- name: Case 3, three person household. - period: 2023-01 - input: - state_code: NY - spm_unit_size: 3 - output: - # Grant standard for 3 people = $336/month - ny_tanf_grant_standard: 336 - -- name: Case 4, ten person household. - period: 2023-01 - input: - state_code: NY - spm_unit_size: 10 - output: - # Grant standard for 6 people = $617 - # Additional 4 people at $85 each = $340 - # Total = $617 + $340 = $957/month - ny_tanf_grant_standard: 957 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml index 05dcbd4c5f0..265aee8f3c4 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.yaml @@ -1,24 +1,13 @@ -# Post-reform tests (2023-01): Gross income test eliminated -# All households pass automatically - -- name: Case 1, post-reform always passes gross income test. - period: 2023-01 - input: - state_code: NY - ny_tanf_gross_earned_income: 10_000 - ny_tanf_countable_gross_unearned_income: 5_000 - output: - ny_tanf_gross_income_eligible: true - # Pre-reform tests (2022-01): 185% gross income test applies # Gross income <= Need Standard × 1.85 -- name: Case 2, pre-reform gross income below 185% threshold. +- name: Case 1, pre-reform gross income below 185% threshold. period: 2022-01 input: people: person1: age: 30 + employment_income_before_lsr: 4_800 person2: age: 5 households: @@ -28,20 +17,19 @@ spm_units: spm_unit: members: [person1, person2] - ny_tanf_gross_earned_income: 400 - ny_tanf_countable_gross_unearned_income: 0 output: # Need standard for 2 people = $252/month # 185% threshold = $252 × 1.85 = $466.20 - # Gross income = $400 <= $466.20 → passes + # Gross income = $400/month <= $466.20 → passes ny_tanf_gross_income_eligible: true -- name: Case 3, pre-reform gross income above 185% threshold. +- name: Case 2, pre-reform gross income above 185% threshold. period: 2022-01 input: people: person1: age: 30 + employment_income_before_lsr: 6_000 person2: age: 5 households: @@ -51,10 +39,30 @@ spm_units: spm_unit: members: [person1, person2] - ny_tanf_gross_earned_income: 500 - ny_tanf_countable_gross_unearned_income: 0 output: # Need standard for 2 people = $252/month # 185% threshold = $252 × 1.85 = $466.20 - # Gross income = $500 > $466.20 → fails + # Gross income = $500/month > $466.20 → fails ny_tanf_gross_income_eligible: false + +- name: Case 3, post-reform gross income test still calculated. + period: 2023-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 4_800 + person2: + age: 5 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + output: + # Even post-reform, this variable calculates the gross income test + # (ny_tanf_income_eligible handles whether to use it) + # Gross income = $400/month <= $466.20 → passes + ny_tanf_gross_income_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml index b87cb45c76d..8352e8116a3 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml @@ -6,7 +6,7 @@ state_code: NY ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 0 - ny_tanf_countable_gross_unearned_income: 0 + tanf_gross_unearned_income: 0 output: ny_tanf_income_eligible: true @@ -16,7 +16,7 @@ state_code: NY ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 100 - ny_tanf_countable_gross_unearned_income: 100 + tanf_gross_unearned_income: 100 output: ny_tanf_income_eligible: true @@ -26,7 +26,7 @@ state_code: NY ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 200 - ny_tanf_countable_gross_unearned_income: 200 + tanf_gross_unearned_income: 200 output: ny_tanf_income_eligible: false @@ -39,7 +39,7 @@ ny_tanf_gross_income_eligible: true ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 100 - ny_tanf_countable_gross_unearned_income: 100 + tanf_gross_unearned_income: 100 output: ny_tanf_income_eligible: true @@ -50,7 +50,7 @@ ny_tanf_gross_income_eligible: false ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 100 - ny_tanf_countable_gross_unearned_income: 100 + tanf_gross_unearned_income: 100 output: ny_tanf_income_eligible: false @@ -61,6 +61,30 @@ ny_tanf_gross_income_eligible: true ny_tanf_need_standard: 336 ny_tanf_countable_earned_income: 200 - ny_tanf_countable_gross_unearned_income: 200 + tanf_gross_unearned_income: 200 output: ny_tanf_income_eligible: false + +# Boundary tests + +- name: Case 7, income exactly at need standard fails (strict less than). + period: 2023-01 + input: + state_code: NY + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 336 + tanf_gross_unearned_income: 0 + output: + # income < need_standard (strict inequality), so $336 < $336 is false + ny_tanf_income_eligible: false + +- name: Case 8, income one dollar below need standard passes. + period: 2023-01 + input: + state_code: NY + ny_tanf_need_standard: 336 + ny_tanf_countable_earned_income: 335 + tanf_gross_unearned_income: 0 + output: + # $335 < $336 is true + ny_tanf_income_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml index b3d22862f10..2fe2f17b2de 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.yaml @@ -1,11 +1,11 @@ -- name: Case 1, elderly household at higher limit. +- name: Case 1, elderly household under higher limit. period: 2023-01 input: state_code: NY age: 61 - ny_tanf_countable_resources: 3_000 + spm_unit_assets: 3_000 output: - # $3,000 limit for households with member 60+ + # $3,750 limit for households with member 60+ or disabled (post-October 2022) ny_tanf_resources_eligible: true - name: Case 2, elderly household exceeds higher limit. @@ -13,7 +13,7 @@ input: state_code: NY age: 61 - ny_tanf_countable_resources: 4_000 + spm_unit_assets: 4_000 output: ny_tanf_resources_eligible: false @@ -22,7 +22,7 @@ input: state_code: NY age: 59 - ny_tanf_countable_resources: 3_000 + spm_unit_assets: 3_000 output: # $2,500 limit for non-elderly households (post-October 2022) ny_tanf_resources_eligible: false @@ -32,6 +32,142 @@ input: state_code: NY age: 59 - ny_tanf_countable_resources: 1_500 + spm_unit_assets: 1_500 output: ny_tanf_resources_eligible: true + +# Pre-reform tests (2022-01): $2,000 standard, $3,000 elderly + +- name: Case 5, pre-reform elderly household at limit. + period: 2022-01 + input: + state_code: NY + age: 61 + spm_unit_assets: 3_000 + output: + # $3,000 limit for households with member 60+ (pre-October 2022) + ny_tanf_resources_eligible: true + +- name: Case 6, pre-reform elderly household exceeds limit. + period: 2022-01 + input: + state_code: NY + age: 61 + spm_unit_assets: 3_001 + output: + ny_tanf_resources_eligible: false + +- name: Case 7, pre-reform non-elderly household at limit. + period: 2022-01 + input: + state_code: NY + age: 59 + spm_unit_assets: 2_000 + output: + # $2,000 limit for non-elderly households (pre-October 2022) + ny_tanf_resources_eligible: true + +- name: Case 8, pre-reform non-elderly household exceeds limit. + period: 2022-01 + input: + state_code: NY + age: 59 + spm_unit_assets: 2_001 + output: + ny_tanf_resources_eligible: false + +# Boundary tests (post-reform exact limits and age threshold) + +- name: Case 9, post-reform non-elderly at exact limit passes. + period: 2023-01 + input: + state_code: NY + age: 59 + spm_unit_assets: 2_500 + output: + # resources <= $2,500 limit + ny_tanf_resources_eligible: true + +- name: Case 10, post-reform non-elderly one dollar over limit fails. + period: 2023-01 + input: + state_code: NY + age: 59 + spm_unit_assets: 2_501 + output: + ny_tanf_resources_eligible: false + +- name: Case 11, post-reform elderly at exact limit passes. + period: 2023-01 + input: + state_code: NY + age: 61 + spm_unit_assets: 3_750 + output: + # resources <= $3,750 limit + ny_tanf_resources_eligible: true + +- name: Case 12, post-reform elderly one dollar over limit fails. + period: 2023-01 + input: + state_code: NY + age: 61 + spm_unit_assets: 3_751 + output: + ny_tanf_resources_eligible: false + +- name: Case 13, age exactly at threshold qualifies for higher limit. + period: 2023-01 + input: + state_code: NY + age: 60 + spm_unit_assets: 3_000 + output: + # age >= 60, so uses $3,750 elderly limit + ny_tanf_resources_eligible: true + +# Disability tests (post-reform only: higher limit applies if 60+ OR disabled) + +- name: Case 14, post-reform disabled non-elderly qualifies for higher limit. + period: 2023-01 + input: + state_code: NY + age: 40 + is_disabled: true + spm_unit_assets: 3_000 + output: + # Disabled member qualifies for $3,750 limit per 22-ADM-11 + ny_tanf_resources_eligible: true + +- name: Case 15, disabled non-elderly exceeds higher limit. + period: 2023-01 + input: + state_code: NY + age: 40 + is_disabled: true + spm_unit_assets: 3_751 + output: + ny_tanf_resources_eligible: false + +- name: Case 16, non-disabled non-elderly uses lower limit. + period: 2023-01 + input: + state_code: NY + age: 40 + is_disabled: false + spm_unit_assets: 3_000 + output: + # No elderly or disabled member, uses $2,500 limit + ny_tanf_resources_eligible: false + +- name: Case 17, pre-reform disabled does NOT qualify for higher limit. + period: 2022-01 + input: + state_code: NY + age: 40 + is_disabled: true + spm_unit_assets: 2_500 + output: + # Pre-reform: disability did NOT qualify for higher limit + # Uses $2,000 limit, $2,500 > $2,000 → ineligible + ny_tanf_resources_eligible: false diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_eligible.py similarity index 68% rename from policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py rename to policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_eligible.py index 3d3f8870e28..895d2db1555 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_eligible.py @@ -13,6 +13,14 @@ class ny_tanf_eligible(Variable): def formula(spm_unit, period, parameters): demographic_eligible = spm_unit("is_demographic_tanf_eligible", period) + immigration_eligible = ( + add(spm_unit, period, ["is_citizen_or_legal_immigrant"]) > 0 + ) income_eligible = spm_unit("ny_tanf_income_eligible", period) asset_eligible = spm_unit("ny_tanf_resources_eligible", period) - return demographic_eligible & income_eligible & asset_eligible + return ( + demographic_eligible + & immigration_eligible + & income_eligible + & asset_eligible + ) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_gross_income_eligible.py similarity index 61% rename from policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py rename to policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_gross_income_eligible.py index df0a6ebd388..8b15fdcfd62 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_gross_income_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_gross_income_eligible.py @@ -8,25 +8,15 @@ class ny_tanf_gross_income_eligible(Variable): definition_period = MONTH defined_for = StateCode.NY reference = ( - "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf", - "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3", + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3", ) def formula(spm_unit, period, parameters): p = parameters(period).gov.states.ny.otda.tanf - - # Gross income test eliminated after October 2022 reform - if p.reform_2022.in_effect: - return True - - # Pre-October 2022: 185% gross income test gross_income = add( spm_unit, period, - [ - "ny_tanf_gross_earned_income", - "ny_tanf_countable_gross_unearned_income", - ], + ["tanf_gross_earned_income", "tanf_gross_unearned_income"], ) need_standard = spm_unit("ny_tanf_need_standard", period) return gross_income <= need_standard * p.gross_income_test.rate diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_income_eligible.py similarity index 62% rename from policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py rename to policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_income_eligible.py index 75f2768c602..317e0851380 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_income_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_income_eligible.py @@ -13,21 +13,20 @@ class ny_tanf_income_eligible(Variable): ) def formula(spm_unit, period, parameters): - # Gross income test (only applies pre-Oct 2022) + p = parameters(period).gov.states.ny.otda.tanf + + # Needs test (always applies) + countable_income = spm_unit("ny_tanf_countable_income", period) + need_standard = spm_unit("ny_tanf_need_standard", period) + needs_test_eligible = countable_income < need_standard + + # Gross income test (only applies pre-October 2022) gross_income_eligible = spm_unit( "ny_tanf_gross_income_eligible", period ) - # Needs test (always applies) - income = add( - spm_unit, - period, - [ - "ny_tanf_countable_earned_income", - "ny_tanf_countable_gross_unearned_income", - ], + return where( + p.reform_2022.in_effect, + needs_test_eligible, + gross_income_eligible & needs_test_eligible, ) - need_standard = spm_unit("ny_tanf_need_standard", period) - needs_test_eligible = income < need_standard - - return gross_income_eligible & needs_test_eligible diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py new file mode 100644 index 00000000000..01f6441aaef --- /dev/null +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py @@ -0,0 +1,41 @@ +from policyengine_us.model_api import * + + +class ny_tanf_resources_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "New York TANF resources eligible" + definition_period = MONTH + defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4", + ) + + def formula(spm_unit, period, parameters): + person = spm_unit.members + p = parameters(period).gov.states.ny.otda.tanf + + # Age 60+ always qualifies for higher limit + person_meets_age_threshold = ( + person("age", period.this_year) + >= p.resource_limit.higher.age_threshold + ) + has_elderly_member = spm_unit.any(person_meets_age_threshold) + + # Disability qualifier added by October 2022 reform + if p.reform_2022.in_effect: + person_is_disabled = person("is_disabled", period) + has_disabled_member = spm_unit.any(person_is_disabled) + qualifies_for_higher_limit = ( + has_elderly_member | has_disabled_member + ) + else: + qualifies_for_higher_limit = has_elderly_member + + resource_limit = where( + qualifies_for_higher_limit, + p.resource_limit.higher.amount, + p.resource_limit.lower.amount, + ) + resources = spm_unit("spm_unit_assets", period.this_year) + return resources <= resource_limit diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py index d4c56f102fc..c6c59a60b3d 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_earned_income.py @@ -3,29 +3,27 @@ class ny_tanf_countable_earned_income(Variable): value_type = float - entity = SPMUnit + entity = Person label = "New York TANF countable earned income" unit = USD definition_period = MONTH defined_for = StateCode.NY reference = ( - "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf", + "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3", "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=2", ) - def formula(spm_unit, period, parameters): - gross_earned = spm_unit("ny_tanf_gross_earned_income", period) + def formula(person, period, parameters): + gross_earned = person("tanf_gross_earned_income", period) p = parameters(period).gov.states.ny.otda.tanf - - eid_rate = p.income.earned_income_deduction.percent - work_expense = p.income.earned_income_deduction.flat + flat = p.income.earned_income_deduction.flat + rate = p.income.earned_income_deduction.percent if p.reform_2022.in_effect: # Post-October 2022: EID first, then work expense - # https://otda.ny.gov/policy/gis/2022/22DC085.pdf Section 2 - return max_(gross_earned * (1 - eid_rate) - work_expense, 0) + after_eid = gross_earned * (1 - rate) + return max_(after_eid - flat, 0) # Pre-October 2022: Work expense first, then EID - # https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf - after_work_expense = max_(gross_earned - work_expense, 0) - return after_work_expense * (1 - eid_rate) + after_work_expense = max_(gross_earned - flat, 0) + return after_work_expense * (1 - rate) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py deleted file mode 100644 index 6fbdccbbcc4..00000000000 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_gross_unearned_income.py +++ /dev/null @@ -1,15 +0,0 @@ -from policyengine_us.model_api import * - - -class ny_tanf_countable_gross_unearned_income(Variable): - value_type = float - entity = SPMUnit - label = "New York TANF countable gross unearned income" - unit = USD - definition_period = MONTH - defined_for = StateCode.NY - reference = ( - "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3" - ) - - adds = "gov.hhs.tanf.cash.income.sources.unearned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_income.py new file mode 100644 index 00000000000..9047186388d --- /dev/null +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_countable_income.py @@ -0,0 +1,18 @@ +from policyengine_us.model_api import * + + +class ny_tanf_countable_income(Variable): + value_type = float + entity = SPMUnit + label = "New York TANF countable income" + unit = USD + definition_period = MONTH + defined_for = StateCode.NY + reference = ( + "https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=3", + ) + + adds = [ + "ny_tanf_countable_earned_income", + "tanf_gross_unearned_income", + ] diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py b/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py deleted file mode 100644 index ceaa41b0028..00000000000 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/income/ny_tanf_gross_earned_income.py +++ /dev/null @@ -1,15 +0,0 @@ -from policyengine_us.model_api import * - - -class ny_tanf_gross_earned_income(Variable): - value_type = float - entity = SPMUnit - label = "New York TANF gross earned income" - unit = USD - definition_period = MONTH - defined_for = StateCode.NY - reference = ( - "https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=3" - ) - - adds = "gov.hhs.tanf.cash.income.sources.earned" diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py index 9d534477bcb..f19adc8f856 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf.py @@ -10,13 +10,6 @@ class ny_tanf(Variable): defined_for = "ny_tanf_eligible" def formula(spm_unit, period, parameters): - grant_standard = spm_unit("ny_tanf_grant_standard", period) - income = add( - spm_unit, - period, - [ - "ny_tanf_countable_earned_income", - "ny_tanf_countable_gross_unearned_income", - ], - ) - return max_(grant_standard - income, 0) + need_standard = spm_unit("ny_tanf_need_standard", period) + income = spm_unit("ny_tanf_countable_income", period) + return max_(need_standard - income, 0) diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py deleted file mode 100644 index 443ec51fbd3..00000000000 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_countable_resources.py +++ /dev/null @@ -1,10 +0,0 @@ -from policyengine_us.model_api import * - - -class ny_tanf_countable_resources(Variable): - value_type = float - entity = SPMUnit - label = "Countable resources for New York TANF" - unit = USD - definition_period = MONTH - defined_for = StateCode.NY diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py deleted file mode 100644 index a63af397297..00000000000 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_grant_standard.py +++ /dev/null @@ -1,24 +0,0 @@ -from policyengine_us.model_api import * - - -class ny_tanf_grant_standard(Variable): - value_type = float - entity = SPMUnit - label = "New York TANF grant standard" - unit = USD - definition_period = MONTH - defined_for = StateCode.NY - reference = ( - "https://www.law.cornell.edu/regulations/new-york/18-NYCRR-352.1" - ) - - def formula(spm_unit, period, parameters): - people = spm_unit("spm_unit_size", period.this_year) - p = parameters(period).gov.states.ny.otda.tanf - capped_people = min_(people, p.max_table_size).astype(int) - additional_people = people - capped_people - base = p.grant_standard.main[capped_people] - additional_grant_standard = ( - p.grant_standard.additional * additional_people - ) - return base + additional_grant_standard diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py index c5951b40de8..e78f6457627 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_need_standard.py @@ -13,12 +13,8 @@ class ny_tanf_need_standard(Variable): ) def formula(spm_unit, period, parameters): - people = spm_unit("spm_unit_size", period.this_year) - p = parameters(period).gov.states.ny.otda.tanf - capped_people = min_(people, p.max_table_size).astype(int) - additional_people = people - capped_people - base = p.need_standard.main[capped_people] - additional_need_standard = ( - p.need_standard.additional * additional_people - ) - return base + additional_need_standard + size = spm_unit("spm_unit_size", period.this_year) + p = parameters(period).gov.states.ny.otda.tanf.need_standard + capped_size = min_(size, p.max_table_size) + additional_size = size - capped_size + return p.main[capped_size] + p.additional * additional_size diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py deleted file mode 100644 index fbb1d9c2a58..00000000000 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/ny_tanf_resources_eligible.py +++ /dev/null @@ -1,30 +0,0 @@ -from policyengine_us.model_api import * - - -class ny_tanf_resources_eligible(Variable): - value_type = bool - entity = SPMUnit - label = "New York TANF resources eligible" - definition_period = MONTH - defined_for = StateCode.NY - reference = ( - "https://otda.ny.gov/policy/tanf/TANF-State-Plan-2021-2023.pdf#page=7" - ) - - def formula(spm_unit, period, parameters): - person = spm_unit.members - p = parameters(period).gov.states.ny.otda.tanf.resources - person_meets_higher_limit_age = ( - person("age", period.this_year) - >= p.higher_resource_limit_age_threshold - ) - has_anyone_with_higher_limit_age = spm_unit.any( - person_meets_higher_limit_age - ) - resource_limit = where( - has_anyone_with_higher_limit_age, - p.higher_limit, - p.lower_limit, - ) - countable_resources = spm_unit("ny_tanf_countable_resources", period) - return countable_resources <= resource_limit From d724d778d757f3023ea294e08b4a5c40c4046642 Mon Sep 17 00:00:00 2001 From: Ziming Date: Mon, 26 Jan 2026 18:46:21 -0500 Subject: [PATCH 9/9] adjustments --- changelog_entry.yaml | 7 +- .../resource_limit/higher/age_threshold.yaml | 2 + .../tanf/resource_limit/higher/amount.yaml | 2 +- .../tanf/resource_limit/lower/amount.yaml | 2 +- .../gov/states/ny/otda/tanf/integration.yaml | 86 +++++++++++++++++++ .../ny/otda/tanf/ny_tanf_income_eligible.yaml | 12 +++ .../eligibility/ny_tanf_resources_eligible.py | 16 ++-- 7 files changed, 115 insertions(+), 12 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 6a1fdfd4b5e..1e8fecfcef6 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,7 @@ -- bump: patch +- bump: minor changes: + added: + - NY TANF pre-October 2022 gross income test and immigration eligibility check. changed: - - NY TANF parameters backfilled to 1997 and updated with October 2022 changes per 22-ADM-11. + - NY TANF parameters backfilled to 1998 with October 2022 reform rules per 22-ADM-11. + - NY TANF earned income deduction calculation order changes by reform date. diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml index 07f412d4f12..852273c56e0 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/age_threshold.yaml @@ -5,6 +5,8 @@ metadata: period: year label: New York TANF elderly age threshold reference: + - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=9 - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml index c3bc5048128..6473cb5582e 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/higher/amount.yaml @@ -6,7 +6,7 @@ metadata: label: New York TANF resource limit for elderly or disabled households reference: - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes - href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=4 + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=9 - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 diff --git a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml index 913dec730a2..847f7e9270c 100644 --- a/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml +++ b/policyengine_us/parameters/gov/states/ny/otda/tanf/resource_limit/lower/amount.yaml @@ -6,7 +6,7 @@ metadata: label: New York TANF resource limit reference: - title: 97-ADM-23 Family Assistance/Safety Net Assistance Changes - href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=4 + href: https://otda.ny.gov/policy/directives/1997/ADM/97_ADM-23.pdf#page=9 - title: 22-ADM-11 Section IV(A) Resource Limit Changes href: https://otda.ny.gov/policy/directives/2022/ADM/22-ADM-11.pdf#page=4 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml index 60518510f9d..608f2c6f177 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/integration.yaml @@ -195,3 +195,89 @@ # No benefit ny_tanf: 0 + +- name: Case 6, post-reform eligible despite gross income exceeding 185% threshold. + period: 2023-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 7_200 + person2: + age: 5 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + output: + # Gross income: $7,200/year = $600/month + tanf_gross_earned_income: [600, 0] + + # Need standard (2 people): $252 + # 185% threshold: $252 × 1.85 = $466.20 + # Gross income $600 > $466.20 → would FAIL pre-reform! + ny_tanf_gross_income_eligible: false + + # But post-reform EID: $600 × 0.50 = $300 + # Then work expense: $300 - $150 = $150 countable + ny_tanf_countable_earned_income: [150, 0] + ny_tanf_countable_income: 150 + + # $150 < $252 need standard → PASSES needs test! + ny_tanf_income_eligible: true + + # Overall eligible (reform eliminated gross income test) + ny_tanf_eligible: true + + # Benefit: $252 - $150 = $102 + ny_tanf: 102 + +- name: Case 7, post-reform disabled non-elderly qualifies for higher resource limit. + period: 2023-01 + input: + people: + person1: + age: 40 + is_disabled: true + employment_income_before_lsr: 0 + ssi: 10_200 + person2: + age: 8 + households: + household: + members: [person1, person2] + state_code: NY + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 + output: + # No earned income + ny_tanf_countable_earned_income: [0, 0] + + # SSI: $10,200/year = $850/month (excluded from TANF income) + # No countable unearned income + tanf_gross_unearned_income: [0, 0] + ny_tanf_countable_income: 0 + + # Need standard for 2 people = $252 + ny_tanf_need_standard: 252 + + # Resources: $3,000 + # Standard limit: $2,500 → would FAIL + # But disabled member qualifies for higher limit: $3,750 + # $3,000 <= $3,750 → PASSES (post-reform disability qualifier) + ny_tanf_resources_eligible: true + + # Income test: $0 < $252 → eligible + ny_tanf_income_eligible: true + + # Overall eligible + ny_tanf_eligible: true + + # Benefit: $252 - $0 = $252 + ny_tanf: 252 diff --git a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml index 8352e8116a3..45445291eb8 100644 --- a/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml +++ b/policyengine_us/tests/policy/baseline/gov/states/ny/otda/tanf/ny_tanf_income_eligible.yaml @@ -88,3 +88,15 @@ output: # $335 < $336 is true ny_tanf_income_eligible: true + +- name: Case 9, post-reform ignores gross income test failure. + period: 2023-01 + input: + state_code: NY + ny_tanf_gross_income_eligible: false + ny_tanf_need_standard: 336 + ny_tanf_countable_income: 100 + output: + # Post-reform: gross income test is ignored + # Only needs test applies: $100 < $336 → passes + ny_tanf_income_eligible: true diff --git a/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py index 01f6441aaef..a792d91ab84 100644 --- a/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py +++ b/policyengine_us/variables/gov/states/ny/otda/tanf/eligibility/ny_tanf_resources_eligible.py @@ -23,14 +23,14 @@ def formula(spm_unit, period, parameters): has_elderly_member = spm_unit.any(person_meets_age_threshold) # Disability qualifier added by October 2022 reform - if p.reform_2022.in_effect: - person_is_disabled = person("is_disabled", period) - has_disabled_member = spm_unit.any(person_is_disabled) - qualifies_for_higher_limit = ( - has_elderly_member | has_disabled_member - ) - else: - qualifies_for_higher_limit = has_elderly_member + person_is_disabled = person("is_disabled", period) + has_disabled_member = spm_unit.any(person_is_disabled) + + qualifies_for_higher_limit = where( + p.reform_2022.in_effect, + has_elderly_member | has_disabled_member, + has_elderly_member, + ) resource_limit = where( qualifies_for_higher_limit,