student_loan_balance has no uprating, but caps repayments and enters net_wealth

Open
#2,946 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start from variables/gov/hmrc/student_loans/student_loan_balance.py and look at how uprating is declared on comparable debt variables such as mortgage_debt and consumer_debt. Then read the two consumers named in the issue, student_loan_repayment.py (the cap around line 27) and net_wealth.py (line 21), to see the effect of holding the balance flat. Done means a maintainer has chosen one of the three options and the variable plus its documentation reflects that choice; the modelling decision blocks any patch, so a newcomer should not start coding before it is settled.

Written by the indexing model from the issue text.

Description

student_loan_balance (variables/gov/hmrc/student_loans/student_loan_balance.py) has no uprating, so a dataset's balance is held flat in every later year.

It matters in two places:

  • student_loan_repayment caps repayments at the balance (student_loan_repayment.py:27), so a stale balance can cap repayments too early.
  • net_wealth subtracts it (net_wealth.py:21) next to mortgage_debt and consumer_debt, which are uprated by per-capita GDP. The debts therefore drift apart in later years.

A real balance grows with interest (RPI-linked) and falls with repayments, so no single index is exactly right. Options:

  1. Per-capita GDP, to match the other household debts.
  2. An RPI-based index, closer to how interest accrues.
  3. Leave it flat, but document that choice on the variable.

This needs a modelling decision, so I haven't opened a PR.

Drafted with AI assistance and checked against main at 70014b3.

Dominant language
Python
Stars
53
Forks
34
Avg merge
3d 7h
Merged PRs (30d)
100

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PolicyEngine/policyengine-uk

All issues in PolicyEngine/policyengine-uk

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.