diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29bb2d..62826815277 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: minor + changes: + added: + - Arizona Cash Assistance (TANF) program. diff --git a/policyengine_us/parameters/gov/hhs/fpg.yaml b/policyengine_us/parameters/gov/hhs/fpg.yaml index a2409534556..a8d69df7635 100644 --- a/policyengine_us/parameters/gov/hhs/fpg.yaml +++ b/policyengine_us/parameters/gov/hhs/fpg.yaml @@ -1,6 +1,7 @@ description: Federal poverty guidelines published by the Department of Health and Human Services. first_person: CONTIGUOUS_US: + 1992-01-01: 6_810 2015-01-01: 11_770 2016-01-01: 11_880 2017-01-01: 12_060 @@ -13,6 +14,7 @@ first_person: 2024-01-01: 15_060 2025-01-01: 15_650 AK: + 1992-01-01: 8_500 2015-01-01: 14_720 2016-01-01: 14_840 2017-01-01: 15_060 @@ -25,6 +27,7 @@ first_person: 2024-01-01: 18_810 2025-01-01: 19_550 HI: + 1992-01-01: 7_830 2015-01-01: 13_550 2016-01-01: 13_670 2017-01-01: 13_860 @@ -50,6 +53,7 @@ additional_person: # Calculated by subtracting a two-person household's line from a one-person's. # This difference is always the same for larger households. CONTIGUOUS_US: + 1992-01-01: 2_380 2015-01-01: 4_160 2016-01-01: 4_160 2017-01-01: 4_180 @@ -62,6 +66,7 @@ additional_person: 2024-01-01: 5_380 2025-01-01: 5_500 AK: + 1992-01-01: 2_980 2015-01-01: 5_200 2016-01-01: 5_200 2017-01-01: 5_230 @@ -74,6 +79,7 @@ additional_person: 2024-01-01: 6_730 2025-01-01: 6_880 HI: + 1992-01-01: 2_740 2015-01-01: 4_780 2016-01-01: 4_780 2017-01-01: 4_810 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml deleted file mode 100644 index e4fa0f7face..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/non_student.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Arizona limits the cash assistance to filers with non-student children below this age threshold. -metadata: - unit: year - label: Arizona cash assistance non-student age threshold - period: year - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Eligibility and Application - href: https://az.db101.org/az/programs/income_support/tanf/program2.htm - -values: - 2023-01-01: 18 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml deleted file mode 100644 index c84a9b9a34f..00000000000 --- a/policyengine_us/parameters/gov/states/az/hhs/tanf/eligibility/age_threshold/student.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Arizona limits the cash assistance to filers with student children below this age threshold. -metadata: - unit: year - label: Arizona cash assistance student age threshold - period: year - reference: - - title: Arizona Department of Economic Security - Cash Assistance (CA) Income Eligibility Guidelines - href: https://az.db101.org/az/programs/income_support/tanf/program2.htm - -values: - 2023-01-01: 19 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml new file mode 100644 index 00000000000..f0c8ea049d7 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/care_expenses/amounts.yaml @@ -0,0 +1,23 @@ +description: Arizona deducts this amount of dependent care expenses under the Temporary Assistance for Needy Families program. + +metadata: + type: single_amount + period: month + threshold_unit: year + amount_unit: currency-USD + label: Arizona TANF child dependent care deduction + reference: + - title: A.R.S. § 46-292(P) - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +brackets: + - threshold: + 1997-01-01: 0 + amount: + 1997-01-01: 200 + - threshold: + 1997-01-01: 2 + amount: + 1997-01-01: 175 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml new file mode 100644 index 00000000000..3663cb2554c --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/flat.yaml @@ -0,0 +1,14 @@ +description: Arizona excludes this amount of earned income under the Temporary Assistance for Needy Families program. + +metadata: + unit: currency-USD + period: month + label: Arizona TANF flat earned income disregard + reference: + - title: A.R.S. § 46-292(P) - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 90 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml new file mode 100644 index 00000000000..d7e11ed4268 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/deductions/percentage.yaml @@ -0,0 +1,14 @@ +description: Arizona excludes this share of earned income under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: month + label: Arizona TANF earned income percentage disregard + reference: + - title: A.R.S. § 46-292(P) - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 0.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml new file mode 100644 index 00000000000..2b21f3a4f15 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/base.yaml @@ -0,0 +1,14 @@ +description: Arizona limits income to this share of the federal poverty guideline under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF income limit rate + reference: + - title: Arizona DES - Cash Assistance Income Eligibility Guidelines + href: https://des.az.gov/services/child-and-family/cash-assistance/income-eligibility-guidelines + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 1 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml new file mode 100644 index 00000000000..b1cacb20b35 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/income/fpg_limit/non_parent.yaml @@ -0,0 +1,14 @@ +description: Arizona limits income to this share of the federal poverty guideline for non-parent relative households under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF non-parent income limit rate + reference: + - title: A.R.S. § 46-292(Q) - Eligibility for assistance + href: https://www.azleg.gov/ars/46/00292.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=18 + +values: + 1997-01-01: 1.3 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml new file mode 100644 index 00000000000..348ac0a64fb --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/rate.yaml @@ -0,0 +1,26 @@ +description: Arizona uses this share of the 1992 federal poverty guideline as the payment standard under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF payment standard rate + reference: + - title: A.R.S. § 46-207.01 - Temporary assistance for needy families; amount of cash assistance + href: https://www.azleg.gov/ars/46/00207-01.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=21 + - title: Arizona DES CNAP Manual - What's Changed 11/27/2023 (TANF Benefit Amount Increase effective 12/01/2023) + href: https://dbmefaapolicy.azdes.gov/Archived_Policy/baggage/2023-11-27_WhatChanged.pdf#page=1 + +# Per A.R.S. § 46-207.01: "shall not be less than thirty-six per cent of the 1992 federal poverty level" +values: + # Statutory floor per A.R.S. 46-207.01 + 1997-01-01: 0.36 + # 20% benefit cut during Great Recession (0.36 * 0.80 = 0.288) + # Sources: CBPP, CLASP, Arizona Center for Economic Progress + # https://www.cbpp.org/blog/arizonas-tanf-experience-highlights-problems-with-block-granting-safety-net-programs + # https://www.clasp.org/blog/arizona-cuts-tanf-lifetime-limit-12-months-harshest-country/ + # https://azeconcenter.org/propublica-feature-strengthens-case-for-improving-cash-assistance-in-arizona/ + 2009-07-01: 0.288 + # Restored to statutory floor + 2023-12-01: 0.36 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml new file mode 100644 index 00000000000..47df41c0f4b --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/payment_standard/reduction.yaml @@ -0,0 +1,17 @@ +description: Arizona sets this share as the payment standard reduction for recipients without shelter costs under the Temporary Assistance for Needy Families program. + +metadata: + unit: /1 + period: year + label: Arizona TANF payment standard reduction rate + reference: + - title: A.R.S. § 46-207(D) - Grant plus income; uniform assistance plan; amount of assistance + href: https://www.azleg.gov/ars/46/00207.htm + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=21 + +# Per A.R.S. § 46-207: "the department shall reduce the federal poverty level used in +# its calculation of payments by thirty-seven per cent if the person is not paying, +# or is not obligated to pay, shelter costs on his place of residence" +values: + 1997-01-01: 0.37 diff --git a/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml new file mode 100644 index 00000000000..5a26cd00b19 --- /dev/null +++ b/policyengine_us/parameters/gov/states/az/hhs/tanf/resources/limit.yaml @@ -0,0 +1,14 @@ +description: Arizona limits resources to this amount under the Temporary Assistance for Needy Families program. + +values: + 1997-01-01: 2_000 + +metadata: + unit: currency-USD + period: month + label: Arizona TANF resource limit + reference: + - title: Arizona DES - Cash Assistance Income Eligibility Guidelines + href: https://des.az.gov/services/child-and-family/cash-assistance/income-eligibility-guidelines + - title: 2023 Arizona TANF State Plan + href: https://des.az.gov/sites/default/files/dl/tanf_state_plan_oct_2023.pdf#page=20 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml new file mode 100644 index 00000000000..55f3c7caca1 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf.yaml @@ -0,0 +1,218 @@ +# Unit tests for Arizona TANF benefit amount +# Benefit = Payment Standard - Countable Income (if eligible) +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, full benefit with no income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Family of 2, with shelter (A1) + # Payment standard: ~$276 + # Countable income: $0 + # Benefit: $276 - $0 = $276 + az_tanf: 276 + +- name: Case 2, partial benefit with income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Payment standard (A1 for family of 2): ~$276 + # Benefit: $276 - $147 = $129 + az_tanf: 129 + +- name: Case 3, no benefit due to high income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 24_000 # $2,000/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # High income - ineligible, benefit = 0 + az_tanf: 0 + +- name: Case 4, larger family full benefit. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Family of 3, with shelter (A1) + # Payment standard: ~$347 + # Countable income: $0 + # Benefit: $347 + az_tanf: 347 + +- name: Case 5, benefit with unearned income. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + child_support_received: 1_200 # $100/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Unearned income (no disregard): $100 + # Payment standard (A1 for family of 2): ~$276 + # Benefit: $276 - $100 = $176 + az_tanf: 176 + +- name: Case 6, benefit with lower payment standard (A2 - no shelter). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Family of 2, no shelter (A2) + # A2 = A1 × (1 - 37%) = 36% × 63% = 22.68% + # Payment standard: $765.83 * 0.2268 = ~$174 + # Countable income: $0 + # Benefit: $174 + az_tanf: 174 + +- name: Case 7, eligible but zero benefit. + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 0 # A2 lower standard + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $500 - $90 = $410, * 0.70 = $287 + # Payment standard (A2 for family of 2): ~$174 + # $287 > $174 - income exceeds payment standard + # Benefit: max($174 - $287, 0) = $0 + az_tanf: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml new file mode 100644 index 00000000000..a062258a746 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_earned_income.yaml @@ -0,0 +1,116 @@ +# Unit tests for Arizona TANF countable earned income at SPMUnit level +# Sums person-level earned income after disregards, minus dependent care deduction +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no earned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_countable_earned_income: 0 + +- name: Case 2, single earner. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $500 - $90 flat = $410, * 0.70 = $287 + # No dependent care deduction + az_tanf_countable_earned_income: 287 + +- name: Case 3, two earners. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + person2: + age: 28 + employment_income_before_lsr: 4_800 # $400/month annual + person3: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Person2: $400 - $90 = $310, * 0.70 = $217 + # Total: $287 + $217 = $504 + az_tanf_countable_earned_income: 504 + +- name: Case 4, single earner with dependent care. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Dependent care: min($300, $200) = $200 (child under 2) + # Countable earned: $287 - $200 = $87 + az_tanf_countable_earned_income: 87 + +- name: Case 5, earned income less than dependent care deduction. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 1_200 # $100/month annual + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Person1: $100 - $90 = $10, * 0.70 = $7 + # Dependent care: min($300, $200) = $200 + # Countable earned: max($7 - $200, 0) = $0 + az_tanf_countable_earned_income: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml new file mode 100644 index 00000000000..2090267d4c6 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_countable_income.yaml @@ -0,0 +1,116 @@ +# Unit tests for Arizona TANF countable income +# Combines countable earned income + gross unearned income +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_countable_income: 0 + +- name: Case 2, earned income only. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $287 (after disregards) + # Unearned: $0 + # Total: $287 + az_tanf_countable_income: 287 + +- name: Case 3, unearned income only. + period: 2024-01 + input: + people: + person1: + age: 30 + child_support_received: 2_400 # $200/month annual unearned + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $0 + # Unearned: $200 (no disregard on unearned) + # Total: $200 + az_tanf_countable_income: 200 + +- name: Case 4, mixed earned and unearned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + child_support_received: 1_200 # $100/month annual unearned + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $287 (after disregards) + # Unearned: $100 (no disregard) + # Total: $387 + az_tanf_countable_income: 387 + +- name: Case 5, mixed income with dependent care. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + child_support_received: 1_200 # $100/month annual unearned + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Earned after disregards: $287 + # Dependent care deduction: $200 (child under 2) + # Countable earned: $287 - $200 = $87 + # Unearned: $100 + # Total: $187 + az_tanf_countable_income: 187 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml new file mode 100644 index 00000000000..125dc2bbc8b --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_dependent_care_deduction.yaml @@ -0,0 +1,157 @@ +# Unit tests for Arizona TANF dependent care deduction +# Child under 2: $200/month max, Child 2+: $175/month max +# Deduction capped at actual childcare expenses +# Reference: https://www.azleg.gov/ars/46/00292.htm + +- name: Case 1, no childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_dependent_care_deduction: 0 + +- name: Case 2, child under 2 with expenses exceeding max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child under 2: max $200/month + # Expenses ($300/mo) > max ($200), so deduction = $200 + az_tanf_dependent_care_deduction: 200 + +- name: Case 3, child age 2+ with expenses exceeding max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 4 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child age 2+: max $175/month + # Expenses ($300/mo) > max ($175), so deduction = $175 + az_tanf_dependent_care_deduction: 175 + +- name: Case 4, expenses less than max. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 1_800 # $150/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child under 2: max $200/month + # Expenses ($150/mo) < max ($200), so deduction = $150 + az_tanf_dependent_care_deduction: 150 + +- name: Case 5, two children with combined deduction. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 1 + is_tax_unit_dependent: true + person3: + age: 4 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2, person3] + childcare_expenses: 6_000 # $500/month annual + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Child1 (under 2): max $200 + # Child2 (age 2+): max $175 + # Total max: $375 + # Expenses ($500/mo) > max ($375), so deduction = $375 + az_tanf_dependent_care_deduction: 375 + +- name: Case 6, child exactly at age 2 boundary. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 2 + is_tax_unit_dependent: true + spm_units: + spm_unit: + members: [person1, person2] + childcare_expenses: 3_000 # $250/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Child at age 2: $175/month max (not $200) + # Expenses ($250/mo) > max ($175), so deduction = $175 + az_tanf_dependent_care_deduction: 175 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml new file mode 100644 index 00000000000..f93d5009c13 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_earned_income_after_disregard_person.yaml @@ -0,0 +1,96 @@ +# Unit tests for Arizona TANF earned income after disregard per person +# $90 flat disregard, then 30% percentage disregard +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, no earned income. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 0 + households: + household: + members: [person1] + state_code: AZ + output: + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 2, $500 monthly earned income. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 6_000 # $500/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $500 + # After $90 flat: $500 - $90 = $410 + # After 30% disregard: $410 * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287] + +- name: Case 3, $400 monthly earned income. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 4_800 # $400/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $400 + # After $90 flat: $400 - $90 = $310 + # After 30% disregard: $310 * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217] + +- name: Case 4, earned income below $90 flat disregard. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 600 # $50/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $50 + # After $90 flat: max($50 - $90, 0) = $0 + # After 30% disregard: $0 * 0.70 = $0 + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 5, earned income exactly $90. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 1_080 # $90/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $90 + # After $90 flat: $90 - $90 = $0 + # After 30% disregard: $0 + az_tanf_earned_income_after_disregard_person: [0] + +- name: Case 6, higher earned income. + period: 2024-01 + input: + people: + person1: + employment_income_before_lsr: 12_000 # $1,000/month annual + households: + household: + members: [person1] + state_code: AZ + output: + # Monthly gross: $1,000 + # After $90 flat: $1,000 - $90 = $910 + # After 30% disregard: $910 * 0.70 = $637 + az_tanf_earned_income_after_disregard_person: [637] diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml new file mode 100644 index 00000000000..aa4972efb8d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_eligible.yaml @@ -0,0 +1,278 @@ +# Unit tests for Arizona TANF eligibility +# Requires: demographic eligibility, immigration eligibility, income eligibility, resource eligibility +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, eligible family with minor child. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_eligible: true + +- name: Case 2, ineligible due to no minor child. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + spm_units: + spm_unit: + members: [person1] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # No minor child (single adult) - fails demographic eligibility + az_tanf_eligible: false + +- name: Case 3, ineligible due to high income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 24_000 # $2,000/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # High income fails income test + # $2,000 - $90 = $1,910, * 0.70 = $1,337 countable + # Payment standard (A1 for 2): ~$276 + # $1,337 > $276 - fails income eligibility + az_tanf_eligible: false + +- name: Case 4, ineligible due to high assets. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $3,000 > $2,000 resource limit + az_tanf_eligible: false + +- name: Case 5, eligible pregnant woman. + period: 2024-01 + input: + people: + person1: + age: 25 + employment_income_before_lsr: 0 + is_tax_unit_head: true + is_pregnant: true + spm_units: + spm_unit: + members: [person1] + spm_unit_assets: 500 + housing_cost: 400 + tax_units: + tax_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # Pregnant woman is demographically eligible + az_tanf_eligible: true + +- name: Case 6, eligible family at income threshold. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_500 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Family of 3 with low income + # Countable income: ($300 - $90) * 0.70 = $147 + # Payment standard (A1): ~$347 + # $147 < $347 - eligible + az_tanf_eligible: true + +- name: Case 7, ineligible due to undocumented immigration status. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + immigration_status: UNDOCUMENTED + person2: + age: 5 + immigration_status: UNDOCUMENTED + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Both members undocumented - fails immigration eligibility + az_tanf_eligible: false + +- name: Case 8, eligible legal permanent resident. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + immigration_status: LEGAL_PERMANENT_RESIDENT + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # LPR is qualified alien - eligible + az_tanf_eligible: true + +- name: Case 9, resources exactly at limit. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_000 # Exactly at $2,000 limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources exactly at $2,000 limit - eligible + az_tanf_eligible: true + +- name: Case 10, resources one dollar over limit. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_001 # $1 over limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources $1 over limit - ineligible + az_tanf_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml new file mode 100644 index 00000000000..a4904f58748 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_baseline.yaml @@ -0,0 +1,109 @@ +# Unit tests for Arizona TANF 1992 FPG baseline +# Arizona uses 1992 FPG values for payment standard calculations +# 1992 FPG (CONTIGUOUS_US): first_person = $6,810, additional = $2,380 +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, family of 1. + period: 2024 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + households: + household: + members: [person1] + state_code: AZ + output: + # 1 person: $6,810 + az_tanf_fpg_baseline: 6_810 + +- name: Case 2, family of 2. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 2 persons: $6,810 + $2,380 = $9,190 + az_tanf_fpg_baseline: 9_190 + +- name: Case 3, family of 3. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 3 persons: $6,810 + 2*$2,380 = $11,570 + az_tanf_fpg_baseline: 11_570 + +- name: Case 4, family of 4. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + person4: + age: 1 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # 4 persons: $6,810 + 3*$2,380 = $13,950 + az_tanf_fpg_baseline: 13_950 + +- name: Case 5, family of 5. + period: 2024 + input: + people: + person1: + age: 30 + person2: + age: 28 + person3: + age: 10 + person4: + age: 8 + person5: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # 5 persons: $6,810 + 4*$2,380 = $16,330 + az_tanf_fpg_baseline: 16_330 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml new file mode 100644 index 00000000000..5c422bc4780 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_fpg_rate.yaml @@ -0,0 +1,78 @@ +# Unit tests for Arizona TANF FPG rate (needy family test) +# Parents: 100% FPG, Non-parent relatives: 130% FPG +# Reference: https://dbmefaapolicy.azdes.gov/index.html#page/FAA5/CA_Benefit_Determination.html + +- name: Case 1, parent caregiver. + period: 2024-01 + input: + people: + person1: + age: 30 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Parent head gets 100% FPG rate + az_tanf_fpg_rate: 1 + +- name: Case 2, non-parent relative caregiver. + period: 2024-01 + input: + people: + person1: + age: 50 + is_tax_unit_head: true + own_children_in_household: 0 + person2: + age: 10 + spm_units: + spm_unit: + members: [person1, person2] + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Non-parent relative gets 130% FPG rate + az_tanf_fpg_rate: 1.3 + +- name: Case 3, two parents. + period: 2024-01 + input: + people: + person1: + age: 35 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 33 + own_children_in_household: 1 + person3: + age: 8 + spm_units: + spm_unit: + members: [person1, person2, person3] + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Has parent head, gets 100% FPG rate + az_tanf_fpg_rate: 1 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml new file mode 100644 index 00000000000..8f442513d20 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_income_eligible.yaml @@ -0,0 +1,149 @@ +# Unit tests for Arizona TANF income eligibility +# Must pass both: (1) needy family test (income <= FPG rate * current FPG) +# (2) payment standard test (income <= payment standard) +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines + +- name: Case 1, no income eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Zero income passes both tests + az_tanf_income_eligible: true + +- name: Case 2, low income eligible with shelter. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Payment standard (A1 for family of 2): ~$276 + # 2024 annual FPG for 2: ~$20,440 (100% FPG for parent) + # $147 < $276 (payment standard test passes) + # $147 < $20,440 (needy family test passes) + az_tanf_income_eligible: true + +- name: Case 3, income exceeds payment standard. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 9_600 # $800/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $800 - $90 = $710, * 0.70 = $497 + # Payment standard (A1 for family of 2): ~$276 + # $497 > $276 (payment standard test FAILS) + az_tanf_income_eligible: false + +- name: Case 4, low income without shelter eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 1_800 # $150/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 0 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Countable earned: $150 - $90 = $60, * 0.70 = $42 + # Payment standard (A2 for family of 2): ~$176 + # $42 < $176 (passes both tests) + az_tanf_income_eligible: true + +- name: Case 5, larger family with unearned income. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 3_600 # $300/month annual + child_support_received: 600 # $50/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Countable earned: $300 - $90 = $210, * 0.70 = $147 + # Unearned: $50 + # Total countable: $197 + # Payment standard (A1 for family of 3): ~$347 + # $197 < $347 (passes) + az_tanf_income_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml new file mode 100644 index 00000000000..690c678035f --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_payment_standard.yaml @@ -0,0 +1,162 @@ +# Unit tests for Arizona TANF payment standard +# A1 (with shelter): 36% of 1992 FPG monthly baseline per A.R.S. § 46-207.01 +# A2 (without shelter): A1 reduced by 37% per A.R.S. § 46-207 = 36% × 63% = 22.68% +# Reference: https://www.azleg.gov/ars/46/00207-01.htm, https://www.azleg.gov/ars/46/00207.htm + +- name: Case 1, family of 2 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 500 # $500/month rent + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 1992 FPG for 2: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 + az_tanf_payment_standard: 276 + +- name: Case 2, family of 2 without shelter costs (A2). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + housing_cost: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # 1992 FPG for 2: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A2: A1 reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $765.83 * 0.36 * 0.63 = $173.68 + az_tanf_payment_standard: 174 + +- name: Case 3, family of 3 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 600 + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 1992 FPG for 3: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate: 36% + # Payment standard: $964.17 * 0.36 = $347.10 + az_tanf_payment_standard: 347 + +- name: Case 4, family of 3 without shelter costs (A2). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + housing_cost: 0 + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # 1992 FPG for 3: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A2: A1 reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $964.17 * 0.36 * 0.63 = $218.67 + az_tanf_payment_standard: 219 + +- name: Case 5, family of 4 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 5 + person3: + age: 3 + person4: + age: 1 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + housing_cost: 700 + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # 1992 FPG for 4: $13,950 annual + # Monthly: $13,950 / 12 = $1,162.50 + # A1 rate: 36% + # Payment standard: $1,162.50 * 0.36 = $418.50 + az_tanf_payment_standard: 419 + +- name: Case 6, family of 5 with shelter costs (A1). + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + person2: + age: 28 + person3: + age: 10 + person4: + age: 8 + person5: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + housing_cost: 800 + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # 1992 FPG for 5: $16,330 annual + # Monthly: $16,330 / 12 = $1,360.83 + # A1 rate: 36% + # Payment standard: $1,360.83 * 0.36 = $489.90 + az_tanf_payment_standard: 490 diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml new file mode 100644 index 00000000000..d3c7f755946 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/az_tanf_resources_eligible.yaml @@ -0,0 +1,102 @@ +# Unit tests for Arizona TANF resources eligibility +# Resource limit: $2,000 +# Reference: https://az.db101.org/az/programs/income_support/tanf/program2.htm + +- name: Case 1, no assets. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 0 + households: + household: + members: [person1, person2] + state_code: AZ + output: + az_tanf_resources_eligible: true + +- name: Case 2, assets below limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_500 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $1,500 < $2,000 limit + az_tanf_resources_eligible: true + +- name: Case 3, assets at limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_000 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $2,000 = $2,000 limit (eligible at limit) + az_tanf_resources_eligible: true + +- name: Case 4, assets exceed limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 2_500 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $2,500 > $2,000 limit + az_tanf_resources_eligible: false + +- name: Case 5, assets significantly exceed limit. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 5_000 + households: + household: + members: [person1, person2] + state_code: AZ + output: + # $5,000 > $2,000 limit + az_tanf_resources_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml deleted file mode 100644 index 265ee093ba2..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.yaml +++ /dev/null @@ -1,35 +0,0 @@ -- name: Eligible non-student - period: 2023 - input: - state_code: AZ - age: 17 - is_full_time_student: false - output: - az_tanf_eligible_child: true - -- name: Not eligible non-student - period: 2023 - input: - state_code: AZ - age: 18 - is_full_time_student: false - output: - az_tanf_eligible_child: false - -- name: Eligible student - period: 2023 - input: - state_code: AZ - age: 18 - is_full_time_student: true - output: - az_tanf_eligible_child: true - -- name: Not eligible student - period: 2023 - input: - state_code: AZ - age: 19 - is_full_time_student: true - output: - az_tanf_eligible_child: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml new file mode 100644 index 00000000000..0fec6153a97 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/az/hhs/tanf/integration.yaml @@ -0,0 +1,573 @@ +# Integration tests for Arizona TANF - full pipeline testing +# Tests realistic family scenarios with complete eligibility and benefit calculations +# Reference: https://des.az.gov/services/child-and-family/cash-assistance/cash-assistance-ca-income-eligibility-guidelines +# +# Key Arizona TANF rules: +# - Earned income disregard: $90 flat + 30% of remainder +# - Payment standard: A1 (36% of 1992 FPG) with shelter, A2 (A1 reduced by 37%) without +# - 1992 FPG (CONTIGUOUS_US): first_person = $6,810, additional = $2,380 +# - Resource limit: $2,000 +# - Needy family test: FPG rate * current FPG (100% for parents, 130% for non-parent relatives) + +- name: Scenario 1, single parent with 2 children, no income - full benefit. + # Family of 3, no income, receives full A1 payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + az_tanf_earned_income_after_disregard_person: [0, 0, 0] + az_tanf_countable_earned_income: 0 + az_tanf_countable_income: 0 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate (with shelter): 36% + # Payment standard: $964.17 * 0.36 = $347.10 + az_tanf_payment_standard: 347 + # Benefit: $347 - $0 = $347 + az_tanf: 347 + +- name: Scenario 2, family of 3 with $500 monthly earnings. + # Standard earned income calculation with $90 flat + 30% disregard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 28 + employment_income_before_lsr: 6_000 # $500/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 4 + person3: + age: 2 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 500 + housing_cost: 550 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + # Person1: $500 - $90 flat = $410, * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287, 0, 0] + az_tanf_countable_earned_income: 287 + az_tanf_countable_income: 287 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Payment standard (family of 3, A1): $347 + az_tanf_payment_standard: 347 + # Benefit: $347 - $287 = $60 + az_tanf: 60 + +- name: Scenario 3, single parent with one child, with childcare. + # Family of 2, earned income with dependent care deduction + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 35 + employment_income_before_lsr: 6_000 # $500/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 1 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 800 + housing_cost: 400 + childcare_expenses: 3_600 # $300/month annual + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1: $500 - $90 = $410, * 0.70 = $287 + az_tanf_earned_income_after_disregard_person: [287, 0] + # Dependent care for child under 2: min($300, $200) = $200 + az_tanf_dependent_care_deduction: 200 + # Countable earned: $287 - $200 = $87 + az_tanf_countable_earned_income: 87 + az_tanf_countable_income: 87 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 2, 1992 FPG: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 ~ $276 + az_tanf_payment_standard: 276 + # Benefit: $276 - $87 = $189 + az_tanf: 189 + +- name: Scenario 4, family ineligible due to income exceeding payment standard. + # Gross income passes needy family test, but countable exceeds payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 32 + employment_income_before_lsr: 9_600 # $800/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 7 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_200 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1: $800 - $90 = $710, * 0.70 = $497 + az_tanf_earned_income_after_disregard_person: [497, 0] + az_tanf_countable_earned_income: 497 + az_tanf_countable_income: 497 + # Payment standard (A1 for family of 2): ~$276 + az_tanf_payment_standard: 276 + # $497 > $276 - fails payment standard test + az_tanf_income_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 5, ineligible due to excess resources. + # Income eligible but assets exceed $2,000 limit + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 3_000 # Exceeds $2,000 limit + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Resources exceed limit + az_tanf_resources_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 6, combined earned and unearned income. + # Tests handling of both income types + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 29 + employment_income_before_lsr: 4_800 # $400/month annual + child_support_received: 1_200 # $100/month annual unearned + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 4 + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_000 + housing_cost: 450 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Income calculation + # Person1 earned: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217, 0] + az_tanf_countable_earned_income: 217 + # Unearned (child support): $100 (no disregard) + # Total countable: $217 + $100 = $317 + az_tanf_countable_income: 317 + # Eligibility + az_tanf_resources_eligible: true + # Payment standard (A1 for family of 2): ~$276 + az_tanf_payment_standard: 276 + # $317 > $276 - fails payment standard test + az_tanf_income_eligible: false + az_tanf_eligible: false + az_tanf: 0 + +- name: Scenario 7, large family of 5 with partial benefit. + # Tests larger family size payment standard + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 38 + employment_income_before_lsr: 4_800 # $400/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 36 + own_children_in_household: 1 + person3: + age: 14 + person4: + age: 10 + person5: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5] + spm_unit_assets: 1_500 + housing_cost: 800 + tax_units: + tax_unit: + members: [person1, person2, person3, person4, person5] + households: + household: + members: [person1, person2, person3, person4, person5] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, false, true, true, true] + # Income calculation + # Person1: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [217, 0, 0, 0, 0] + az_tanf_countable_earned_income: 217 + az_tanf_countable_income: 217 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 5, 1992 FPG: $16,330 annual + # Monthly: $16,330 / 12 = $1,360.83 + # A1 rate: 36% + # Payment standard: $1,360.83 * 0.36 = $489.90 ~ $490 + az_tanf_payment_standard: 490 + # Benefit: $490 - $217 = $273 + az_tanf: 273 + +- name: Scenario 8, two working adults with childcare. + # Multi-earner household with dependent care deduction + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 # $500/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 28 + employment_income_before_lsr: 4_800 # $400/month annual + own_children_in_household: 1 + person3: + age: 1 + is_child: true + person4: + age: 4 + is_child: true + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + spm_unit_assets: 1_200 + housing_cost: 700 + childcare_expenses: 6_000 # $500/month annual + tax_units: + tax_unit: + members: [person1, person2, person3, person4] + households: + household: + members: [person1, person2, person3, person4] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, false, true, true] + # Income calculation + # Person1: $500 - $90 = $410, * 0.70 = $287 + # Person2: $400 - $90 = $310, * 0.70 = $217 + az_tanf_earned_income_after_disregard_person: [287, 217, 0, 0] + # Total after disregards: $287 + $217 = $504 + # Dependent care: child under 2 ($200) + child 2+ ($175) = $375 + az_tanf_dependent_care_deduction: 375 + # Countable earned: $504 - $375 = $129 + az_tanf_countable_earned_income: 129 + az_tanf_countable_income: 129 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 4, 1992 FPG: $13,950 annual + # Monthly: $13,950 / 12 = $1,162.50 + # A1 rate: 36% + # Payment standard: $1,162.50 * 0.36 = $418.50 ~ $419 + az_tanf_payment_standard: 419 + # Benefit: $419 - $129 = $290 + az_tanf: 290 + +- name: Scenario 9, family without shelter costs (A2 payment standard). + # Tests lower A2 payment standard without shelter costs + period: 2024-01 + absolute_error_margin: 1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 1_800 # $150/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 500 + housing_cost: 0 # No shelter costs + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation + # Person1: $150 - $90 = $60, * 0.70 = $42 + az_tanf_earned_income_after_disregard_person: [42, 0, 0] + az_tanf_countable_earned_income: 42 + az_tanf_countable_income: 42 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A2: A1 (36%) reduced by 37% = 36% × 63% = 22.68% + # Payment standard: $964.17 * 0.36 * 0.63 = $218.67 ~ $219 + az_tanf_payment_standard: 219 + # Benefit: $219 - $42 = $177 + az_tanf: 177 + +- name: Scenario 10, historical period with 20% benefit cut (2023). + # Tests the reduced benefit rate during 2009-2023 period (0.288 instead of 0.36) + # Reference: Arizona implemented 20% cut during Great Recession (restored Dec 2023) + period: 2023-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 0 + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 5 + person3: + age: 3 + spm_units: + spm_unit: + members: [person1, person2, person3] + spm_unit_assets: 1_000 + housing_cost: 600 + tax_units: + tax_unit: + members: [person1, person2, person3] + households: + household: + members: [person1, person2, person3] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true, true] + # Income calculation - no income + az_tanf_countable_income: 0 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 3, 1992 FPG: $11,570 annual + # Monthly: $11,570 / 12 = $964.17 + # A1 rate in 2023: 28.8% (20% cut from 36%) + # Payment standard: $964.17 * 0.288 = $277.68 + az_tanf_payment_standard: 277.68 + # Benefit: $277.68 - $0 = $277.68 + az_tanf: 277.68 + +- name: Scenario 11, non-parent relative caretaker with income. + # Tests 130% FPG rate for non-parent relative (grandparent caring for grandchild) + # Reference: A.R.S. § 46-292 - non-parent relative cases have 130% FPG limit + period: 2024-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 55 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 0 # Not the parent + person2: + age: 8 + is_child: true + spm_units: + spm_unit: + members: [person1, person2] + spm_unit_assets: 1_500 + housing_cost: 500 + tax_units: + tax_unit: + members: [person1, person2] + households: + household: + members: [person1, person2] + state_code: AZ + output: + # Demographics + is_person_demographic_tanf_eligible: [false, true] + # Non-parent relative case: head has no own children, unit has children + az_tanf_fpg_rate: 1.3 # 130% FPG rate for non-parent relative + # Income calculation + # Person1: $300 - $90 = $210, * 0.70 = $147 + az_tanf_earned_income_after_disregard_person: [147, 0] + az_tanf_countable_earned_income: 147 + az_tanf_countable_income: 147 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 2, 1992 FPG: $9,190 annual + # Monthly: $9,190 / 12 = $765.83 + # A1 rate: 36% + # Payment standard: $765.83 * 0.36 = $275.70 + az_tanf_payment_standard: 275.7 + # Benefit: $275.70 - $147 = $128.70 + az_tanf: 128.7 + +- name: Scenario 12, large family of 6 members. + # Tests payment standard extrapolation for family size > 5 + # 1992 FPG formula: $6,810 + (n-1) * $2,380 + period: 2024-01 + absolute_error_margin: 0.1 + input: + people: + person1: + age: 40 + employment_income_before_lsr: 3_600 # $300/month annual + is_tax_unit_head: true + own_children_in_household: 1 + person2: + age: 38 + own_children_in_household: 1 + person3: + age: 16 + person4: + age: 12 + person5: + age: 8 + person6: + age: 4 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5, person6] + spm_unit_assets: 1_800 + housing_cost: 900 + tax_units: + tax_unit: + members: [person1, person2, person3, person4, person5, person6] + households: + household: + members: [person1, person2, person3, person4, person5, person6] + state_code: AZ + output: + # Demographics - only children under 18 are demographically eligible + is_person_demographic_tanf_eligible: [false, false, true, true, true, true] + # Income calculation + # Person1: $300 - $90 = $210, * 0.70 = $147 + az_tanf_earned_income_after_disregard_person: [147, 0, 0, 0, 0, 0] + az_tanf_countable_earned_income: 147 + az_tanf_countable_income: 147 + # Eligibility + az_tanf_resources_eligible: true + az_tanf_income_eligible: true + az_tanf_eligible: true + # Family of 6, 1992 FPG: $6,810 + 5*$2,380 = $18,710 annual + # Monthly: $18,710 / 12 = $1,559.17 + # A1 rate: 36% + # Payment standard: $1,559.17 * 0.36 = $561.30 + az_tanf_payment_standard: 561.3 + # Benefit: $561.30 - $147 = $414.30 + az_tanf: 414.3 diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py new file mode 100644 index 00000000000..809b74df277 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/az_tanf.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class az_tanf(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF" + unit = USD + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00207-01.htm" + defined_for = "az_tanf_eligible" + + def formula(spm_unit, period, parameters): + payment_standard = spm_unit("az_tanf_payment_standard", period) + countable_income = spm_unit("az_tanf_countable_income", period) + return max_(payment_standard - countable_income, 0) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py new file mode 100644 index 00000000000..0671340f9f4 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible.py @@ -0,0 +1,27 @@ +from policyengine_us.model_api import * + + +class az_tanf_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Eligible for Arizona TANF" + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Use federal demographic eligibility (minor child or pregnant) + demographic_eligible = spm_unit("is_demographic_tanf_eligible", period) + # Must be US citizen or qualified alien + immigration_eligible = ( + add(spm_unit, period, ["is_citizen_or_legal_immigrant"]) > 0 + ) + income_eligible = spm_unit("az_tanf_income_eligible", period) + resources_eligible = spm_unit("az_tanf_resources_eligible", period) + + return ( + demographic_eligible + & immigration_eligible + & income_eligible + & resources_eligible + ) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py deleted file mode 100644 index 6b0793a094b..00000000000 --- a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_eligible_child.py +++ /dev/null @@ -1,19 +0,0 @@ -from policyengine_us.model_api import * - - -class az_tanf_eligible_child(Variable): - value_type = bool - entity = Person - label = "Eligible child for the Arizona Cash Assistance" - definition_period = YEAR - defined_for = StateCode.AZ - - def formula(person, period, parameters): - # Get the age of the person - age = person("age", period) - # Determine whether they are a student - student = person("is_full_time_student", period) - # Determine the age thresholds - p = parameters(period).gov.states.az.hhs.tanf.eligibility.age_threshold - age_threshold = where(student, p.student, p.non_student) - return age < age_threshold diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py new file mode 100644 index 00000000000..113fadb9a31 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_baseline.py @@ -0,0 +1,23 @@ +from policyengine_us.model_api import * + + +class az_tanf_fpg_baseline(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF payment standard FPG baseline" + unit = USD + definition_period = YEAR + reference = "https://www.azleg.gov/ars/46/00207-01.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Arizona uses 1992 FPG values for payment standard calculations + instant_str = "1992-01-01" + household_size = spm_unit("spm_unit_size", period) + state_group = spm_unit.household("state_group_str", period) + + p_fpg = parameters(instant_str).gov.hhs.fpg + p1 = p_fpg.first_person[state_group] + pn = p_fpg.additional_person[state_group] + + return p1 + pn * (household_size - 1) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py new file mode 100644 index 00000000000..6a40f3183c6 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_fpg_rate.py @@ -0,0 +1,33 @@ +from policyengine_us.model_api import * + + +class az_tanf_fpg_rate(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF needy family FPG rate" + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # 130% FPG for non-parent relative heads requesting CA only for dependent children + # 100% FPG for all other families (default) + # Reference: A.R.S. § 46-292 + p = parameters(period).gov.states.az.hhs.tanf.income.fpg_limit + + person = spm_unit.members + # Use period.this_year for YEAR-defined demographic variables + is_head = person("is_tax_unit_head", period.this_year) + # Use is_parent which checks own_children_in_household > 0 + is_parent = person("is_parent", period.this_year) + is_child = person("is_child", period.this_year) + + # Check if head is a parent (has own children in household) + head_is_parent = spm_unit.any(is_head & is_parent) + # Check if there are children in the unit + has_children = spm_unit.any(is_child) + + # Non-parent relative caretaker: head is NOT a parent but unit HAS children + is_non_parent_relative_case = ~head_is_parent & has_children + + return where(is_non_parent_relative_case, p.non_parent, p.base) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py new file mode 100644 index 00000000000..25721321193 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_income_eligible.py @@ -0,0 +1,25 @@ +from policyengine_us.model_api import * + + +class az_tanf_income_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Arizona TANF income eligible" + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + countable_income = spm_unit("az_tanf_countable_income", period) + fpg = spm_unit("spm_unit_fpg", period) + payment_standard = spm_unit("az_tanf_payment_standard", period) + + # Test 1: Needy family test (income <= FPG rate * FPG) + # Use period.this_year for fpg_rate since it's a rate, not a flow + fpg_rate = spm_unit("az_tanf_fpg_rate", period.this_year) + needy_family_test = countable_income <= fpg_rate * fpg + + # Test 2: Payment standard test (income <= payment standard) + payment_standard_test = countable_income <= payment_standard + + return needy_family_test & payment_standard_test diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py new file mode 100644 index 00000000000..bac168724e1 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_payment_standard.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + + +class az_tanf_payment_standard(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF payment standard" + unit = USD + definition_period = MONTH + reference = ( + "https://www.azleg.gov/ars/46/00207-01.htm", + "https://www.azleg.gov/ars/46/00207.htm", + ) + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Arizona uses monthly 1992 FPG baseline for payment standard + # az_tanf_fpg_baseline is YEAR, auto-converted to monthly when called from MONTH context + monthly_fpg_baseline = spm_unit("az_tanf_fpg_baseline", period) + + p = parameters(period).gov.states.az.hhs.tanf.payment_standard + + # Base payment standard (A1) per A.R.S. § 46-207.01 + base_standard = p.rate * monthly_fpg_baseline + + # A2 = A1 reduced by 37% for those without shelter costs per A.R.S. § 46-207 + shelter_cost = spm_unit("housing_cost", period) + has_shelter_costs = shelter_cost > 0 + + reduced_standard = base_standard * (1 - p.reduction) + + return where(has_shelter_costs, base_standard, reduced_standard) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py new file mode 100644 index 00000000000..d09e9d3c167 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/eligibility/az_tanf_resources_eligible.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class az_tanf_resources_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Arizona TANF resources eligible" + definition_period = MONTH + reference = ( + "https://az.db101.org/az/programs/income_support/tanf/program2.htm" + ) + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + p = parameters(period).gov.states.az.hhs.tanf.resources + resources = spm_unit("spm_unit_assets", period.this_year) + return resources <= p.limit diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py new file mode 100644 index 00000000000..d209324a8ec --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_earned_income.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class az_tanf_countable_earned_income(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF countable earned income" + unit = USD + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + # Sum person-level earned income after $90 flat and 30% disregards + after_disregards = add( + spm_unit, + period, + ["az_tanf_earned_income_after_disregard_person"], + ) + # Subtract dependent care deduction + care_deduction = spm_unit("az_tanf_dependent_care_deduction", period) + return max_(after_disregards - care_deduction, 0) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py new file mode 100644 index 00000000000..0388b411c2f --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_countable_income.py @@ -0,0 +1,13 @@ +from policyengine_us.model_api import * + + +class az_tanf_countable_income(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF countable income" + unit = USD + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + adds = ["az_tanf_countable_earned_income", "tanf_gross_unearned_income"] diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py new file mode 100644 index 00000000000..1f883b1f6ef --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_dependent_care_deduction.py @@ -0,0 +1,32 @@ +from policyengine_us.model_api import * + + +class az_tanf_dependent_care_deduction(Variable): + value_type = float + entity = SPMUnit + label = "Arizona TANF dependent care deduction" + unit = USD + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(spm_unit, period, parameters): + p = parameters( + period + ).gov.states.az.hhs.tanf.income.deductions.care_expenses + + person = spm_unit.members + age = person("age", period.this_year) + + # Actual childcare expenses + childcare_expenses = spm_unit("childcare_expenses", period) + + # Calculate eligible deduction for dependent children (based on age) + is_dependent = person("is_tax_unit_dependent", period.this_year) + child_amount = p.amounts.calc(age) * is_dependent + + # Total eligible deduction + total_eligible = spm_unit.sum(child_amount) + + # Deduction is capped at actual childcare expenses + return min_(childcare_expenses, total_eligible) diff --git a/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py new file mode 100644 index 00000000000..5759197f565 --- /dev/null +++ b/policyengine_us/variables/gov/states/az/hhs/tanf/income/az_tanf_earned_income_after_disregard_person.py @@ -0,0 +1,22 @@ +from policyengine_us.model_api import * + + +class az_tanf_earned_income_after_disregard_person(Variable): + value_type = float + entity = Person + label = "Arizona TANF earned income after disregard per person" + unit = USD + definition_period = MONTH + reference = "https://www.azleg.gov/ars/46/00292.htm" + defined_for = StateCode.AZ + + def formula(person, period, parameters): + # Step 1: Get person's gross earned income + gross_earned = person("tanf_gross_earned_income", period) + + # Step 2: Apply $90 flat disregard, then 30% percentage disregard + p = parameters(period).gov.states.az.hhs.tanf.income.deductions + after_flat = max_(gross_earned - p.flat, 0) + after_percentage = after_flat * (1 - p.percentage) + + return max_(after_percentage, 0)