diff --git a/changelog_entry.yaml b/changelog_entry.yaml index f8f61c000cc..bce5b579e5a 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - Add Florida Temporary Cash Assistance (TCA) program. + - Implement Maryland Temporary Cash Assistance (TCA) program. diff --git a/policyengine_us/parameters/gov/states/md/tanf/README.md b/policyengine_us/parameters/gov/states/md/tanf/README.md deleted file mode 100644 index eb8aeb3f951..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/README.md +++ /dev/null @@ -1 +0,0 @@ -# Temporary Assistance for Needy Families diff --git a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/new.yaml b/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/new.yaml deleted file mode 100644 index 165c28eb934..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/new.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Maryland excludes this share of earnings from TANF countable earned income, for individuals not currently enrolled in TANF. - -values: - 2022-11-01: 0.2 - -metadata: - unit: /1 - period: month - label: Maryland TANF earnings exclusion percent for new enrollees - reference: - - title: Maryland TEMPORARY CASH ASSISTANCE MANUAL 904.1 DEDUCTIONS FROM EARNED INCOME - href: https://dhs.maryland.gov/documents/Manuals/Temporary-Cash-Assistance-Manual/0900-Financial-Eligibility/0904%20Deductions%20and%20Expenses%20rev%2011.22.1.doc diff --git a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/not_self_employed.yaml b/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/not_self_employed.yaml deleted file mode 100644 index bf54cc4ca0f..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/not_self_employed.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Maryland excludes this share of earnings from TANF countable earned income, for individuals without self employment income. - -values: - 2022-11-01: 0.4 - -metadata: - unit: /1 - period: month - label: Maryland TANF earnings exclusion percent for non-self-employed individuals - reference: - - title: Maryland TEMPORARY CASH ASSISTANCE MANUAL 904.1 DEDUCTIONS FROM EARNED INCOME - href: https://dhs.maryland.gov/documents/Manuals/Temporary-Cash-Assistance-Manual/0900-Financial-Eligibility/0904%20Deductions%20and%20Expenses%20rev%2011.22.1.doc diff --git a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/self_employed.yaml b/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/self_employed.yaml deleted file mode 100644 index 039ec1a662c..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/income/deductions/earned/self_employed.yaml +++ /dev/null @@ -1,12 +0,0 @@ -description: Maryland excludes this share of earnings from TANF countable earned income, for individuals with self employment income. - -values: - 2022-11-01: 0.5 - -metadata: - unit: /1 - period: month - label: Maryland TANF earnings exclusion percent for self-employed individuals - reference: - - title: Maryland TEMPORARY CASH ASSISTANCE MANUAL 904.1 DEDUCTIONS FROM EARNED INCOME - href: https://dhs.maryland.gov/documents/Manuals/Temporary-Cash-Assistance-Manual/0900-Financial-Eligibility/0904%20Deductions%20and%20Expenses%20rev%2011.22.1.doc diff --git a/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/additional.yaml b/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/additional.yaml deleted file mode 100644 index 794d973a6d2..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/additional.yaml +++ /dev/null @@ -1,11 +0,0 @@ -description: Maryland TANF grant standard additional amount per child over 10. - -values: - 2021-10-01: 136 - -metadata: - unit: currency-USD - period: month - reference: - - title: Family Investment Programs Income Guidelines as of October 01, 2021 - href: https://dhs.maryland.gov/documents/Supplemental%20Nutrition%20Assistance%20Program%20(SNAP)/October-2020-Income-Guidelines-1-1.pdf diff --git a/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/main.yaml b/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/main.yaml deleted file mode 100644 index bf7385350e1..00000000000 --- a/policyengine_us/parameters/gov/states/md/tanf/maximum_benefit/main.yaml +++ /dev/null @@ -1,27 +0,0 @@ -description: Maryland TANF grant standard by number of caretakers and children. - -1: - 2021-10-01: 328 -2: - 2021-10-01: 575 -3: - 2021-10-01: 727 -4: - 2021-10-01: 870 -5: - 2021-10-01: 1_010 -6: - 2021-10-01: 1_110 -7: - 2021-10-01: 1_247 -8: - 2021-10-01: 1_372 - -metadata: - unit: currency-USD - period: month - breakdown: - - range(1, 9) - reference: - - title: Family Investment Programs Income Guidelines as of October 01, 2021 - href: https://dhs.maryland.gov/documents/Supplemental%20Nutrition%20Assistance%20Program%20(SNAP)/October-2020-Income-Guidelines-1-1.pdf diff --git a/policyengine_us/parameters/gov/states/md/tca/README.md b/policyengine_us/parameters/gov/states/md/tca/README.md new file mode 100644 index 00000000000..23c7bdba578 --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/README.md @@ -0,0 +1 @@ +# Temporary Cash Assistance diff --git a/policyengine_us/parameters/gov/states/md/tca/income/deductions/childcare_expenses/cap.yaml b/policyengine_us/parameters/gov/states/md/tca/income/deductions/childcare_expenses/cap.yaml new file mode 100644 index 00000000000..3ca87928dec --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/income/deductions/childcare_expenses/cap.yaml @@ -0,0 +1,21 @@ +description: Maryland caps the monthly childcare deduction at this amount per child under the Temporary Cash Assistance program. + +metadata: + threshold_unit: hour + amount_unit: currency-USD + period: month + type: single_amount + label: Maryland TCA childcare deduction cap + reference: + - title: COMAR 07.03.03.13.E(3)(c) - Childcare Deduction + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx + +brackets: + - threshold: + 2016-01-01: 0 + amount: + 2016-01-01: 100 + - threshold: + 2016-01-01: 100 + amount: + 2016-01-01: 200 diff --git a/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/applicant.yaml b/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/applicant.yaml new file mode 100644 index 00000000000..97be1a3e827 --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/applicant.yaml @@ -0,0 +1,12 @@ +description: Maryland excludes this share of earnings from countable earned income under the Temporary Cash Assistance program. + +values: + 2016-01-01: 0.2 + +metadata: + unit: /1 + period: month + label: Maryland TCA initial earnings exclusion rate + reference: + - title: COMAR 07.03.03.13.E(3)(a) - Application Phase Earned Income Disregard + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx diff --git a/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/recipient.yaml b/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/recipient.yaml new file mode 100644 index 00000000000..bfce7489802 --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/income/deductions/earned/recipient.yaml @@ -0,0 +1,12 @@ +description: Maryland excludes this share of earnings from countable earned income under the Temporary Cash Assistance program. + +values: + 2016-01-01: 0.4 + +metadata: + unit: /1 + period: month + label: Maryland TCA continuous earnings exclusion rate + reference: + - title: COMAR 07.03.03.13.E(3)(b) - Post-Eligibility Earned Income Disregard + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx diff --git a/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/additional.yaml b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/additional.yaml new file mode 100644 index 00000000000..3d4c40760fa --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/additional.yaml @@ -0,0 +1,23 @@ +description: Maryland provides this additional amount per person under the Temporary Cash Assistance program. + +values: + 2017-10-01: 127 + 2018-10-01: 127 + 2019-10-01: 136 + 2025-01-01: 146 + +metadata: + unit: currency-USD + period: month + label: Maryland TCA additional grant amount per person + reference: + - title: FIA Action Transmittal 18-09 (Effective October 1, 2017) + href: https://dhs.maryland.gov/documents/?dir=FIA%2FAction+Transmittals-AT+-+Information+Memo-IM%2FAT-IM2017 + - title: FIA Action Transmittal 19-04 (Effective October 1, 2018) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2019/19-04-AT-TEMPORARY-CASH-ASSISTANCE-BENEFIT-INCREASE-1.pdf#page=2 + - title: FIA Action Transmittal 20-06 (Effective October 1, 2019) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2020/20-06%20AT-TCA%20Benefit%20Increase.pdf#page=3 + - title: FIA Information Memo 25-12 (Effective January 1, 2025) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2025/25-12%20IM%202025%20TCA%20TDAP%20RCA%20Benefit%20Increase.pdf#page=3 + - title: COMAR 07.03.03.17 - Benefit Schedules + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.17.aspx diff --git a/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/main.yaml b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/main.yaml new file mode 100644 index 00000000000..4954be65373 --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/main.yaml @@ -0,0 +1,127 @@ +description: Maryland provides this amount as the monthly grant standard under the Temporary Cash Assistance program. + +1: + 2017-10-01: 306 + 2018-10-01: 320 + 2019-10-01: 328 + 2025-01-01: 339 +2: + 2017-10-01: 536 + 2018-10-01: 561 + 2019-10-01: 575 + 2025-01-01: 596 +3: + 2017-10-01: 677 + 2018-10-01: 709 + 2019-10-01: 727 + 2025-01-01: 753 +4: + 2017-10-01: 811 + 2018-10-01: 849 + 2019-10-01: 870 + 2025-01-01: 902 +5: + 2017-10-01: 941 + 2018-10-01: 985 + 2019-10-01: 1_010 + 2025-01-01: 1_046 +6: + 2017-10-01: 1_034 + 2018-10-01: 1_083 + 2019-10-01: 1_110 + 2025-01-01: 1_149 +7: + 2017-10-01: 1_162 + 2018-10-01: 1_217 + 2019-10-01: 1_247 + 2025-01-01: 1_292 +8: + 2017-10-01: 1_279 + 2018-10-01: 1_339 + 2019-10-01: 1_372 + 2025-01-01: 1_421 +9: + 2017-10-01: 1_379 + 2018-10-01: 1_444 + 2019-10-01: 1_480 + 2025-01-01: 1_553 +10: + 2017-10-01: 1_490 + 2018-10-01: 1_560 + 2019-10-01: 1_599 + 2025-01-01: 1_656 +11: + 2017-10-01: 1_625 + 2018-10-01: 1_701 + 2019-10-01: 1_744 + 2025-01-01: 1_806 +12: + 2017-10-01: 1_699 + 2018-10-01: 1_779 + 2019-10-01: 1_823 + 2025-01-01: 1_889 +13: + 2017-10-01: 1_803 + 2018-10-01: 1_888 + 2019-10-01: 1_935 + 2025-01-01: 2_005 +14: + 2017-10-01: 1_908 + 2018-10-01: 1_998 + 2019-10-01: 2_048 + 2025-01-01: 2_122 +15: + 2017-10-01: 2_017 + 2018-10-01: 2_112 + 2019-10-01: 2_165 + 2025-01-01: 2_243 +16: + 2017-10-01: 2_146 + 2018-10-01: 2_247 + 2019-10-01: 2_303 + 2025-01-01: 2_386 +17: + 2017-10-01: 2_274 + 2018-10-01: 2_381 + 2019-10-01: 2_440 + 2025-01-01: 2_605 +18: + 2017-10-01: 2_400 + 2018-10-01: 2_513 + 2019-10-01: 2_576 + 2025-01-01: 2_749 +19: + 2017-10-01: 2_526 + 2018-10-01: 2_645 + 2019-10-01: 2_711 + 2025-01-01: 2_893 +20: + 2017-10-01: 2_652 + 2018-10-01: 2_777 + 2019-10-01: 2_846 + 2025-01-01: 3_037 +21: + 2017-10-01: 2_779 + 2018-10-01: 2_910 + 2019-10-01: 2_983 + 2025-01-01: 3_183 + +metadata: + unit: currency-USD + period: month + label: Maryland TCA grant standard + breakdown: + - range(1, 22) + breakdown_label: + - Assistance unit size + reference: + - title: FIA Action Transmittal 18-09 (Effective October 1, 2017) + href: https://dhs.maryland.gov/documents/?dir=FIA%2FAction+Transmittals-AT+-+Information+Memo-IM%2FAT-IM2017 + - title: FIA Action Transmittal 19-04 (Effective October 1, 2018) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2019/19-04-AT-TEMPORARY-CASH-ASSISTANCE-BENEFIT-INCREASE-1.pdf#page=2 + - title: FIA Action Transmittal 20-06 (Effective October 1, 2019) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2020/20-06%20AT-TCA%20Benefit%20Increase.pdf#page=3 + - title: FIA Information Memo 25-12 (Effective January 1, 2025) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2025/25-12%20IM%202025%20TCA%20TDAP%20RCA%20Benefit%20Increase.pdf#page=3 + - title: COMAR 07.03.03.17 - Benefit Schedules + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.17.aspx diff --git a/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/max_table_size.yaml b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/max_table_size.yaml new file mode 100644 index 00000000000..f699dc9f7f2 --- /dev/null +++ b/policyengine_us/parameters/gov/states/md/tca/maximum_benefit/max_table_size.yaml @@ -0,0 +1,16 @@ +description: Maryland caps the grant standard lookup at this household size under the Temporary Cash Assistance program. + +values: + 2016-10-01: 21 + +metadata: + unit: person + period: year + label: Maryland TCA maximum table size for grant standard lookup + reference: + - title: FIA Action Transmittal 20-06 (Effective October 1, 2019) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2020/20-06%20AT-TCA%20Benefit%20Increase.pdf#page=3 + - title: FIA Information Memo 25-12 (Effective January 1, 2025) + href: https://dhs.maryland.gov/documents/FIA/Action%20Transmittals-AT%20-%20Information%20Memo-IM/AT-IM2025/25-12%20IM%202025%20TCA%20TDAP%20RCA%20Benefit%20Increase.pdf#page=3 + - title: COMAR 07.03.03.17.B - Grant Standard Table + href: https://dsd.maryland.gov/regulations/Pages/07.03.03.17.aspx diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_gross_earned_income_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_gross_earned_income_deduction.yaml deleted file mode 100644 index e8fc19871cc..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_gross_earned_income_deduction.yaml +++ /dev/null @@ -1,37 +0,0 @@ -- name: If zero earned income, zero deduction. - period: 2023 - input: - state_code: MD - earned_income: 0 - output: - md_tanf_gross_earned_income_deduction: 0 - - -- name: If not enrolled in TANF, 20% deduction. - period: 2023 - input: - state_code: MD - is_tanf_enrolled: false - earned_income: 100 - output: - md_tanf_gross_earned_income_deduction: 20 - -- name: If enrolled in TANF and not self-employed, 40% deduction. - period: 2023 - input: - state_code: MD - is_tanf_enrolled: true - self_employment_income: 0 - earned_income: 100 - output: - md_tanf_gross_earned_income_deduction: 40 - -- name: If self-employed, 50% deduction. - period: 2023 - input: - state_code: MD - is_tanf_enrolled: true - self_employment_income: 100 - earned_income: 100 - output: - md_tanf_gross_earned_income_deduction: 50 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_maximum_benefit.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_maximum_benefit.yaml deleted file mode 100644 index f04441a57da..00000000000 --- a/policyengine_us/tests/policy/baseline/gov/states/md/tanf/income/md_tanf_maximum_benefit.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: One-person household has a maximum benefit of $328 per month. - period: 2023 - input: - md_tanf_eligible: true - spm_unit_size: 1 - output: - md_tanf_maximum_benefit: 328 * 12 - -- name: Ten-person household has a maximum benefit of $1,372 (8-person) + 2 * $136 = $1,644 per month. - period: 2023 - input: - md_tanf_eligible: true - spm_unit_size: 10 - output: - md_tanf_maximum_benefit: 1_644 * 12 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/deductions/md_tca_childcare_deduction.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/deductions/md_tca_childcare_deduction.yaml new file mode 100644 index 00000000000..1e023ba1a40 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/deductions/md_tca_childcare_deduction.yaml @@ -0,0 +1,242 @@ +# Tests childcare deduction capped at actual expenses per COMAR 07.03.03.13.E(3)(c) +# Cap is PER CHILD: Full-time (>= 100 hrs/month): $200/child, Part-time: $100/child +# Deduction = min(actual_expenses, per_child_cap * num_children) + +- name: Case 1, no children gets no deduction even with expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 160 + pre_subsidy_childcare_expenses: 3_000 + person2: + age: 28 + monthly_hours_worked: 120 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # No children = $0 cap + md_tca_childcare_deduction: 0 + +- name: Case 2, one child with part-time work, expenses at cap. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 80 + pre_subsidy_childcare_expenses: 2_400 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 1 child * $100 (part-time, 80 hrs < 100) = $100 cap + # Expenses = $200/month, min($200, $100) = $100 + md_tca_childcare_deduction: 100 + +- name: Case 3, one child with full-time work, expenses at cap. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 1 child * $200 (full-time, 120 hrs >= 100) = $200 cap + # Expenses = $500/month, min($500, $200) = $200 + md_tca_childcare_deduction: 200 + +- name: Case 4, one child, expenses below full-time cap. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 1_200 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 1 child * $200 = $200 cap + # Expenses = $100/month, min($100, $200) = $100 + md_tca_childcare_deduction: 100 + +- name: Case 5, one child, expenses below part-time cap. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 80 + pre_subsidy_childcare_expenses: 600 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 1 child * $100 = $100 cap + # Expenses = $50/month, min($50, $100) = $50 + md_tca_childcare_deduction: 50 + +- name: Case 6, has child but zero expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 120 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 1 child * $200 = $200 cap, but expenses = $0 + md_tca_childcare_deduction: 0 + +- name: Case 7, two children with full-time work. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 8 + person3: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + state_code: MD + output: + # 2 children * $200 = $400 cap + # Expenses = $500/month, min($500, $400) = $400 + md_tca_childcare_deduction: 400 + +- name: Case 8, two children with part-time work. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 80 + pre_subsidy_childcare_expenses: 3_600 + person2: + age: 8 + person3: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3] + households: + household: + state_code: MD + output: + # 2 children * $100 = $200 cap + # Expenses = $300/month, min($300, $200) = $200 + md_tca_childcare_deduction: 200 + +- name: Case 9, three children, expenses below cap. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 4_800 + person2: + age: 10 + person3: + age: 7 + person4: + age: 4 + spm_units: + spm_unit: + members: [person1, person2, person3, person4] + households: + household: + state_code: MD + output: + # 3 children * $200 = $600 cap + # Expenses = $400/month, min($400, $600) = $400 + md_tca_childcare_deduction: 400 + +- name: Case 10, exactly at 100 hours/month threshold. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 100 + pre_subsidy_childcare_expenses: 3_600 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 100 hrs/month = full-time threshold + # 1 child * $200 = $200 cap + # Expenses = $300/month, min($300, $200) = $200 + md_tca_childcare_deduction: 200 + +- name: Case 11, just below 100 hours/month threshold. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 96 + pre_subsidy_childcare_expenses: 3_600 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # 96 hrs/month = part-time (below 100 threshold) + # 1 child * $100 = $100 cap + # Expenses = $300/month, min($300, $100) = $100 + md_tca_childcare_deduction: 100 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/md_tca_countable_earned_income.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/md_tca_countable_earned_income.yaml new file mode 100644 index 00000000000..505a684b28d --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/income/md_tca_countable_earned_income.yaml @@ -0,0 +1,96 @@ +# Tests countable earned income calculation +# Formula: max(gross_earned * (1 - rate) - childcare_deduction, 0) +# Rate: 20% for applicants, 40% for enrolled recipients + +- name: Case 1, enrolled recipient with no childcare. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + spm_units: + spm_unit: + members: [person1] + is_tanf_enrolled: true + md_tca_childcare_deduction: 0 + households: + household: + state_code: MD + output: + # $1,000 * (1 - 0.4) - $0 = $600 + md_tca_countable_earned_income: 600 + +- name: Case 2, applicant with no childcare. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + spm_units: + spm_unit: + members: [person1] + is_tanf_enrolled: false + md_tca_childcare_deduction: 0 + households: + household: + state_code: MD + output: + # $1,000 * (1 - 0.2) - $0 = $800 + md_tca_countable_earned_income: 800 + +- name: Case 3, enrolled with childcare deduction. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + spm_units: + spm_unit: + members: [person1] + is_tanf_enrolled: true + md_tca_childcare_deduction: 200 + households: + household: + state_code: MD + output: + # $1,000 * (1 - 0.4) - $200 = $600 - $200 = $400 + md_tca_countable_earned_income: 400 + +- name: Case 4, childcare exceeds after-disregard amount. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 6_000 + spm_units: + spm_unit: + members: [person1] + is_tanf_enrolled: true + md_tca_childcare_deduction: 400 + households: + household: + state_code: MD + output: + # $500 * (1 - 0.4) - $400 = $300 - $400 = max(-$100, 0) = $0 + md_tca_countable_earned_income: 0 + +- name: Case 5, zero income. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + is_tanf_enrolled: true + md_tca_childcare_deduction: 0 + households: + household: + state_code: MD + output: + md_tca_countable_earned_income: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/integration.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/integration.yaml new file mode 100644 index 00000000000..77fce67d576 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/integration.yaml @@ -0,0 +1,284 @@ +# Maryland TCA Integration Tests +# COMAR 07.03.03 - Temporary Cash Assistance +# Tests verify complete calculation pipeline with documented intermediate values + +- name: Case 1, single parent with child, enrolled, with childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + # 1 child * $200/child (120 hrs >= 100 = full-time) = $200 cap + # Expenses = $500/month, min($500, $200) = $200 + md_tca_childcare_deduction: 200 + + # Countable earned income (enrolled = 60% kept) + # $1,000 * 0.6 - $200 = $400 + md_tca_countable_earned_income: 400 + + # Countable income = $400 earned + $0 unearned = $400 + md_tca_countable_income: 400 + + # Maximum benefit (2-person household) + md_tca_maximum_benefit: 575 + + # Income eligibility ($400 <= $575) + md_tca_income_eligible: true + + md_tca_eligible: true + + # max($575 - $400, 0) = $175 + md_tca: 175 + +- name: Case 2, single parent with child, not enrolled, with childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + is_tanf_enrolled: false + households: + household: + state_code: MD + output: + # 1 child * $200/child (full-time) = $200 cap + # Expenses = $500/month, min($500, $200) = $200 + md_tca_childcare_deduction: 200 + + # Countable earned income (not enrolled = 80% kept) + # $1,000 * 0.8 - $200 = $600 + md_tca_countable_earned_income: 600 + + # Countable income = $600 earned + $0 unearned = $600 + md_tca_countable_income: 600 + + # Maximum benefit + md_tca_maximum_benefit: 575 + + # Income eligibility ($600 > $575 = false) + md_tca_income_eligible: false + + md_tca_eligible: false + + md_tca: 0 + +- name: Case 3, multiple earners with child, with childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 24_000 + monthly_hours_worked: 160 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 35 + employment_income_before_lsr: 12_000 + monthly_hours_worked: 120 + person3: + age: 5 + spm_units: + spm_unit: + members: [person1, person2, person3] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + # Person1: $24,000/12 = $2,000/month + # Person2: $12,000/12 = $1,000/month + # Total: $3,000/month + + # 1 child * $200/child (160 hrs full-time) = $200 cap + # Expenses = $500/month, min($500, $200) = $200 + md_tca_childcare_deduction: 200 + + # Countable earned income (enrolled = 60% kept) + # $3,000 * 0.6 - $200 = $1,600 + md_tca_countable_earned_income: 1_600 + + # Countable income = $1,600 earned + $0 unearned = $1,600 + md_tca_countable_income: 1_600 + + # 3-person household + md_tca_maximum_benefit: 727 + + # $1,600 > $727 = false + md_tca_income_eligible: false + + md_tca_eligible: false + + md_tca: 0 + +- name: Case 4, large household at size cap, no childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 35 + monthly_hours_worked: 0 + person2: + age: 33 + monthly_hours_worked: 0 + person3: + age: 14 + person4: + age: 12 + person5: + age: 10 + person6: + age: 8 + person7: + age: 6 + person8: + age: 4 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5, person6, person7, person8] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + # No childcare expenses = $0 deduction + md_tca_childcare_deduction: 0 + + md_tca_countable_earned_income: 0 + + md_tca_countable_income: 0 + + # 8-person household = maximum in table + md_tca_maximum_benefit: 1_372 + + md_tca_income_eligible: true + md_tca_eligible: true + + md_tca: 1_372 + +- name: Case 5, zero income with childcare expenses receives full benefit. + period: 2024-01 + input: + people: + person1: + age: 30 + monthly_hours_worked: 0 + pre_subsidy_childcare_expenses: 2_400 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + # 1 child * $100/child (0 hrs < 100 = part-time) = $100 cap + # Expenses = $200/month, min($200, $100) = $100 + md_tca_childcare_deduction: 100 + + # No earned income, so countable earned = max(0 - 100, 0) = 0 + md_tca_countable_earned_income: 0 + + md_tca_countable_income: 0 + + md_tca_maximum_benefit: 575 + + md_tca_income_eligible: true + md_tca_eligible: true + + md_tca: 575 + +- name: Case 6, ineligible no children. + period: 2024-01 + input: + people: + person1: + age: 30 + employment_income_before_lsr: 12_000 + person2: + age: 28 + spm_units: + spm_unit: + members: [person1, person2] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + md_tca_maximum_benefit: 575 + + md_tca_eligible: false + + md_tca: 0 + +- name: Case 7, 10 person household above size cap, with childcare expenses. + period: 2024-01 + input: + people: + person1: + age: 35 + monthly_hours_worked: 120 + pre_subsidy_childcare_expenses: 6_000 + person2: + age: 33 + person3: + age: 15 + person4: + age: 13 + person5: + age: 11 + person6: + age: 9 + person7: + age: 7 + person8: + age: 5 + person9: + age: 3 + person10: + age: 1 + spm_units: + spm_unit: + members: [person1, person2, person3, person4, person5, person6, person7, person8, person9, person10] + is_tanf_enrolled: true + households: + household: + state_code: MD + output: + # 8 children * $200/child (120 hrs full-time) = $1,600 cap + # Expenses = $500/month, min($500, $1,600) = $500 + md_tca_childcare_deduction: 500 + + # No earned income + md_tca_countable_earned_income: 0 + + md_tca_countable_income: 0 + + # 10-person household = $1,599 (explicit table value) + md_tca_maximum_benefit: 1_599 + + md_tca_eligible: true + + md_tca: 1_599 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca.yaml new file mode 100644 index 00000000000..adc9a1960ff --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca.yaml @@ -0,0 +1,74 @@ +- name: Case 1, eligible with income below maximum benefit. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_eligible: true + md_tca_maximum_benefit: 727 + md_tca_countable_income: 200 + households: + household: + state_code: MD + output: + # Benefit = $727 - $200 = $527 + md_tca: 527 + +- name: Case 2, eligible with zero income. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_eligible: true + md_tca_maximum_benefit: 575 + md_tca_countable_income: 0 + households: + household: + state_code: MD + output: + # Benefit = $575 - $0 = $575 + md_tca: 575 + +- name: Case 3, income exceeds maximum benefit. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_eligible: true + md_tca_maximum_benefit: 575 + md_tca_countable_income: 600 + households: + household: + state_code: MD + output: + # Benefit = max($575 - $600, 0) = $0 + md_tca: 0 + +- name: Case 4, ineligible household receives zero. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_eligible: false + md_tca_maximum_benefit: 575 + md_tca_countable_income: 0 + households: + household: + state_code: MD + output: + md_tca: 0 diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_eligible.yaml new file mode 100644 index 00000000000..45b16b88cd2 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_eligible.yaml @@ -0,0 +1,108 @@ +# Tests overall TCA eligibility (demographic + income + immigration) + +- name: Case 1, household with child is eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 5 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + md_tca_eligible: true + +- name: Case 2, household with no children is not eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + person2: + age: 28 + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + md_tca_eligible: false + +- name: Case 3, single adult is not eligible. + period: 2024-01 + input: + people: + person1: + age: 25 + spm_units: + spm_unit: + members: [person1] + households: + household: + state_code: MD + output: + md_tca_eligible: false + +- name: Case 4, 18 year old secondary school student is eligible. + period: 2024-01 + input: + people: + person1: + age: 40 + person2: + age: 18 + is_in_secondary_school: true + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # Per federal TANF rules, 18-year-olds in secondary school count as children + md_tca_eligible: true + +- name: Case 5, 19 year old is not eligible. + period: 2024-01 + input: + people: + person1: + age: 40 + person2: + age: 19 + is_full_time_college_student: true + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # Per federal TANF rules, 19-year-olds do not count as children + md_tca_eligible: false + +- name: Case 6, non-citizen household is not eligible. + period: 2024-01 + input: + people: + person1: + age: 30 + immigration_status: UNDOCUMENTED + person2: + age: 5 + immigration_status: UNDOCUMENTED + spm_units: + spm_unit: + members: [person1, person2] + households: + household: + state_code: MD + output: + # Per COMAR 07.03.17.09 and 8 USC 1641, must be citizen or qualified alien + md_tca_eligible: false diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_income_eligible.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_income_eligible.yaml new file mode 100644 index 00000000000..f6c43ce89a7 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_income_eligible.yaml @@ -0,0 +1,72 @@ +# Tests income eligibility: net_income <= grant_standard + +- name: Case 1, income below grant standard. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_countable_income: 300 + md_tca_maximum_benefit: 575 + households: + household: + state_code: MD + output: + # $300 <= $575 = true + md_tca_income_eligible: true + +- name: Case 2, income equals grant standard. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_countable_income: 575 + md_tca_maximum_benefit: 575 + households: + household: + state_code: MD + output: + # $575 <= $575 = true + md_tca_income_eligible: true + +- name: Case 3, income exceeds grant standard. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_countable_income: 600 + md_tca_maximum_benefit: 575 + households: + household: + state_code: MD + output: + # $600 <= $575 = false + md_tca_income_eligible: false + +- name: Case 4, zero income. + period: 2024-01 + input: + people: + person1: + age: 30 + spm_units: + spm_unit: + members: [person1] + md_tca_countable_income: 0 + md_tca_maximum_benefit: 575 + households: + household: + state_code: MD + output: + md_tca_income_eligible: true diff --git a/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_maximum_benefit.yaml b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_maximum_benefit.yaml new file mode 100644 index 00000000000..ffff1241582 --- /dev/null +++ b/policyengine_us/tests/policy/baseline/gov/states/md/tca/md_tca_maximum_benefit.yaml @@ -0,0 +1,45 @@ +- name: Case 1, one-person household. + period: 2024-01 + input: + spm_unit_size: 1 + state_code: MD + output: + # $328 per month + md_tca_maximum_benefit: 328 + +- name: Case 2, ten-person household. + period: 2024-01 + input: + spm_unit_size: 10 + state_code: MD + output: + # $1,599 per month (explicit table value for 10-person household) + md_tca_maximum_benefit: 1_599 + +- name: Case 3, eight-person household. + period: 2024-01 + input: + spm_unit_size: 8 + state_code: MD + output: + # $1,372 per month + md_tca_maximum_benefit: 1_372 + +- name: Case 4, nine-person household. + period: 2024-01 + input: + spm_unit_size: 9 + state_code: MD + output: + # $1,480 per month (explicit table value for 9-person household) + md_tca_maximum_benefit: 1_480 + +- name: Case 5, 22-person household (beyond max table size). + period: 2024-01 + input: + spm_unit_size: 22 + state_code: MD + output: + # Max table size is 21, so use main[21] + additional * (22 - 21) + # 2_983 + 136 * 1 = 3_119 + md_tca_maximum_benefit: 3_119 diff --git a/policyengine_us/variables/gov/states/md/tanf/income/earned/md_tanf_gross_earned_income_deduction.py b/policyengine_us/variables/gov/states/md/tanf/income/earned/md_tanf_gross_earned_income_deduction.py deleted file mode 100644 index 721f6b00b35..00000000000 --- a/policyengine_us/variables/gov/states/md/tanf/income/earned/md_tanf_gross_earned_income_deduction.py +++ /dev/null @@ -1,33 +0,0 @@ -from policyengine_us.model_api import * - - -class md_tanf_gross_earned_income_deduction(Variable): - value_type = float - entity = SPMUnit - label = "Maryland TANF earned income deduction" - unit = USD - definition_period = YEAR - defined_for = StateCode.MD - - def formula(spm_unit, period, parameters): - # Get TANF enrollment status. - is_tanf_enrolled = spm_unit("is_tanf_enrolled", period) - # Get earned income for the SPM unit. - earned_income = add(spm_unit, period, ["earned_income"]) - # Determine if the SPM unit has any self-employment income. - self_employment_income = add( - spm_unit, period, ["self_employment_income"] - ) - has_self_employment_income = self_employment_income > 0 - # Get the policy parameters. - p = parameters(period).gov.states.md.tanf.income.deductions.earned - percent = select( - # First arg: list of conditions - [~is_tanf_enrolled, has_self_employment_income], - # Second arg: list of values to return if the corresponding condition is True - [p.new, p.self_employed], - # Third arg: default value to return if none of the conditions are True - default=p.not_self_employed, - ) - # Multiply earned income by percent deduction. - return earned_income * percent diff --git a/policyengine_us/variables/gov/states/md/tanf/md_tanf_count_children.py b/policyengine_us/variables/gov/states/md/tanf/md_tanf_count_children.py deleted file mode 100644 index e89d31a1230..00000000000 --- a/policyengine_us/variables/gov/states/md/tanf/md_tanf_count_children.py +++ /dev/null @@ -1,10 +0,0 @@ -from policyengine_us.model_api import * - - -class md_tanf_count_children(Variable): - value_type = int - entity = SPMUnit - label = "Maryland TANF number of children" - definition_period = YEAR - defined_for = StateCode.MD - adds = "is_child" diff --git a/policyengine_us/variables/gov/states/md/tanf/md_tanf_eligible.py b/policyengine_us/variables/gov/states/md/tanf/md_tanf_eligible.py deleted file mode 100644 index 9894284fd6a..00000000000 --- a/policyengine_us/variables/gov/states/md/tanf/md_tanf_eligible.py +++ /dev/null @@ -1,10 +0,0 @@ -from policyengine_us.model_api import * - - -class md_tanf_eligible(Variable): - value_type = bool - entity = SPMUnit - label = "Maryland TANF eligible" - unit = USD - definition_period = YEAR - defined_for = StateCode.MD diff --git a/policyengine_us/variables/gov/states/md/tanf/md_tanf_maximum_benefit.py b/policyengine_us/variables/gov/states/md/tanf/md_tanf_maximum_benefit.py deleted file mode 100644 index a4050f0adaf..00000000000 --- a/policyengine_us/variables/gov/states/md/tanf/md_tanf_maximum_benefit.py +++ /dev/null @@ -1,21 +0,0 @@ -from policyengine_us.model_api import * - - -class md_tanf_maximum_benefit(Variable): - value_type = float - entity = SPMUnit - label = "Maryland TANF maximum benefit" - unit = USD - definition_period = YEAR - defined_for = "md_tanf_eligible" - - def formula(spm_unit, period, parameters): - people = spm_unit("spm_unit_size", period) - # TODO: Add DHS layer. - p = parameters(period).gov.states.md.tanf.maximum_benefit - capped_people = min_(people, 8).astype(int) - additional_people = people - capped_people - base = p.main[capped_people] - additional_maximum_benefit = p.additional * additional_people - monthly = base + additional_maximum_benefit - return monthly * MONTHS_IN_YEAR diff --git a/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_eligible.py b/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_eligible.py new file mode 100644 index 00000000000..b5dc66ea23b --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_eligible.py @@ -0,0 +1,31 @@ +from policyengine_us.model_api import * + + +class md_tca_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Maryland TCA eligible" + definition_period = MONTH + defined_for = StateCode.MD + reference = ( + "https://dsd.maryland.gov/regulations/Pages/07.03.03.03.aspx", + "https://dsd.maryland.gov/regulations/Pages/07.03.03.12.aspx", + ) + + def formula(spm_unit, period, parameters): + # Must have at least one eligible child (uses federal demographic rules) + has_children = spm_unit("is_demographic_tanf_eligible", period) + + # Must meet income eligibility + income_eligible = spm_unit("md_tca_income_eligible", period) + + # Must meet immigration status eligibility (citizen or qualified alien) + # Per COMAR 07.03.17.09 and 8 USC 1641 + immigration_eligible = ( + add(spm_unit, period, ["is_citizen_or_legal_immigrant"]) > 0 + ) + + # Note: Per COMAR 07.03.03.12, individual assets are EXCLUDED + # from TCA eligibility, so no resource test is required. + + return has_children & income_eligible & immigration_eligible diff --git a/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_income_eligible.py b/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_income_eligible.py new file mode 100644 index 00000000000..809cb086495 --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/eligibility/md_tca_income_eligible.py @@ -0,0 +1,17 @@ +from policyengine_us.model_api import * + + +class md_tca_income_eligible(Variable): + value_type = bool + entity = SPMUnit + label = "Maryland TCA income eligible" + definition_period = MONTH + defined_for = StateCode.MD + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx" + + def formula(spm_unit, period, parameters): + # Per COMAR 07.03.03.13, eligibility is based on comparing + # countable income to the grant standard + countable_income = spm_unit("md_tca_countable_income", period) + grant_standard = spm_unit("md_tca_maximum_benefit", period) + return countable_income <= grant_standard diff --git a/policyengine_us/variables/gov/states/md/tca/income/md_tca_childcare_deduction.py b/policyengine_us/variables/gov/states/md/tca/income/md_tca_childcare_deduction.py new file mode 100644 index 00000000000..42ea29e8c0e --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/income/md_tca_childcare_deduction.py @@ -0,0 +1,28 @@ +from policyengine_us.model_api import * + + +class md_tca_childcare_deduction(Variable): + value_type = float + entity = SPMUnit + label = "Maryland TCA childcare deduction" + unit = USD + definition_period = MONTH + defined_for = StateCode.MD + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx" + + def formula(spm_unit, period, parameters): + # Per COMAR 07.03.03.13.E(3)(c), childcare deduction is capped at + # actual expenses, "not to exceed" per child based on employment + # hours: $200/child for 100+ hours/month, $100/child for <100 hours. + person = spm_unit.members + is_child = person("is_child", period.this_year) + num_children = spm_unit.sum(is_child) + monthly_hours = person("monthly_hours_worked", period.this_year) + max_monthly_hours = spm_unit.max(monthly_hours) + p = parameters(period).gov.states.md.tca.income.deductions + # Maximum deduction per child based on monthly work hours + per_child_cap = p.childcare_expenses.cap.calc(max_monthly_hours) + max_deduction = per_child_cap * num_children + # Actual childcare expenses (capped at regulatory maximum) + childcare_expenses = spm_unit("childcare_expenses", period) + return min_(childcare_expenses, max_deduction) diff --git a/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_earned_income.py b/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_earned_income.py new file mode 100644 index 00000000000..e8056c00766 --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_earned_income.py @@ -0,0 +1,24 @@ +from policyengine_us.model_api import * + + +class md_tca_countable_earned_income(Variable): + value_type = float + entity = SPMUnit + label = "Maryland TCA countable earned income" + unit = USD + definition_period = MONTH + defined_for = StateCode.MD + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx" + + def formula(spm_unit, period, parameters): + # NOTE: Maryland applies different deduction rates for self-employment (50%) + # vs regular employment. We apply the employment rate to all earned + # income as a simplification. + p = parameters(period).gov.states.md.tca.income.deductions.earned + gross_earned = add(spm_unit, period, ["tanf_gross_earned_income"]) + is_enrolled = spm_unit("is_tanf_enrolled", period) + # 20% disregard for applicants, 40% disregard for enrolled recipients + rate = where(is_enrolled, p.recipient, p.applicant) + after_disregard = gross_earned * (1 - rate) + childcare_deduction = spm_unit("md_tca_childcare_deduction", period) + return max_(after_disregard - childcare_deduction, 0) diff --git a/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_income.py b/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_income.py new file mode 100644 index 00000000000..3bf6b422bac --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/income/md_tca_countable_income.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class md_tca_countable_income(Variable): + value_type = float + entity = SPMUnit + label = "Maryland TCA countable income" + unit = USD + definition_period = MONTH + defined_for = StateCode.MD + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.13.aspx" + + adds = [ + "md_tca_countable_earned_income", + "tanf_gross_unearned_income", + ] diff --git a/policyengine_us/variables/gov/states/md/tca/md_tca.py b/policyengine_us/variables/gov/states/md/tca/md_tca.py new file mode 100644 index 00000000000..f8e1b2c5844 --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/md_tca.py @@ -0,0 +1,16 @@ +from policyengine_us.model_api import * + + +class md_tca(Variable): + value_type = float + entity = SPMUnit + label = "Maryland Temporary Cash Assistance" + unit = USD + definition_period = MONTH + defined_for = "md_tca_eligible" + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.17.aspx" + + def formula(spm_unit, period, parameters): + grant_standard = spm_unit("md_tca_maximum_benefit", period) + countable_income = spm_unit("md_tca_countable_income", period) + return max_(grant_standard - countable_income, 0) diff --git a/policyengine_us/variables/gov/states/md/tca/md_tca_maximum_benefit.py b/policyengine_us/variables/gov/states/md/tca/md_tca_maximum_benefit.py new file mode 100644 index 00000000000..eaa974b3510 --- /dev/null +++ b/policyengine_us/variables/gov/states/md/tca/md_tca_maximum_benefit.py @@ -0,0 +1,19 @@ +from policyengine_us.model_api import * + + +class md_tca_maximum_benefit(Variable): + value_type = float + entity = SPMUnit + label = "Maryland TCA maximum benefit" + unit = USD + definition_period = MONTH + defined_for = StateCode.MD + reference = "https://dsd.maryland.gov/regulations/Pages/07.03.03.17.aspx" + + def formula(spm_unit, period, parameters): + size = spm_unit("spm_unit_size", period.this_year) + p = parameters(period).gov.states.md.tca.maximum_benefit + capped_size = min_(size, p.max_table_size) + additional_size = size - capped_size + base = p.main[capped_size] + return base + p.additional * additional_size