Skip to content

Calibrate ACA take-up contract#8352

Open
daphnehanse11 wants to merge 1 commit into
PolicyEngine:mainfrom
daphnehanse11:codex/issue-8168-marketplace-takeup-ratios
Open

Calibrate ACA take-up contract#8352
daphnehanse11 wants to merge 1 commit into
PolicyEngine:mainfrom
daphnehanse11:codex/issue-8168-marketplace-takeup-ratios

Conversation

@daphnehanse11

@daphnehanse11 daphnehanse11 commented May 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • derive takes_up_aca_if_eligible from reported Marketplace coverage or a data-supplied/simulated take-up switch
  • add simulated_aca_take_up_if_eligible so Populace and other datasets can provide calibrated non-reported Marketplace take-up without writing the final formula-owned take-up variable
  • document selected_marketplace_plan_benchmark_ratio as an explicit user/data input, defaulting to the benchmark-plan assumption when absent
  • add tests for observed Marketplace take-up and an unsubsidized reported Marketplace buyer using a selected-plan ratio below the benchmark

Closes #8168.

Data framework note

Under the Populace-style contract, has_marketplace_health_coverage_at_interview remains the observed coverage input, simulated_aca_take_up_if_eligible is the data-supplied/calibrated take-up input for tax units without reported Marketplace coverage, and takes_up_aca_if_eligible is computed by PolicyEngine-US. Populace should therefore write simulated_aca_take_up_if_eligible, not takes_up_aca_if_eligible, once this lands.

Tests

  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/aca/takes_up_aca_if_eligible.yaml policyengine_us/tests/policy/baseline/gov/aca/person_receives_aca.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/marketplace_net_premium.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/selected_marketplace_plan_premium_proxy.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/used_aca_ptc.yaml policyengine_us/tests/policy/baseline/gov/aca/ptc/assigned_aca_ptc.yaml -c policyengine_us
  • uv run python -m policyengine_core.scripts.policyengine_command test policyengine_us/tests/policy/baseline/gov/aca -c policyengine_us
  • uv run pytest policyengine_us/tests/test_parameter_files.py -q
  • uv run --extra dev ruff check policyengine_us/variables/gov/aca policyengine_us/tests/policy/baseline/gov/aca
  • uv run --extra dev ruff format --check policyengine_us/variables/gov/aca/takes_up_aca_if_eligible.py policyengine_us/variables/gov/aca/simulated_aca_take_up_if_eligible.py policyengine_us/variables/gov/aca/ptc/selected_marketplace_plan_benchmark_ratio.py
  • git diff --check

@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (206b9e7) to head (09b160d).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #8352   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         3    -5     
  Lines          127        30   -97     
=========================================
- Hits           127        30   -97     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

☔ View full report in Codecov by Harness.
📢 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 daphnehanse11 force-pushed the codex/issue-8168-marketplace-takeup-ratios branch from b53dcb3 to 09b160d Compare June 17, 2026 21:02
@daphnehanse11 daphnehanse11 marked this pull request as ready for review June 17, 2026 21:05
@daphnehanse11 daphnehanse11 requested a review from MaxGhenis June 17, 2026 21:25
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.

Calibrate Marketplace take-up and selected-plan premium ratios

1 participant