Sub topic 2
The balance roll-forward: opening, movements, closing
This chapter assumes you can read the three financial statements, understand compound interest, and write short Python functions or basic spreadsheet formulas. It builds the structure that every later debt calculation sits on: the balance roll-forward.
Why the roll-forward comes first
A debt schedule tracks how much a company owes at each date. Interest, repayments, revolver draws and covenant ratios all depend on that balance. If the balance is wrong, everything after it is wrong.
The roll-forward is a small block of rows that explains how the balance moves from one period to the next. Every debt tranche gets its own block. The block always has the same shape:
- Opening balance: what the company owed at the start of the period.
- Movements: draws (new borrowing) and repayments (cash paid back).
- Closing balance: opening balance plus movements.
The identity is:
closing = opening + draws − repayments
The closing balance of one period is the opening balance of the next. That link is the only thing that connects periods, so it is the most important formula in the schedule.
Sign conventions
Pick one sign convention and keep it for the whole model. Two common choices:
| Convention | Draws | Repayments | Closing formula |
|---|---|---|---|
| Repayments entered as positive numbers | Positive | Positive | opening + draws − repayments |
| Repayments entered as negative numbers | Positive | Negative | opening + draws + repayments |
The first convention is easier to read in a schedule, because "repayment of 100" is a positive 100 in the row labelled "Repayment". The second makes the closing balance a plain sum of the rows above it, which suits a spreadsheet SUM. Mixing the two is a common source of errors. A repayment entered with the wrong sign increases the debt instead of reducing it, and nothing in the arithmetic warns you.
This chapter uses the first convention: movements are stored as positive amounts and the formula subtracts repayments.
A first roll-forward in Python
The function below builds a roll-forward for a single term loan. It takes the opening balance for the first period, a list of draws and a list of repayments, one entry per period.
def roll_forward(opening, draws, repayments):
"""Return one row per period: (period, opening, draws, repayments, closing)."""
if len(draws) != len(repayments):
raise ValueError("draws and repayments must cover the same periods")
rows = []
balance = opening
for t, (draw, repay) in enumerate(zip(draws, repayments), start=1):
closing = balance + draw - repay
rows.append((t, balance, draw, repay, closing))
balance = closing # closing of this period is opening of the next
return rows
rows = roll_forward(
opening=1000,
draws=[0, 0, 0, 0],
repayments=[100, 100, 100, 100],
)
for t, opening, draw, repay, closing in rows:
print(t, opening, draw, repay, closing)The output is:
1 1000 0 100 900
2 900 0 100 800
3 800 0 100 700
4 700 0 100 600The line balance = closing is the link between periods. In a spreadsheet, the same link is a formula in the opening balance cell that points at the previous column's closing balance cell, for example =D10 in cell E6.
Spreadsheet layout
Time runs across the columns and line items run down the rows. A tranche block looks like this:
| Row | Label | Period 1 | Period 2 | Period 3 |
|---|---|---|---|---|
| 1 | Opening balance | 1,000 | 900 | 800 |
| 2 | Draws | 0 | 0 | 0 |
| 3 | Repayments | 100 | 100 | 100 |
| 4 | Closing balance | 900 | 800 | 700 |
Three habits keep the block reliable:
- Keep one formula per row, copied across all periods. If row 1 has a different formula in the first period from the rest, label it clearly as the starting input.
- Take the first opening balance from an input cell or from the prior-year balance sheet. Do not type it into the schedule.
- Never type numbers over formulas in the middle of the row. A hardcoded cell in a copied row is hard to spot and survives every scenario you run.
The first period and the balance sheet
The opening balance in the first forecast period is not an assumption of the debt schedule. It is the closing debt on the last historical balance sheet. Link the cell to that balance sheet figure so the two cannot drift apart.
If the company has several tranches, each has its own opening balance. The tranches should add up to the balance sheet debt figure. A quick check cell helps:
def check_opening(tranche_balances, balance_sheet_debt, tol=1e-6):
total = sum(tranche_balances)
return abs(total - balance_sheet_debt) < tol
print(check_opening([600, 400], 1000)) # True
print(check_opening([600, 350], 1000)) # FalseA False result means a tranche is missing, a balance is stale, or the balance sheet groups debt differently from the schedule. For example, the balance sheet may show the current portion of long-term debt on a separate line. Find the reason before going on, because later chapters will build interest and cash flow on this number.
Movements: what goes in each row
The roll-forward can have more than two movement rows. The set depends on the instrument:
- Draws or issuance: new borrowing. A term loan usually has one draw at closing. A revolver may draw in any period.
- Mandatory repayments: scheduled principal payments set by the loan agreement. Later chapters build these.
- Optional repayments: voluntary prepayments, including a cash sweep.
- Non-cash movements: items such as payment-in-kind interest, which is interest added to the balance instead of paid in cash, or foreign exchange revaluation of foreign-currency debt.
Keep each type on its own row. Separate rows let you see what drove a change in the balance, let you switch individual rows on and off in scenarios, and let each row link to a different place in the cash flow statement.
Constraints that protect the balance
A roll-forward formula by itself will happily produce nonsense. A repayment larger than the opening balance gives a negative closing balance, which means the lender owes the company money. Add a cap to each repayment row:
def capped_repayment(opening, scheduled):
"""Repay no more than what is owed."""
return max(0.0, min(opening, scheduled))
print(capped_repayment(80, 100)) # 80: only 80 is left to repay
print(capped_repayment(500, 100)) # 100: scheduled amount fitsIn a spreadsheet this is =MAX(0, MIN(opening, scheduled)). The MAX(0, ...) part also protects against a negative scheduled amount sneaking in from an input error.
Add two permanent checks under every block:
- Closing balance is never below zero.
- Closing balance equals opening plus draws minus repayments. This looks circular, but it catches cases where someone overwrote the closing cell.
Timing: why the period matters
A roll-forward works in discrete periods. All movements in a period are treated as if the balance moves from opening to closing in a single step. That has a consequence for the next chapter: interest can be calculated on the opening balance, the closing balance, or the average of the two. Each choice answers the question "when during the period did the movements happen?" differently.
For now the point is practical. The period length must match the rest of the model. If the income statement is annual, a debt schedule with monthly rows has to be summed back to annual figures. If the schedule is annual but a loan has quarterly payments, the annual repayment row holds the sum of four payments and the model loses within-year timing. Choose the period length first and use it in every block.
Common errors
| Error | Symptom | Fix |
|---|---|---|
| Opening balance typed in each period | Balance does not respond when an earlier repayment changes | Link opening to the previous closing |
| Mixed sign conventions | Debt rises when a repayment is entered | Document one convention and test with a known repayment |
| Repayment exceeds balance | Negative closing debt | Cap with MAX and MIN |
| First opening balance disagrees with the balance sheet | Balance sheet does not balance after linking | Add a check against the historical balance sheet |
| Everything in one row | Cannot tell a sweep from a scheduled payment | One row per movement type |
Extending to several tranches
Models usually carry more than one tranche, such as a term loan and a revolver, or senior and subordinated notes. Each tranche gets its own roll-forward block with the same row structure. A summary block at the bottom adds up the closing balances, which is the figure that goes to the balance sheet and the one that credit ratios use later.
tranches = {
"term_loan": roll_forward(1000, [0, 0, 0], [100, 100, 100]),
"notes": roll_forward(500, [0, 0, 0], [0, 0, 500]),
}
for period in range(3):
total = sum(rows[period][4] for rows in tranches.values())
print(period + 1, total)The output is 1 1400, 2 1300 and 3 700. Period 3 falls sharply because the notes are repaid in full at maturity.
Identical structure across tranches is a feature. It lets you copy a block, change the inputs and trust the formulas.
Summary of the working model
- Each tranche has its own block: opening, draws, repayments, closing.
- Closing equals opening plus draws minus repayments, and the closing balance becomes the next period's opening balance.
- The first opening balance links to the last historical balance sheet.
- Repayments are capped at what is owed, and checks flag negative balances.
- Separate rows for separate movement types keep the schedule readable and flexible.
The next chapter takes the balances from this roll-forward and calculates interest on them.
Exercise
A loan has an opening balance of 500 in period 1. Period 1 has a draw of 50 and a repayment of 120. Period 2 has no draw and a scheduled repayment of 450. Using repayments capped at the balance owed, what are the closing balances for periods 1 and 2, and what repayment is actually made in period 2?
Show answer
Period 1 closing = 500 + 50 − 120 = 430. Period 2 opening is 430. The scheduled repayment of 450 exceeds the balance, so the capped repayment is min(430, 450) = 430. Period 2 closing = 430 + 0 − 430 = 0. The actual period 2 repayment is 430, not 450.
Exercise
A colleague's model enters repayments as negative numbers, but the closing balance formula is still opening + draws − repayments. What happens to the balance when a repayment of −100 is entered, and how would you detect and prevent this?
Show answer
Subtracting −100 adds 100, so the debt increases by 100 instead of falling. Detect it by testing the model with a known repayment and confirming the closing balance falls, and by adding a check that closing never exceeds opening plus draws. Prevent it by documenting one sign convention, and either changing the formula to opening + draws + repayments for negative entries, or wrapping inputs in ABS or MAX(0, ...) so the sign is enforced.