Sub topic 5
Building the mandatory repayment schedule
This chapter assumes you can build a balance roll-forward (opening balance, movements, closing balance) and compute interest on an opening balance. It also assumes you know the bullet, straight-line and level-payment profiles from the previous chapter. Here you turn those profiles into the single row of a debt schedule that the rest of the model reads: mandatory repayment.
What "mandatory" means
Mandatory repayment is the principal the borrower must pay under the loan agreement, whether or not it has spare cash. It differs from optional repayment, which is a prepayment the borrower chooses to make or a cash sweep forces. The model keeps the two on separate rows for three reasons:
- Mandatory repayment is fixed by the contract. It does not depend on the cash balance, so it can be calculated before the cash waterfall runs.
- It is the first claim on cash. The cash available for debt repayment is calculated after mandatory repayments, and a shortfall is covered by the revolver.
- Only the optional row responds to the sweep. If both rows were mixed, you could not tell contractual obligations from discretionary ones.
The core formula
For every profile, the mandatory repayment in period t is the scheduled amount, capped at the opening balance:
Mandatory repayment = MIN( Opening balance, Scheduled amount )The cap matters when prepayments have already shrunk the balance. A loan with a scheduled 200 per year and an opening balance of 120 must repay only 120. Without the cap, the closing balance goes negative and the model "lends" money back to the bank.
The scheduled amount depends on the profile:
| Profile | Scheduled amount in period t |
|---|---|
| Bullet | 0 until maturity, then the full balance |
| Straight-line | Original principal divided by number of periods |
| Percentage of original | Original principal times the contractual percentage for period t, with the balance due at maturity |
| Level payment | Fixed payment minus interest on the opening balance |
The percentage profile is common for term loans that amortize 1% a year with the rest due at maturity. Its inputs are a row of percentages on the assumptions sheet, one per period.
A reusable function
The function below builds the mandatory row for all four profiles. It keeps a running balance, applies the cap, and forces a balloon at maturity for the bullet and percentage profiles.
def mandatory_repayments(original, n, profile, rate=0.0, pcts=None):
"""Return the mandatory principal repayment for each of n periods."""
balance = original
repayments = []
if profile == "level":
payment = original * rate / (1 - (1 + rate) ** -n) if rate else original / n
for t in range(1, n + 1):
if profile == "bullet":
scheduled = balance if t == n else 0.0
elif profile == "straight":
scheduled = original / n
elif profile == "pct":
scheduled = balance if t == n else original * pcts[t - 1]
elif profile == "level":
scheduled = payment - balance * rate
else:
raise ValueError("unknown profile: " + profile)
repaid = min(scheduled, balance)
repayments.append(repaid)
balance -= repaid
return repayments
for name, kwargs in [
("bullet", {}),
("straight", {}),
("pct", {"pcts": [0.01] * 5}),
("level", {"rate": 0.08}),
]:
row = mandatory_repayments(1000, 5, name, **kwargs)
print(name.ljust(8), " ".join(f"{x:.2f}" for x in row))The output is:
bullet 0.00 0.00 0.00 0.00 1000.00
straight 200.00 200.00 200.00 200.00 200.00
pct 10.00 10.00 10.00 10.00 960.00
level 170.46 184.09 198.82 214.73 231.90All four rows sum to 1000, which is the check that the loan is fully repaid at maturity. In the level row, the payment is a constant 250.46 and the principal portion grows because the interest portion falls. The level profile therefore needs the interest rate, so a rate change must flow into this row.
The per-period logic
Each period follows the same steps. The order matters because the cap uses the opening balance, and the closing balance feeds the next period.
Spreadsheet layout
Put the contract inputs in one block: original principal, first repayment period, maturity period, the profile selector, and the percentage row. Then the mandatory row uses one formula across all periods. A common layout is:
Scheduled = IF(period > maturity, 0,
IF(period = maturity, Opening,
CHOOSE(profile, 0, Original/Term, Original*pct, PMT-based principal)))
Mandatory = MIN(Opening, Scheduled)
Closing = Opening - Mandatory - OptionalA few layout rules prevent most errors:
- Use one formula across the row. Do not hard-code a bullet payment into the last column.
- Use a timeline flag, such as 1 when the period is at or before maturity. Multiply by the flag so a model extended past maturity shows zeros instead of repeating the schedule.
- Start repayments after the grace period. If the loan has a moratorium for two periods, the scheduled amount is zero for those periods, and the straight-line divisor is the number of repayment periods, not the loan term.
- Keep signs consistent. Show the repayment as a positive number on the schedule and as a negative number only on the cash flow statement.
Edge cases
Maturity inside the forecast. A bullet that falls due in year 3 of a 5-year forecast requires 1000 of cash in year 3. The model has two honest choices. It can let the cash waterfall and revolver find the money, which often shows a funding gap. Or it can add a refinancing tranche with its own terms. Letting the balance silently roll over is not a neutral choice. It is an assumption, and it should be a visible switch.
Sweeps and the cap. When a cash sweep has reduced the balance, later mandatory payments from a percentage or straight-line schedule can exceed what is left. The MIN cap handles this. Some agreements instead apply prepayments to the last installments first or to the next installments first. That choice changes the schedule, so read the contract before assuming either.
Level payments with floating rates. When the rate changes, the original payment is no longer correct. The usual treatment recalculates the payment each period from the opening balance, the current rate and the remaining periods. The principal then equals that payment minus interest on the opening balance. A level payment recalculated this way also adjusts automatically after a prepayment.
Periods that are not years. For quarterly or monthly schedules, divide the annual rate by the periods per year and count periods, not years. A 5-year loan with quarterly payments has 20 periods, and the straight-line amount is original principal divided by 20. Check that the rate and the period count use the same frequency.
Circularity. If interest is on the opening balance, a level-payment principal does not create a circular reference. If interest is on an average balance, the interest depends on the closing balance. The closing balance depends on the repayment, and in the level profile the repayment depends on the interest. This is one of the loops that the circularity chapter resolves.
Links to the rest of the model
The mandatory row feeds four places:
- The cash flow statement shows it in financing activities as a repayment of debt.
- The cash waterfall subtracts it before calculating cash available for optional repayment.
- The balance sheet splits the closing balance. The current portion is the next 12 months of mandatory repayments, taken from the following period's mandatory row. The remainder is long-term debt.
- Credit metrics, such as the debt service coverage ratio, add the mandatory repayment to interest as the total scheduled debt service.
Checks to build in
Add these checks beside the schedule so errors show up immediately:
- The sum of mandatory repayments equals original principal when no prepayments occur.
- The closing balance is never negative.
- The closing balance after maturity is zero.
- Mandatory repayment never exceeds the opening balance.
- In the level profile, the payment (interest plus principal) is constant across periods.
Exercise
A term loan of 600 has a 3-year term and amortizes 10% of the original principal in year 1 and 20% in year 2, with the rest due at maturity. In year 1, a cash sweep prepays 450 in addition to the mandatory repayment. What is the mandatory repayment in each of the three years, using the MIN cap and the original principal as the base for percentages?
Show answer
Year 1 scheduled is 600 x 10% = 60, and the opening balance is 600, so mandatory = 60. The closing balance is 600 - 60 - 450 = 90. Year 2 scheduled is 600 x 20% = 120, but the opening balance is only 90, so MIN gives a mandatory repayment of 90. The closing balance is 0. In year 3 the opening balance is 0, so the mandatory repayment is 0. Without the cap, year 2 would repay 120 and leave a balance of -30.
Exercise
A 4-year loan of 800 is repaid in level annual payments at 10% interest. Interest is on the opening balance. The payment is 252.38. What are the interest and the mandatory principal repayment in year 1 and year 2?
Show answer
Year 1 interest is 800 x 10% = 80, so principal is 252.38 - 80 = 172.38 and the closing balance is 627.62. Year 2 interest is 627.62 x 10% = 62.76, so principal is 252.38 - 62.76 = 189.62 and the closing balance is 438.00. The principal portion grows by 10% each year (172.38 x 1.1 = 189.62).