Skip to content

Calibrate ACA take-up contract#8352

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

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

Conversation

@daphnehanse11
Copy link
Copy Markdown
Collaborator

Summary

  • derive takes_up_aca_if_eligible from reported Marketplace coverage or a reform-responsive simulated take-up switch
  • add simulated_aca_take_up_if_eligible so callers can choose observed-only take-up without losing the existing default simulated behavior
  • 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.

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
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (bf8b00a) to head (4a479a0).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #8352       +/-   ##
============================================
+ Coverage   78.70%   100.00%   +21.29%     
============================================
  Files        4750         3     -4747     
  Lines       69270        30    -69240     
  Branches      341         0      -341     
============================================
- Hits        54517        30    -54487     
+ Misses      14675         0    -14675     
+ Partials       78         0       -78     
Flag Coverage Δ
unittests 100.00% <100.00%> (+21.29%) ⬆️

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.

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