Skip to content

Add Pennsylvania unemployment insurance#8124

Draft
daphnehanse11 wants to merge 4 commits intoPolicyEngine:mainfrom
daphnehanse11:issue-8117-pa-unemployment-insurance
Draft

Add Pennsylvania unemployment insurance#8124
daphnehanse11 wants to merge 4 commits intoPolicyEngine:mainfrom
daphnehanse11:issue-8117-pa-unemployment-insurance

Conversation

@daphnehanse11
Copy link
Copy Markdown
Collaborator

@daphnehanse11 daphnehanse11 commented Apr 20, 2026

Summary

Implements Pennsylvania Unemployment Compensation (PA UC) for PolicyEngine-US, covering monetary eligibility, weekly benefit rate from the 2025 statutory rate table, dependent allowance, partial benefits, benefit duration, and annual benefit calculation.

Closes #8117.

Regulatory Authority

Monetary Eligibility (4 tests, § 401(a) / § 404(c))

A claimant must satisfy ALL four tests. These are implemented as separate boolean variables combined via AND in pa_uc_monetarily_eligible:

  • Minimum high-quarter wages ≥ $1,688 (2025) — pa_uc_meets_high_quarter_test — rate table Part A floor (§ 404(e)(1))
  • Wages outside high quarter ≥ 37% of base-year wages — pa_uc_meets_wages_outside_high_quarter_test (§ 401(a)(2))
  • Total base-year wages ≥ Part C qualifying wages from rate table — pa_uc_meets_qualifying_wages_test (§ 401(a)(2))
  • Credit weeks ≥ 18 — pa_uc_meets_credit_weeks_test — where a credit week is any calendar week with ≥ $116 in earnings (§ 4(g.1), § 404(c))

Weekly Benefit Rate (§ 404(a)(1) / § 404(e)(1))

WBR is determined by a statutory table lookup on the claimant's highest quarterly wages in the base year. The 2025 table has 549 bracket rows in $25 bands, mapping $1,688–$15,387 to WBRs of $68–$604, with an open-ended top row ($15,388+) at $605.

  • Minimum WBR: $68
  • Maximum WBR: $605

Stored as a single-amount bracket parameter (rate_table.yaml) generated programmatically from the Pa. Bulletin source.

Dependent Allowance (§ 404(e)(3))

Flat-dollar weekly allowance, paid on top of WBR when the claimant has qualifying dependents:

Composition Allowance
No dependents $0
Dependent spouse only $5
One dependent child, no spouse $5
Dependent spouse + one dependent child $8
No spouse + two dependent children $8
More than two dependents $8 (cap)
  • Dependent child: under age 18 and a tax-unit dependent
  • Dependent spouse: a tax-unit spouse (PA does not require spouse to be non-working, per verbatim § 404(e)(3) — spouse and ≥ 18 dependents are the key categories)

Partial Benefits (§ 4(m.3) / § 404(d)(1))

When a claimant works part of the week:

  • Partial Benefit Credit (PBC) = max(30% × WBR, $6), rounded up to the next dollar
  • Weekly payable = max(0, WBR + PBC − gross_weekly_earnings), capped at WBR + dependent_allowance
  • When earnings are zero, the full WBR + dependent allowance is payable

Benefit Duration (§ 404(c))

  • Maximum benefit weeks = min(credit_weeks, 26)
  • Maximum Benefit Amount = maximum_weeks × (WBR + dependent_allowance)
  • Annual benefit pa_uc = weekly_payable × min(weeks_unemployed, maximum_weeks)

Payment Standards (2025)

Parameter Value Source
Minimum high-quarter wages $1,688 rate table Part A lowest band
Wages-outside fraction 37% § 401(a)(2)
Minimum credit weeks 18 § 404(c)
Credit-week earnings threshold $116 § 4(g.1) (16 × PA min wage)
Maximum benefit weeks 26 § 404(c)
Minimum WBR $68 rate table
Maximum WBR $605 rate table
Dependent allowance — spouse or first child $5/week § 404(e)(3)
Dependent allowance — second child $3/week § 404(e)(3)
Dependent allowance cap $8/week § 404(e)(3)
Partial Benefit Credit rate 30% of WBR § 4(m.3)
Partial Benefit Credit minimum $6 § 4(m.3)

