Decisive battle in milliseconds, detailed explanation of digital currency high-frequency trading strategy
- High-frequency trading is a programmatic trading method that uses complex computer systems to place orders, enjoy direct data connection with the exchange, and has high handover and low latency characteristics . High-frequency trading has played an important role in the US stocks, futures, foreign exchange and other markets. At its peak, its trading volume accounted for 50% of the three markets; in recent years, due to the decline in overall market volume and liquidity, and changes in regulatory policies Due to intensified competition with the track and other reasons, profitability has declined.
- The capacity of the high-frequency trading strategy in the digital currency market is relatively small. The size of a single team is generally between tens and hundreds of BTC. The rate of return and Sharp ratio are relatively high. Its usage scenarios are mainly market-making and proprietary trading. The scale effect of lack of funds . However, the combination of high-frequency strategy logic and other strategies to effectively prevent market and exchange risks under extreme market conditions will help to quantify the optimal combination of strategies to create excess returns.
1. Definition, scale and current status of high-frequency trading
High-frequency trading refers to the use of high-performance computers for programmatic pending order transactions, through a large number of pending orders to withdraw orders to capture the slight price difference between the purchase and sale of a certain transaction target, and complete the profit in a very short time. In the highly financially developed United States, the Securities and Exchange Commission (SEC) once gave an overview of the characteristics of high-frequency trading in an official document in 2010:
1. Use an ultra-high-speed complex computer system to place an order
In terms of program implementation, in order to improve the running speed of the algorithm, some instructions will be integrated into the computer system (the instruction interval is usually in the order of milliseconds, and even can reach microseconds). In the development of high-frequency systems, the running speed is faster. The underlying language C ++ is mainly;
In terms of hardware, overclocking CPUs, FPGA hardware acceleration, and GPU parallel computing can be used to improve overall performance.
- In the communication network, because the propagation rate of electromagnetic waves in quartz is only two-thirds of the propagation speed in the air, and the congestion of the optical fiber network will increase the delay, high-frequency transactions will even abandon the traditional optical fiber communication and use microwave, millimeter wave dedicated Communication line. As shown in the figure below, the green line in the figure represents the microwave lines erected between urban areas with dense fiber distribution (London and Frankfurt, Chicago and New York). Quincy data company has been able to transmit the transaction data of the Chicago Mercantile Exchange in Aurora with a low latency of about 4 milliseconds to Cartwright and Scox in New Jersey.
Figure 1: The microwave communication network of high-frequency trading directly connected to the exchange Source: Quincy data
- From the digital currency, I saw the dawn of inclusive finance-Zhao Guodong commented on "Digital Currency"
- Babbitt's weekly elections halving is approaching, the market is accelerating recovery, is the halving effect coming?
- Babbitt Exclusive | Forty-five-day currency crisis in 35 days, halving or changing the three "Bitcoin" patterns
2. Use co-location and data channels directly connected to the exchange
The so-called co-location, that is, the high-frequency company's server and other hardware facilities need to be placed very close to the exchange host, some exchanges even provide server hosting services for market makers near their server clusters. In this way, the trading order does not need to pass through the broker, and the high-frequency trading company will see the information on the order book earlier than other market participants.
3. The average position holding time is extremely short
In addition to low latency, another major feature of high-frequency trading is the high handover, which means that trading behavior will be generated very frequently and the holding time will be short to reduce risk exposure.
4. Send and cancel orders in bulk
High-frequency traders will process and judge each piece of information that appears on the order book, and establish corresponding positions for a large number of pending orders. In some high-frequency strategies, traders will issue some order orders to detect other orders (such as Iceberg strategy), or through a large number of orders to remove orders to guide the short-term trend of price changes to promote price discovery.
5. Basically keep the position closed at the close
Generally, high-frequency trading will close all positions (except for holding the bottom position) before the end of a trading day. On the one hand, holding the position overnight will increase the risk; on the other hand, it can greatly reduce the cost of holding the position (mainly the payment except for the margin position Overnight interest)
Looking at the history of the development of high-frequency trading, it is not difficult to see that it has benefited from regulatory adjustments and the widespread application of Internet technology in the financial industry. At first, the NYSE used manual matching to place orders, and the Nasdaq market was mainly handled by its market makers to handle retail orders. With the gradual rise of electronic automated trading platforms, the number of customers participating in intraday trading gradually increased, which was a high frequency. The rise of trading has laid the foundation. Following the improvement of several regulations issued by the SEC, the high-frequency trading market is gradually taking shape. The "Alternative Trading System Regulations" issued in 1998 made the Electronic Communication Network (ECN), which is both efficient and convenient, gradually accepted by the market.
Since then, through many ECN platforms, people do not need to make orders through market makers. At the same time, the order information that reflects the real situation of the market has also entered the investor's perspective-this is undoubtedly for high-frequency teams who like to study the microstructure of transactions. It's a shocking change. At that time, even the New York Stock Exchange and Nasdaq had to follow the torrent of history and plunge into the wave of electronic trading platform business. After entering 2000, the SEC stipulated that the minimum price change unit should be changed from 0.0625 US dollars to 0.01 US dollars. The increase in the price range allows more space for placing and canceling orders between selling one and buying one.
With the development of high-frequency trading, many traditional giants in the financial industry such as Goldman Sachs, JP Morgan, Merrill Lynch, etc. have entered the field, and the industry has a group of competitive legendary companies and hedge funds blessings-by Simons Led by Renaissance Technologies, Virtu Financial, which is known for its speed (only one loss in 1485 trading days from 2009 to 2014), Citadel Securities, Two sigma, Jump Trade Co, GETCO, etc.
Since then, high-frequency trading has ushered in a golden decade of rapid development in the US stock market. As shown in the blue histogram below, it only accounted for about 10% of the US stock market's trading volume in 2005 and gradually developed to 61% in 2009. In the futures and foreign exchange markets, according to the Chicago Mercantile Exchange (CME) and Data released by the Electronic Broking System in 2009 show that high-frequency trading also contributes at least 50% of trading volume. The orange histogram in the figure represents the situation in the European market. Similar to the United States, the high-frequency trading accounted for only 1% at the beginning, and developed to 38% in 2010.
Figure 2 The proportion of high-frequency transactions in the US and European markets from 2005 to 2014
The profitability of high-frequency trading has attracted a large number of financial technology teams to enter the field, making the track increasingly crowded and profits gradually being divided;
Some high-frequency strategies threaten traditional asset management companies and hedge funds that believe in value investment or fundamental analysis, and due to domestic policies introduced in the United States, some high-frequency strategies that restrict "significant damage" to the market are further suppressed;
- As a result of deleveraging, market liquidity and trading volume declined overall.
Unlike foreign high-frequency companies that can build data lines to directly connect to exchanges, every order placed and cancelled by domestic traders needs to be transferred by a brokerage firm, which reduces the low-latency performance and loses the speed advantage.
The granularity of the transaction data is not enough. The domestic exchanges will only give TICK level data, and cannot obtain more detailed information on the order and order book.
- The domestic regulatory policy is unclear, and it is strictly controlled for transactions that are suspected of guiding price trends such as large orders and cancellations.
At present, there is still a long way to go for the development of high-frequency trading in the Chinese market.
2. High-frequency strategy classification and profit model
The reason behind the high-frequency trading is profitable, the statistical logic behind it is the law of large numbers (law of large numbers), that is, when we repeat a large number of experiments, the result distribution tends to a fixed value. In high-frequency trading, when the probability of each profit is greater than 50% (the pass rate of the passive market-making strategy will even reach 80%), even if the profit of each transaction is meager, it is closed in a large number of transactions (after buying and selling Out, the total position remains unchanged) After completion, the expected return is positive. Different types of high-frequency strategies have different profit-making methods. The following will introduce several mainstream high-frequency strategies and their specific profit models.
1. Passive market making strategy
The core idea of this strategy is that, based on the principle of adverse selection, market makers insert both buy orders and sell orders at the forefront of the order and order sequences to become new buy one and sell one. Assuming that both orders can be filled within a certain period of time, the profit is realized without changing the position.
The picture below is a schematic diagram of the order book. The real situation is often more complicated than here. The market-making strategy will synthesize the information of the ten orders (or more) on the order book to determine what price to open the position. In markets where there is no passive market-making strategy, as shown in Figure 1, the bid-ask spread is larger at 100.2-99.5 = 0.7 yuan. At this time, if the market is determined to be a central shock market, the high-frequency strategy will open a position and insert an order between sell one and buy one, as shown in the red order in Figure 2. High-frequency trading has a huge advantage over manual traders in terms of speed, so if the manual trader cancels his order at the second, third / sell second, and third positions at this time and then jumps to the front of the order, The passive market-making strategy will also withdraw orders, by the principle of adverse selection, after the price is lowered, the order will be placed again, keeping the market-making order closest to the direction of price formation, that is, at the forefront of the commission sequence.
The passive market making strategy is more suitable for the central shock market without obvious breakthrough trends, but when the market breaks unilaterally, it will cause market makers to shift their positions, either because the bottom position sells at a low price and cannot be received, or it is a buy order. After the transaction, the price continues to fall into the quilt of the position. At this time, the strategy will stop in time. As shown in the figure below, when we traded 15 sell orders at 100.1 in Figure 2, the price still went up and directly eliminated the sell one to sell three or three stalls. After a re-judgment of the board information, it was learned that when the buy order for the 15 lots at 99.7 yuan was not expected, the stop loss was decisive. Remove the red buy four orders in Figure 3, and directly eat 15 lots of one 100.45 yuan order to complete the cover, which is regarded as a stop loss trigger. Generally speaking, the pass rate of passive market making strategies can reach 80%, and the probability of stop loss is 20%.
Passive market making is one of the current main applications of high-frequency trading. When the price fluctuates within a range (when there is no obvious trend), the high-frequency market maker will insert a pair of buyers and sellers between the buying and selling markets. A more favorable quotation, which prompts the transaction to take place, is to inject liquidity into a certain security by narrowing the market spread. The way to earn a small spread in the market, although the profit is thin but the win rate is high, can achieve considerable profits in the case of high-frequency transactions; in more cases, the profit of the market-making strategy comes from the exchange for this Liquidity remuneration provided by the transaction-return a portion of the commission as a commission.
2. Directional strategy
Unlike the relatively stable market environment in which passive market-making strategies operate, trend strategies are used in price reversals or breakouts. When the high-frequency strategy detects that the event-driven market is coming through the detection of external market information, the position will be established in advance in conjunction with the market data, and the profit will be closed when the market reacts to the event and the price is reflected. As shown in the figure below, suppose we judge that a wave of downtrend market is coming (it can be seen that the sales orders in the market are large and dense), so we sell first 100 market orders to eliminate all the buy one and buy two in Figure 4, and the remaining 1 The hand is placed at the sell position at a price of 99.85. Because the market is slow to respond, we have established short positions in advance to wait for prices to fall. At this time, when other traders see that the downtrend has become, they will follow the lightening position. When the price falls to the position of buy four in Figure 5, the high-frequency strategy will take back the 100 lots sold at the high position at 99.4 yuan and make a profit. Close the position. Of course, if you misjudge the market, you also need to stop loss in time, that is, quickly buy back the short position and use the top sell order to make up.
In addition to directional strategies triggered by events, there are two strategies: trend-induced and command-first . The command-first strategy has another name in the academic world- predatory algorithm trading , that is, high-frequency strategy will continuously send small orders before opening a position to test whether there is an iceberg commission in the opening of the market, if it is found at a certain price Continuous large-value buy / sell orders will use technical means to preemptively complete the opening of a large order, and wait until the price rises before distributing chips at a high price to large orders that have not been successfully placed before. Trend-triggered strategies, also known as fraudulent trading , are easily linked to market manipulation and become the target of key investigations. Its specific method is to place a huge sell / buy order and a small buy / sell order at the low / high. When other traders in the market see the information of the order book, they will be affected by the psychological effects of fear or greed to sell. Buy / Buy trading behavior, so that small orders ambushed in advance can be traded, and the profit can be closed after the trend returns to normal.
The core idea of the directional strategy is basically to obtain the short-term high probability price fluctuation direction after studying and judging the order flow information or specific events, and to open the position in advance with the speed advantage, and to close the position after the price fluctuation reaches the expected point. The reason why this strategy is profitable is that the research on the microstructure of the trading market (order book information), event grasp, and execution speed have far crushed other participants. At the same time, because the order is placed, the mood is not easily affected by fluctuations.
3. Structural strategy
Similar to the trend strategy, instruction preemption is similar to fraudulent trading, structural strategy is also to make a fuss about the trading mechanism, seize the opportunity, more or less suspected of undermining the fairness of the trading market. As mentioned earlier, some high-frequency companies will put hardware facilities such as servers very close to the exchange host. Some exchanges even provide server hosting services for market makers near their server clusters. In this way, the trading order not only does not need to pass through the broker, but also the high-frequency trading company will see the information on the order book earlier than other market participants. In addition, there have been structural strategies such as "no audit channel" and "lightning directive", but it has been banned by the US Securities Regulatory Commission around 2010 because it undermined market fairness.
4. Arbitrage strategy
Arbitrage can be roughly divided into cross-market arbitrage and cross-asset arbitrage. In the US stock exchange market, the same stock can be traded on different exchanges. When there is a slight deviation in the price of the same asset on different exchanges, it will be quickly captured and completed by the high-frequency team. More commonly, ETF arbitrage and stock index futures arbitrage also have very high requirements for speed, and the transmission of instructions is in the order of microseconds or even nanoseconds.
3. Advantages and risks of high-frequency trading
1. Advantages of high-frequency strategy
For funds that allocate high-frequency strategies to a portion of assets, the profits they generate are an important part of excess returns, and they will not conflict with other investment strategies and play a role in hedging risks. From the micro-level of trading, the research of high-frequency trading on the information flow of order books is so important that the high-frequency strategy can guide the price trend in the short term, make correct judgments and complete profits; then combine the speed of its own hardware Advantages can often be preemptive and run ahead of market participants to complete opening or closing positions.
By narrowing the spread of the active market, to stimulate trading desire and to a certain extent can increase the real trading volume of the market.
Provide short-term momentum for price fluctuations in the trading market, and can cover the gap so that prices will not deviate too far from the normal range in an instant.
- Improve the overall trading efficiency of the market, catalyze the iteration of computer hardware and software technology and feed back the financial industry.
2. The risks brought by high-frequency trading to the market
At about 11 a.m. on August 16, 2013, China Everbright Securities issued more than 26,000 pen orders to actively purchase 234 billion yuan worth of ETF constituent stocks, with an actual turnover of 7.27 billion yuan; then 1.85 billion constituent stocks were converted to ETF sales. More than 7000 hand stock index futures short positions were issued and hedged. After this series of operations, the Shanghai Stock Index changed by 6% on the day, which triggered investigations and investors' attention by the regulators. According to the self-examination report of China Everbright Securities, the reason is that the order generation module of its high-frequency arbitrage system mistakenly submitted more than 26,000 orders other than available order funds to the order module, and there was no risk control alarm, which caused a subsequent huge earthquake. At the time, this incident not only unveiled the mystery of high-frequency arbitrage, but also brought high-frequency trading and the hidden risks it brought to the Chinese regulators and market participants.
As early as 2012, an oolong finger incident in the United States caused huge losses to the former industry leader, Cavaliers Capital. During the upgrade of the high-frequency trading system, the technical staff did not upgrade a server, which caused it to send millions of abnormal orders to the market after the market opened on August 1, involving more than 150 stocks and triggering a fuse mechanism. Some stocks were temporarily suspended from trading to terminate the transaction. Afterwards, the New York Stock Exchange canceled only 6 stocks on the same day, and the remaining 140 stocks failed to be cancelled. Eventually, Cavaliers Capital lost 460 million US dollars, turned into a business dilemma and was acquired by GETCO.
The development of high-frequency trading so far seems to have been causing people's reflection and criticism of the possible systemic risks. Buffett and Munger, the heads of Berkshire Hathaway, have publicly stated that high-frequency trading is like a "rat in a barn", criticizing that it does not bring liquidity to the market, but only brings trading. the amount. The rest of this chapter will discuss the risks, trading volume and liquidity brought by high-frequency trading to the market one by one.
Let us go back to May 6, 2010 again. Several major indexes such as the US stock market Dow, S & P and other major indexes have plunged more than 9% in a short period of time, although the price gradually made up and closed in the rest of the trading day. It has only fallen by about 3% from the previous day, but this incident has greatly shaken the United States, known as "Flash Crash" in history.
Figure 3: May 6, 2010 Dow Jones index k-line chart Source: Futu Securities
The US Securities Regulatory Commission conducted a comprehensive investigation on the flash crash, and the conclusions drawn can better help us understand how high-frequency trading contributes to providing liquidity. As shown in the left figure below, the red curve represents the change in the trading volume of the S & P 500 index futures on the day, the blue curve represents the change in futures price, and the right graph represents the change curve of the number of pending orders. We can clearly see that at 14:45 at the time of the flash crash, the volume of transactions surged but the depth of the market plummeted, and the orders even dropped to 0. With the support of the market-making strategy, why the market will be vacuumed, What about instant fluidity?
Figure 4 S & P 500 Index Futures Volume and Price Chart Source: Bloomberg
Figure 5 S & P 500 index futures trading pending orders trend chart Source: Bloomberg
In May of that year, under the bad mood of the European debt crisis, the capital market was tight and sensitive. When an institutional trader decided to place an empty order of 75,000 lots for hedging, an unexpected flash crash occurred. As usual, due to the presence of high-frequency market makers, orders for such "small" positions will be closed in full. After judging the order book information and market sentiment on the spot, the high-frequency strategy can decide to adopt the "no-quote quotation" scheme, or to avoid the stock price plunge and cause the market-making position to be locked up, directly adopt "no market-making" Strategy. The exit of the market maker caused the liquidity of the market to dry up instantly, the depth became worse, and a small number of sell orders could smash a few stalls of the buy order, and the instantaneous stock price plummeted. So far we can see that the target with large trading volume does not necessarily have greater liquidity and real trading demand. The role of high-frequency trading in the market is to provide trading conveniences such as smaller spreads for real demand, rather than price. The root cause of the decline. As for whether high-frequency trading has a boosting effect on large price fluctuations, there has been controversy throughout the academic session.
Similar to Buffett and Munger's views on high-frequency trading, some scholars believe that high-frequency teams affect the price changes through fraudulent trading and other methods to deprive other traders in the market, and Jonathan Brogaard said in an academic paper published in 2018 High-frequency trading truly provides liquidity to the market and narrows the bid-ask spread; high-frequency trading does not compete with price, but with quantity, so that there is no voice of academics questioning high-frequency strategies-orientation through price competition Harvest fundamental investors.
Brogaard selected the order book data of 279 large-cap stocks from Alpha Exchange, the second largest trading platform in Canada, from 2008 to 2012 as the research object. At the same time, in order to more accurately portray the market situation, the Canadian TSX exchange similar data was selected as a control reference. The following two figures show the high-frequency market makers have been stationed on the platform in the past three years. The picture on the left is the number of businesses that provide market making for each stock during the sampling period, and the picture on the right is the date distribution of high-frequency traders entering the Alpha platform.
Figure 6: Number of merchants providing market making for each stock from 2008 to 2012
Figure 7 Date distribution of high-frequency traders entering the Alpha platform
Afterwards, the data was processed using a difference-in-difference (DID) method to analyze the changes in liquidity before and after the entry of high-frequency market makers. As shown in the figure below, as the number of market makers stationed increases, the bid-ask spread of the two stocks on the same stock gradually narrows but eventually stays flat. Along with this process, the degree of competition among market makers has increased. It finally concluded that high-frequency trading can effectively improve market liquidity while reducing price volatility.
Figure 8 Comparison of the bid-ask spreads of the same target between the two exchanges
So far, the outside world's attitude towards high-frequency trading is still mixed. People are surprised at its investment scale and profitability, and they are also afraid of the "black swan event" that it may bring to the system again. Every instruction and algorithm of high-frequency trading is done by a machine, but how to improve risk control capabilities, reduce system vulnerabilities, or think about changes in trading systems and trading structures is something people should do.
4. High-frequency trading in the crypto asset market
Various types of high-frequency trading strategies can be applied in the digital currency market, and its strategy logic and profit model are basically consistent with the traditional trading market. Moreover, for the high-frequency strategy, the digital currency market has fewer trading restrictions, the market is more ineffective, the high-frequency trading strategy is less difficult to profit, and the level of return is higher.
In order to improve the liquidity level and trading volume, digital currency exchanges usually provide various subsidies and preferential convenience policies to the high-frequency trading team, such as extremely low handling fees or even negative handling fees, as well as high-frequency trading under the exchange server cluster. Market makers provide services such as co-location and lifting API transaction frequency restrictions. For smaller exchanges, it is also necessary to pay to hire a high-frequency market-making team to provide liquidity services for the exchange. However, for teams that are guided by high-frequency strategy profits, the general trading venues will also choose large trading platforms with better liquidity and more retail traders to accumulate for strategic deployment.
Figure 9 List of digital currency exchange handling fees and delivery rates
Figure 10 Digital currency exchange high-frequency market maker handling fee discount
As the overall market value of crypto assets is relatively small, the volume of high-frequency trading strategies in the crypto asset market is mostly small, mainly based on market-making strategies and cross-platform liquidity arbitrage strategies. The strategic capacity is generally between tens and hundreds of BTC. Due to the exchange's limited restrictions on high-frequency quantization and the many conveniences provided by the high-frequency quantization team to meet the exchange's own liquidity needs, the high-frequency quantization strategy's return and sharp ratio in the crypto asset market are relatively All other quantitative strategies are much higher. However, due to the limitation of high-frequency strategy capacity, it is generally based on quantitative team self-operation and does not accept external investment, and the scale effect of funds is difficult to achieve.
In addition, the failure of the exchange under the situation of severe market fluctuations is also a major hidden danger of high-frequency quantitative strategies . When extreme market conditions appear, high-frequency strategies will generally take measures to cancel orders, avoid position shifts caused by excessive price fluctuations, and ensure the balance of positions. Due to the withdrawal of orders by high-frequency market makers and arbitrage teams, the liquidity of the exchange's handicap will be instantaneously evacuated, causing greater price volatility and higher trading slippage for other traders, further aggravating price changes. The emergence of a large number of trading orders and liquidation of liquidation will also cause the exchange server to be overloaded or down, resulting in the delay of API query and trading orders. The slight delay may have less impact on the low-frequency quantization strategy, but the API delay will affect the high-frequency strategy. The impact is huge, which will cause the high-frequency strategy to execute a large number of loss-making orders in a short time. Sometimes API failures can cause the trading strategy to fail to execute pending orders, cancel orders, and close transactions. Uneven positions among multiple exchanges produce risk exposure. Position allocation and distribution further reduce the strategy's gains, which may eventually lead to huge losses of the strategy.
Figure 11: The sharp fluctuations in the market on March 12 produced a large slippage Source: skew
As an important part of the secondary market, high-frequency trading strategy plays an important role in the stock, futures, foreign exchange and other markets. It is also because of the increase in high-frequency trading participants in the traditional financial market and regulatory restrictions that have caused some high-frequency teams to squeeze out and thus transfer to the digital currency market. For high-frequency strategies, the volume of the digital currency market is relatively small, and the possibility of extreme risks is high. Pure high-frequency strategies are more suitable for small funds and self-managed management. The increase in high-frequency track traders has further caused strategic crowding, making it difficult to form scale effects. However, the combination of high-frequency strategy logic and other strategies to effectively prevent market and exchange risks under extreme market conditions will help to quantify the optimal combination of strategies to create excess returns.
1.Will high-frequency trading practices transform the financial markets in the Asia Pacific Region? Kauffman, Hu and Ma
2. High-Frequency Trading Competition, Jonathan Brogaard, Corey Garriott February 16, 2018
- Free and easy week review | How will Coda compress data into 22KB
- Learn the Methodology of DAO Movement from the Swedish Pirate Party
- After the delisting of FTX, Binance entered the options market, why did it choose the "American option" that is different?
- DeFi Review: Maker's leap of faith
- Market optimism shows, ETH2.0 drives prices up 20%?
- Tim Draper, a well-known venture capitalist: The epidemic will prompt people to switch to bitcoin, will stimulate the adoption of cryptocurrencies
- Where did the Ethereum Foundation spend its money last year?