Clearing and settlement
The unglamorous days between agreeing a trade and actually owning the thing. Where most financial crises are quietly prevented.
Agreeing a trade and completing it are different events separated by time. Clearing is the process of working out who owes what; settlement is the moment money and securities actually change hands.
The problem being solved
Between agreement and settlement, either side could fail. If the buyer collapses before paying, the seller has delivered shares for nothing. That is counterparty risk, and in a large market it is a chain — one failure can cascade.
Through a process called novation, one trade between two parties becomes two trades, each facing the clearing house. The buyer no longer depends on the seller's solvency and vice versa — both depend on the clearing house, which is capitalised and collateralised precisely to be depended upon.
Margin, again
The clearing house protects itself by demanding collateral from members and adjusting it as positions move. This is why a violent market move produces margin calls across the system simultaneously — the machinery is doing its job, and the job creates forced selling.
Settlement cycles
Markets settle a set number of business days after the trade. Shortening that cycle reduces the window in which something can go wrong, which is why the long-run direction of travel has been towards faster settlement.
Nobody thinks about clearing until a member defaults or a settlement fails. The system's success is measured by how little anyone needs to know about it, which is also why it attracts so little attention until the moment it matters enormously.