Skip to content

Commit a37d009

Browse files
MaxGhenisclaude
andcommitted
Consolidate comments in plan_2_interest_rate
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent b1dbe8c commit a37d009

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

policyengine_uk/variables/gov/hmrc/student_loans/plan_2_interest_rate.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ def formula(person, period, parameters):
2121
rpi = parameters(period).gov.economic_assumptions.yoy_growth.obr.rpi
2222

2323
# Per Regulation 21AB, lower interest threshold = repayment threshold
24-
# Below lower threshold: RPI only
25-
# Above upper threshold: RPI + 3%
26-
# Between: linear taper
24+
# Below lower: RPI only; above upper: RPI + 3%; between: linear taper
2725
taper_fraction = np.clip(
2826
(income - p.thresholds.plan_2)
2927
/ (p.interest_rates.plan_2.upper_threshold - p.thresholds.plan_2),
3028
0,
3129
1,
3230
)
33-
return rpi + (p.interest_rates.plan_2.additional_rate * taper_fraction)
31+
return rpi + p.interest_rates.plan_2.additional_rate * taper_fraction

0 commit comments

Comments
 (0)