Requirements Coverage

REQ Description Parameter Variable Test
REQ-001 Min high-quarter wages $1,688 minimum_high_quarter_wages.yaml pa_uc_meets_high_quarter_test.py pa_uc_meets_high_quarter_test.yaml
REQ-002 ≥37% wages outside high quarter wages_outside_high_quarter_fraction.yaml pa_uc_meets_wages_outside_high_quarter_test.py pa_uc_meets_wages_outside_high_quarter_test.yaml
REQ-003 ≥18 credit weeks minimum_credit_weeks.yaml pa_uc_meets_credit_weeks_test.py pa_uc_meets_credit_weeks_test.yaml
REQ-004 Part C qualifying wages qualifying_wages.yaml pa_uc_meets_qualifying_wages_test.py + pa_uc_qualifying_wages.py pa_uc_meets_qualifying_wages_test.yaml
REQ-005 Credit week = ≥$116 earnings credit_week_minimum_earnings.yaml (input var; counted externally)
REQ-006 WBR via rate table rate_table.yaml pa_uc_weekly_benefit_rate.py pa_uc_weekly_benefit_rate.yaml
REQ-007 Dependent allowance $5/$3/$8 dependent_allowance/*.yaml pa_uc_dependent_allowance.py pa_uc_dependent_allowance.yaml
REQ-008 Partial Benefit Credit partial_benefit_credit/*.yaml pa_uc_partial_benefit_credit.py pa_uc_partial_benefit_credit.yaml
REQ-009 Partial weekly payable pa_uc_weekly_payable.py pa_uc_weekly_payable.yaml
REQ-010 Max weeks = min(cw, 26) maximum_weeks.yaml pa_uc_maximum_weeks.py pa_uc_maximum_weeks.yaml
REQ-011 Maximum Benefit Amount pa_uc_maximum_benefit_amount.py pa_uc_maximum_benefit_amount.yaml
REQ-012 Annual PA UC pa_uc.py (main) integration.yaml + edge_cases.yaml

Not Modeled

  • § 401(b) active work search
  • § 401(e) one-week waiting period (matches NJ UI scope)
  • § 401(f) purge / requalification
  • § 402 disqualifications (voluntary quit, misconduct, labor dispute, drug test, self-employment)
  • § 404(a)(1) alternate 50%-of-full-time-weekly-wage formula
  • § 404(a)(3) qualifying-wage redetermination to next-lower rate
  • § 404(d)(1)(ii)–(iii) vacation / severance pay offsets
  • § 404(d)(2) pension offset
  • § 404(e)(2)(v) 2026+ HQW averaging formula (trigger-contingent on 7/1/2025 UC fund trigger)
  • § 404(e)(4) Act 144 5% reduction (already baked into 2025 table values)
  • Alternate base year for work-related injury
  • Extended Benefits (EB, federal program)
  • Overpayments, fraud penalties, appeals

Historical Notes

  • 2025 rate table has been in effect since Jan 1, 2025 (54 Pa.B. 8560, Dec 28, 2024).
  • 2024 used the same min/max ($68 / $605) — trigger conditions in § 404(e)(2) were not met.
  • Prior rate eras (2017–2019 at max $561; 2020–2023 at max $572) can be backfilled in a follow-up PR; each year has its own Pa. Bulletin notice listed in sources/working_references.md § Historical rate tables.

Files Added

policyengine_us/parameters/gov/states/pa/dli/unemployment_compensation/
├── index.yaml
├── rate_table.yaml                           (549-row bracket)
├── qualifying_wages.yaml                     (549-row bracket)
├── minimum_high_quarter_wages.yaml
├── wages_outside_high_quarter_fraction.yaml
├── minimum_credit_weeks.yaml
├── credit_week_minimum_earnings.yaml
├── maximum_weeks.yaml
├── dependent_allowance/
│   ├── spouse_or_first_child.yaml
│   ├── second_child.yaml
│   ├── maximum.yaml
│   └── child_age_limit.yaml
└── partial_benefit_credit/
    ├── rate.yaml
    └── minimum.yaml

policyengine_us/variables/gov/states/pa/dli/unemployment_compensation/
├── pa_uc.py                                  (main annual variable)
├── pa_uc_weekly_benefit_rate.py
├── pa_uc_qualifying_wages.py
├── pa_uc_weekly_payable.py
├── pa_uc_maximum_benefit_amount.py
├── pa_uc_maximum_weeks.py
├── pa_uc_dependent_allowance.py
├── pa_uc_dependent_children_count.py
├── pa_uc_has_dependent_spouse.py
├── pa_uc_partial_benefit_credit.py
├── pa_uc_monetarily_eligible.py
├── pa_uc_meets_high_quarter_test.py
├── pa_uc_meets_wages_outside_high_quarter_test.py
├── pa_uc_meets_qualifying_wages_test.py
├── pa_uc_meets_credit_weeks_test.py
├── pa_uc_highest_quarter_wages.py            (bare input)
├── pa_uc_base_year_wages.py                  (bare input)
├── pa_uc_wages_outside_high_quarter.py       (bare input/derived)
├── pa_uc_credit_weeks.py                     (bare input)
├── pa_uc_weeks_unemployed.py                 (bare input)
└── pa_uc_gross_weekly_earnings.py            (bare input)

policyengine_us/tests/policy/baseline/gov/states/pa/dli/unemployment_compensation/
├── integration.yaml
├── edge_cases.yaml
├── pa_uc_weekly_benefit_rate.yaml
├── pa_uc_meets_high_quarter_test.yaml
├── pa_uc_meets_wages_outside_high_quarter_test.yaml
├── pa_uc_meets_qualifying_wages_test.yaml
├── pa_uc_meets_credit_weeks_test.yaml
├── pa_uc_monetarily_eligible.yaml
├── pa_uc_dependent_allowance.yaml
├── pa_uc_partial_benefit_credit.yaml
├── pa_uc_weekly_payable.yaml
├── pa_uc_maximum_weeks.yaml
└── pa_uc_maximum_benefit_amount.yaml

Counts: 14 parameter YAMLs (incl. index), 21 variable Python files (6 bare inputs + 15 derived), 13 test YAMLs.

Testing

  • All 94 PA UC tests pass
  • Full PA state test suite (316 tests) passes
  • make format runs clean

Follow-up work

  • Integrate pa_uc into policyengine_us/parameters/gov/household/household_state_benefits.yaml (manual)
  • Register PA UC in policyengine_us/programs.yaml
  • Backfill 2017–2024 rate tables (each year has its own Pa. Bulletin notice)
  • Revisit § 404(e)(2)(v) 2026+ HQW averaging formula once 7/1/2025 UC fund trigger outcome is confirmed

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (968397a) to head (5f8a028).
⚠️ Report is 28 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #8124       +/-   ##
============================================
+ Coverage   71.23%   100.00%   +28.76%     
============================================
  Files        4528        21     -4507     
  Lines       65767       285    -65482     
  Branches      333         0      -333     
============================================
- Hits        46852       285    -46567     
+ Misses      18906         0    -18906     
+ Partials        9         0        -9     
Flag Coverage Δ
unittests 100.00% <100.00%> (+28.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

daphnehanse11 and others added 2 commits April 21, 2026 14:30
- Gate dependent allowance on is_unemployed (earnings < WBR+PBC) per § 4(u)
- Correct MBA formula: WBR × min(credit_weeks, 26), not (WBR+dep) × ...
- Register PA UC in programs.yaml
- Fix #page=132 → #page=136 citations for § 404(e)(1) rate table
- Gate dependent count/spouse flag on is_tax_unit_head to avoid broadcast
- Document credit_week_minimum_earnings as intentionally informational

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PA UI

1 participant