Sub topic 10
Interest Circularity: Causes, Circuit-Breaker Switch, and Iteration
Assume you understand debt balances, interest expense, cash flow, and basic spreadsheet or Python formulas. This chapter focuses on the circular reference created when debt interest depends on a balance that the interest itself helps determine.
Why circularity occurs
A debt schedule becomes circular when these relationships form a loop:
For example:
- Interest expense reduces profit.
- Lower profit reduces cash available for repayment.
- Lower repayment leaves a higher closing debt balance.
- A higher closing balance increases average debt.
- Higher average debt increases interest expense.
The same issue can occur with a revolver. A cash shortfall causes a draw, the draw creates interest expense, and that interest expense creates a larger cash shortfall.
Opening-balance interest avoids this loop because the opening balance is already known. Closing-balance and average-balance interest can be more accurate, but they require a method to resolve the dependency.
Circuit-breaker switch
A circuit-breaker switch lets you turn circular calculations off while building or checking the model. A common design uses a control cell named circularity_on:
0uses a non-circular interest calculation, such as opening-balance interest.1uses the intended average-balance calculation.
A spreadsheet formula might look like this:
=IF(circularity_on=1, rate*(opening_balance+closing_balance)/2, rate*opening_balance)Keep the switch off while checking the schedule. Turn it on only after the balance roll-forward, cash waterfall, and repayment limits work correctly. Add a visible warning when the switch is off so that a reviewer does not mistake the simplified result for the final result.
> callout warning > A circuit-breaker switch is a control, not a cure. It prevents circularity during setup, but the model still needs a documented method for producing the final circular result.
Iterative calculation
With iteration enabled, the model repeatedly recalculates the circular formulas. Each pass uses the previous pass's closing balance to calculate interest, then recalculates cash and repayment. The process stops when the change between passes is below a tolerance.
A Python version makes the process explicit:
def sweep_with_average_interest(open_bal, rate, cash_before_interest,
tol=1e-9, max_iter=100):
interest = open_bal * rate
close = open_bal
for _ in range(max_iter):
sweep = max(0.0, min(open_bal, cash_before_interest - interest))
close = open_bal - sweep
new_interest = rate * (open_bal + close) / 2
if abs(new_interest - interest) < tol:
interest = new_interest
break
interest = new_interest
else:
raise RuntimeError("Circular calculation did not converge")
return interest, close
interest, close = sweep_with_average_interest(100, 0.10, 30)
print(round(interest, 4), round(close, 4))Here, the function limits the sweep to the opening debt balance and raises an error if 100 iterations do not produce convergence. A model should also check that debt never becomes negative, cash does not fall below its minimum without an available revolver, and the balance roll-forward ties.
Practical choices
Use opening-balance interest when transparency and stability matter more than timing precision. Use average-balance interest when repayments occur throughout the period and the added precision affects valuation or credit analysis. If iteration is unstable, inspect the sweep formula, repayment caps, minimum cash, and any sign errors before increasing the iteration limit.
Exercise
A model calculates interest on the average debt balance, and interest changes by less than the chosen tolerance after each pass. What does this indicate?
Show answer
The circular calculation has converged. The current interest and closing balance are stable within the model's tolerance.