Repository navigation
Conversation
…ndard term Add federal_student_loan_is_consolidated, a Person YEAR input that marks federal_student_loan_balance as a Direct Consolidation Loan that entered repayment on or after July 1, 2006. For flagged borrowers, standard_repayment_payment uses the 34 CFR 685.208(b)(2)(iii) term scale, keyed to the consolidation loan plus the borrower's other education loans counted up to the consolidation loan's amount (685.220(i)(2)(ii), (i)(3)(i)), through a helper shared with consolidated parent PLUS loans. combined_standard_repayment_payment applies one minimum where both balances are under the same paragraph of 685.208(b) and two where they are not. The income-driven repayment cap stays on the 10-year plan (685.209(f)(2)(ii), (f)(3)(ii)). Fixes #10485. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11696 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 6 +5
Lines 24 110 +86
=========================================
+ Hits 24 110 +86
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10485
What was wrong
standard_repayment_paymentamortized everyfederal_student_loan_balanceover the 10-year standard plan. Under 34 CFR 685.208(b)(1), the 10-year plan covers Direct Consolidation Loans only if they entered repayment before July 1, 2006. A consolidation loan that entered repayment on or after that date repays under 685.208(b)(2) (685.208(c) and (j) before July 1, 2026). Its term runs 10 to 30 years, set by the total of the consolidation loan and the borrower's other education loans. Those other loans count only up to the consolidation loan's amount (685.220(i)(2)(ii), (i)(3)(i)). #10415 added that scale (standard_repayment.consolidation_repayment_period), but only consolidated parent PLUS loans used it.At 6% with no other loans, main gives $333.06, $555.10 and $888.16 for $30,000, $50,000 and $80,000. The 20-, 25- and 30-year terms give $214.93, $322.15 and $479.64.
What changes
federal_student_loan_is_consolidated(Person, YEAR, bool, default false). It marksfederal_student_loan_balanceas a Direct Consolidation Loan that entered repayment from July 1, 2006 through June 30, 2026 and did not repay parent PLUS loans. A consolidation loan made on or after July 1, 2026 is a new Direct Loan, sohas_federal_student_loan_made_on_or_after_2026_07_01already moves that borrower to the tiered plan. Pre-July 2006 consolidation loans stay unflagged and repay over 10 years.student_loan_amortization_helpers.py: a newstandard_repayment_periodhelper holds the 685.208(b)(2)(iii) / 685.220(i)(3)(i) logic. Bothdirect_standard_amortized_paymentandparent_plus_standard_amortized_paymentnow call it. For a flagged Direct balance, the other education loans arefederal_parent_plus_loan_balanceplusfederal_ffel_loan_balance. This mirrors the parent PLUS helper, which counts the Direct and FFEL balances. The parent PLUS result is unchanged.combined_standard_repayment_payment: before this PR, the two separate payments were added (two minimums) whenever the parent PLUS loan was consolidated. Now that happens when exactly one of the two balances is a post-2006 consolidation loan, so the borrower's loans fall under two plans. Where both are, both loans fall under (b)(2), and the two level payments share one (b)(2)(ii) minimum, just as two (b)(1) loans share one. Theus:standard-plan-minimum-consolidatednote insource_conflicts/candidates.yamlnow describes this rule. It follows the per-plan reading that entry already ruled, so it adds no new reading and no marker.income_driven_repayment_standard_paymentstays on the 10-year term for flagged borrowers. 685.209(f)(2)(ii) and (f)(3)(ii) cap IBR and PAYE payments at what the borrower "would have paid on a 10-year standard repayment plan". That variable never called the Direct helper, so only its documentation changes.minimum_payment.yaml: the first reference title now cites (b)(2)(ii) next to (b)(1)(ii), since the same $50 applies to (b)(2) loans. The value and href are unchanged.Who is affected
The change only affects households that set
federal_student_loan_is_consolidatedto true. No dataset supplies it, and its default is false, so microsimulation results don't change. Household calculations that set it get the consolidation term. For example, a $30,000 consolidation loan at 6% pays $214.93 a month instead of $333.06.Tests
All new cases are appended. No existing expected value changes (6 added, 0 changed).
standard_repayment_payment.yamlCase 8combined_standard_repayment_payment.yamlCase 9Every expected value was worked out by hand from the formula balance × i / (1 − (1 + i)^−n). The YAML comments show the arithmetic. All 6 new cases fail on main (
50af7fba69) because the input doesn't exist there. The "Main" column comes from running the same households on main without the flag. Cases 9, 10 ($5,000 and $3,000) and the IDR column give the same values on both, as they should. Those cases pin the 10-year results that must not move.Local runs on the branch, one process at a time (policyengine-core 3.37.2):
tests/policy/baseline/gov/ed/student_loans/standard_repayment: 43/43tests/policy/baseline/gov/ed/student_loans(integration plus the IBR, ICR, IDR, PAYE, RAP and SAVE folders): 174/174test_combined_standard_repayment_property.py,code_health/test_source_conflicts.py,test_parameter_yaml_keys.py,test_reference_urls.py,test_known_dead_reference_urls.py,test_no_concatenated_reference_urls.py: 407/407.test_source_conflicts.pywas re-run after the candidate edit: 251/251.test_parameter_files.py,test_parameter_scale_thresholds.py,test_student_loan_idr_cap_order_property.py: 37/37No partner test reads any changed variable. Ruff format and check are clean.
Not in this PR
federal_student_loan_balance, so a borrower who holds both a consolidation loan and unconsolidated Direct Loans isn't split between the two plans. The SCF has neither the flag nor a split.standard_repaymententry inprograms.yaml, which Add IBR, PAYE, ICR, SAVE (counterfactual) and standard repayment plan payments #9720's triage suggested. I left it out because Compute student loan payments for tax-dependent borrowers from their own income #10803 edits that file.income_driven_repayment_balance_share,integration.yamlandprograms.yaml. This PR edits none of those files. Onincome_driven_repayment_standard_payment.pyit changes only the docstring, a file Compute student loan payments for tax-dependent borrowers from their own income #10803 doesn't touch. I appended the IDR assertion tostandard_repayment_payment.yamlrather than Compute student loan payments for tax-dependent borrowers from their own income #10803'sincome_driven_repayment_standard_payment.yaml. No other open PR touchesed/student_loans.axiom: TheAxiomFoundation/rulespec-us#1711 queued
🤖 Generated with Claude Code