A clearing house is an institution that steps in between the buyer and the seller of every trade, and guarantees that both will be paid, even if one of them fails. It is also called a central counterparty, or CCP. In India, each stock exchange and commodity exchange has its own clearing house, called a clearing corporation.
Here is how it works. When a trade is matched, the clearing house replaces the original contract between the buyer and the seller. It becomes the buyer for the seller, and the seller for the buyer. This replacement is called novation. So the buyer and the seller never need to trust each other. Each of them only needs to trust the clearing house.
To keep this promise, the clearing house collects money in advance. Say a trader buys one gold futures contract worth ₹10 lakh on a commodity exchange. A futures contract is an agreement to buy or sell something at a fixed price on a future date. The clearing house collects a deposit called margin, for example ₹1 lakh, from each side's broker. Every evening, it compares the contract with the latest price. If the price of gold falls and the buyer's contract loses ₹30,000 in value, the clearing house debits ₹30,000 from the buyer's side and credits it to the seller's side the same day. This daily step is called mark-to-market. So losses never pile up for long.
What if the buyer cannot pay? The buyer's broker must pay first. If the broker also fails, the clearing house closes the broker's positions. It covers the loss from the broker's margin and then from a default fund, a pool of money kept for such failures. In India, the clearing corporation and the stock exchange put in most of this fund.
This is why futures and options can trade safely between strangers. Clearing houses are also used outside share markets. Energy traders clear their contracts in the same way, through their energy trading and risk management (ETRM) systems. Some crypto exchanges now also clear their contracts through a clearing house.
A clearing house is part of clearing and settlement. It is different from a depository. The clearing house guarantees that each trade will be paid. The depository records who owns the shares after the trade.