Where you are. Three lessons have turned module 0’s stories into machinery: money is an entry in a list, every movement is a posting, and the miniledger refuses any posting whose legs do not cancel. So far that machinery has worked on fragments - an account here, a transfer there. This lesson hands it a whole institution. You will lay a bank out the way the miniledger sees it, four typed accounts in two columns, assert the single invariant that joins the columns, and compute the number that says how thin the bank’s own skin is under everything it holds.
Strip the bank
Take a bank - a real one, whose name you would recognise - and start removing things. The branches first: the marble, the queue ropes, the pens on chains. Then the app, the cards, the sort codes, the adverts. Then the people: tellers, analysts, compliance officers, the chief executive. Banks replace every one of those constantly, and nobody’s money moves an inch while they do.
What refuses to disappear is two columns of numbers. One column lists what the bank holds. The other lists what it owes, and to whom. One rule joins them: the columns agree - not at the end of the quarter, not when the auditors visit, but after every single edit. Keep the columns and everything you stripped away can be rebuilt around them; delete them and there was never a bank at all. The buildings and the app were not the bank. They were its user interface.
The idea in one paragraph
A bank is a balance sheet plus a licence. The asset column is what it holds: reserves, its own balance at the central bank - tier 1 money, from module 0’s map - and loans, borrowers’ promises to repay it. The other column is who holds claims on those assets: deposits, the bank’s IOUs to its customers, which is what your balance has been since the goldsmiths; and equity, the owners’ claim on whatever is left once every other claim is met. One invariant fuses the columns into a single statement - assets equal liabilities plus equity - and a serious ledger asserts it after every posting rather than reporting it once a quarter. Read the columns and the bank’s whole character is on display, including the fact this lesson ends on: the equity line is thin, the ratio of assets to equity - leverage - measures exactly how thin, and that number is the distance between an ordinary bad year and depositors’ money being touched.
The two columns
Start on the asset side, because it is the side that surprises. A bank’s assets are mostly not things at all; they are other people’s promises. Reserves you have already met twice: module 0 coined the word for a bank’s own balance at the central bank, and its milestone had you move them with your own hands to get Alice’s payment across two banks. Here reserves appear in their quietest role: a line in the bank’s asset column, the money it holds rather than the money it owes.
The counter-intuitive line is loans. Your mortgage feels like your debt, and it is - but the same agreement, read from the bank’s side, is a stream of repayments owed to it, and a credible promise of money is an asset the way an IOU in your favour is an asset. On a typical bank’s sheet the loans line dwarfs the reserves line: most of what a bank holds is claims on its borrowers.
Across the divide sits almost everything the bank owes: deposits. Your account balance is the goldsmith’s receipt from module 0 grown into a database row - the bank’s IOU, one agreement seen from two sets of books. In yours, an asset; in the bank’s, a debt it must make good every time you tap a card or ask for cash.
And beneath deposits, the last line: equity, the owners’ claim on what is left.
The figure’s bank is the one you will build in the exercise: Alder Bank, holding reserves of 200 and loans of 800 against deposits of 900 and equity of 100. The numbers are stylised - round on purpose, small enough to check in your head - and every number in the rest of this lesson is derived from them.
Wider than the screen; scroll it sideways.
The invariant, running
Here is Alder Bank in the miniledger:
from miniledger import Ledger, ASSET, LIABILITY, EQUITY
bank = Ledger("Alder Bank")
bank.open("reserves", ASSET)
bank.open("loans", ASSET)
bank.open("deposits", LIABILITY)
bank.open("equity", EQUITY)
bank.post([("reserves", 200), ("loans", 800), ("deposits", 900), ("equity", 100)],
memo="opening sheet")
open gives every account a kind - ASSET, LIABILITY or EQUITY - and the kinds are what turn a flat list of accounts into two columns. post applies its legs atomically, a positive amount growing the account whatever its kind. Before touching a single balance it sums the changes by kind and demands that the change in assets equal the change in liabilities plus the change in equity; the opening posting passes because 200 + 800 on the holds side is exactly 900 + 100 on the owes side. After applying the legs it calls assert_balanced(), which re-checks the whole sheet from scratch. The library’s own docstring says why it checks twice: belt and braces is what a ledger is for.
How thin is the skin
Two of Alder Bank’s numbers, divided, describe its whole risk posture:
In words: leverage is how much the bank holds for each unit its owners have at stake. Alder Bank holds 1,000 on equity of 100 - leverage of 10x. The useful reading is the reciprocal: one tenth is the fraction of the bank’s assets that can evaporate before the owners’ claim is gone and losses start landing on people the bank owes. Losses go to equity first; that is what “the residual” means when the news is bad. The thinner the skin, the shorter the distance from a bad year to a broken promise.
Which leaves the question the liability column quietly asks: why do depositors sleep at night? A deposit is an unsecured loan to an institution running at 10x. Part of the answer arrives over the rest of the course; one piece belongs on this page, because it rewrites what the deposits line means. Deposit insurance is a standing scheme that guarantees deposits up to a capped amount, set by law. Below the cap, a depositor is made whole even if equity hits zero and keeps falling; above it, a deposit is what it always was underneath - an unsecured claim on the bank, queueing with the other creditors. The cap’s actual figure is dated business, differing by jurisdiction and moving by the decade, so it lives where this course keeps dated things: lesson 13 carries it, with its date, next to the other credit risks in the cash pile.
Review
Two columns under one invariant
A bank is a balance sheet plus a licence. The asset column is what it holds: reserves, its own balance at the central bank, and loans, which are borrowers’ promises to repay it. The other column is who holds claims on those assets: deposits, the bank’s IOUs to its customers, which is what your balance has been since the goldsmiths, and equity, the owners’ claim on whatever is left once every other claim is met. One invariant fuses the columns into a single statement, that assets equal liabilities plus equity, and a serious ledger asserts it after every posting rather than reporting it once a quarter. Your deposit is on the liability side. It is not money the bank is holding for you; it is money the bank owes you.
Leverage is the distance to your money
Read the columns and the bank’s whole character is on display, including the thing this lesson ends on: the equity line is thin. Leverage, the ratio of assets to equity, measures exactly how thin, and that number is the distance between an ordinary bad year and depositors’ money being touched. If assets fall by more than the equity cushion, the losses have nowhere left to go but the liability side, and the liability side is you. Deposit insurance protects balances only up to a capped amount, and everything above that cap is an unsecured claim on the bank. The same idea returns later applied to trading positions, where it multiplies gains and losses in exactly the same proportion.
Check yourself
1. Your banking app shows a balance and calls it yours. Where does that number sit on your bank’s balance sheet, and why there?
On the liability side, inside the deposits line. The balance is not something the bank keeps for you; it is something the bank owes you - the goldsmith’s IOU as a database row. One agreement, two books: in your personal accounting the deposit is an asset, in the bank’s it is a debt. Module 0’s map sorted money by whose liability it is, and this is that same rule applied inside a single bank.
2. Alder Bank’s equity line says 100. Where in the bank are those 100 actually kept?
Nowhere. Equity is not a store of anything; the storable things - reserves, the loan contracts - are all in the asset column. The 100 is a residual: assets of 1,000 minus deposits of 900, the owners’ claim on what would remain if every other claim were paid. The ledger holds it as an account line so the invariant can be checked by summing, but the line records a difference, not a location.
3. post refuses any posting whose legs do not cancel, and it still calls assert_balanced() on the whole sheet afterwards. What does the second check add?
Induction plus a safety net. The change check proves the posting preserves the invariant, assuming the sheet was balanced before - the inductive step. assert_balanced re-checks the state itself, so a balance mutated through any other path - a hand-edited account, a careless method in some future subclass - is caught at the next posting instead of surviving quietly forever. The docstring calls it belt and braces, and that is an accurate spec: never rely on one check when the cost of being wrong is a broken ledger nobody notices.
4. At 10x leverage, how far can Alder Bank’s assets fall before its depositors are exposed, and what does deposit insurance change about the answer?
One tenth. Assets of 1,000 on equity of 100 means equity absorbs the first 100 of losses; at exactly 100 the owners are wiped out while the columns still agree, and beyond it losses land on the people the bank owes. Insurance changes none of that arithmetic - it changes who bears the tail. Below a capped amount, set by law, an insured depositor is made whole by the scheme; above the cap the deposit remains an unsecured claim. The cap’s current figure, with its date, is lesson 13’s business.
Do this
Ten minutes, from module-01-money-at-rest. Open code/balance_sheet.py. build_bank() is already written: it opens the same four typed accounts and posts the same stylised opening sheet you read above, as one four-legged posting. The one TODO(you) is leverage(): total assets divided by equity. Ledger.totals() does the summing, returning a dict keyed by kind, so the two numbers you need are one lookup each; the script pins the answer with an assert, and anything but 10 fails loudly.
python code/balance_sheet.py
Run as shipped, the script stops at NotImplementedError. Completed, it prints assets 1000 on equity 100: leverage 10x, then deliberately tries to post a sloppy loan whose legs do not cancel - loans up 50, deposits up only 40, ten units of assets appearing with no matching claim. The ledger must refuse, and the final printed line is exactly
the sheet refused: Alder Bank: unbalanced posting sloppy loan: dAssets 50 != dLiabilities 40 + dEquity 0
One experiment before you leave: post the example’s loss, bank.post([("loans", -50), ("equity", -50)], memo="write-down"), and print leverage(bank) again. 10x becomes 19x: a loss does not just thin the skin, it steepens the leverage against every loss that follows. The completed version is in solutions/balance_sheet.py; check yours against it when you are done, not before.
What you can now do. You can read a bank as a data structure: two columns of typed accounts joined by one invariant that no posting is allowed to break, with reserves and loans on the holds side, deposits on the owes side, and equity as a residual rather than a pot. You can place any line on its correct side and say why - including the line that matters most to you personally, your own balance, sitting on the bank’s liability side and insured only up to a capped amount set by law. And you can compute leverage and read it as a distance: how far assets can fall before the owners are wiped out and the promises above them are exposed. The next lesson stacks these sheets into module 0’s map made executable - a central bank whose ledger carries the banks’ reserve lines, above commercial banks whose ledgers carry balances like yours - two tiers, composed as objects instead of drawn as a pyramid.