15 min

The amplifier and the safety net

This module is one story told twice: leverage multiplies exposure, and collateral, margin and clearing houses are the machinery that keeps the multiplication from cascading when someone fails.

Where you are. Module 4 ended with a market that ran end to end and one honest admission: real trades settle tomorrow, not now, and that day of waiting is a day of depending on a counterparty. It also gave you two other loose threads - a fund at three times leverage that got a margin call on a quiet Tuesday, and a prime broker whose client risks were correlated rather than diversified. This module is those threads pulled together. It is one story told twice: first the machinery that multiplies exposure, then the machinery built to stop the multiplication cascading when somebody fails.

The same afternoon, from two desks

A trader is delighted. A hundred thousand of her own money controls three million of exposure, so a one percent move earns thirty percent on her capital. The position is working.

Two floors down, somebody whose job is to worry has a different view of the identical position. Three million of exposure sits behind a hundred thousand of cushion. A three percent move the wrong way, over any two days the market cares to produce, and the cushion is gone - and what is left is not her problem but her broker’s.

Neither of them is wrong. They are looking at the same number and seeing different questions: how much do I make, and what happens when this fails. This module answers both, in that order.

The idea in one paragraph

Everything in this module is a variation on one trade: put down a fraction of a position’s value and control the whole thing. Futures, perpetuals, options and securitised loan pools are four ways of doing that, each with a different payoff shape, and they are the module’s first half. The second half is the machinery built because the first half exists. If a fraction is enough to control a position, then losses can exceed the fraction, and somebody must decide in advance who covers the gap. Collateral posted up front, daily settlement of what has been lost, haircuts, the reuse of pledged assets, and clearing houses with an agreed order of loss absorption are all answers to that question. The two halves are not separate subjects. The safety net is shaped precisely by the amplifier, and neither is comprehensible without the other.

What each lesson is protecting against

The amplifier comes first. Lesson 2 builds the simplest form, a future: a binding promise about a price, symmetric and zero sum. Lesson 3 puts a deposit behind it and shows what multiplying does, including the exact move that wipes a deposit out at any given leverage. Lesson 4 takes the crypto-native variant that never expires, and shows the feedback loop that replaces expiry. Lessons 5 to 8 turn to options, where the payoff stops being symmetric: a buyer’s loss is capped and a writer’s is not, and pricing that asymmetry needs a small tree and four sensitivities. Lessons 9 to 11 take the same amplification into lending: how a loan repays itself, how the payments are split by strict priority, and how a pool of loans is cut into slices that fail in a chosen order.

Then the safety net. Lesson 12 is the daily discipline of margin - initial and variation, and what each is for. Lesson 13 follows one piece of collateral being pledged down a chain and counts the claims on it. Lesson 14 puts a clearing house between every buyer and seller, and walks a default through the ordered stack that decides who pays. The project assembles all of it into one margin engine.

The workbench

The exercise sets up what the module needs: a clearing member’s ledger with a customer who has money, and a segregated account for margin. Posting margin is a balanced move between two of the broker’s liabilities - the customer’s deposit falls, the segregated line rises - and the broker’s own assets do not move at all.

That detail matters more than it looks. Margin is the customer’s money, held separately, not the broker’s to spend. Lesson 13 is about what happens when that separation is weaker than it sounds.

Check yourself

1. The trader and the risk officer look at the same position and ask different questions. What are they?

She asks what the position earns: a small move on a large exposure is a large return on her own capital. He asks what happens when it fails: the exposure is much larger than the cushion behind it, so losses can exceed what has been posted, and the excess lands on the broker. Both questions are about the same ratio, from opposite ends.

2. Why does this module treat leverage and clearing as one subject rather than two?

Because the safety machinery exists in the shape it does because of the amplification. Margin, haircuts, default funds and clearing houses are all answers to the same question: if a fraction controls the whole, who covers the difference when the fraction is not enough? Studying either half alone leaves the other looking arbitrary.

3. Posting margin moves money between two of the broker’s liabilities and leaves its assets unchanged. What does that tell you about whose money it is?

That it is still the customer’s. The broker’s balance sheet did not grow: it owes the same total, just in a different shape - less on the deposit line and more on the segregated margin line. The separation is the protection, and lesson 13 is about how solid it turns out to be.

Do this

Set up the workbench and post margin without breaking the sheet.

python3 code/check_setup.py

The starter leaves you post_margin: one balanced posting moving the amount from the customer’s deposit to the segregated margin line. The assertions check both balances afterwards and that the world’s invariants still hold. Success prints the broker’s trial balance and the line:

the bench is set: money can be moved into margin and the sheet still balances

The completed version is in solutions/check_setup.py.

What you can now do. You can name the module’s two halves and say why they are one subject, and you can move money into margin on a ledger that refuses to let you cheat. The next lesson builds the simplest amplifier there is: a promise about a price, made today, settled later.

What you can now do

You can name the module's two halves, post margin on the ledger, and say what each safety mechanism is protecting against.