Order book for high-frequency trading

Author: The Little Dream, Created: 2017-09-01 12:18:52, Updated:

Order book for high-frequency trading

  • Why do you care about the order book?

    The limit order book is where all buyers and sellers meet and all bidding takes place. Essentially, it is all supply and demand. When we see the order book, we see the decisions and strategies of all market participants. If the transaction data shows what has already happened, then the order book shows the trader's intentions.

    Many information can be obtained by tracking and analyzing the order book, such as:

    Find liquid price levels. Certain price levels can attract large numbers of bids, which can only be identified by a deep observation of the market. When the above price level is below the current price, it often manifests as a support point; when it is above the current price, it manifests as a resistance point.

    The price difference between buying and selling can be used to predict what will happen in the near future.

    Identify the change in the direction of the movement of the market during the day, such as the change from a strong buy to a strong sell.

    Research the relationship between changes in the order book and changes in market prices.

    We also use market depth data to see how strategies work, for example:

    Price-triggering strategies, which are strategies that automatically change the direction of a trade based on price changes.

    Verify whether a breakthrough has occurred on certain key technical indicators and better identify whether it is a fake breakthrough or a real one.

    It's a good idea to identify if there are big players in the game.

    It's not just the retailers who are doing it.

    There are many ways to use an order book. A speculator (scalper) uses the information in the order book to decide whether to go long or short; a swing trader or a trader who reveres technical analysis may use it to justify their macro buying or selling decisions.

  • Challenges in dealing with the limit order book

    When dealing with the order book, quantitative analysts or traders often face the following challenges:

    High-frequency trading strategies involve placing a price limit order at many price levels in order to gain the upper hand. Usually these placement actions are triggered by price changes. Then, as the market price approaches the order price, most orders are withdrawn.

    Not all quotes represent true trading intentions. Some traders manipulate the market by listing quotes, creating the illusion of high or low liquidity. Their methods include spoofing and quote stuffing.

    Sometimes, not all trading orders are shown in the order book. Many exchanges have some type of hidden order.

  • Understanding microstructure

    Every macro event is a collection of micro events. Many times, if you can understand the microstructure, you can understand the macro phenomenon better. The benefits of studying microstructures are that there are fewer major events, and therefore it is easier to interpret the behavior and intentions of market participants.

  • How to visualize order book

    We had to deal with this problem when we were still working on high-frequency trading strategies. We wanted to better understand other types of market participants and how the market would react when we placed orders. We decided to convert the order book into a heat chart, which was updated at a frequency of 25-40 frames per second. This heat chart recorded and plotted each change in the order book, showing the change in shadows of different grades.

  • This heat chart gives us a clear view of how the entire limit order book and trading volume changes over time, allowing us to gain a faster and deeper insight into the market mechanism. I'll explain in more detail below. Conventional charts, such as the column chart, are two-dimensional (price and time). When you use the heat chart, you add a dimension to the chart so you can see the order size under each price at each moment in history.

    Visualization allows you to see patterns that you couldn't see or understand before: How does the order size at each price level change over time? When the price approaches a certain price line (support line or resistance line), how does the line move? Is there a stronger support or resistance line below or above this price line? How many transactions are there near this price line? What happens on the other side of the order book? Are there areas where the order book is asymmetrical?

  • The price rebound

    A large number of buy and sell orders are clustered at several adjacent ask levels. Usually we want to test the following assumption in real time: if the price reaches such a level, then the price will rebound afterwards (at least for a short period of time). Here are some phenomena that can support this assumption: When the price approaches this level, the number of sellers:

    • a. remain unchanged, or

    • b. becomes larger (in this case, it is possible that the transaction at that level has not yet occurred and the price has rebounded)

    When orders start to be placed at this price level:

    • a. More sellers joined and/or

    • b. We observe that hidden sales orders are being executed, their counterparts being market price purchases.

  • Major changes in the order book

    In an instant, several large orders are canceled and several large orders are added; then the price drops. Based on what we just magnified, these orders most likely belong to the same trader.

  • One, more transparency

    Organizations and individuals need broader and more accurate data. The more data you have (e.g. from more than one exchange) and the more detailed you are, the more you can make informed decisions. We have already seen these trends during our time observing the market. A good example is the upcoming CME Market by Order data, which provides the queue positions of each order and their quantities.

  • 2 More data analytics and visualization

    As technology advances, more data is collected, transmitted in real-time or on-demand (thanks to a faster internet), and analyzed and visualized by ordinary computers (thanks to better GPUs). As with other industries, the financial industry will require better data analytics and visualization applications. These programs can be used not only for offline research, but also in real-time, with the goal of making faster and better decisions.

  • 3. Interoperability, flexibility and modularity of visualization tools

    Visualization software should be more neutral to data sources and able to intelligently display data from a variety of sources. In addition, as the amount of data increases, the way you interact with it becomes more flexible. For example, imagine that you can use your own data to select parameters and build a video (like building a chart in Excel), enrich the video with your own metrics, and decide whether to watch it offline or in real time. These analytics methods can serve not only algorithm developers or quantitative analysts, but also traders and other market analysts.

  • 4 Automated data analytics

    More data also means higher data dimensions (different phenomenon types, data anomalies, different tools, different time scales, etc.). Most data analysis work today is done in two dimensions, but in the future it may also be done in three or four dimensions, thus increasing user insight and competitive advantage. However, the human perceptual dimension is limited (e.g. 3D vision, audio, etc.) so it is necessary to perform preliminary automated data analysis, generate alerts and present meaningful parts of the preliminary results.

Translated from WeChat


More