Limit Order Book - Aggregated Market Liquidity

Limit Order Book - Aggregated Market Liquidity

The market is a complex adaptive system in which a multitude of agents interact with the purpose of maximizing their different strategies. The sum of the actions of individuals does not always correspond to the general behavior of the system. This self-organization behavior has always attracted the interest of many theoretical investigations: stochastic processes and random variables.[1]

Order book depth
Order book: bids (green) vs asks (red)

Liquidity

Liquidity is an indicator that measures the ease and speed with which an asset can be bought or sold at stable prices.[1]

In other words, liquidity refers to the market's ability to absorb large volumes of transactions without significantly affecting the price of the asset in question.[1]

  • A liquid market is characterized by the presence of a large number of buyers and sellers willing to participate actively in the market, which facilitates the execution of transactions efficiently and with minimal impact on prices.[1]
  • A market with low liquidity is characterized by a lack of participants and can make it difficult to carry out transactions, as well as increase their cost.[1]

How is Liquidity Organized in Centralized Markets?

Liquidity can be observed in the order book, which shows the number of buyers and sellers available to carry out transactions at each price level at a given moment.[1]

Both buyers who wish to acquire an asset at a price equal to or lower than the current market value, and sellers who wish to sell an asset at a price greater than or equal to the market price, can place limit orders in the order book. These orders represent a passive intention to buy or sell and remain registered in the order book until they are executed or canceled.[1]

Main Characteristics of Liquidity

This change in price is known as impact or crossing and will become a key concept in the chapters we will develop next. Liquidity is not really an indicator of the market but one of its fundamental data. Although there is no precise definition of liquidity, a market is considered liquid when it has three main characteristics:[1]

  • Depth: the order book must include a wide variety of prices, indicating the presence of multiple buy and sell orders at different price levels waiting.[1]
  • Spread: the market must have a large number of participants to ensure that the price does not vary too much when placing an order (greater liquidity implies less impact on price when orders are executed).[1]
  • Resilience: the market must respond quickly to changes in supply and demand.[1]

A practical way to visualize these principles is to understand that limit orders increase liquidity in the market and market orders reduce market liquidity.[1]

The choice between a market order or placing a limit order is largely based on the urgency of the operation and the need to complete a transaction.[1]

Liquidity and Market Making

Financial markets can only function if some participants commit to providing liquidity. In the financial markets ecosystem, liquidity providers offer to both buy and sell an asset, seeking to generate a profit from the difference between the buy and sell price (called the spread). The so-called market makers typically seek to keep their inventory neutral, meaning as close to zero as possible; they do not want to assume directional risk.[1]

