Skip to content
219 changes: 219 additions & 0 deletions us/cdctc_single_parent_work_requirement.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# CDCTC Single Parent Work Requirement Reform Analysis\n",
"\n",
"This notebook analyzes a reform to the Child and Dependent Care Tax Credit (CDCTC) that would make families eligible if **at least one parent works**, instead of the current law requiring **both parents to work**.\n",
"\n",
"## Background\n",
"\n",
"Under current law, the CDCTC caps eligible childcare expenses at the **minimum** of both spouses' earnings for married couples. This means if one spouse earns $50,000 and the other earns $0, the cap is $0 and the family receives no credit.\n",
"\n",
"The reform changes this to use the **maximum** of both spouses' earnings, allowing families to qualify if at least one parent works."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from policyengine_us import Microsimulation\n",
"from policyengine_us.reforms.cdcc.cdcc_single_parent_work_requirement import (\n",
" cdcc_single_parent_work_requirement\n",
")\n",
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Microsimulation Analysis (2026)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "YEAR = 2026\n\n# Baseline simulation\nprint(\"Running baseline simulation...\")\nbaseline = Microsimulation()\n\n# Reform simulation\nprint(\"Running reform simulation...\")\nreform = Microsimulation(reform=cdcc_single_parent_work_requirement)\n\n# Clear cached downstream variables to ensure recalculation\n# Note: This reform overrides cdcc_relevant_expenses directly \nfor var_name in ['cdcc_relevant_expenses', 'cdcc_potential', 'cdcc', 'capped_cdcc', 'income_tax']:\n holder = reform.get_holder(var_name)\n if holder:\n holder.delete_arrays()\n\n# Calculate federal impacts using income_tax (isolates federal budgetary impact)\nbaseline_income_tax = baseline.calculate('income_tax', YEAR)\nreform_income_tax = reform.calculate('income_tax', YEAR)\nfederal_revenue_change = reform_income_tax.sum() - baseline_income_tax.sum()\n\n# Also get CDCC-specific metrics\nbaseline_cdcc = baseline.calculate('cdcc', YEAR)\nreform_cdcc = reform.calculate('cdcc', YEAR)\n\nprint(\"Done.\")"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "# Calculate metrics\ncdcc_cost = reform_cdcc.sum() - baseline_cdcc.sum()\n\nbaseline_claimants = (baseline_cdcc > 0).sum()\nreform_claimants = (reform_cdcc > 0).sum()\nnew_claimants = reform_claimants - baseline_claimants\n\nbaseline_avg = baseline_cdcc[baseline_cdcc > 0].mean()\nreform_avg = reform_cdcc[reform_cdcc > 0].mean()\n\n# New claimants average\nnew_claimant_mask = (baseline_cdcc.values == 0) & (reform_cdcc.values > 0)\nnew_claimants_avg = reform_cdcc[new_claimant_mask].mean() if new_claimant_mask.any() else 0\n\nprint(f\"Federal Budgetary Impact (income_tax change): ${federal_revenue_change/1e9:.2f}B\")\nprint(f\"CDCC Credit Change: ${cdcc_cost/1e9:.2f}B\")"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "# Create results table\nresults = pd.DataFrame({\n 'Metric': ['CDCC Cost', 'Income Tax Revenue', 'Claimants', 'Average Credit'],\n 'Baseline': [\n f'${baseline_cdcc.sum()/1e9:.2f}B',\n f'${baseline_income_tax.sum()/1e9:.2f}B',\n f'{baseline_claimants/1e6:.2f}M',\n f'${baseline_avg:.0f}',\n ],\n 'Reform': [\n f'${reform_cdcc.sum()/1e9:.2f}B',\n f'${reform_income_tax.sum()/1e9:.2f}B',\n f'{reform_claimants/1e6:.2f}M',\n f'${reform_avg:.0f}',\n ],\n 'Change': [\n f'+${cdcc_cost/1e9:.2f}B',\n f'${federal_revenue_change/1e9:.2f}B',\n f'+{new_claimants/1e6:.2f}M',\n f'${reform_avg - baseline_avg:+.0f}',\n ]\n})\n\nresults"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "## Summary\n\nThe CDCTC single parent work requirement reform would:\n\n- **Federal CDCC cost increase**: ~$740M annually\n- **Federal income tax revenue change**: ~-$437M (less than CDCC increase because CDCC is non-refundable)\n- **State CDCC impact**: ~$198M additional state credits\n- **New claimants**: ~920,000 additional families\n\nThe reform primarily benefits one-earner married couples with childcare expenses who are currently excluded from the credit.\n\n**Implementation note:** This reform overrides `cdcc_relevant_expenses` directly rather than `min_head_spouse_earned` to avoid affecting other programs that use the minimum earnings calculation for non-CDCC purposes."
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## State CDCC Impacts\n",
"\n",
"Some states offer child care credits that directly match or piggyback on the federal CDCC. These state credits will also increase under the reform since they reference the federal credit amount."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "# Use aggregated state_cdcc for total state impact\nbaseline_state_cdcc = baseline.calculate('state_cdcc', YEAR)\nreform_state_cdcc = reform.calculate('state_cdcc', YEAR)\ntotal_state_change = reform_state_cdcc.sum() - baseline_state_cdcc.sum()\n\n# For state-by-state breakdown, calculate key state CDCCs directly\n# (Entity mapping between tax_unit and household makes aggregation complex)\nstate_vars = [\n ('California', 'ca_cdcc'),\n ('South Carolina', 'sc_cdcc'),\n ('Pennsylvania', 'pa_cdcc'),\n ('Maryland', 'md_cdcc'),\n ('DC', 'dc_cdcc'),\n ('Rhode Island', 'ri_cdcc'),\n ('Kansas', 'ks_cdcc'),\n ('Arkansas', 'ar_cdcc'),\n ('Delaware', 'de_cdcc'),\n ('West Virginia', 'wv_cdcc'),\n ('Nebraska', 'ne_cdcc_nonrefundable'),\n]\n\nstate_results = []\nfor state_name, var_name in state_vars:\n try:\n b = baseline.calculate(var_name, YEAR).sum()\n r = reform.calculate(var_name, YEAR).sum()\n change = r - b\n if abs(change) > 1000: # Only show meaningful changes\n state_results.append({\n 'State': state_name,\n 'Baseline ($M)': round(b/1e6, 2),\n 'Reform ($M)': round(r/1e6, 2),\n 'Change ($M)': round(change/1e6, 2),\n })\n except:\n pass\n\nstate_df = pd.DataFrame(state_results).sort_values('Change ($M)', ascending=False)\nstate_df"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "print(f\"=== Summary ===\")\nprint(f\"Federal Budgetary Impact (income_tax): ${federal_revenue_change/1e6:.0f}M\")\nprint(f\"Total State CDCC Impact (state_cdcc): ${total_state_change/1e6:.0f}M\")\nprint(f\"Combined Impact: ${(federal_revenue_change + total_state_change)/1e6:.0f}M\")"
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Single Household Example"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from policyengine_us import Simulation\n",
"\n",
"# Example: Married couple where only one spouse works\n",
"situation = {\n",
" 'people': {\n",
" 'adult1': {'age': {YEAR: 35}, 'employment_income': {YEAR: 50_000}},\n",
" 'adult2': {'age': {YEAR: 35}, 'employment_income': {YEAR: 0}},\n",
" 'child': {'age': {YEAR: 5}},\n",
" },\n",
" 'tax_units': {\n",
" 'tax_unit': {\n",
" 'members': ['adult1', 'adult2', 'child'],\n",
" 'tax_unit_childcare_expenses': {YEAR: 5_000},\n",
" }\n",
" },\n",
" 'families': {'family': {'members': ['adult1', 'adult2', 'child']}},\n",
" 'households': {\n",
" 'household': {\n",
" 'members': ['adult1', 'adult2', 'child'],\n",
" 'state_code': {YEAR: 'CA'},\n",
" }\n",
" },\n",
" 'marital_units': {\n",
" 'marital_unit': {'members': ['adult1', 'adult2']},\n",
" },\n",
" 'spm_units': {\n",
" 'spm_unit': {'members': ['adult1', 'adult2', 'child']},\n",
" },\n",
"}\n",
"\n",
"# Baseline\n",
"baseline_sim = Simulation(situation=situation)\n",
"baseline_credit = baseline_sim.calculate('cdcc', YEAR)[0]\n",
"\n",
"# Reform\n",
"reform_sim = Simulation(situation=situation, reform=cdcc_single_parent_work_requirement)\n",
"reform_credit = reform_sim.calculate('cdcc', YEAR)[0]\n",
"\n",
"print(f\"Example: Married couple, one earner ($50k), one child, $5k childcare expenses\")\n",
"print(f\" Baseline CDCC: ${baseline_credit:.0f}\")\n",
"print(f\" Reform CDCC: ${reform_credit:.0f}\")\n",
"print(f\" Benefit: ${reform_credit - baseline_credit:.0f}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": "## State Household Example: South Carolina\n\nSouth Carolina offers a state CDCC equal to 7% of qualified childcare expenses (using the same expense calculation as the federal credit). Here's how the reform affects a family in South Carolina."
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# South Carolina example: Same family structure\n",
"sc_situation = {\n",
" 'people': {\n",
" 'adult1': {'age': {YEAR: 35}, 'employment_income': {YEAR: 50_000}},\n",
" 'adult2': {'age': {YEAR: 35}, 'employment_income': {YEAR: 0}},\n",
" 'child': {'age': {YEAR: 5}},\n",
" },\n",
" 'tax_units': {\n",
" 'tax_unit': {\n",
" 'members': ['adult1', 'adult2', 'child'],\n",
" 'tax_unit_childcare_expenses': {YEAR: 5_000},\n",
" }\n",
" },\n",
" 'families': {'family': {'members': ['adult1', 'adult2', 'child']}},\n",
" 'households': {\n",
" 'household': {\n",
" 'members': ['adult1', 'adult2', 'child'],\n",
" 'state_code': {YEAR: 'SC'},\n",
" }\n",
" },\n",
" 'marital_units': {\n",
" 'marital_unit': {'members': ['adult1', 'adult2']},\n",
" },\n",
" 'spm_units': {\n",
" 'spm_unit': {'members': ['adult1', 'adult2', 'child']},\n",
" },\n",
"}\n",
"\n",
"# Baseline\n",
"sc_baseline = Simulation(situation=sc_situation)\n",
"sc_baseline_federal = sc_baseline.calculate('cdcc', YEAR)[0]\n",
"sc_baseline_state = sc_baseline.calculate('sc_cdcc', YEAR)[0]\n",
"\n",
"# Reform\n",
"sc_reform = Simulation(situation=sc_situation, reform=cdcc_single_parent_work_requirement)\n",
"sc_reform_federal = sc_reform.calculate('cdcc', YEAR)[0]\n",
"sc_reform_state = sc_reform.calculate('sc_cdcc', YEAR)[0]\n",
"\n",
"print(f\"South Carolina Example: Married couple, one earner ($50k), one child, $5k childcare\")\n",
"print(f\"\\nFederal CDCC:\")\n",
"print(f\" Baseline: ${sc_baseline_federal:.0f}\")\n",
"print(f\" Reform: ${sc_reform_federal:.0f}\")\n",
"print(f\" Benefit: ${sc_reform_federal - sc_baseline_federal:.0f}\")\n",
"print(f\"\\nSouth Carolina CDCC (7% of federal):\")\n",
"print(f\" Baseline: ${sc_baseline_state:.0f}\")\n",
"print(f\" Reform: ${sc_reform_state:.0f}\")\n",
"print(f\" Benefit: ${sc_reform_state - sc_baseline_state:.0f}\")\n",
"print(f\"\\nTotal Combined Benefit: ${(sc_reform_federal - sc_baseline_federal) + (sc_reform_state - sc_baseline_state):.0f}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.11.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}