Repository navigation
uprate_student_loan_plans relabels existing holders in 2025 against SLC plan rules (Plan 4, NI Plan 1, Postgraduate Loans, pre-2006 write-off) #2636
Copy link
Copy link
Closed as not planned
Description
Problem
uprate_student_loan_plans (policyengine_uk/data/economic_assumptions.py), Step 1, relabels every existing loan holder in a projected year by a course started at 18 (uni_start_year = year - age + 18). It ignores the holder's funding nation, plan type and the plan they held in the base year. So in the first projected year, 2025 on a 2024 base, it changes plans that SLC rules say cannot change.
Reproduction on main
main at 3bcacaa (policyengine-uk 2.153.0). One person per row, tertiary-educated, £500 stored repayments, a 2024 base projected to 2025 with uprate_student_loan_plans(current_2025, base_2024, system.parameters, base_year=2024):
| Case | Region | 2024 plan | 2025 plan | 2025 repayments |
|---|---|---|---|---|
| Plan 2 holder, age 33 (a 2014 mature starter) | London | PLAN_2 | PLAN_1 | 500 |
| Plan 1 holder, age 45 (1998 intake) | London | PLAN_1 | PLAN_1 | 500 |
| Plan 1 holder, age 50 (pre-2006 loan) | London | PLAN_1 | NONE | 0 |
| Plan 4 holder, age 30 | Scotland | PLAN_4 | PLAN_2 | 500 |
| Plan 4 holder, age 40 | Scotland | PLAN_4 | PLAN_1 | 500 |
| Plan 1 holder, age 25 | Northern Ireland | PLAN_1 | PLAN_2 | 500 |
| Plan 2 holder, age 22 | Wales | PLAN_2 | PLAN_2 | 500 |
| Postgraduate Loan, age 28 | London | POSTGRADUATE | PLAN_2 | 500 |
Expected behaviour (SLC plan rules)
From GOV.UK, Which repayment plan you're on and When your student loan gets written off:
- Funding nation. Student Awards Agency Scotland borrowers are on Plan 4 and Student Finance NI borrowers on Plan 1, "whether you studied an undergraduate course or a postgraduate course". The start-year boundaries (1 September 2012, 1 August 2023) apply only to England and Wales. Step 1 should leave Scottish Plan 4 and Northern Irish Plan 1 holders on their plans. The function's own new-borrower rule (
new_borrower_plan) and the teststest_extended_*_follow_funding_nationalready use these rules for people it adds; only the relabelling of existing holders ignores them. - Postgraduate Loans are a separate plan, and a borrower can hold one alongside an undergraduate plan. Step 1 should not turn
POSTGRADUATEinto an undergraduate plan. - Write-off. Plan 1 loans first paid before 1 September 2006 are written off at 65. Later Plan 1 loans are written off 25 years after the April the borrower was first due to repay. Step 1 writes off every plan at
uni_start_year + 29, so the age-50 Plan 1 holder above loses the loan 15 years early. Step 2 of the same function already applies the age-65 rule (_PLAN1_LAST_AGE_65_WRITEOFF_UNI_START); Step 1 should use the same rule. Plan 2 (30 years), Plan 4 (30 years, or 65 for pre-August 2007 loans) and Plan 5 (40 years) have their own terms. - Course dating. Where the data already date a holder's course (an FRS or Microcosm plan from the age they left full-time education), the age-18 rule moves mature starters across a plan boundary: the 2014 starter aged 33 becomes Plan 1. Since ages are fixed in projection, some cohort shift is intended (the docstring says so). But the relabel should shift the base-year course start by the years projected,
base_start + (year - base_year), not recompute it from age 18. That keeps the base plan in the base year's terms and gives the same result as today for anyone who did start at 18.
Impact
- Microcosm UK's frame carries NONE, PLAN_1, PLAN_2 and PLAN_5 only, so the Plan 4 part of item 1 and item 2 do not arise there. Items 3 and 4, and Northern Irish Plan 1 holders where the frame assigns them, do. Datasets that carry Plan 4 or Postgraduate Loans see all four.
- Microcosm calibrates its SLC rows at 2025 on the engine's relabelled plans. Its PR Lock policyengine-uk 2.151.0 and write the UK inputs it reads (#1095, #1278) microcosm#1383 adds
test_the_engine_relabels_course_dated_plans_by_age_at_2025(packages/microcosm-build/tests/engine/uk/test_uk_student_loans.py), which pins rows 1 and 3 of the table so it fails when this is fixed and the SLC rows are re-measured. That review asked for a pe-uk issue to link; this is it. - EFRS student_loan_repayments input overrides modelled repayment formula #1764 (stored
student_loan_repaymentsoverride the formula) hides part of this: a relabelled holder keeps their base-year repayment, but a written-off holder's is set to 0.
Related
- Inputs and fixes Microcosm UK needs: bonus sacrifice, spousal maintenance, Widowed Parent's Allowance, student loan plans, other heating fuels #2572 section 4 and Add bonus sacrifice, spousal maintenance, Widowed Parent's Allowance and heating fuel inputs, and fix student loan plan projection #2573 fixed Steps 2 and 3 and keyed the draws on
person_id. Our Inputs and fixes Microcosm UK needs: bonus sacrifice, spousal maintenance, Widowed Parent's Allowance, student loan plans, other heating fuels #2572 write-up called Step 1's cohort rule right for static-age data and did not check it against the funding-nation, postgraduate and write-off rules. That was a miss on our side. - Lock policyengine-uk 2.151.0 and write the UK inputs it reads (#1095, #1278) microcosm#1383.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels
Activity
vahid-ahmadi commentedon Oct 25, 2026
Status, 26 Oct 2026: #2650 (merged 25 Oct at 2df1918) fixes the relabelling in the table above. Step 1 of
uprate_student_loan_plansnow keeps each existing holder's recorded plan and repayment, so Scottish Plan 4, Northern Irish Plan 1 and Postgraduate Loan holders keep their plans and nobody's loan is cleared by the age-18 write-off rule (items 1 and 2, and the early write-off in item 3).Not fixed: exact write-off dates (item 3) and date-aware cohort shifts across the 2012 and 2023 plan boundaries (item 4). Retained plans can now run too long instead of too short. #2675 tracks that work, so this issue could be closed in its favour; leaving that call to Vahid.
🤖 Generated with Claude Code
juaristi22 commentedon Oct 26, 2026
Closing as superseded by #2675, which now explicitly tracks both remaining tasks: forward cohort transitions and exact date-aware, plan-specific write-offs.
Merged PR #2650 fixes the unsupported relabelling and generic cancellation by preserving recorded plans and repayments. The remaining date-aware work is still unimplemented and stays open in #2675. This closure consolidates tracking; it does not mark that work complete.
Pin the engine keeping recorded student loan plans from 2.162.2