Sub topic 1
Debt Instruments and the Terms a Model Needs
This chapter sets up the core inputs for a debt schedule: the terms of each loan, how its balance changes over time, how interest is charged, and how repayment is structured.
Prerequisites
You should know basic spreadsheet or Python work, compound interest, and the difference between principal and interest. You should also be able to read a balance sheet and cash flow statement.
Debt instruments and key terms
Every tranche (a separate slice of borrowing) needs these inputs:
- Principal: the amount borrowed.
- Interest rate: annual rate, fixed or floating.
- Maturity: the date the balance must be fully repaid.
- Repayment profile: how principal is repaid over time.
The balance roll-forward
Each period, the closing balance equals the opening balance plus drawdowns, minus repayments.
Calculating interest
Interest can use three balances:
- Opening balance: simple and free of circular references, but it ignores repayments during the period.
- Closing balance: depends on repayments, which can depend on interest.
- Average balance: the most accurate for a mid-period view, but it creates circularity.
def interest_options(opening, closing, rate):
average = (opening + closing) / 2
return {
"opening": opening * rate,
"closing": closing * rate,
"average": average * rate,
}
print(interest_options(1000, 800, 0.08))Repayment profiles
- Bullet: no principal until maturity, then the full amount.
- Straight-line: equal principal each period.
- Level payment: equal total payment each period, with the principal share rising over time.
principal, rate, years = 1000, 0.08, 5
level = principal * rate / (1 - (1 + rate) ** -years)
straight = principal / years
print(round(level, 2), round(straight, 2))Exercise
Exercise
A loan opens at 500 and closes at 400 in a period, at 6% a year. What is the interest on the average balance for that period?
Show answer
The average balance is 450, and 450 × 0.06 = 27.0.