![Trading Liquidity and Market Making](https://pythonparatrading.com/content/images/wordpress/2023/06/Tradinganancias by buying at a low price (at their bid price b) and selling at a high price (at their ask price a), thus obtaining the bid-ask spread:[1]

spread = ask - bid

Despite the complexity that predominates in the markets, we can separate market participants into two classes: speculators (who take liquidity) and market makers who provide liquidity.[1]

Conclusions on Liquidity

Liquidity is a multifaceted concept that refers to the ability to execute large transactions with limited impact on prices. Liquidity is commonly associated with low transaction costs and speed of execution.[1]

Aggregated Liquidity

Within the different forms of market organization, two broad groups can be distinguished: centralized markets and non-centralized markets.[1]

What is a Centralized Market

A centralized market is a system in which all transactions and operations are carried out in a physical location or through a single electronic platform. In this type of market, there is an entity or institution that acts as an intermediary and facilitates transactions between buyers and sellers.[1]

What is a Decentralized Market

In general, a decentralized market is a system in which decision-making and transactions are carried out without the intervention of a centralized authority or intermediary. Rather than relying on a central entity to coordinate and control all activities, interactions between participants take place directly and in a distributed manner.[1]

The Importance of Aggregated Liquidity

The foreign exchange market, known as FOREX, is the most fragmented and decentralized of all markets. A large number of individuals and entities participate in it, such as ECNs, central banks, investment banks, and other financial institutions. This market is fundamental for globalization and the world economy, since all participants contribute to the liquidity of the product.[1]

To better understand all these concepts, let us turn to some examples.[1]

Imagine three independent currency exchange houses, where the customers who come to exchange currencies are selected at random and the amounts they exchange also vary. At the end of the day, the balances of the three exchange houses will be completely different from one another.[1]

When we want to exchange currencies and seek to obtain the best return, we check the exchange rates at different exchange houses and choose the one that offers us the best deal. This is a simplification of how decentralized markets work. Currency exchange markets have millions of participants.[1]

When you make a purchase in dollars with your card in euros, you are allowing your bank to perform a currency exchange to pay the seller. This market is fully integrated into the economy, where non-specialized individuals delegate to third parties, such as your bank, PayPal, Binance, or other entities dedicated to exchange. All these people accept the established prices, which means that their short-term goal is not to obtain favorable exchange rates but rather to complete the transaction quickly and efficiently.[1]

For the short, medium, and long term to obtain a positive expected value, it can be seen that using these exchange houses is not the most favorable option. Each of these exchange houses can range from the Federal Reserve to an individual performing currency exchanges in an alley in Buenos Aires. Each of them has their own currency reserves and sets their own prices.[1]

For example, the price of an S&P 500 futures contract is determined in real time based on its expiration date. Buying that product at a higher price would imply voluntarily paying a premium, since there is sufficient liquidity available at a lower price, and you would be executing the transaction at a higher price. Similarly, if someone sold you futures below their value, they would be assuming voluntary losses, since by selling at the market price they could obtain more favorable prices from the order book.[1]

In the world of currency exchange markets, there is no centralized reference price. Each price is determined by the internal order book of each broker. This means that there are teams that obtain significant profits through arbitrage strategies in currency markets. These strategies tend to be very profitable, except for unforeseen or unexpected events, known as black swans. Without adequate protection against such events, these strategies can be harmed.[1]

Consequently, when your broker offers you a price for a Forex, CFD, or cryptocurrency product, they are providing you with the price based on their own internal order book. This price can vary from one broker to another due to the diversity of participants and strategies in the market. It is important to keep in mind that the collateral percentage required to maintain positions is a separate matter and can be complex to address in detail.[1]

While it is true that large banks and organizations with ample currency reserves, as well as ECNs, constantly offer liquidity and compete with each other to attract the greatest possible traffic, centralization is not necessarily the only logical option.[1]

In summary, when accepting any price in the market and when investing in a Darwin created by someone else, it is important to remember that the creator has their own interests and will seek to execute transactions in a way that is convenient and profitable for them. They are not in the market to lose money, and they must earn a profit somehow, which may come at the expense of investors.[1]

It is important to keep in mind that in currency exchange markets, there are different prices and latencies. This also applies to Darwinex, which uses this data to calculate the real price and margins, and thus offer you the product. Prices and latencies can vary between different liquidity sources and platforms, which can affect the execution of transactions and the margins applied.[1]

Liquidity Aggregators

A liquidity aggregator is a tool that centralizes the available options for currency exchange. One of the most important technological challenges it must overcome is the diversity of protocols used by ECNs, banks, etc. These protocols include different versions of FIX, where older versions are not compatible with newer ones, as well as ITCH/OUTCH, FAST, among others.[1]

In a trading platform, there are not only different execution protocols but also different data providers or data-feeds. This means that the information received can vary depending on the provider and the platform used. It is important to keep this diversity in mind when analyzing and making decisions in currency exchange markets.[1]

Professional liquidity aggregators use algorithmic execution to fragment an order across different venues and achieve complete execution. However, their main objective is to centralize the different order books into a single, broad global order book. This allows them to offer traders access to greater liquidity and trading opportunities across various markets and providers. By consolidating order books, liquidity aggregators seek to improve the efficiency and quality of transaction execution in the markets.[1]

Regarding liquidity in cryptocurrencies, many aggregators are incorporating cryptocurrency data and guaranteed liquidity pools. The challenge of cryptoasset markets lies in their decentralized nature, which also applies to their derivatives. One of the advantages of using regulated derivatives is that there is solid and stable regulation that allows resolving execution problems and errors through arbitrage, in addition to guaranteeing the compensation and settlement of differences. In the world of cryptocurrencies, all these responsibilities fell on people like Bankman, and as you probably know, it did not end well.[1]

Advantages of Using a Liquidity Aggregator

To eliminate slippage, it is possible to estimate the impact of an order on the order book by knowing the required price level precisely. This helps minimize the probability of slippage.[1]

Price Discovery: By maintaining constant contact with different data sources, it is possible to evaluate arbitrage opportunities should they exist, or to have an average valuation of the five venues with the highest volume, to consider it as the "reference price".[1]

Feed for algorithms: This allows you to keep your risk management models updated with a more realistic market estimate, considering the real volatility of the markets with the highest volume.[1]

Efficient execution: A liquidity aggregator gives you access to evaluate which is the best price to carry out a transaction, eliminating the dilemma of the transaction itself.[1]

Examples of Liquidity Aggregators

In general, liquidity aggregators come in the form of professional solutions and are typically aimed at specialized users. However, there are many interesting projects that can be suitable for volumes under 1 million dollars. These solutions can be more than sufficient to meet the needs of less specialized users.[1]

Some of the liquidity aggregators are:

LSEG FX Aggregator: https://www.lseg.com/en/fx/workflows/fx-aggregator[1]

But the most widely used in my experience is Eikon:

Refinitiv: https://www.refinitiv.com/es/blog/future-of-investing-trading/adicion-de-liquidez-a-un-mercado-de-divisas-fragmentado[1]

In recent decades, currency markets and interbank markets have experienced exponential growth. The number of dealers has also increased. All this has generated opportunities for operators to execute transactions at correct prices, minimizing methodological deviations. These opportunities, previously reserved exclusively for large banks and investment funds, are now within everyone's reach. The speed of data has reached extraordinary levels, allowing current prices to be determined in fractions of a second. This has enabled anyone to program models and evaluate what prices are available in the market.[1]

Order and Product Types

In the market, various participants have the ability to display limit buy or sell orders at different price levels, even without the real intention of executing them. It is important to note that these limit orders are placed in a queue organized by price and time of arrival. When a sufficiently large market order is executed, it can alter the best available bid, which in turn can modify the market price and generate changes in expected liquidity. Additionally, there are other types of orders that are important to know.[1]

General Order Types

Specifically, there are two types of orders in the market (generalizing); the rest are combinations of these.[1]

  • Limit orders (LMT): These orders require the price to be higher than the best bid for sell orders, or lower than the best ask for buy orders. A specific price is set for the transaction, but execution is not guaranteed. Limit orders are registered in the order book and sorted by price and time of arrival.[1]
  • Market orders (MKT): Market orders are executed at the current market price. For sell orders, the price must be equal to or lower than the best bid, and for buy orders, equal to or higher than the best ask. It is not possible to choose the price; we take liquidity.[1]

Specific Orders

Specific orders, derived from general orders (LMT, MKT), require a series of additional conditions to be met for their execution.[1]

A stop order is a buy (or sell) market order that is sent as soon as the price of an asset reaches a specified level above (or below) the current price. This type of order is used by operators who wish to avoid large losses or protect profits without having to monitor the performance of the stock. Stop orders can also be limit orders.[1]

  • Iceberg orders: Investors who wish to place a large limit order without being detected can place an iceberg order. For this type of order, only a fraction of the order size is publicly disclosed. The remaining portion is not visible to other traders, but generally has lower time priority, meaning regular limit orders at the same price that are placed later will execute first. When the publicly disclosed volume is filled and there is still hidden volume available, a new volume enters the book. On exchanges where iceberg orders are allowed, their use can be quite frequent. For example, according to studies of iceberg orders on Euronext, 30% of the book volume is hidden.[1]
  • Immediate or cancel orders: If a market participant wishes to profit from a trading opportunity that they expect to last only a short period of time, they can send an "immediate or cancel" (IOC) order. Any volume that is not matched will be canceled.[1]

Products

Financial markets are characterized by a wide variety of instruments with different characteristics. While equities have a relatively standardized nature and their trading is facilitated by stock exchanges, other instruments such as fixed income and derivatives are more complex and their supply and demand are more difficult to assess.[1]

Given the lack of a continuous two-sided market for buyers and sellers in these markets, market makers play a fundamental role. Banks and brokers facilitate transactions by intervening as counterparty in transactions, buying or selling financial instruments without an immediate matching transaction.[1]

These are traded in the over-the-counter (OTC) market rather than on exchanges.[1]

Derivatives markets have also been largely traded OTC, as end users have historically traded bespoke products specific to their requirements or particular needs.[1]

Market makers are able to provide liquidity in these markets because they buy and hold inventories of the different financial instruments; it is a risk on their balance sheets that allows investors to exit or enter positions quickly. In this way, market makers absorb temporary imbalances between supply and demand, which helps cushion the impact on market volatility and improves the price discovery mechanism.[1]

In summary, market makers are essential for the functioning of financial markets, especially in those instruments that are more complex and less standardized.[1]

$$s = \frac{1}{2}(\text{ask} - \text{bid})$$

$$\Delta P = \kappa \times \sqrt{V}$$

Resources

Jesús Cuesta

Odesa (Ucrania)
Inversor desde 2014. Research desde 2017. He trabajado en diferentes gestoras de capital y Hedgefunds Crypto. Apasionado del codigo, los datos y las finanzas. Actualmente localizado en Ucrania.