
The core of the Moscow Exchange implements both the functions of directly registering and conducting transactions, and the clearing functions. For example, the same stock exchanges in New York and London carried it into a separate module, so that if one of the fronts fall, do not stop all trades, but simply degrade in terms of possible services.
But it's not about that. In this post, I will talk about why we need a clearing system at all and how the deal is conducted between, for example, the Netherlands and Moscow.
')
To begin with, in some cases, exchanges and banks, of course, do not change money and securities immediately and instantly. The procedure is very similar to write-caching: than to make thousands of single Random IO, it is better to write several blocks at once in sequence. There is also the maximum allowable amount of debt for the period - this is the cache size in our comparison.
Plus, of course, neither the money nor the shares go to the final participants of the transaction - they “physically” fall in the depository, and you get a “pointer” to them.
How then do financial institutions interrelate?
They save mutual debts to each other and close them at the end of the period. For example, if we are talking about two Russian banks, then in a day there are many operations between them. For example, 40 customers of Bank A transferred a total of 5 million rubles to Bank B, and another 30 customers of Bank B transferred 4 million rubles to Bank A. on the same day.

Accordingly, at the end of the trading day, transactions between banks will not be 70 units for a total of 9 million rubles, but only one per 1 million:

This makes clearing. In fact, of course, the situation is somewhat more complicated, and there are not two banks involved in it, but all those that are in clearing. And there are situations when Bank A owes Bank B, Bank B owes Bank C, Bank C - Bank D, and Bank D - Bank A. As a result, as in the well-known problem of $ 100, the economy begins to spin even before fact there is money. And clearing makes sure that for each bank there is a minimum of incoming and outgoing transactions.
That is why physical persons cannot be traded on the stock exchange.
Just because of this architecture (simplified) of netting in transactions with securities, only those who have a license for brokerage activities can trade in securities. And that is why you, as an individual, cannot take and buy shares. You must give instructions to your broker (this may be your own bank, for example, VTB24, Alpha and Sberbank have excellent tools for this), and the broker will already buy the necessary securities.
So (again, very simplistic) it looks like:

If we consider brokers as production servers, you as a user, an exchange as a router, and a depository of securities as a data storage system, it will be clear why we need a “financial cache”.
What is this "financial cache"?
Imagine that you decided to buy shares of Google from someone from Europe. For example, you made an order to buy at a certain price on the stock exchange, and at this moment a private investor from Europe decided to sell several of his shares and just made a deal with you.
The exchange helped you find each other, which played a long route with other exchanges and was able to forward the connection between you.
Since securities can be viewed as an ordinary physical commodity like potatoes, then you can meet somewhere in the forest, conclude a purchase and sale agreement in two languages, certify translations from a notary, check everything for compliance with the laws of the two countries and exchange papers for money. The money will go on standard bank routing. But it is expensive, long and completely unnecessary, as a rule.
Therefore, you are using the same exchange for a deal. Securities are, again very roughly, records in the database with the designation that it is who released it and to whom it belongs. In the simple case, transactions within the country (even within a single depositary of the bank) simply change the ownership of the shares and not move them anywhere.
But different countries and different financial organizations have different depositories. Why? Because it is the depositary, in fact, is the very cache that determines the possible amount of mutual settlements at the end of the period. That is, if you have already made deals for 500 million rubles in one direction, and you owe 300 million, but your depository is limited to only 500 million, you will not be able to make new purchase transactions. Because from the point of view of the financial system, right now you are at zero - and only after clearing you will be at plus 200. If you will. And we must either wait for the next period, or increase the cache.
In the role of the Russian cache is NSD - the national settlement depository (NKO CJSC NSD). Architecturally, it is part of the Moscow Stock Exchange and is included in its “cluster” as an integral part.
OK, that is, there are routers-exchanges and depositories, right? What then when calculating with Germany?
That is, it is a multi-rank network, where, simplifying:- At the lowest level, the bank simply changes the ownership of the securities in its database (its depository).
- At a higher level inside the country, the main exchange of this country counts banks as part of its clearing.
- But even higher, there is a problem with the fact that the “formats” of two different countries do not match, they have different depositories and there are a lot of difficulties. Therefore, we need an integration point. The role of the integration server is the international clearing system, which also accumulates mutual debts for the period, and then optimizes them and reduces them to the minimum number of transactions.
What is this system that “befriends” the exchange with each other?
There are several such systems, but for example we will look at Euroclear (we work with our ETF for Russia through it, so I know fine details better than other systems). So, Euroclear is a Belgian bank, on the basis of which this system exists - in fact, this is a
bridge between exchanges of different countries .
“The Euroclear system includes 2400 participants from 80 countries, most of which are banks, broker-dealers and other institutions professionally involved in managing new issues of securities, acting as market makers, trading or storing a large number of securities accepted by the system Euroclear In the third quarter of 1997, about 98,000 securities were accepted for servicing in the Euroclear system. The value of the securities of participants in the Euroclear system at the end of 1996 was $ 2.116 billion. ”
Quote from www.nsd.ru/common/img/uploaded/files/depo/02/02-42.pdf
From the point of view of the National Settlement Commission, we are settling only with one company - Euroclear, and Eurocler already understands how to proceed further as a black box. Each country works in the same way: there is a depository where Euroclear has, again simplifying, the right to write, and there is an API that allows you to give him instructions.
If you buy our cluster ETFs from a retailer in the Netherlands on the NYSE Euronext (secondary market), a fairly simple operation takes place. From the point of view of Euroclear, the Russian depositary gave the task of moving the security (ETF) to itself, and in return promised money. Since we have the DVP mode (delivery vs. payment), Euroclar takes ETF-papers from the Dutch depository and puts it “in itself” (in fact, without moving anything, but working with the pointer). Then he takes the money from our depository and also drags "in himself." That is, at this moment we don’t owe the Dutch money, but the Dutch give us the shares, and we owe the money to Euroclear, and the European Clicker shares. Similarly, the Germans owe Euroclear a share, and Euroclear a money to them.
The size of the debt is determined by the size of the depositories. In DVP mode, the transaction will not be completed if there is not enough free money in NSD, and a sufficient number of required securities in the Dutch depository. At the same time, NSD will not believe Euroclear if it does not have a similar resource. That is, each of the participants guarantees a deal with their “cache”. All operational risks are eliminated by our clearing NCC (it has large own funds, it makes a pledge assessment, an assessment of the participants' ability). NCC is directly capitalized by the Central Bank to minimize the risks of trading through the central counterparty. Naturally, NSD and NCC do not believe you if your broker’s free cash is less than the amount of the transaction.
Plus external financial control, plus other overheads.
Then, in the clearing process, all these operations are performed, and the Euroclar quickly exchanges shares for money, and then not only sends you pointers to resources, but “physically” swaps resources in depositories. This entire procedure, together with the checks, takes two standard trading days, and therefore ETFs are bought in T + 2 mode.
Stop, but an ETF is also a cluster of shares, isn't it?
Yes, one ETF paper is actually a piece of a cluster, for example, from a huge portfolio of shares of US IT companies or global IT companies. But at the same time, all market participants work with ETF as with one security, and not as a package deal, because virtualization is achieved one more level lower. In fact, an ETF issuer is a legal entity that bought shares of IT companies according to certain rules and issued its shares. From the point of view of the exchange, this is one company, and from your point of view it is an index.
So what happened in the end?
In order to pass the transaction from the point of view of Euroclear, we make a DVP calculation through NRM with the help of the NCC. NSD holds a nominally large account, and NCC makes calculations for all market participants.
If a more complex deal is needed, for example, with America, a situation is possible with the emergence of another network rank - this is when the Euroclear prokidyvaet bridge to a similar American system.
So everything is cleverly twisted.
What does this mean in simple words?
- Banks, exchanges and systems like Euroclear are the transport and logical level of the financial network.
- Brokers are proxy structures or something like NAT systems.
- National depositories define the “thickness” of channels between countries.
- National clearing centers identify switching capabilities and do packet processing.
- Securities and money are packages.
- ETF and other index funds are an analogue of the overlay network on top of the “ordinary” financial network.
Naturally, everything is not quite so much more complicated and more fun (forgive the limitations of these comparisons). But I think in general terms the task of integration is clear.
So, five years ago, we had to make ETFs begin to be listed on the Moscow Exchange, that is, they could be “compatible” with the NCC, that is, they could be part of NSD. This was to be achieved both by legal and IT means. Therefore, in the next post I will talk about how we all connected and automated the workflow.
And links: