📜 ⬆️ ⬇️

Automating stock purchases: large transaction processing architecture

A short background: a few years ago we were able to achieve the appearance on the Russian market of ETF financial instruments - clusters of stocks. The most fun part after the legal coordination of this whole story with the state (more precisely, the states, given that the calculations are checked through Dublin, and our 6 data centers are located in London) was IT integration with bridges between exchanges in different countries.

Fortunately, we were not the first to solve this problem, and there were already ready-made “library solutions”. However, we took the file and started modifying the existing systems.

What is the problem from the point of view of the financial market?


You want to buy our ETF on the aggregate of IT companies on the world market, say, for 100 thousand rubles - as a portfolio investment next to your bank account. You have a bank of those that conduct brokerage activities, and you already have the opportunity to make the necessary purchases directly through the Internet bank or application. And you see prices for all securities - “glass”. Prices suit you, and you send a purchase request.
')
Since the sum of 100 thousand rubles is almost ridiculous for the bank, nothing further happens. Your broker takes and buys securities at the stated price on the secondary market, that is, from someone else who is on the stock exchange and sells their securities. This Brownian motion takes place constantly and without stopping. There is no "I can not buy because no one has" - it happens "I can not buy at such and such a price." And I remind you that you already know the purchase price on your request.

Transactions of less than 0.5-2 million dollars are made on the secondary market (mainly on the exchange), larger applications can be withdrawn from the fund directly through an authorized participant.

Big deal


Let me remind you, ETF is a security that represents a share of a cluster of companies' stocks. For example, there is a legal entity in Ireland, which buys shares of only certain IT companies in a certain proportion (by index) - and ETF is the share of this legal entity. This legal entity does not do anything else - there are neither staff, nor debts, nor management - such a “bag for securities” filled with shares.

Accordingly, when new ETFs are needed in the market, an authorized participant needs to make a DVP transaction (delivery-versus-payment, delivery versus payment):
  1. Take money from the Russian market to a certain intermediate "cache"
  2. To assign the task of a robotic trading platform to buy new shares in the USA in exact accordance with the index. When generating new subscriptions, deals are made in London through the trading wing of FinEx Capital Management. The purchase of securities is carried out by block transactions using the powerful automated trading platform Charles River, which gives simultaneous access to a dozen brokers through which you can purchase valuable stocks worldwide.
  3. Ensure that everything is done correctly (stocks are only those that make up the index) with the help of a custodian depository - BoNY (assets worth $ 30 trillion in custody).
  4. Cluster these stocks as new ETFs in Euroclear.
  5. Transfer money through an international bridge to the settlement center of Ireland, and the ETF to the Russian depository (NSD).
  6. After clearing (information of all calculations), you will in fact return the money “frozen” earlier and receive in return pointers to securities in your account.


Where do ETFs come from for transactions of less than $ 0.5-2 million?


ETFs can be put on the secondary market by traders (professional participants or private traders) who are ready to give ETF or other securities at certain prices. As a rule, first such a feeder is a market maker who signs new shares with the help of BNY Mellon, and then sells it on the market. The target amount of shares that the market maker must offer is determined when the fund is launched. That is, to start trading, you must first ensure this standard-set amount, which guarantees some transactions. Later on, various private investors and funds are added on top of this volume, which “revolve around” in free movement.

As soon as we otlitinga (that is, became compatible with domestic systems for IT and the legal part), we are immediately obliged by law and the stock exchange to put the market maker and give it liquidity. In the case of an ETF, liquidity is limited by the capacity of the primary asset (ETF MSCI Information Technology).

Our main market maker is one of the world leaders Goldenberg Hehmeyer, with a narrow spread on the market. We have a clear agreement with the IB about the target spread (the difference between the purchase and sale prices). Accordingly, market makers constantly move ruble stock quotes and set a “glass” based on the prices of shares included in the index, the target spread.

If you need a lot and fast - you go to an authorized participant and buy at a price determined closer to the close of the day. Further, the scheme works out with the release of new ETFs (but you pay about $ 500 for Bony for the entire transaction hemorrhoids).

So what's up with integration?


So, in London, we have an ETF provider that can do fill ETFs with shares of different companies, collecting them into a cluster in accordance with the index. For example, do an ETF for IT companies. In Ireland, a cash bag filled with stocks is registered (40% of European funds are created in Ireland, because there is the most pleasant legislation for collective investment). There is also an independent organization verifying each transaction that stores and controls assets - the custodian depository (Bank of New York Mellon).

In the previous post, I talked about the terrible IT-bridges between countries - all this does not concern us, because we do not even look at the transport level, all this is done by the Moscow Exchange. We are “on API”, that is, through the Quick platform, we knock there and give instructions.

image

"Last mile"


If you want to start selling ETF portfolios directly to customers, we do all of the tasks in terms of back office and accounting systems through Kvik (which can do some basic things, but not full accounting), but through the domestic Turbo9 system. This is a software for accounting transactions and accounting rights of many customers. By and large - an analogue of 1C, only for securities. Turbo9 is integrated with Kvik - the system receives information from it and distributes the papers, rights and obligations between customers. And through it, orders are made. The client sends a request to us, we put it in Turbo9, Turbo9 gives it on our behalf to Quick, picks up the ETF from the exchange to us (this is a process that includes checking Boni and other things in London and Ireland, but for Quik this is already "black box "), And then Turbo9 transfers the paper to a specific client. This is the essence of brokerage.

All this could be done directly, but, I remind you, the goal was to reduce the level of costs. After all, the advantage of ETF as opposed to active trading is to repeat the index as well as possible. As a result, a small number of staff needed to manage a large document flow. Let me remind you, we are now 10 people.

Turbo9 was not chosen by chance. Some of our specialists worked with her in other brokerage and management companies, and they knew exactly what and how it should be. Plus, we knew where the developers live and what the name of their children is.

At the very beginning, we compared Turbo9 with BackQORT. It can be said that both systems have comparable implementation costs, basic accounting organization functionality and the ability to integrate with other information systems. But Turbo9 is more flexible from the point of view of the implementation of the functionality that is not included in the box. In the process of implementation, we had to solve a number of specific tasks: to build a unique process of rebalancing portfolios with our own calculation algorithm, the ability to conduct consolidated transactions with their subsequent distribution to end customers, full integration with the personal account on the site, including identification in the ESIA, two-way exchange of electronic copies of documents use of electronic signature to sign them. Opportunities Turbo9 allowed to realize this in a short time. The same electronic signature by other means would have been solved for almost a year - and here we have the opportunity to develop new features, “incrementing” modules to the main system due to a very well thought-out architecture.
You can also note a lower cost of ownership Turbo9 compared with a similar solution based on BackQORT. Pay attention, it is possession, not implementation.

Total


We raised our own Turbo9 accounting system for the “last mile”. Then they used a standard platform for the API of the Moscow Exchange. In order to work with the exchange, it was necessary to create a market-maker and give it the necessary liquidity, and then to be listed in NSD. The Moscow Exchange routes all resources through NSD and international bridges, in our case through Euroclear. Bondi's Custodian from London scans every “intra protocol” transaction at the top level of the transport stack. Shares are also purchased “inside the protocol”. Warranties are given by NSD Euroclear and Barclays Bank.

Bottom line - one order for the purchase of ETF in Russia launches a huge automated chain consisting of many subsystems. Now you understand about how cunning it works.

By the way, answering the frequent question of why we do not keep the Russian development office - in our country there is a serious prejudice against the work of a developer in the financial structure. The reason is very simple: tests are made "for slaughter", that is, the day of the code can actually be tested for six months with the active participation of the developer. This is an incredibly boring, dull, repetitive job with a bunch of regulations that discourage many from banks.

And now links


Source: https://habr.com/ru/post/277459/


All Articles