当前位置:网站首页>Development of trading system (VI) -- HFT high frequency trading
Development of trading system (VI) -- HFT high frequency trading
2022-06-25 04:01:00 【Tianshan old demon】
One 、 Introduction to high frequency trading
1、 Introduction to high frequency trading
High frequency trading (High Frequency Trading) It refers to a change from a very short market ( The micro characteristics of the market ) In order to seek profit , Such as a security Purchase price and Selling price Price difference Small changes in , Or a stock in a different exchange A small price difference between .
2、 The characteristics of high-frequency trading
Securities and Exchange Commission SEC Given the characteristics of high-frequency trading :
(1) Order with super high-speed complex computer system .
(2) Use co-location And the data channel directly connected to the exchange .
(3) The average holding time of each position is very short .
(4) Send and cancel a large number of delegated orders .
(5) At the close of the market, the position was basically closed ( Don't stay overnight ).
HFT The speed advantage is when the exchange completes a transaction , When notifying all traders ,HFT Because upstream of the communication line , So you will see the transaction confirmation information before others , Based on your understanding of transaction confirmation information and business needs , Add or remove your own consignment order , But they are all completely normal trading operations , There is no malice , And because the transaction confirmation information is sent to everyone , Anyone will interpret and react to the transaction confirmation , But competition is possible only among traders working at the same time granularity .
3、 The history of high-frequency trading
1602 year , Amsterdam Stock Exchange became the first stock exchange in the world .
17 century , The Rothschild family uses carrier pigeons to deliver messages , Successfully carry out arbitrage on the price of the same kind of securities across national borders .
1983 year , Bloomberg (Bloomberg) Get Merrill Lynch (Merrill Lynch)3000 Ten thousand dollar investment , Built the first computer system , To provide real-time market data to Wall Street financial companies 、 Financial computation and analysis .
1998 year , Securities and Exchange Commission (SEC) To authorize an electronic exchange , The execution speed is the manual speed 1000 Times more high-frequency trading (HFT) Service paves the way .
2000 year ,HFT The transaction execution time has reached several seconds .
2000 year ,HFT It accounts for less than% of U.S. stock exchange orders 10%.
2005 year ,HFT In the U.S. stock exchange 35% The proportion of .
2010 year ,HFT The transaction execution speed has dropped to the millisecond and subtle level .
2010 year ,HFT In the U.S. stock exchange 56% The proportion of .
2010 year 3 month 6 Japan , value 41 Billion dollars of electronic transactions triggered a flash crash in financial markets , The Dow Jones index fell sharply in a single trading day 1,000 spot , Near evaporation of market value 1 Trillions of dollars . Before the market goes on the road of recovery , The market can still emerge 5 Minute crash 600 Point situation .SEC And the CFTC (CFTC) Think HFT The company is primarily responsible for .
2011 year , The launch of nano trading technology : A company called Fixnetix Our company has developed microchips , Make the transaction execution speed reach nanoseconds .
2012 year ,HFT Trading speed reaches nanosecond level .
2012 year 9 month , Start-up company Dataminr get 3000 A new service was launched after an investment of US $million , Turn social media traffic into actionable trading signals , The business news it reports is ahead of the traditional news reports on average 54 minute .
2012 year ,HFT About 70% The proportion of .
2012 year , quite a lot IT The company began to HFT Millions of dollars invested in technology . A special one for HFT The developed computer chip has improved the execution speed to 74 nanosecond ; And a value 3 Billion dollars 、 The transatlantic cable project is under construction , The purpose is only to reduce the trading time between New York and London 6 millisecond .
2012 year 8 month 1 Japan , The largest in the United States HFT Corporate Knight capital (Knight Capital) Crazy buying due to program errors 4 Billion shares , Cause great loss 4.6 Billion dollars , The next year was SEC fine 1200 Thousands of dollars .
2012 year 11 month , Federal bureau of investigation (FBI) Announced the start of an investigation into social media as a form of securities fraud .
2013 year 4 month 2 Japan ,SEC and CFTC Publish restrictions on public companies' announcements through social media .
2013 year 4 month 4 Japan , Bloomberg terminal will be real-time Tweets Integrate into their economic data services . Bloomberg social speed (Social Velocit) Start tracking anomalies on social media about specific company topics .
2013 year 4 month 23 Japan , Associated Press (Associate Press) Of Twitter After the account is hacked , In the afternoon 1:05 Released a false message that US President Barack Obama was injured in a bomb attack on the White House , It caused a sudden panic on Wall Street , The Dow is in 3 Dive in minutes 143 spot .
2013 year , A server center located in New York can provide ultra fast microwave transmission services , Transmit data at the speed of light to the New Jersey NASDAQ Exchange .
2013 year 9 month 18 Japan , Fed afternoon 2 It was announced that it would not reduce the level of support for the economy for the time being , The news shocked the financial markets . In the milliseconds before some traders in Chicago got the message , Have made an appointment with 6 Billion dollars of assets have been changed hands .
2013 year 9 month , Italy became the first country to HFT The country in which taxes are levied , Yes, it lasts less than 0.5 Seconds of stock trading levy 0.02% The tax .
2014 year 1 month , American high frequency trading company Virtu Financial Submit IPO apply , It says in the prospectus that ,2009 - 2013 Year of 1238 Each trading day , The company has only one day to lose money , Through the meager profits from each transaction , The company can get 130 Wan to 150 A net profit of ten thousand dollars .
2014 year 2 month , Buffett to eliminate the recent media coverage of his business information provider Bussiness Wire The misunderstanding and other negative effects that may be caused by providing charging services to high-frequency trading companies , Decide not to allow high-frequency trading companies to obtain Bussiness Wire Licensed direct delivery service provided .
2014 year 4 month ,SEC、CFTC、FBI Investigate high-frequency trading ,FBI Examine whether traders are suspected of using unpublished information to trade in front of institutional investors .
2014 year 4 month 15 Japan , The European Parliament has adopted a series of measures to restrict high-frequency trading 《 Financial instruments market directive Ⅱ》, The content includes restricting the currency unit of quotation to be too small 、 Mandatory testing of trading algorithms 、 Market makers are required to report the trading volume every hour every trading day , And the circuit breaker mechanism when the price fluctuation exceeds a certain limit .
2016 year 6 month ,SEC approval IEX Become a national stock exchange .IEX It is the first time in the United States to impose 350 Microsecond delayed exchange .
2017 year 4 month 20 Japan , High frequency trading company Virtu announce 14 $billion acquisition of Knight capital .
2018 year 5 month , Swiss stock exchange SIX Announced that it will cooperate with microwave solution suppliers 12H Microwave trading network to be launched in Europe .12H Responsible for providing technologies to support the transaction of microwave integrated optical wave ,SIX Manage all customers connected to the microwave trading network .SIX It is the first exchange in the world to operate and own the European microwave trading network , The exchange's system will be connected to Zurich 、 London 、 Frankfurt 、 Milan .
2018 year 9 month 20 Japan , The Commodity Futures Trading Commission (CFTC) Declare right Geneva Trading company ( Chicago based proprietary trading company ) punish 150 $10000 fine , Because the employees of the company cheated (Spoof) transaction .
2018 year 11 month , The Moscow Stock Exchange announced that it would provide funds 、 Algorithm 、 High frequency traders provide more analytical tools .
2018 year 11 month , The Australian Securities and Investment Commission announced , High frequency trading accounts for a quarter of Australian stock market trading .
2019 year 3 month , High frequency traders Virtu announce 10 US $100 million acquisition ITG(Investment Technology Group).
2019 year 11 month 7 Japan , The U.S. Department of justice and the commodity futures trading commission (CFTC) Announce the high frequency trading company Tower Research Capital Agreed payment 6749 Million US dollars to settle the charges that three of its former traders engaged in the fraud of listing , The fine includes 3259 Ten thousand dollars in damages ,1050 Million dollars of illegal income and 2440 $million civil penalty . Pending fraud refers to frequent cancellation of orders in China , In the international community, it is called deception (spoofing) The trading behavior of enterprises . In the actual transaction operation , Speculators may use high-frequency trading to make frequent statements 、 cancel the order , Create phantom liquidity to attract other investors .
Two 、 High frequency transaction supervision
1、 High frequency transaction supervision
1998 year , Securities and Exchange Commission (SEC) To authorize an electronic exchange , The execution speed is the manual speed 1000 Times more high-frequency trading (HFT) Service paves the way .
2010 year 7 month , U. S. President Barack Obama signed Dodd - frank (Dodd Frank) Financial Reform Act , The false offer is officially listed as illegal market manipulation .
2012 year 10 month , Securities and Exchange Commission (SEC) Put forward a series of regulatory methods for high-frequency transactions .
2012 year 11 month , Federal bureau of investigation (FBI) Announced the start of an investigation into social media as a form of securities fraud .
2013 year 5 month , The German high frequency trading act has been implemented , It is the world's first high-frequency trading ( Including algorithmic transactions ) The bill of .
2014 year 4 month , Securities Regulatory Commission (SEC)、 The Commodity Futures Trading Commission (CFTC)、 Federal bureau of investigation (FBI) Investigate high-frequency trading ,FBI Examine whether traders are suspected of using unpublished information to trade in front of institutional investors .
2014 year 4 month 15 Japan , The European Parliament has adopted a series of measures to restrict high-frequency trading 《 Financial instruments market directive Ⅱ》, The content includes restricting the currency unit of quotation to be too small 、 Mandatory testing of trading algorithms 、 Market makers are required to report the trading volume every hour every trading day , And the circuit breaker mechanism when the price fluctuation exceeds a certain limit .
2015 year 11 month , The Commodity Futures Trading Commission introduced new rules , Strengthen the supervision of high-frequency traders .
2016 year 6 month , Securities Regulatory Commission (SEC) approval IEX Become a national stock exchange .IEX It is the first time in the United States to impose 350 Microsecond delayed exchange .
2、 Regulatory penalties for high-frequency transactions
2013 year 10 month , The SEC announced , Knight capital, a high-frequency trading company, violated the market access rules because it did not prepare enough security measures to avoid a large number of wrong orders (market access rule), Be fined 1200 Thousands of dollars . Knight capital (Knight Capital) On 2012 year 8 month 1 Japanese crazy buying due to program errors 4 Billion shares , Cause great loss 4.6 Billion dollars .
2014 year 10 month , The securities and Exchange Commission of the United States announced that Athena There is market manipulation , And a fine 100 Thousands of dollars .
2014 year 11 month , The Commodity Futures Trading Commission (CFTC) The announcement said , Chicago Investment Corporation 3 Red Trading LLC And its trader, Igor · Ostach , Suspected of using deceptive means and fraudulent equipment to manipulate the market ,CFTC Decided to institute legal proceedings against him .
2015 year 4 month , The US Department of Justice accused sallow, a British high-frequency trader, of making profits by deceiving trading , Cause us stocks 2010 year 5 month 6 A lightning crash occurred on the th .
2015 year 10 month , The Chinese Ministry of Public Security announced that Easton International Trade Co., Ltd. was suspected of manipulating China futures The market conducts case filing and investigation , Chinese regulators believe that high-frequency trading is 2015 The reasons for the collapse of China's stock and futures markets in .
2015 year 11 month , The United States federal court ruled that Panther Energy Trading Michelle, the head of the company · KOSHA (Michael Coscia) Commodity trading fraud and deception (spoofing) convicted .
2016 year 8 month , China Securities Regulatory Commission (CSRC) announced that it would impose a ban on the Dutch high-frequency trading company IMC Of futures Review of transactions .
2018 year 9 month 20 Japan , The Commodity Futures Trading Commission (CFTC) Declare right Geneva Trading company ( Chicago based proprietary trading company ) punish 150 $10000 fine , Because the employees of the company cheated (Spoof) transaction .
2019 year 11 month , The U.S. Department of justice and the commodity futures trading commission (CFTC) Announce the high frequency trading company Tower Research Capital Agreed payment 6749 Million US dollars to settle the charges that three of its former traders engaged in the fraud of listing , The fine includes 3259 Ten thousand dollars in damages ,1050 Million dollars of illegal income and 2440 $million civil penalty . Pending fraud refers to frequent cancellation of orders in China , In the international community, it is called deception (spoofing) The trading behavior of enterprises . In the actual transaction operation , Speculators may use high-frequency trading to make frequent statements 、 cancel the order , Create phantom liquidity to attract other investors .
3、 ... and 、 High frequency trading strategy
1、 Introduction to high frequency trading strategy
Simmons' medal fund is a myth of Wall Street hedge funds , continuity 20 year , Average annual profit 35%, If you consider funds 5% Management fee and 40% Royalty , Its annual yield exceeds 60%. Yields far exceed those of Buffett and Soros .
Simmons' strategy is to use powerful mathematical models and computer software , In different products in the global market , High frequency trading , Earn a small fluctuation margin , So as to obtain a steady and sustainable income , It is a market neutral strategy , Less affected by bull and bear markets , As long as there are fluctuations, you can make money . Simmons' grand medal fund can be found in 2008 In the financial crisis, the global market plummeted 80% The rate of return of .
High frequency trading strategies mainly include : Liquidity rebate transactions (Liquidity Rebate Trading)、 Game algorithm trading (Predatory Algorithmic Trading) And automatic market maker strategy (Automated MarketMakers Trading).
The mainstream high-frequency trading strategy requires very high performance of computers and networks , High frequency trading institutions usually place their trading servers close to the exchange computers , To shorten the distance that trade orders travel at the speed of light through fiber optic cables .
High frequency trading is suspected of market fairness , The equipment and computing power required for high-frequency trading is an insurmountable threshold for small and medium-sized investors , An institution that makes use of high-frequency trading to obtain income , It may cause the unfairness of the market .
In the domestic market , The stock market is T+1, Stock index futures market position 、 There are great restrictions on the frequency of transactions , Commodity futures markets can do some short-term trading within a day , But it is still a long way from high-frequency trading .
2、 Market making strategy
Market making refers to acting as a liquidity provider in the market . The market maker is the opponent of everyone , Before anyone wants to buy a target ( Such as the stock , Futures, etc ), Market makers should ensure that buyers and investors can buy , Before anyone wants to sell a target , The market maker should ensure that the selling investor can sell .
Market maker strategy is essentially mean reversion , It is believed that the market price has volatility in the short term , Rising prices will fall , Falling prices rise back . Market makers can choose to take risks , Buy shares from seller investors for the time being , Sell after a period of time when the price becomes favorable . Since there is no guarantee that the price will change in the direction favorable to the market maker , Therefore, market makers have the risk of losing money , The longer the time span , The greater the risk . Market makers need to keep the goods they buy for a certain period of time as inventory , To earn a little spread due to volatility .
noncontractual market maker( Non contract market makers ), It is an active market maker , By investing a lot of money to hire first-class IT Experts 、 Financial expert , Buy the most advanced IT equipment , Develop high frequency trading algorithms and strategies , Create a high-frequency trading system with extremely high performance and low delay , But rarely make money .
contractual market maker( Contract market makers ), It is a passive market maker , Not sure about making money all the time , But exchanges need to provide liquidity to the market , Avoid lack of liquidity when the market judges the price trend consistently , therefore , The exchange will introduce market makers . Contract market makers will sign a contract with the exchange , How much liquidity is promised , The exchange will give some remuneration and benefits accordingly . therefore , Even if the contract market maker loses some money , But with the exchange's reward , Still profitable . Contract market makers don't really need the ability to predict market trends , As long as you don't lose money, you can earn the reward of the exchange . Do not lose money , First, hedging , The second is to cancel the order in time when the situation is unfavorable , Therefore, low delay is required , If the speed is slow, it will be too late to cancel the order and suffer losses .
Market making is the mainstream HFT Business , The market maker is the opponent of all traders , So that most of the transactions are completed through the participation of market makers .
Market price list (market order) The transaction price is not guaranteed , The order is sent to the exchange , According to the situation at that time , You can give me whatever the price is . If you want to ensure the price , Please use the limit order (limit order), Guaranteed transaction price , But there is no guarantee of time .
3、 Arbitrage strategy
Arbitrage refers to finding two highly correlated securities , Such as ETF And composition ETF Shares . It can be used according to the stock price ETF Calculation method calculate a ETF Expected price . If it turns out to be ETF Expected price and market ETF The price is different , Obviously, there is some confusion in the market ,ETF The market price will return to ETF Near the expected price . here , Investors can buy ( sell )ETF, sell ( purchase ) Stocks , Wait for the price to return , You can make a steady profit .
Arbitrage strategy competition is very fierce , Anyone can take part in , With more participants, the market will make fewer mistakes , At the same time, the profit margin of arbitrageurs will also become smaller . When the net profit earned by arbitrage is not enough to support HFT R & D and maintenance costs ,HFT The company will close down .
In order to reduce the impact on the market price , Investors' algorithmic trading systems generally handle large purchases in two stages : First, break it down into dozens or even hundreds of small bills ( A small bill is usually made in 100~500 Between shares ), Then put the small bills on the market in a set order .
4、 Liquidity rebate transactions
In order to win more trading orders , All stock exchanges in the United States will provide certain transaction fee rebates for securities companies that create liquidity , Usually it is 0.25 cents / stocks . Whether you buy or sell , As long as the deal is successful , The exchange will pay a rebate to the original broker providing the liquidity , At the same time, higher fees will be charged to securities companies that use liquidity to trade . With the increasing popularity of transaction rebate incentive mechanism , More and more trading strategies with the purpose of obtaining trading rebates have been born .
Suppose that the psychological transaction price of institutional investors is 30~30.05 Between US dollars . If the first bill in the trading system ( Such as 100 stocks ) Pairing successful , With 30 Deal in US $ . The second bill in the trading system ( Such as 500 stocks ) Then it jumps out . Suppose that the bill is matched successfully , With 30 Deal in US $ . According to the above transaction information , The computer systems of high-frequency traders who specialize in liquidity rebate strategies may detect other follow-up of institutional investors 30 The existence of the dollar bill , therefore , Rebate dealer computer takes action , The quoted price is 30.01 The dollar bill 100 stocks . here , Once upon a time 30 Securities companies that sell stocks in US dollars are more willing to 30.01 Selling to a kickback dealer at the price of US dollars .
After the transaction is successful , The rebate dealer immediately adjusts the trading direction , Will just be 30.01 In dollars 100 Shares at the same price , namely 30.01 Sell in USD . because 30 The dollar share price no longer exists , Therefore, the sales order is likely to be accepted by institutional investors . Although the rebate dealer did not make a profit in the whole trading process , But because the second active selling order provides liquidity to the market , Thus, each share provided by the exchange 0.25 A commission of cents . Each share earned by a kickback dealer 0.25 The profit of cents is paid by institutional investors 1.0 At the cost of cents .
5、 Game algorithm trading
In the U.S. , More than half of institutional investors' algorithmic declarations follow SEC National best bidding principle (National Best Bid or Offer,NBBO). So-called NBBO, That is, when a customer buys Securities , Securities companies must guarantee to give the best selling price available in the market ; Also when a client sells securities , Securities companies must ensure that they give the best available purchase price to the market . according to NBBO principle , When one order is ranked higher than another because of its higher price priority , In order to be able to close the second order , Often adjust the stock price and guarantee to be consistent with the former . in fact , The algorithmic quotation prices of a stock are often compared with each other at a very fast speed , Thus, the stock price shows a trend from high to low 、 From low to high . In actual transactions, we often see a limited number of 100 Shares or 500 The reason why small transactions of stocks often push up or down the share price by 10 cents to dozens of cents .
The game algorithm trading strategy is designed on the basis of the above historical law of stock price changes . generally speaking , The game algorithm strategy induces institutional investors to increase the buying price or reduce the selling price by making artificial prices , So as to lock in the trading profits .
Suppose institutional investors follow NBBO And the psychological transaction price is 30~30.05 Between US dollars . Game algorithm traders use programs and techniques to find potential sequential algorithm orders from other investors . Confirm on the computer that the price is 30 After the existence of the dollar's algorithmic entry , The prey algorithm trading program launches an attack : The quoted price is 30.01 The dollar bill , Thus forcing institutional investors to quickly raise the subsequent purchase price to 30.01 dollar ; Then the game algorithm traders further push the price up to 30.02 dollar , Entice institutional investors to continue chasing .
And so on , Game algorithm traders push the price to the upper limit of the price acceptable to institutional investors in an instant 30.05 dollar , And sell the shares to institutional investors at this price . Game algorithm traders know 30.05 The artificial price of dollars is generally difficult to maintain , So as to make a profit when the price decreases .
Pinging A trial order means a small amount of ( Usually onehundredandtwohundred shares )、 Constantly raising prices ( For example, add a penny each time )、 An order that is cancelled immediately if it cannot be closed immediately (Immediate-or-Cancel Order, abbreviation IOC Order ) The strategy of , In order to pry into the dark pool or the large hidden orders of the exchange . stay HFT in ,Pinging Test sheets are used to find hidden prey .
In order to discover the existence of large orders , The high-frequency trading company carries out... For each listed stock 100 Offer and quotation for shares .
Once a high-frequency trader finds a large order , Just trade first , After scanning the order ( That is to eat up the existing liquidity ) And then at a slightly lower price ( Higher or lower prices ) Provide new liquidity , Reverse buying and selling to institutional investors , Profit from it .
6、 Automatic market maker strategy
The main function of a market maker is to provide trading liquidity for the exchange . Automatic market maker high-frequency traders improve liquidity by providing buy and sell orders to the market , Generally, the reverse operation is carried out with investors . The high-frequency trading system of automatic market maker high-frequency traders has the ability to find the investment intentions of other investors by sending super fast orders , For example, after sending a purchase order or a sale order at a very fast speed , If no quick deal is made , Cancel the order immediately ; However, if a deal is made , The system captures a large number of potential 、 Hide the information about the existence of the order .
Suppose the institutional investors send the price to their algorithmic trading system at 30.01~30.03 A series of bills between dollars . In order to discover the existence of potential orders , The high-speed computer system of high-frequency traders of automatic market makers began to 30.05 The price of US dollars sends a 100 A sale order for shares . Because the price is higher than the investor's price ceiling , So it didn't cause any reaction , So the sale order was quickly cancelled . The computer takes the form of 30.04 The price of US dollar is tested again , The result was still no response , So the sales order was quickly cancelled . The computer then 30.03 The price of US dollars continues to test , As a result, the transaction was successful . therefore , The computer system immediately realizes that the price ceiling for a certain quantity is 30.03 The existence of the hidden bill of the dollar . therefore , The computer system with powerful operation function sends out 30.01 The dollar bill , And make use of its technical advantages to make a deal before institutional investors , And then 30.03 Selling back to institutional investors at the price of US dollars .
Four 、 High frequency trading infrastructure
1、 Introduction to HFT infrastructure
The end-to-end delay of high-frequency trading system is mainly caused by the forwarding delay of network equipment 、 Transmission delay of network connection 、 Network card data receiving and sending delay 、 Operating system processing delay 、 Middleware processing delay and business processing delay etc . In order to pursue the ultimate low latency , It is necessary to reduce delay loss in all links .
2、 Financial network
(1) Optical fiber communication
In optical fiber communication, the optical signal in the optical fiber cable does not advance in a straight line, but continuously bends and reflects forward , And it is limited by the glass medium inside the optical cable , The actual transmission degree of optical signal is only about 20 Thousands of kilometers / second ; The optical fiber laying is limited by the terrain such as mountains, rivers and oceans , The optical fiber transmission distance is larger than the actual distance between the two places . But the bandwidth of optical network is relatively large , It is still the first choice for long-distance high-speed network connection .
High frequency trading companies usually choose dark fiber ( Laid but not put into use optical cable ), For high-quality dark fiber Services ( No connection to share with other customers ), Chicago, the most popular city in the world —— The New York route has sufficient transmission capacity , The standard round trip delay is 16 millisecond .
2010 year , Us high-speed network provider Spread Networks It used to cost 3 Billion dollars to build the most direct optical cable between New York and Chicago , In order not to bypass the optical cable , The optical cable tunnel across the Appalachian Mountains was dug , The round trip speed of the network connection only needs 13.33 Less milliseconds than other networks 3 millisecond .
2013 year , The Arctic submarine optical cable began to be laid by using ice breaking teams and special polar iceberg cable laying ships , At a cost of 15 Billion dollars . There are three Arctic submarine optical cables , Two of them are called Artic Fibre and Arctic Link The cable will cross the northwest passage of the Canadian Arctic islands ; The third Russian transarctic submarine optical cable (ROTACS) It will be laid around the Northern Scandinavian Peninsula and Russia . Through the Arctic submarine optical cable , The two major financial trading centers in the world, London in the United Kingdom and Tokyo in Japan, will be almost directly connected , Distance saving is close 8000 km , The data transmission time between the two places also ranges from about 0.23 Seconds reduced to 0.17 second .
2018 year 12 month 7 Japan , China Unicom announces that China Unicom ( The European ) The French branch of the Operation Co., Ltd. officially opened in Paris, France . The French company is the first established overseas by China Unicom 32 Branches . China Unicom has launched upgraded terminal security protection solutions and low delay financial private network solutions for French and European financial customers , Shorten the information transmission delay from Paris to Hong Kong, the backbone network of China Unicom, to nearly 160 millisecond .
(2) Microwave communication
The transmission speed of microwave communication is about 30 Thousands of kilometers / second , By building a microwave signal tower 、 By relay ( It is usually built on the top of a hill or a tall building ), Keep the transmission distance as short as possible . The delay of microwave communication is one order of magnitude lower than that of optical fiber , Microwave lines must be selected for low delay sensitive applications ; But the transmission speed of microwave communication is easily affected by bad weather , Wind and rain will cause communication damage , Even a direct failure , Therefore, spare optical fiber lines are required ; The bandwidth of microwave communication is small , If it is a cross exchange business , It is impossible to transfer market data through microwave communication , It can only be used to send and receive orders , Therefore, network service providers have a certain space to do some data compression and sampling , It can provide a miniature version of market data on the microwave line .
Optical fiber 、 Submarine optical cable communication mode is suitable for carrying a large number of data transactions , For example, listed companies issue trillions of financial statements .
2014 year , High frequency trading company Jump Trading At the Chicago Mercantile Exchange, the world's largest futures exchange (CME) Across from the data center , Bought a piece of 12 Microwave communication base stations will be erected in the open space of 10000 square meters , It is used to send the transaction request to CME.
2018 year 5 month , Swiss stock exchange SIX Announced that it will cooperate with microwave solution suppliers 12H Microwave trading network to be launched in Europe .12H Responsible for providing technologies to support the transaction of microwave integrated optical wave ,SIX Manage all customers connected to the microwave trading network .SIX It is the first exchange in the world to operate and own the European microwave trading network , The exchange's system will be connected to Zurich 、 London 、 Frankfurt 、 Milan .
(3) Laser communication
Laser communication takes into account the advantages of optical fiber communication and microwave communication , The transmission speed of laser communication is about 30 Thousands of kilometers / second , Can provide 2Gbps bandwidth , It is hundreds of times the microwave communication network and the infrared laser is basically unaffected by the weather , It can transmit data normally in rainy days and heavy fog . But in laser communication, laser can only be transmitted in a straight line , Transmission deviation is easy to occur , Therefore, it is necessary to install the laser transmitter on the top of a high building to increase the transmission distance , But high-rise buildings will swing back and forth slightly under the influence of the wind , The difficulty lies in how to let the laser shoot into the receiver board the size of the pot cover during the signal transmission , And remain so throughout the transmission process .
Anova The company is located in Manhattan, New York ( NYSE ) And New Jersey Carteret( NASDAQ Exchange ) A base station with a laser communication network is installed on the top of the building , It can shoot the infrared laser of hair thickness to 10 Kilometers away , Because the straight-line distance between the data centers of the two exchanges is about 55 km ,Anova It will be built halfway 6 to 7 Laser base stations , Establish a most direct channel for transaction data , To replace optical fiber and microwave wireless networks .
3、 Exchange machine room custody
In pursuit of lower latency , High frequency trading companies usually put their servers in the data center where the exchange matchmaking engine servers are located (co-location).
The exchange data center will ensure that Co-location No matter where the client places the machine in the exchange , Are transmitted through the same length of cable 、 Same delay time .
Domestic exchanges have their own server hosting centers , Shanghai Securities Exchange trusteeship machine room, Waigaoqiao, Shanghai Stock Exchange 、 Shenzhen tongtuoguan machine room of South Center of Shenzhen Stock Exchange 、 Shanghai Stock Exchange Jinqiao trusteeship machine room . Only securities 、 A futures company may rent a custody machine room cabinet from the exchange . negotiable securities 、 Futures companies provide cabinets 、 Buy equipment 、 Purchase or rent software to serve its customers . High end procedural trading teams usually purchase equipment by themselves or specify hardware configuration by securities 、 Futures companies purchase , Securities 、 The futures company agrees , Put it into the rented cabinet for transaction .
HFT The company or proprietary trading team can apply for cabinets and network resources from securities companies or futures companies , Place the trading host and the trading host of the exchange as close as possible in physical distance .
The custody machine room provided by the exchange is limited by the site and power , General resource capacity is limited , Supply often exceeds demand .
4、 Network access
exchange co-location The network connection generally provided by the service is 1G、10G Ethernet and 40G Ethernet connection . Usually , Higher bandwidth has a direct impact on latency , Especially in the trading environment, a single message is relatively large 、 The message rate is relatively high 、 When the network has congestion and burst traffic , High bandwidth ensures low and stable system delay . about co-location user ,40G The network connection of is relative to 10G The Internet connection , It can delay the round trip (roundtrip latency) Reduce 7 Microsecond , For high-frequency trading is considerable .
High bandwidth not only brings lower latency , And it can guarantee the stability of delay . High bandwidth ensures that when a large amount of data needs to be transmitted , The time for data to wait for transmission to the network cable is shorter , Because there are more bits that can be transmitted per unit time , It ensures that even when the network has burst traffic , You can also get as low a delay as possible . For high-frequency trading , The time when the data is highest is often the time when the market is most volatile , It is also the time when trading has the most profit opportunities .
5、 Network devices
The performance of network equipment will have a direct impact on the overall delay of high-frequency trading system , Network equipment mainly includes routers 、 Switches and servers I/O Interface card or network card , Switches and network cards usually have a direct impact on the delay of high-frequency trading systems .
(1) Switch
At present, it is more conventional 10G Ethernet switch , such as Dell,Juniper, Cisco And so on , The port to port delay that can be provided is about 700 nanosecond ; Focus on low latency switch products , Such as Arista and Mellanox Company switches , Can provide less than 500 Nanosecond delay , among Mellanox Claim to be able to provide 250 Nanosecond delay ; For extreme application scenarios , Switch products with lower latency , such as Zeptonics The company's switches can support up to 130 Nanosecond delay performance , Its Layer-1 switch (Layer 1 switch) Even do 5 Nanosecond delay , But it can only support some specific application scenarios , For example, there is not much communication between ports based on transaction network .
High frequency trading systems do not require complex switching functions , Mainly the communication connected to the exchange through a specific port , therefore , Support low latency switches .
(2) network card
The server network card is also very important for the delay performance of the system , At present, some high-end products 1G and 10G The Ethernet card integrates TOE(TCP Offload Enigne) technology , Because the data in the network arrives at the server , Server side operating system (OS) Data need to be TCP/IP Protocol analysis , The data parsing process is not only time-consuming , And it will occupy a large number of hosts CPU resources ( Handle 1Gbps Of TCP/IP The protocol data needs to occupy about 1GHz Of CPU), After protocol resolution is supported on the network card , On the one hand, the processing power of specific hardware can be used to obtain lower delay , On the other hand, it can save CPU Resources are used to process high-frequency trading programs running on the host . High end network interface cards usually support RoCE,FCoE Technology , Company includes Solarflare, Mellanox, Chelsio etc. .
In addition to the design of its own hardware, the private network card , You need to switch the system's own kernel space TCP/IP stack, Avoid expensive context switching.
FPGA(ield Programmable Gate Array, Field programmable gate array ) It's a hardware reconfigurable architecture ,FPGA It has both pipeline parallelism and data parallelism , Ratio CPU and GPU Lower latency and higher throughput , So you can use FPGA Do special network equipment and some additional logic processing , Further emancipation CPU.
Except Ethernet , Another network structure InfiniBand With its higher speed , The feature of lower delay is becoming more and more popular in trading systems . Higher speed and lower latency are not absolute , It can only be reflected in some specific applications , Depending on InfiniBand The architecture itself , such as ,InfiniBand The frame of is based on 16bit Local address , Ethernet uses 48bit The only physical address in the world ,InfiniBand The essence is a I/O technology , Not network technology .InfiniBand Another advantage of is scalability , For some applications that require frequent messaging between multiple nodes , For example, the message passing interface often used in supercomputing (MPI) technology ,InfiniBand Compared with Ethernet, it can improve the overall throughput , Reduce the delay , And ensure the effective expansion of the overall processing capacity of the system with the increase of nodes . but InfiniBan The disadvantage is that the price is relatively high , Special hardware is required , Compatibility problems with Ethernet devices, etc , And so far, few exchanges offer InfiniBand The connection of , therefore InfiniBand The network card is usually used in the internal network of high-frequency trading companies .
at present , Ethernet is also introducing some InfiniBand Supported features , Such as RDMA( Remote direct memory access ) Technology enables nodes in the cluster to directly access the memory of each other's machines through network devices , Both reduce delay , It also saves on nodes CPU resources , and RoCE(RDMA over Converged Ethernet) Technology to achieve Ethernet based RDMA( Remote direct memory access ), take InfiniBand Its low latency also gives Ethernet .
at present InfiniBand Compared with Ethernet technology , In terms of latency and throughput , There are advantages . Due to compatibility and cost , Many companies adopt a mixed model , Use the part of the network that needs the most speed 40G Of Infiniband Or Ethernet , The other part of the network uses the general 10G.
6、 High frequency trading system
The design and development of high frequency trading system is a very complex project , Moreover, it requires extremely high accuracy and stability , If it is not precise enough, there will be various problems after it goes online , It's impossible to use .
The essence of high-frequency trading system is to give full play to the performance of the software and hardware system of a single machine , Without emphasis on high load and ductility .
The core business logic processing of high-frequency trading system is delay . There are two parts in the computer , One is core The usage rate of , such as irq balance,cpuisol,affinity etc. , The main thing is to monopolize as much as possible core; The other is cache invalidation, from L1/L2/L3cache To TLB, Memory layout should be carefully considered .
The transaction policy program exists as a user program of the operating system . The market data is mainly through UDP And TCP Two methods for network transmission . After the market data reaches the network card , adopt PCI Express or HyperPort Interface , And then to the kernel of the operating system (OS Kernel) Conduct TCP/IP Protocol stack parsing , And then pass the parsed data content through socket Interface , Push to the user program, i.e. policy . Then the user program parses the data according to the specified format , Then it is applied to the policy logic , Analyze , Single action .
The processing time of the whole process is in the order of two digit microseconds . In the whole process of internal transmission and analysis of market data , The main things that can be optimized are TCP/IP Analysis of protocol stack and business data . Due to the diversity of strategy logic , A general acceleration of strategic logic is unlikely .TCP/IP Resolution of protocol stack (TOE,TCP/IP offload engine) And service data analysis is mainly done by a dedicated network card . There are currently two ways to achieve , One is attached to the network card CPU Top processing (IBM A network card comes with CELL chip , It's very powerful ); The other is network card +FPGA In the form of , use FPGA( Field programmable gate array ) To do it TCP/IP And business data .FPGA Because it's all hardware , It will be faster . Through hardware acceleration , It can reach single digit microseconds (us) Delay of , And it can achieve fixed performance regardless of the amount of data .
5、 ... and 、 Mainstream high-frequency trading system
1、 Shengli system
Shengli express counter system (REM) Both trading and quotations use FPGA Hardware acceleration ,EFH Market system 、 Multi core hardware technology casting nanosecond market forwarding service equipment , Fully meet the needs of high-frequency trading customers tick-to-trade 0 The need for delay .REM Counter system features :
(1) Order management and risk control 0 Delay
(2) Single digit subtle performance jitter .
(3) Capital risk control 、 Flow control parallel processing .
(4) Visual real-time risk monitoring .
2、 Ekron
Market acceleration system Xele-MD It is the industry leading based on FPGA Sub microsecond market acceleration system .
Original FPGA The data transmission system has nanosecond response speed , It can provide the fastest and most accurate information channel , For investment securities 、 High end people of futures and fund investment institutions , An important part of the high-performance and high-speed trading system tailored by industrial giants .
Xele-Trade The system adopts international top technology , Based on high-speed programmable hardware devices , For Securities 、 futures 、 option 、 Foreign exchange provides hardware and software acceleration .
3、CTPII mini
CTPII mini It is a system developed by Shanghai futures exchange with the latest technical framework , Comparison CTP mini The system has been simplified to a greater extent , Merge all core components into Tserver A component , Cancel unnecessary API. The trading offer and market offer corresponding to different exchanges are reserved , At the same time, the trading offer and market offer of Zhengshang exchange and Dashang exchange will be updated to the latest Linux Components , Greatly improve transaction efficiency .
4、 Flying horse
The Pegasus counter system consists of a trading system 、 The market system is composed of the member end , Meet the current regulatory requirements for visibility , Support all futures of the four major domestic futures exchanges and energy centers 、 Options business , With low system delay 、 Superior order processing performance .
5、 Quantity investment QDP
Volume investment express counter trading system (QDP) Through kernel development and hardware precise tuning , Trading market with subtle level delay , Access licenses for the four major domestic futures exchanges and energy centers , Built in pen by pen compliance check and flow control technology , A unified API Interface .
6、 Yi Sheng mini
Yi Sheng mini The counter is a heterogeneous dual core trading system architecture , The large capacity kernel of the common version ensures the super capacity and super stability of the system , The extreme version high-speed kernel provides the fastest extreme transaction speed in the current domestic trading system , Ultra low data latency , Fully support the futures and options business of four domestic exchanges and energy centers .
tapextreme The system is a subsystem based on Yisheng Qixing system , The purpose is to simplify the system architecture , Optimize processing logic , A set of subsystems developed by reducing the communication delay between modules . The basic data comes from the offline files exported by the star system 、 Query interface provided by the exchange .
边栏推荐
- China's SkyEye found suspicious signals of extraterrestrial civilization. Musk said that the Starship began its orbital test flight in July. Netinfo office: app should not force users to agree to proc
- Xidian AI ranked higher than Qingbei in terms of AI majors, and Nantah ranked the first in China in 2022 in terms of soft science majors
- uniapp 制作手机app程序, 使用uni.chooseVideo录制视频,视频播放模糊分辨率低的原因
- Jilin University 22 spring March "career design" assignment assessment-00072
- Work assessment of pharmacotherapeutics of Jilin University in March of the 22nd spring -00064
- 2点睡10点起不算熬夜?除非你每天都能执行
- Redis related-03
- Redis related-02
- 马斯克:推特要学习微信,让10亿人「活在上面」成为超级APP
- opencv是开源的吗?
猜你喜欢
2点睡10点起不算熬夜?除非你每天都能执行
The era of copilot free is over! The official version is 67 yuan / month, and the student party and the defenders of popular open source projects can prostitute for nothing
Time management understood after working at home | community essay solicitation
Zuckerberg's latest VR prototype is coming. It is necessary to confuse virtual reality with reality
Copilot免费时代结束!正式版67元/月,学生党和热门开源项目维护者可白嫖
练习:仿真模拟福彩双色球——中500w巨奖到底有多难?跑跑代码就晓得了。
佐喃社区
X86 CPU, critical! The latest vulnerability has caused heated discussion. Hackers can remotely steal keys. Intel "all processors" are affected
The sign in function completes 03 "IVX low code sign in system production"
Lao Ye's blessing
随机推荐
Intel 13代酷睿首次露出真面目:68MB缓存提升明显
(超详细onenet TCP协议接入)arduino+esp8266-01s接入物联网平台,上传实时采集数据/TCP透传(以及lua脚本如何获取和编写
Winxp kernel driver debugging
OpenSUSE environment PHP connection Oracle
Time management understood after working at home | community essay solicitation
Interview with Mo Tianlun | ivorysql wangzhibin - ivorysql, an Oracle compatible open source database based on PostgreSQL
Deveco studio 3.0 editor configuration tips
Jilin University 22 spring March "official document writing" assignment assessment-00084
Tai Chi graphics 60 lines of code to achieve classic papers, 0.7 seconds to get Poisson disk sampling, 100 times faster than numpy
居家办公之后才明白的时间管理 | 社区征文
Demonstration of combination of dream CAD cloud map and GIS
Jilin University 22 spring March "career design" assignment assessment-00072
How to use crawlers to capture bullet screen and comment data of station B?
The more AI evolves, the more it resembles the human brain! Meta found the "prefrontal cortex" of the machine. AI scholars and neuroscientists were surprised
Perfect shuffle problem
JSP cannot be resolved to a type error reporting solution
一文搞懂php中的(DI)依赖注入
Internet Explorer died, and netizens started to build a true tombstone
Huawei failed to appeal and was prohibited from selling 5g equipment in Sweden; Apple regained the first place in the world in terms of market value; DeNO completes round a financing of USD 21million
Tensorflow, danger! Google itself is the one who abandoned it