Sub topic 14
A Sensible Order for Building the Model
This chapter assumes you know what each statement reports and can write spreadsheet formulas with cell references. It also assumes you have seen the links from the earlier chapters: net income into retained earnings, depreciation add-backs, working capital changes, the PP&E roll-forward, and the debt schedule. Here you will learn the sequence for wiring them together.
Why order matters
A linked model is a chain of dependencies. Ending cash depends on the cash flow statement. The cash flow statement depends on net income and balance sheet changes. Net income depends on interest, and interest depends on the debt schedule. If you build in the wrong order, you end up with formulas that point at empty cells, plugs that hide errors, and an imbalance you cannot localize.
A good order has three properties:
- Each step uses only things already built and checked.
- Cash is the last balance sheet line you fill in, so it is a result and not an input.
- You can test the model after every step, not only at the end.
The build sequence
The dependencies suggest the following order.
1. Historicals and assumptions
Load the last actual balance sheet as the opening position. Put every driver in one clearly labeled assumptions area: growth rates, margins, days of receivables and payables, capex, depreciation, repayments, interest rate, dividend policy, and tax rate. Do not bury constants inside formulas. A hardcoded 0.05 in an interest formula is the kind of thing you will forget about later.
The opening balance sheet must balance on its own. If it does not, nothing you build afterward will balance either.
2. Supporting schedules
Build the schedules that turn assumptions into balances:
- Working capital: receivables, inventory, and payables balances for each period.
- PP&E roll-forward: beginning balance plus capex minus depreciation.
- Debt schedule: beginning balance, borrowing, repayment, ending balance, and interest on the opening balance.
Schedules come before the statements because the statements only reference them. They have no dependency on net income, so nothing circular can arise yet.
3. Income statement
Pull revenue, costs, depreciation from the PP&E schedule, and interest from the debt schedule. Compute pre-tax income, tax, and net income. Stop here and look at the numbers. Margins that are far from history usually mean an assumption was entered wrongly.
4. Retained earnings
Roll equity forward: beginning retained earnings plus net income minus dividends. Common stock stays flat unless you forecast share issuance.
5. Cash flow statement
Start from net income. Add back depreciation, subtract increases in receivables and inventory, and add increases in payables. That gives operating cash flow. Take capex from the PP&E schedule for investing. For financing, use debt borrowing and repayment from the debt schedule, plus dividends. Ending cash is beginning cash plus the three sections.
6. Complete the balance sheet
Link every balance sheet line to its schedule. The cash line links to the ending cash of the cash flow statement, and nothing else. Do not calculate cash as total liabilities and equity minus other assets. That is a plug, and it makes the check pass no matter what.
7. Balance check
Add a row: total assets minus total liabilities and equity. It should be zero in every period. Put it near the top of the model or on a summary sheet so it is visible.
Dependencies at a glance
| Step | Built from | Produces | Test after the step |
|---|---|---|---|
| Assumptions | Historical data | Drivers, opening balances | Opening balance sheet balances |
| Schedules | Drivers, opening balances | Working capital, PP&E, debt balances, interest | Each roll-forward ties to its opening balance |
| Income statement | Drivers, schedules | Net income | Margins are plausible |
| Retained earnings | Net income, dividends | Ending equity | Change equals NI minus dividends |
| Cash flow statement | Net income, schedule changes | Ending cash | Sections sum to the cash change |
| Balance sheet | Schedules, equity, ending cash | Totals | Check row is zero |
The sequence as code
The Python example below uses the same opening balances and first-period assumptions as the spine's worked example, then runs a second period to show that the closing balances carry forward. The comments mark the build stages.
# Two forecast periods built in dependency order.
opening = {"cash": 100, "ar": 50, "ppe": 200, "ap": 30,
"debt": 100, "common": 100, "re": 120}
periods = [
{"revenue": 500, "cogs": 300, "opex": 100, "da": 20,
"ar_end": 60, "ap_end": 35, "capex": 30, "repay": 10, "div": 20},
{"revenue": 550, "cogs": 330, "opex": 105, "da": 22,
"ar_end": 66, "ap_end": 38, "capex": 30, "repay": 10, "div": 25},
]
INTEREST_RATE, TAX_RATE = 0.05, 0.20
def forecast(prior, a):
# Stage 2: schedules (use only prior balances and drivers)
ppe_end = prior["ppe"] + a["capex"] - a["da"]
debt_end = prior["debt"] - a["repay"]
interest = prior["debt"] * INTEREST_RATE # opening balance: no circularity
# Stage 3: income statement
ebt = a["revenue"] - a["cogs"] - a["opex"] - a["da"] - interest
net_income = ebt * (1 - TAX_RATE)
# Stage 4: retained earnings
re_end = prior["re"] + net_income - a["div"]
# Stage 5: cash flow statement (indirect method)
cfo = (net_income + a["da"]
- (a["ar_end"] - prior["ar"])
+ (a["ap_end"] - prior["ap"]))
cfi = -a["capex"]
cff = -a["repay"] - a["div"]
cash_end = prior["cash"] + cfo + cfi + cff
# Stage 6: balance sheet, with cash taken from the cash flow statement
closing = {"cash": cash_end, "ar": a["ar_end"], "ppe": ppe_end,
"ap": a["ap_end"], "debt": debt_end,
"common": prior["common"], "re": re_end}
# Stage 7: balance check
assets = closing["cash"] + closing["ar"] + closing["ppe"]
liab_eq = (closing["ap"] + closing["debt"]
+ closing["common"] + closing["re"])
check = assets - liab_eq
return closing, net_income, cfo, check
balance = opening
for n, assumptions in enumerate(periods, start=1):
balance, ni, cfo, check = forecast(balance, assumptions)
print(f"Period {n}: NI={ni:.1f} CFO={cfo:.1f} "
f"cash={balance['cash']:.1f} check={check:.6f}")
assert abs(check) < 1e-9The output is:
Period 1: NI=60.0 CFO=75.0 cash=115.0 check=0.000000
Period 2: NI=70.8 CFO=89.8 cash=139.8 check=0.000000The function returns the closing balance sheet, and the loop feeds it back in as the next period's opening balance. A spreadsheet does the same thing when each period's opening column points at the prior period's closing column.
Common errors in the build order
- Building the balance sheet first and plugging cash. The check passes by construction, so it can no longer catch mistakes.
- Writing the cash flow statement before the schedules. You then compute changes in working capital and PP&E ad hoc and later find they disagree with the balance sheet.
- Linking the first forecast period to the wrong opening column. Link it to the last actual balance sheet. Later periods link to the prior forecast column.
- Mixing sign conventions. An increase in an asset reduces cash, and an increase in a liability raises it. Pick one convention for the cash flow section, such as showing outflows as negatives, and use it throughout.
- Testing only at the end. An imbalance from three errors is much harder to untangle than three separate imbalances caught one step at a time.
Extending the order
When you add features later, such as a revolving credit facility or new equity issuance, keep the same pattern. First add the schedule, then connect it to the income statement if it creates an expense, then add its cash flow line, and finally link the new balance sheet balance. Check the balance after each of these steps.
Exercise
A colleague builds the balance sheet first and sets cash equal to total liabilities and equity minus all other assets, so the balance check is always zero. Which step of the build sequence does this skip, and what should cash link to instead?
Show answer
It skips the cash flow statement and the ending cash reconciliation (steps 5 and 6). Cash should link to ending cash on the cash flow statement, which is beginning cash plus operating, investing, and financing cash flows. With that link, the balance check can detect an error. With the plug, it cannot.
Exercise
In the code above, why is it safe to calculate interest as prior["debt"] * INTEREST_RATE before the income statement, and what would change if you used the average of opening and closing debt?
Show answer
Opening debt is known before the period starts, so interest does not depend on anything computed later in the same period. With average debt, interest would depend on closing debt. Closing debt depends on repayments, which in a cash-sweep model depend on cash flow, and cash flow depends on net income, which depends on interest. In this model repayment is a fixed input, so closing debt would not be circular. Once repayment responds to cash flow, the loop appears.