Market Making under a Weakly Consistent Limit Order Book Model
Baron Law, Frederi Viens

TL;DR
This paper introduces a novel market-making model tailored for high-frequency trading that respects the microstructure of limit order books, allowing for flexible order dynamics and ensuring price consistency.
Contribution
It develops a flexible, microstructure-consistent market-making framework using impulse control techniques, extending classical models with more realistic order book features.
Findings
Optimal trading strategies are numerically computed.
Price inconsistencies can significantly overstate profits.
Model calibration to ETF data demonstrates practical applicability.
Abstract
We develop a new market-making model, from the ground up, which is tailored towards high-frequency trading under a limit order book (LOB), based on the well-known classification of order types in market microstructure. Our flexible framework allows arbitrary order volume, price jump, and bid-ask spread distributions as well as the use of market orders. It also honors the consistency of price movements upon arrivals of different order types. For example, it is apparent that prices should never go down on buy market orders. In addition, it respects the price-time priority of LOB. In contrast to the approach of regular control on diffusion as in the classical Avellaneda and Stoikov [1] market-making framework, we exploit the techniques of optimal switching and impulse control on marked point processes, which have proven to be very effective in modeling the order-book features. The…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10| Year | Authors | Contribution |
|---|---|---|
| 2012 | Fodra and Labadie | solve the subsolution of the HJB PDE under a more general setting |
| 2013 | Guéant et al. | efficient algorithm to solve the HJB PDE |
| 2013 | Guilbaud and Pham | allow market orders and arbitrary limit order volume, restrict bid/ask prices to best quotes or 1 tick better, mid price as jump diffusion |
| 2013 | Fodra and Labadie | extend to multiple assets |
| 2014 | Cartea et al. | introduce dependence of price with order arrivals via the drift term |
| 2014 | Nyström et al. | introduce model uncertainty |
| 2015 | Cartea and Jaimungal | compare different penalty functions in the optimization objective |
| 2015 | Fodra and Pham | mid-price as Markov renewal process correlated with order arrivals |
| 2017 | Cartea et al. | introduce model uncertainty |
| 2017 | Guéant | solve the HJB PDE under a more general setting with multiple assets |
| 2018 | Cartea et al. | model the conditional intensity of order arrivals based on volume imbalance |
| 2018 | Evangelista and Vieira | closed-form approximate solution of the HJB PDE under multi-asset environment |
| Type | Order Arrival Event | Bid Price | Ask Price |
|---|---|---|---|
| 1 | aggressive market buy | 0 | + |
| 2 | aggressive market sell | - | 0 |
| 3 | aggressive limit buy | + | 0 |
| 4 | aggressive limit sell | 0 | - |
| 5 | aggressive limit buy cancellation | - | 0 |
| 6 | aggressive limit sell cancellation | 0 | + |
| 7 | non-aggressive market buy | 0 | 0 |
| 8 | non-aggressive market sell | 0 | 0 |
| 9 | non-aggressive limit buy | 0 | 0 |
| 10 | non-aggressive limit sell | 0 | 0 |
| 11 | non-aggressive limit buy cancellation | 0 | 0 |
| 12 | non-aggressive limit sell cancellation | 0 | 0 |
| Feature | Value |
|---|---|
| Average Mid Price ($) | 87.0040 |
| Average Bid-Ask Spread (tick) | 1.0775 |
| Average Best Bid Depth (shares) | 18,650 |
| Average Best Ask Depth (shares) | 19,796 |
| Type | Description | Count | % Count | (/s) | ||
|---|---|---|---|---|---|---|
| 1 | aggressive market buy | 730 | 0.10% | 0.0676 | 766 | 1.0000 |
| 2 | aggressive market sell | 669 | 0.09% | 0.0619 | 1,174 | 1.0000 |
| 3 | aggressive limit buy | 1,499 | 0.20% | 0.2140 | 1,134 | 1.0000 |
| 4 | aggressive limit sell | 1,625 | 0.22% | 0.2320 | 1,056 | 1.0000 |
| 5 | aggressive limit buy cancellation | 937 | 0.13% | 0.0868 | 706 | 1.0000 |
| 6 | aggressive limit sell cancellation | 789 | 0.11% | 0.0731 | 637 | 1.0000 |
| 7 | non-aggressive market buy | 1,118 | 0.15% | 0.1035 | 814 | NA |
| 8 | non-aggressive market sell | 1,124 | 0.15% | 0.1041 | 724 | NA |
| 9 | non-aggressive limit buy | 176,421 | 23.89% | 16.3353 | 1,052 | NA |
| 10 | non-aggressive limit sell | 184,271 | 24.95% | 17.0621 | 1,061 | NA |
| 11 | non-aggressive limit buy cancellation | 182,498 | 24.71% | 16.8980 | 959 | NA |
| 12 | non-aggressive limit sell cancellation | 186,943 | 25.31% | 17.3095 | 946 | NA |
| Market Parameter | Value | Exchange Parameter | Value | Model Parameter | Value | Discretization Parameter | Value |
|---|---|---|---|---|---|---|---|
| 0.05 | 0.01 | 1e-7 | T | 300s | |||
| 0.25 | 0.002 | 0.1 | 0.1s | ||||
| 0.075 | 0.003 | 3750 | 10 shares | ||||
| 0.1 | 3750 | 2001 | |||||
| 0.3 | 8 | ||||||
| 0.1 | 100 shares | ||||||
| 10 shares | |||||||
| 0.1 |
| Unconstrained Trading | Optimal Control | |
|---|---|---|
| Mean | 8,224 | 6,471 |
| Std Deviation | 10,258 | 516 |
| Skewness | -0.44 | 0.10 |
| Kurtosis | 7.81 | 3.19 |
| IR = Mean/SD | 0.80 | 12.55 |
| Value | LOB 1 | LOB 2 | LOB 3 |
|---|---|---|---|
| -1 | 0.50 | 0.33 | 0.20 |
| 0 | 0.00 | 0.33 | 0.00 |
| 1 | 0.50 | 0.33 | 0.80 |
| Weakly Consistent LOB | Inconsistent LOB 1 | Inconsistent LOB 2 | Inconsistent LOB 3 | |||||
| Unconstrained | Optimal | Unconstrained | Optimal | Unconstrained | Optimal | Unconstrained | Optimal | |
| Trading | Control | Trading | Control | Trading | Control | Trading | Control | |
| Mean | 8,224 | 6,471 | 12,286 | 10,533 | 12,304 | 10,534 | 9,853 | 8,095 |
| SD | 10,258 | 516 | 22,830 | 941 | 19,515 | 833 | 16,488 | 716 |
| Skewness | -0.44 | 0.10 | 0.16 | 0.11 | 0.20 | 0.12 | -0.08 | 0.09 |
| Kurtosis | 7.81 | 3.18 | 7.61 | 3.19 | 7.70 | 3.19 | 7.63 | 3.31 |
| IR | 0.80 | 12.55 | 0.54 | 11.19 | 0.63 | 12.65 | 0.6 | 11.30 |
| Overstatement | NA | NA | 49% | 63% | 50% | 63% | 20% | 25% |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsStochastic processes and financial applications · Complex Systems and Time Series Analysis · Economic theories and models
Market Making under a Weakly Consistent
Limit Order Book Model
Baron Law
Agam Capital
Frederi Viens
Michigan State University
(28 Jan, 2020)
Abstract
We develop a new market-making model, from the ground up, which is tailored towards high-frequency trading under a limit order book (LOB), based on the well-known classification of order types in market microstructure. Our flexible framework allows arbitrary order volume, price jump, and bid-ask spread distributions as well as the use of market orders. It also honors the consistency of price movements upon arrivals of different order types. For example, it is apparent that prices should never go down on buy market orders. In addition, it respects the price-time priority of LOB. In contrast to the approach of regular control on diffusion as in the classical Avellaneda and Stoikov [1] market-making framework, we exploit the techniques of optimal switching and impulse control on marked point processes, which have proven to be very effective in modeling the order-book features. The Hamilton-Jacobi-Bellman quasi-variational inequality (HJBQVI) associated with the control problem can be solved numerically via finite-difference method. We illustrate our optimal trading strategy with a full numerical analysis, calibrated to the order-book statistics of a popular Exchanged-Traded Fund (ETF). Our simulation shows that the profit of market-making can be severely overstated under LOBs with inconsistent price movements.
Keywords: market making; high-frequency trading; stochastic optimal control; optimal switching; impulse control; point processes; viscosity solution
Published in High Frequency
1 Introduction
Market makers in modern electronic order-driven exchanges provide liquidity to the market by posting limit buy and sell orders simultaneously on both sides of the limit order book (LOB). They earn the bid-ask spread in each round-trip buy-and-sell transaction in return for bearing the risks of adverse price movements, uncertain executions, and adverse selections [2, 3].
In the now classical setting of Avellaneda and Stoikov [1], which we will call AS framework or AS model thereafter, the authors assume that the mid price follows Brownian motion and the arrival of buy or sell market order, hitting a limit order at a distance of from the mid price, is an independent Poisson process with intensity where are constants. A small market maker strives to maximize her risk-adjusted wealth at the end of a trading period by controlling her bid price and ask price at different times, subject to the dynamics of the mid price , her cash holdings , her inventory , and market order arrivals on the bid and ask sides . The market-making problem can thus be cast as a stochastic optimal control as follows:
[TABLE]
where represents Brownian motion and denotes Possion processes independent from with intensity respectively. The quantity represents instantaneous volatility and is a concave utility function.
The AS framework is adapted from Ho and Stoll [4], which is originally designed for dealers to trade in a quote-driven market (e.g. bonds, OTC derivatives), where they give bid and ask quotes111Here the quote means a price quotation to clients, but later we will use quote loosely to mean bid or ask price. to potential clients via phone calls or nowadays Bloomberg terminals. Avellaneda and Stoikov replace the assumption of a monopolistic market maker with an infinitesimally small one, so that the reference (mid) price is exogenous. In addition, they also substitute optimal limit orders for optimal price quotes in order to trade in a LOB. This turns a game-theoretic model into a pure stochastic one, with which researchers in mathematical finance is much more comfortable, and thus their framework has became the foundation of many recent research papers in stochastic market-making models (see Table 1)222Interested readers can also refer to Appendix A for a short history of market-making models..
However, simply exchanging price quote for limit orders does not turn a quote-driven market-making model into a good order-driven one, as the AS framework does not address many important LOB features, which we are going to highlight in the following sections333See also [14]..
1.1 Price Consistency
In the AS framework, price and order arrivals are assumed to be independent, so price can rise on a large sell market order, which is clearly impossible in real world LOB trading. Because market makers are often on the wrong side of the trade, due to the presence of informed traders (adverse selection), the absence of this crucial dependency structure often generates large phantom gain scenarios, leading to exaggeration of the average profit of market-making strategies. In our simulated backtest in Section 6.2, this price inconsistency may overstate the market-making profit by more than 50%.
1.2 Price-Time Priority
Since nearly all LOBs now use the price-time444Highest execution priority goes to limit orders having better price, and then to those with earlier time-stamps. priority, changing the price or quantity of a limit order means loss of execution priority; however, the AS framework assumes there is no cost in changing the bid and ask prices555Section 2.4 in [1]: These limit orders and can be continuously updated at no cost., as the model is originally designed for quote-driven market, which obviously incurs no cost in altering quotes to clients.
The optimal bid and ask prices at time in the AS model is expressed as a distance from the mid price at current time , not the mid price at the time one posts the limit order, thus following the optimal bid and ask prices means continuously changing your limit orders. For example, according to the model, the current optimal bid and ask should be 3 ticks from the mid price and you place the limit orders as prescribed. When the mid price moves up 1 tick, your limit buy and sell orders are now at a position of 4 and 2 ticks from the mid price. According to the model, you should immediately cancel them and post new orders that is 3 ticks from the current mid price. If you follow the model, your orders will hardly get executed in a LOB as your orders are always at the bottom of the bid and ask queues due to your continuous update666In the backtest section of [6], the authors need to tweak the market environment and trading strategy in order for the model to make sense under a LOB..
The AS model makes perfect sense when it is used under a quote-driven market as per originally designed in Ho and Stoll [4]. For example, when a client first calls, you give her a quote of say 9.98/10.04 as your reference price has moved up $0.01. Changing quotes in a quote-driven market in this example does not cost anything but it is not the case under a LOB because of the rule of price-time priority.
1.3 Price Ticks
In a LOB, prices are only allowed on a fixed price grid777For stocks with price ¿ 0.01.. As a result, a price is indeed a pure-jump process and it has two dimensions: namely jump times and jump magnitudes. A diffusion model can only approximate the magnitudes of the jumps but cannot describe the properties related to timing of the jumps such as jump clustering in high-frequency trading.
In addition, the optimization may not be useful in some models under the constraint of price tick. For example, after spending numerous hours crunching the PDE in high precision, the optimal bid price from the model is 10.01 or $10.02. In Section 1.4, one may even find that in many cases you do not need to waste time solving the PDE as the only viable option is the best bid or best ask.
1.4 Execution Probability
A crucial component of the AS model is the rate function , which directly affects the execution probability of limit orders in a given interval. In their model, price is continuous, so is a continuous variable. However, because of the discrete nature of the price grid in LOB, the rate function can only be a step function rather than a smooth curve.
Moreover, when the limit order is more than one tick from the best quote in some liquid stocks, the execution probability is extremely small (e.g. less than 3% for E-mini S&P future [17]888This execution probability is not the probability of a limit order posted to the second-best eventually gets executed after series of price movements. Rather, it is the probability that a limit order in the current second-best queue gets executed by a very large market order that walks up the book.). As a result, the optimization problem becomes unnecessary, as in this case, the only reasonable action is to peg the limit orders to the best quotes.
1.5 Order Size
For the sake of simplicity, the AS model assumes that all market and limit orders are of the same size. Such an assumption may mask the risk of overtrading by the market maker.
In practice, market maker will not put all limit orders at one single pair of optimal bid and ask prices as suggested by the AS framework; instead they will place a plethora of limit orders at many price levels in order to continuously maintain her priority in the LOB, while orders are executed.
Nonetheless, the arrival of one large market order may raise her inventory to an unacceptable level, and this kind of overtrading risk cannot be revealed when all orders have the same size.
1.6 Paper Layout
This paper is organized as follows: in Section 2, we define the notion of order-book consistency and then in Section 3, we fully describe our implementation of a weakly consistent LOB. Our novel market-making model is fully depicted in Section 4, and Section 5 illustrates some properties of our model with the numerical solution. Section 6 provides the result of a simulated backtest and Section 7 concludes.
2 Consistency of Limit Order Book Model
In a full LOB model, the only ingredients are limit and market orders. All the other quantities, namely bid price, ask price, bid-ask spread, and depth of limit order queues can be derived from the occurrences of limit and market orders. In a reduced form level-one LOB, however, one only observes the events which happen on the best bid and best ask; thus, such a model does not contain all the information required to derive the price dynamics. As a result, the prices in many market-making models are exogenous, and such prices are often inconsistent with the order-book transactions.
Before we discuss specific examples, we first define what we mean by a consistent LOB model. In the following sections, we will use to denote the bid price, ask price, mid price and bid-ask spread respectively, and the corresponding small letters will be used to express their current “states” values, at a given point in time.
Definition 1** (Consistent Limit Order Book Model).**
Let denote the arrival times of any market sell, market buy, limit buy, limit sell, limit buy cancellation, and limit sell cancellation orders, and the corresponding volume and price (limit order only) be represented by and .
A limit order book model is called consistent if it satisfies all of the followings.
Direction Consistency
- •
On the arrival of marketable999Marketable buy/sell order is either a market buy/sell order or a limit buy/sell order with limit price greater/lower than or equal to the ask/bid price. sell/buy order, the bid/ask price cannot move up/down while the ask/bid price can only stay unchanged:
[TABLE]
- •
On the arrival of limit sell/buy order with price falling inside the bid-ask spread, the ask/bid price can only move down/up while the bid/ask price can only stay unchanged. If the limit order is outside the bid-ask spread, both ask and bid prices remain unchanged:
[TABLE]
- •
On the arrival of limit sell/buy order cancellation at the best ask/bid, the ask/bid can only move up/down while the bid/ask can only stay unchanged. If the cancellation is outside of best quotes, both bid and ask prices remain unchanged:
[TABLE] 2. 2.
Timing Consistency - The bid/ask price moves only at the instants of orders arrivals/cancellations:
[TABLE]
where is the set of all stopping times of market and limit orders. 3. 3.
Volume Consistency
- •
If the volume of the marketable buy/sell order is equal to or larger than the depth of the best ask/bid queue (), the ask/bid price moves up/down; otherwise it stays unchanged:
[TABLE]
- •
If the volume of the limit buy/sell cancellation is equal to the depth of the best ask/bid queue (), the ask/bid price moves up/down; otherwise it stays unchanged:
[TABLE]
When direction consistency is violated, the market makers’ profit may be significantly exaggerated. For example, when the price plunges after a sequence of sell market order, the market maker, which have a net long inventory by taking the opposite sides of the trades, will suffer a major loss. Were the price to violate the direction consistency and go up, the market maker will instead enjoy a windfall profit. More generally, since the market maker is frequently on the wrong side of the trade, that is, she buys from market sell orders and sell from market buy orders, a LOB model violating direction consistency will likely overstate the market makers’ profit (see Section 6.2 for simulation result).
We also require that price updates due to aggressive orders to be instantaneous to prevent phantom opportunities arising from stale prices, which would otherwise create a very profitable trading strategy101010It is not an arbitrage in the classical sense, since there can be a major market sell order right after such a buy.. For example, one may buy at the stale price right after a large buy market order and wait for the price to fully reflect the order book status, assuming the direction consistency will be observed eventually. The direction, together with timing consistency, ensure that the LOB model faithfully reflect the price risk only from the order book events.
Without volume consistency, the overstatement in a direction consistency violation may be exacerbated. In general, the average size of aggressive market orders111111Aggressive order is an order that moves the price. is larger than that of non-aggressive ones. Thus the loss due to adverse price movements from the aggressive market orders will be further understated when the volume distribution of aggressive orders are not modeled properly.
Nevertheless, the volume consistency is more difficult to achieve in a LOB model as we need to keep track of the order book depth. We associate a label of weakly consistent to a LOB if the model only complies with direction and timing consistency.
As mentioned, the conditions defined above for order book consistency are simply the direct consequences of normal order book operations, and thus any full LOB model, regardless of the distributional assumptions, will be fully compliant.
2.1 Examples of inconsistent models
Most of the existing market-making models do not model the full LOB: prices are often exogenous, leading to inconsistency of price movements, particularly when it is used in high-frequency trading.
For example, Avellaneda and Stoikov [1] model the mid prices as independent Brownian motions.
[TABLE]
Such a setting may not reproduce even some simple stylized facts. For instance, when a buy market order arrives, since the mid price is an independent Brownian motion, half of the time it will go down, sometimes significantly. Such unrealistic scenarios may severely overstate the profit of a market-making strategy. As the price is a diffusion, it moves continuously even without any orders.
Observing these and other issues associated with totally independent prices and order arrivals, a few authors have attempted to incorporate some dependency structure between these two processes. Cartea et al. [9] divide the buy and sell market orders into influential () and non-influential () with (,) being a multivariate Hawkes process. The mid price is a diffusion coupled with the market orders via an unobservable mean-reverting process as follows:
[TABLE]
where and are independent Brownian motions and are all strictly positive constants.
When an influential buy market order arrives, jumps up and the mid price will have a larger drift. Nonetheless, there is nothing to prevent the term from having an even larger negative change that results in an overall downward price movement. Since the mid price is continuous, it will not jump even with the arrival of influential market orders.
Another way to introduce the dependency structure is to model the mid price as pure jump process correlated with the order arrivals. Bacry and Muzy [18] assume that the mid price has the form
[TABLE]
Together with the buy and sell market order , the quadruplet forms a multivariate Hawkes process [19, 20, 21].
Although the prices and market orders are now correlated via the cross-excitation feature in the Hawkes process, there is still a non-zero probability that price goes down after a buy market order. In addition, a multivariate Hawkes process is by definition a simple point process, meaning that price jumps and market orders occur at exactly the same time with probability zero.
In Fodra and Pham [12], the mid-price is modeled as
[TABLE]
where is the tick size and is a Markov renewal process with and representing jump times and jump directions respectively. The market order is postulated as a marked point process where the mark indicates the side (buy/sell) of the market order. The stochastic intensity of depends on the elapse time since last price jump and the conditional distribution of depends on the direction of last price jump.121212One may notice that the common believe of ”order moves price” is reversed in this model and the authors acknowledge that his purpose is to reproduce the dependence between price and order rather than modeling causality.
It again has the same problem as [18] where price and market are correlated but the direction consistency can still be violated with a non-zero probability. Also, there is nothing to guarantee the price and arrival point processes to jump at the same time even though the price and order arrival processes are correlated.
In all of the above examples, either the volumes of all orders are assumed to be same, or the volume is not used directly to control the price jumps.
In the last 10 years, academic research on market making (See Table 1) has been mostly focusing on extending and fine-tuning the Avellaneda and Stoikov [1] framework, with little attention to its practicality in modern order-driven exchanges. This framework is well-suited to quote-driven markets like fixed income and OTC derivatives, but ill-suited to order-driven markets like equity and futures, owing to the presence of price-time priority. But ironically, most examples in the above quoted research are applying their results to high-frequency electronic trading platforms, which are order driven.131313Similar comment was raised by Guéant [14].
3 A Weakly Consistent Level-One Reduced-Form LOB
3.1 The Model
Following Biais et al. [22] and Large [23], all orders141414We ignore the exotic order types such as iceberg orders, retail price improvement orders, pegged orders, etc. falling on the top of the limit order book can be classified into one of the twelve types in Table 2 according to their categories (limit, market, cancellation), sides151515Sell include both long sell and short sell. (buy, sell) and aggressiveness. As in [23], aggressive orders are the ones which move the bid or ask price. To be more precise, an aggressive market order is one which completely depletes the best bid or ask queue, an aggressive limit order is one with limit price inside the bid-ask spread and an aggressive cancellation is one which cancels the last remaining order in the best bid or best ask queue.
Let be the multivariate simple161616A point process is called simple if it has at most one jump at each point of time almost surely. For simplicity, we assume no two types of orders can arrive at exactly the same time. Nonetheless, the probability that two orders arrive at the exact same instant is close to zero as the Nasdaq/CME timestamp is down to nanosecond. point process of the number of orders in each type up to and including time . denote the number of buy and sell market orders and represent the bid and ask price respectively. The tick size of the price grid is assumed to be fixed.
The following straightforward but important relations are immediately observed.
[TABLE]
Eqautions (28) and (29) are simply the definition of and . The ask price is the initial ask price plus the number of aggressive orders which move the ask price up, minus the number of aggressive orders which move it down, multiplied by the tick size . Equation (31) for the bid price follows from the same logic.
Through these remarkably simple equations (28)-(31), one can observe the dependency of price and order arrivals via the common components and . For instance, when there is an aggressive buy market order (type 1), both the buy market order point process and ask price will jump at the same time (co-jump), but they can also jump separately upon the arrivals of other order types. From these equations, one also recognizes that an ask price cannot go down with a buy market order (type 1 or 7).
However, the price jumps caused by aggressive orders can be larger than one tick and this is especially important for small tick stocks, where the limit orders are sparsely populated in the price grid. Therefore in addition to the random jump times , we add the random marks , which correspond to the jump sizes (in ticks) of the aggressive orders ( for non-aggressive orders), and , representing the volumes of the orders.
The multivariate marked point process171717See [24] for an excellent introduction to marked point process. is now denoted as and its compensator will have the form where is the intensity of the ground process and is the conditional mark (volume and jump) distribution. For ease of exposition, we will use the notation , and . The joint model of prices and market orders now becomes:
[TABLE]
The bid-ask spread in our model is given by
[TABLE]
Because of the negative term, and , one may concern that the bid-ask spread may fall below one tick . However, if we look closely at order types and (limit orders inside the spread), they can only happen when ; therefore will never shrink below .
The simplest way to enforce this constraint is to restrict the intensity of . Based on the result that when the intensity of a point process is zero at time , the probability that an event happens at time is zero [24, T12, p.31], we impose the condition181818We can also use the equivalent form , see Brémaud [24, T10, p.29] for a proof. that
[TABLE]
where and are any predictable non-negative stochastic processes.
It is easy to see that our model is direction- and timing-consistent, however since we do not keep track of the depths of best quotes, our model is not volume-consistent.
3.2 Intensity and Mark Distributions
In general, the intensities of the order arrival processes can be any predictable non-negative stochastic process. In the simplest case, they are assumed to be constant, resulting in Poisson processes for these order arrivals. However, one may argue that, for example, is simply a thinned process of the total market buy order with thinning probability where is the amount of limit sell orders resting in the best ask and is the incoming buy market order size. Therefore the intensity should be stochastic depending on the current shape of the limit order book.
However, including in the model would significantly increase the dimension of the state variables needed for modeling, as we need to keep track of the order flow at all price levels, not just the best bid/ask [25]191919For example, we need to keep track of orders falling at the second best, otherwise we would have no way to compute the queue depth of the new best quote after an aggressive market order.. Moreover, the practices of quote stuffing202020Rapid placement and cancellation of large amount of limit orders. [26] and spoofing212121Submission of limit orders to create an illusion of demand/supply imbalance. [27] render the usefulness of the full LOB questionable, especially beyond the best quotes. As a result, the benefit of a full LOB model may not justify the added nontrivial complexity and this may explain the emergence of reduced-form models, which focus only on the top of the book [28, 29].
Should the arrival intensity be assumed constant, it could be interpreted as the intensity based on the thinning probability in the equilibrium distribution of the order book. Since the market maker is supplying liquidity throughout the whole trading day, the average shape of the order book provides a reasonable approximation for our purpose.
Regarding order volume, Gopikrishnan et al. [30] observe that the sizes of market orders have power law tails (e.g. Pareto distribution) while Maslov and Mills [31] find that log-normal distribution also fits the data reasonably well. We will use a log-normal distribution in our numerical example in Section 5.2 but our framework is compatible with any distributional assumption.
Any positive discrete distribution can be used to model the magnitude of the price jump and it can be conditional on the history of arrival times and volumes. For example, a very large order will cause the price to jump multiple ticks while a series of large market orders is more likely to cause the price to jump even more as the liquidity dries up222222The speed at which the LOB reverts to its normal/equilibrium shape after a large order is called resiliency [23].. However, for the sake of simplicity, we will assume volume and jump size are independent and stationary in the solved example in Section 5.2.
3.3 Parameter Estimation
Since we assume the arrival intensities are constant, all the order types, except aggressive limit orders (type 3 and 4), follow Poisson processes. The Maximum Likelihood Estimator (MLE) of Poisson intensity is well-known to be
[TABLE]
For the aggressive limit order 3 and 4, the intensity is constrained to be zero while the bid-ask spread is one tick, so the MLE becomes
[TABLE]
For the jump and volume distributions, one can either assume a parametric distribution with parameters estimated from MLE or simply use the empirical distribution. For example, given the sequence of observed jump sizes of some order type, the empirical distribution of is simply
[TABLE]
On a sparsely populated LOB where the range of observed jump sizes is very large, one can fit a parametric distribution (e.g. Negative Binomial) to . If we assume the volume follows a lognormal distribution, that is log() N(,), the MLE of and is simply the sample mean and variance of log()’s.
For the joint density of volume and jump size for aggressive order types, we express it as and can be estimated as just described using the empirical distribution. Since is discrete, we can easily estimate the conditional volume distribution given a particular jump size , similar to the unconditional one.
4 The Market-Making Model
4.1 Trading Environment
Our market maker can choose to post limit orders at both bid and ask or withdraw from one or both sides of the market. The operating regimes on bid and ask are indicated by respectively. For instance, in the buy only (ask-off) regime (), the market maker will only post limit buy orders at the best bid.
In addition, the market maker can issue a market order (impulse) of size to adjust her inventory immediately, subject to the cost of crossing the bid-ask spread232323The size of each market order is assumed to be small enough such that it does not walk up the LOB, and both the bid and ask queues are non-empty with probability one., exchange fee , as well as a fixed overhead cost .
In this version, our market maker will not consider aggressive limit orders (limit orders inside spread) as in [7], where a limit order inside the spread could have a permanent effective fill rate higher than that resting on the previous best quotes. In our model, the effect of switching from one regime to another is to switch on/off the arrival of our market orders, which follow an prescribed point process dynamics. In our terminology, the gain, which we do not model here, is the temporary increase in participation rate due to higher order priority, rather than the arrival intensity of market orders due to our price improvement of one tick.
4.2 Modeling Assumptions
We assume that the market maker has only a small and pre-decided participation rate (e.g. say 10%) among all the transactions in the market, so that her orders have negligible influence on the order flow. There are three alternatives regarding the interpretation of this participation rate :
For each market order of size , our market maker will execute shares; this implies that the orders of the market maker are infinitesimal small and distribute evenly in the queues. 2. 2.
For each market order, there is a probability that it will hit a limit order from our market maker. This assumption is more reasonable when the average market order size is small compared with that of limit order from our market maker. 3. 3.
For each market order of size , if , where is a fixed constant, there is a probability that it will hit a limit order from our market maker. If , shares will be executed against our market maker.
For large-tick stocks242424Large-tick stock means the tick size is large relative to the price [32]., since the stock price is comparatively small and the average order size is big, option 1 is reasonable. While for small tick stocks, for exactly the opposite reason, option 2 seems more appropriate. For instance, the price of Berkshire Hathaway Inc. class A on 8 May, 2014 is $190,010 and most market orders are of size one share, so it is not reasonable to assume that the market maker execute a fraction of each market order as in option 1. Option 3 is more complicated but it can adapt to market orders of various sizes. In this article, we will use option 1 for illustration.
The market maker may achieve her target execution profile by continuously adjusting her limit orders in the LOB to be roughly the proportion of the queue length at each price level, but the detailed mechanism is outside the scope of this paper.
Since nearly all stock exchanges implement the so-called price-time priority, withdrawal from the market involves loss of priority of the current limit orders. To fully account for this, one would need to involve delay integral differential equations, which would further complicate the model. Instead, we simply penalize the switching of regime from to with cost on the bid and ask side respectively at time with spread . We suggest the following simple formula for , while acknowledging that more research is needed in this area.
[TABLE]
where is the mean volume for order of type , are parameters representing the queue length ahead of our market maker in switching-off mode, and is a constant discount factor.
Rationales for these formulas are as follows: canceling limit orders, in order to stop providing liquidity, does not cost the market maker anything, so we set . However, when the market maker want to re-providing liquidity after pulling out from the market, she cannot do so until all the orders ahead of her are executed. As we will see later in the full model, we assume for simplicity that market maker will be able to capture market orders once the regime becomes 1; thus in fact the penalization cost is the amount to subtract from the overstated profit of 252525In each round trip transaction, the market maker earns per share and we attribute half of it to each side of the transaction. due to the price-time priority, where can be or depending on the side. However, one is not guaranteed to make money just by posting limit orders. The price may move away from the initial quotes and the market maker may even suffer a loss. That is why we introduce the discount factor to take this into consideration.
In addition, when market close is near, the overstated profit decreases as there is little time left for the market-making activity to run. The average time to consume all the bona fide limit orders on the bid side ahead of the market maker is about . When the remaining time is less than that, we use the factor to prorate the switching cost. In other words, when the time is near market close, it is less costly to switch off in order to minimize the final liquidation cost.
We would like to stress that is not the average depth of the book as the market maker does not need to cancel all her orders in order to temporarily leave the market. If this were the case, there would be a long delay before she can re-provide liquidity. To leave the market briefly, she should simply keep canceling sufficient high priority orders such that the remaining ones will not be executed with a probability of, say 90%. For instance, if the 90 percentile of the sell market order size is 9000 shares, she just need to cancel about 1000 shares, given that her participation rate is 10% and her orders are distributed uniformly in the queue. After, say, a sell order of size 900 shares hits the bid, she would cancel an additional 100 shares so that her orders will never appear in the top 9000 shares. Thus in this example, . One can further fine-tune the switching cost formula but the key takeaway is that a switching penalty should be less than the full order book depth.
The penalty for impulse (market order) is the exchange fee and the cost of crossing the bid-ask spread, which is already reflected in the holding , together with an overhead cost , which we model as the unexpected slippage cost incurred when the price moves away before the market maker can send out the market order.
[TABLE]
We assume there is a chance that the price moves away 1 tick as the market maker delays the submission of the market order for various reasons. The average size of her market order is about where the maximum of average volume of type 1,2,7,8.262626Using the actual impulse size in (45) may seems to be better aligned with our rationale, but the impulse cost needs to be bounded away from 0, so that continuously sending out infinitesimally small impulses will never be optimal. Alternatively, the impulse cost could be regarded as a parameter to control the delay of impulses. We emphasize that the trade-off between switching and impulse is quite sensitive to (see Section 5.2.1) and a thorough consideration is required to make the final result useful.
One limitation of our model is that the average execution price under aggressive market order cannot be computed faithfully as we only know the price at the best bid/ask. As an approximation, we will assume the average execution price is simply the best bid/ask, even though aggressive market orders, by definition, can walk up the LOB. As we will see in Table 4 in Section 5.1 on our order book example, aggressive market orders are rare [17]. In addition, our approximation errs on the conservative side as it always understates the market maker’s profit.
4.3 Market Making Optimal Control Problem
The evolution of the market maker’s cash holding and inventory depends on the regime . For instance, when the market maker does not post any limit order , the change in will be zero. When , for each buy market order, her inventory will be decrease by where is the volume of the market order. The cash received will be the effective share quantity multiplied by ask price , plus the rebate 272727We do not include transaction tax, clearing fee, broker commission, etc. in this model but they can be incorporated very easily.. The logic on the bid size is similar.
This setting, by which the market maker’s limit orders are assumed to be distributed uniformly in the queue, affords a major simplification as we do not need to deal with a full-blown order-book model and keep track of the priorities of the market maker’s orders in the queues. Within any given regime, the quantity of orders execution by our market maker is determined by the participation rate , and the decision variables are only when to switch (limit order) regimes, when to place impulses (market orders), and how many shares to trade for the impulse282828The direction of impulse order is trivial as the market maker should always act to reduce the magnitude of the inventory due to the associated penalty..
Consequently, the control , which lies in some admissible set , is a sequence of ordered quadruples , where is the stopping time of the switching and/or impulse. are the new regimes on the bid and ask queues respectively and is the signed impulse strength (number of shares to buy (positive) or sell (negative)) in a compact set .292929The set of impulse strength may depend on the current inventory level and other state variables such that, after the impulse, the inventory is still within the domain. However, we will not highlight the dependence in the symbol for clarity. are all measurable with respect to . If , it indicates no change of regime. If , it means there is only switching but no market order. When and , the market maker switches regime and issues market order at the same time. Since our switching and impulse costs do not depend on the regime, the order of switching and impulse does not matter.
The market-making optimal control problem is to maximize value function of expected total wealth (cash + inventory) at the end of the period , minus the total cost on inventory penalty () with risk aversion , switching () and impulse (), by choosing an optimal control , subject to the dynamics of bid and ask prices , order arrivals , cash and inventory .
When a limit order from the market maker is executed, she will receive a per-share rebate . Whereas a per-share exchange fee 303030We assume the fee structure is not inverted [33]., in addition to the unfavorable price due to crossing of the spread, will be imposed when the market maker remove excess inventory with market order.
We now state the mathematical formulation of our market-making problem.
Definition 2** (Market-Making Optimal Control Problem).**
[TABLE]
where
[TABLE]
4.4 Solving the Optimal Control Problem
Tang and Yong [34] show that the value function of a combined optimal switch and impulse control313131The combined switching and impulse in Tang and Yong’s paper is slightly different from ours as the switching and impulse cannot happen at the time in their setting. of a diffusion process is the unique viscosity of a system of variational inequalities. On the other hand, Biswas et al. [35] prove that the value function of a optimal switching of a Levy process is the uniqueness viscosity solution of a system of nonlocal variational inequalities.
By combining the arguments in [35, 34], we conjecture that the value function is the unique viscosity solution323232As discussed in [36], the value function may not be differentiable with respect to time due to the pure jump nature of the state dynamics, so a classical solution may not exist for the control problem. of the following Hamilton-Jacobi-Bellman quasi-variational inequality (HJBQVI), which is now an integral differential equation333333Please be aware that is the positive/negative part of while are defined in equations (62).. A rigorous proof of this result deserves a full paper of its own and we will leave it to interested researchers in stochastic control and viscosity solution. In this paper, we are satisfied with finding a numerical procedure which can provide us useful insights to tackle the market-making problem.
[TABLE]
where
[TABLE]
[TABLE]
[TABLE]
where are the joint probability density functions of the volume and jump distribution of aggressive market orders, are the probability mass functions of the jump distribution of aggressive limit orders and cancellations and are the density of the volume distribution of non-aggressive market orders. We assume . is the infinitesimal generator of the state processes. is the so-called the intervention operator, which maximizes the value function by switching regimes and/or issuing impulses, which ever action results in the highest value.
The expression for the infinitesimal generator (61) looks daunting; however, in each part of the expression, it simply records the transaction changes on the arrival of different order types, no complicated mathematically theories are involved. For instance, when a type 1 (aggressive market buy) order arrives, the inventory of the market maker will be reduced by and the cash collected is . Moreover, since it is an aggressive order, the ask price will jump by . The integral computes the average change over different volumes and jump sizes and finally, the result is multiplied by to scale the effect by the arrival intensity.
4.5 Ansatz
Using the standard ansatz in the AS framework, we reduce the dimension of our state variables by two. In particular, the optimal control depends only on the bid-ask spread rather than the bid and ask prices and the cash level becomes irrelevant to the control problem.
Introducing new state variables for for the spread and mid price, and using the -based ansatz
[TABLE]
one can see that, after some simple but tedious algebra, satisfies the following HJBQVI.
[TABLE]
where
[TABLE]
[TABLE]
[TABLE]
and the optimal control is given by
[TABLE]
where we recognize the regime-switching and impulse stopping times as the times where the portion of the value function ansatz, which depends on the regime variables, is indifferent to the intervention operator, while the choice of regimes and size of impulses maximizes the said at the time of action, subject to new inventory, fee and cost structure.
4.6 Action Thresholds
In a typical scenario, a market maker will start the day with no inventory and provide liquidity on both side of the LOB. If her inventory exceed a certain threshold, she may either cancel limit orders on one side or send a market order to reduce the inventory. We define (bid-off) to be the threshold over which it is optimal to stop providing liquidity on the bid and (bid-impulse) to be the one over which to send market order. The minimum of bid-off and bid-impulse is denoted as (bid-action). The threshold under which the market maker should resume trading on the bid side is denoted as (bid-on). The quantities on the ask sides are defined similarly.
Definition 3** (Action Thresholds).**
[TABLE]
If , it is optimal to use market order to eliminate excess inventory to avoid the risk of adverse price movement due to uncertain execution. On the other hand, if , it is beneficial to wait for the offsetting order, rather than paying the bid-ask spread and exchange fee.
We will illustrate the relationship of these thresholds with other model parameters in Section 5.2.
4.7 Numerical Scheme
We present here a numerical method using finite difference similar to the so-called penalty scheme[37, 38]. The HJBQVI (66) can be approximated by the following representation when the parameter is sufficiently small.343434It can be verified easily that for any , iff and ..
[TABLE]
Replace the -derivative by backward difference, we have a discretized version
[TABLE]
Rearranging the equation, we arrive at our explicit numerical scheme.
[TABLE]
, where , will be computed on a finite grid of time and space (spread, inventory, bid and ask). The step size for the backward difference is whereas the inventory is divided into intervals of size , and is computed up to maximum value of for the spread state variable. The integrals inside the operator can be evaluated numerically using any quadrature technique (e.g. trapezoidal rule) with step size . For values of between grid points in the numerical integration, one can assign a value using the method of nearest-neighbor interpolation. The maximum in the operator can be found by exhaustive search on a compact subset with grid size .
After solving for on the grid, the optimal control can be obtained naturally from
[TABLE]
5 Numerical Illustration
5.1 An Order Book Example
A summary of the order book statistics of QQQ (PowerShares QQQ ETF) on May 8, 2014 12pm - 3pm353535It is well-known that market has different behavior during the opening and closing period [22], so we only use the data between 12-3pm. is shown in Table 3. However, we would like to stress that the numbers are based on the order flow in the Nasdaq LOB only. Since Nasdaq executed only 20.8% (by shares)363636https://www.nasdaqtrader.com/trader.aspx?ID=marketsharedaily of QQQ on May 2014 among all US stock exchanges, the number of aggressive orders is likely to be overestimated373737NYSE TAQ contains consolidated trades and quotes from all US exchanges, but the timestamps of the trades and quotes are not synchronized [39] and subjected to significant delay [40].. The figures here are meant for illustration only.
QQQ is actively traded in Nasdaq; its bid-ask spread is one tick most of time and the depths of the best quotes are reasonably healthy.
The type level statistics are presented in Table 4. Because of the rapid placements and cancellations of limit orders, potentially including e.g. quote stuffing [26] or spoofing [27], 98.83% of the order flow belongs to types 8 thru 12. Fortunately, thanks to our assumption of uniform distribution of market maker’s limit orders, these types do not factor into our market-making model. This is one of the reasons why we do not intend to pursue a full order-book model since the dominating activities of limit-order placements and cancellations will only increase the complexity without adding any value to explain the decision process of a bona-fide market maker [41].
The relatively large aggressive limit order arrival rates , together with the almost sure jump size of one tick, contribute to the tight spread of the QQQ LOB. The sum of intensities for all market order types is 0.3371. This means that there is a trade executed on the Nasdaq LOB around every 3 seconds on average. The average sizes for aggressive and non-aggressive market buy orders are about the same but the average size of aggressive market sell orders is 60% larger than that of non-aggressive ones. It is expected that one needs large volumes to move prices, but in the current trading environment, nearly all institutional investors use algorithmic trading to trade large blocks, and the algorithmic engine will typically divide the blocks into small pieces to hide its intention.
5.2 A Solved Example
We solve the HJBQVI (66) numerically for a 5-minute trading session () using finite difference as describe in Section 4.7 with the parameters depicted in Table 5, which are realistic since they resemble those we just discussed for QQQ. However, we make the parameters on the buy and sell sides symmetric so as not to embed any alpha view in the model (see Section 5.2.5). In addition, we ensure are sufficiently large so that the spread will not diverge under the long simulation horizon in Section 6.1.
For the mark distribution, we simply assume volumes are independent from the jump sizes and and follow the lognormal law while and follow the lognormal law. For the jump size (in ticks) , we use the Bernoulli law and are 1 tick almost surely. We use Simpson’s rule to compute the integrals in the operator with step size of 100 shares on a bounded interval for each order type. Since is 0.1 and the step size of is 10 shares, no interpolation is required to get the value of .
Unless stated otherwise, all the charts in this section show the values when spread = 1.
5.2.1 Trade-off between Switching and Impulse
Figure 1 plots the graph of ask-off, bid-off, ask-impulse and bid-impulse thresholds vs remaining time to close when the spread is one tick. The chart is symmetric with respect to the bid and ask due to the symmetric parameters, so we will only show the bid side thereafter.
The bid-off goes to infinity at 26 seconds in remaining time, meaning that the only optimal action is to send market order when the inventory exceeds the bid-impulse limit. In other words, throughout the whole trading session, it is not optimal to switch off the bid until shortly before close.
This is a bit surprising since, traditionally, one assumes that a market maker is a liquidity provider, so she should rarely, if at all, use market orders. This is true in quote-driven markets as there is simply no market order available. However, under an order-driven market, market orders in fact provide a very effective means to control inventory risk.
The reason is that when one uses market order, one does not really pay the spread, one just does not earn it. Suppose the market maker has just reached the impulse threshold of 750 shares and then she accepts a sell market order to buy an additional 100 shares at bid. She can immediately issue a market sell order to get rid of this unwanted 100 shares at the same bid price, provided that she is quick enough so that the bid price has not moved. The cost of unwinding this trade is simply the exchange fee - rebate , which is only 0.001 per share (0.1 tick).
If instead she cancels shares in the bid queue, the lost opportunity cost under our framework when spread equals 1 is 0.337500.1*(0.01/2+0.002)=c^{i}=$0.11, by not using a market order.
Nonetheless, switching may become effective when the decay factor of the switching cost kicks in; at that time the market maker should start unwinding the inventory to avoid paying the exchange fee at the final liquidation. Besides, you will see in Section 5.2.4 that when the spread is sufficiently large, it is justified to switch off before sending impulse in order to earn the spread.
There is also a catch when using market order for inventory control. When adverse selection occurs, the incoming market order triggering the breach of threshold may be aggressive, so the market-maker may suffer loss as the last incoming market order has already depleted the best quote and she can no longer unwind the excess inventory at cost.
The above illustration is highly simplified, as various types of buy and sell market orders have different intensities, volume, and jump characteristics. However, after considering the distributional assumptions, fees, rebates and risk aversion, the model result still tells us that market orders are indeed a very efficient tool for the market maker to control inventory risk.
The impulse threshold reaches its equilibrium value of 750 shares very quickly at 108 seconds remaining. This result coincides with that of [6, 7]. We have solved the HJBQVI up to 1 hour and, though not reported here for the sake of conciseness, we have noted that the thresholds remain the same.
5.2.2 Switching and Impulse Cost
The appeal of switching depends largely on the switching cost , which is modulated by the discount factor . We plot the graphs of bid-off against time for various choice of in Figure 3.
We can see that when , switching become more attractive, compared with market order impulses, but one should remember that our interpretation of is the chance of bid or ask price stays at the same level or moves favorably to the market maker, til the other leg of a round-trip market-making transaction is executed. It is a judgment call to decide whether such a low level of is reasonable.
On the other hand, switching is also preferred when impulses are costly. Transaction fee is fixed by the exchange, but under our framework there is a fixed cost , which is modulated by another discount factor . Figure 3 shows a high lowers the threshold, as the slippage renders market orders less effective, leading to a more conservative optimal strategy. On the other hand, if the market maker is concerned about the slippage due to unexpected adverse selection, she can also increase accordingly.
5.2.3 Optimal Impulse Size
Figure 4 shows the optimal size of the market order at s against the inventory level, when the impulse threshold is exceeded. Because of the fixed impulse cost , the impulse size starts at 230, but not 0, when the inventory reaches 750, and then it increases linearly with inventory level.
The linearity of impulse size vs inventory makes the optimal decision rule much simpler to use. In this example, the optimal impulse size is simply inventory minus 520, which we called impulse anchor, and it is roughly the impulse threshold when . The impulse anchor reaches the equilibrium very quickly; the optimal impulse graph is exactly the same whether the remaining time is 300s or 3600s. Because of this, we do not need to maintain a large table describing the optimal impulse size at each time, spread, and inventory level, we just need to store the bid and ask impulse thresholds and anchors for each spread.
5.2.4 Bid-Ask Spread
The Bid-ask spread is crucial to the market maker’s profit; thus we expect the optimal action will change according to the prevailing spread and Figure 5, which shows the bid-off and bid-impulse thresholds under different spreads, confirms our intuition.
The impulse limit increases when the spread widens but still, impulse is preferred over switching when the spread is relatively low. However when the spread is large (spread 5), the market-making business become so lucrative that the greed starts to trump the fear. In this case, the market maker will switch off the bid before sending sell market order, hoping that she can eventually earn the spread.
Our result is similar to that of [7] in the sense that the impulse threshold increases with spread. However in [7], the market maker always switches off first before sending out market orders as there is no switching cost in that paper.
In Figure 5, the impulse threshold jumps when the spread is greater than one tick. It is because a two-tick spread is much more profitable than a one-tick spread. Under a one-tick spread, if the price move one tick against the market maker after one side of the transaction is executed, her profit will be just the rebate (2/5 tick). However, under a two-tick spread, she earns one tick plus rebate (7/5 tick), which is 3.5 times the one-spread case.
Another reason is that in our example the type 1,2 orders jump one tick with probability 0.95 and type 3-6 orders always jump one tick. Were the jump size distribution be more dispersed, the change in threshold from one to two ticks will be less prominent. In addition, the relatively large ensure that the spread is one tick most of the time, so this state transition should rarely occur in our example.
5.2.5 Order Imbalance
With symmetric distributions between buy and sell orders, the thresholds on the bid and ask sides are symmetric. However when the order distributions become skewed, the optimal action under this implied alpha view is to scale back the market-making activity383838This agrees with empirical evidence [42]., as this is the way in which market makers protect themselves from adverse selection [2, 3].
Figure 9 shows the impulse thresholds with different intensities for aggressive sell market orders. When = 0.08 (large selling pressure), the market maker should maintain her inventory below 70 using market orders, effectively not providing any liquidity on the bid side. The case is similar when (large buying interest) and it is not optimal for the market to provide liquidity on the ask side as she will suffer huge loss due to adverse price movements.
The effect of (Figure 9) has a similar but much smaller effect on the thresholds, as type 8 orders are not aggressive; it just takes longer to liquidate the inventory in such market, but the market orders themselves will not introduce adverse price movements against the market maker. Figure 9, 9 show a similar trend for mean volume and we do not repeat the argument again.
6 Simulated Backtest
6.1 Backtest under a Consistency LOB
In this section, we run a simulation to test the performance of two market-making strategies under our weakly consistent LOB defined in Section 3, with the configuration parameters the same as in Table 5.
Simply put, twelve types of orders, modeled as multivariate marked point processes393939See [21] for methods to simulate marked point processes., with marks being volume and jump size, will arrive at the top of the LOB, where of the limit orders are from our market maker and they are uniformly distributed in the queues. The arrivals of different type of orders will trigger the changes in prices and/or bid-ask spread according to Table 2. The market maker’s cash and inventory will evolve according to equations (48,49). Our market maker can cancel her limit orders on one or both sides of the queues and/or send market orders to control her inventory level if necessary.
The two strategies are described below:
Unconstrained Trading - the market maker continuously provide liquidity on both sides of the market with no risk limit. 2. 2.
Optimal Control - the market maker will act according to the optimal control (71, 72) with the admissible set of the impulse where . In this simulation, we solve for the optimal control only up to 300 seconds from close, and the decision rule at that point is extended to the earlier session.
In order to make the simulation more realistic regarding the price-time priority in a real LOB, the market maker’s limit orders will not be executed after switching on until shares of limited orders ahead of them have been eliminated. On the other hand, even when the market maker is in switch-off mode, if the order size is greater than , she will still execute the excess portion, subject to her usual participation rate . This is the price to pay as she wants to maintain priority in future executions by canceling only limit orders at the top of the book.
We will not deduct the artificial cost of switching , impulse and inventory penalization in the simulation; only real cost such as exchange fees and rebates are included. The initial setting are: . The length of each trading session is 6.5 hours and one millions iterations were executed. The performance of the two strategies are shown in Table 6.
The mean profit under the optimal control strategy is slightly smaller than that under the unconstrained strategy, but the standard deviation and kurtosis are much smaller while the skewness changes from negative to positive. Also, the large reduction in standard deviation relative to the mean profit leads to a much better reward-to-risk or information ratio (IR). Though we did not calibrate the risk aversion parameter to maximize the IR, the IR, together with standard deviation, skewness, and kurtosis, is significantly improved as a result of our strategy’s sound risk management decision.
6.2 Backtest under Inconsistency LOBs
In order to demonstrate the importance of order book consistency, we also simulate the performance of the same two strategies under hypothetical order books which suffer from inconsistency as follows: all the order flows are exactly same as in Section 6.1, except for the direction of price movements, which now depend on an independent random variable. Suppose that a type 1 (market buy) order arrives, the pseudo code for the weakly consistent model in Section 6.1 is
ask_price = ask_price + jump_size * tick_size spread = spread + jump_size bid_price = bid_price
whereas in the hypothetical models, it becomes
simulate D ask_price = ask_price + jump_size * tick_size * D spread = spread + jump_size bid_price = ask_price - spread * tick_size
where D is an independent random variable with the distributions given in Table 7.
In other words, the direction of a price movement is independent of the arrival order type; the price can go down with a buy market order or up with a sell market order. When , the price moves in the proper direction consistent with the order type, while in the other two cases, the price either does not move or move to the wrong direction.
Similar logic is applied to orders of type 1-6 and we keep the bid and ask prices unchanged for type 7,8 orders in the alternative LOBs. Finally, we assume the thresholds for the optimal control strategy do not change in the hypothetical LOBs.
The results in Table 8 are rather loud and clear: the mean profits are seriously overstated in the three inconsistent LOBs, compared to what would occur in our weakly consistent one. The overstatement of mean profit is around 50-60% in LOB1 and LOB2. In addition, even the seemingly harmless LOB3, where the direction is right 80% of the time, still has a nontrivial 20-25% discrepancy.
We have stressed throughout this paper that the market maker is often on the wrong side of the trade due to adverse selection. Hence if the price does not move in the appropriate direction consistent with the order type, it can lead to an exaggeration of expected profit and this is most evident in Table 8.
Besides, the performance metrics can also be distorted under inconsistent LOBs. For example, under the weakly consistent LOB, the IR improvement by the optimal control is around 16 times but it becomes 20 times under the inconsistent ones; hence it is also possible that a good strategy may appear worse than a poor one under an inconsistent LOB. Therefore, an optimized trading strategy under an inconsistent framework may not perform well in real-world trading.
7 Conclusion
We develop from the ground up a new market-making model which is tailor-made for high-frequency trading under a LOB. In this model, we avoid the common but overly simplistic assumptions of independent price processes, constant volume, one-tick jump and spread, continuous switching without penalty and no market orders. Instead, we build a flexible framework that enforces consistent price movements, allows arbitrary volume, jump, and spread distributions, includes a state-dependent switching cost and permits the use of market orders.
Departing from the classical Avellaneda and Stoikov [1] framework of regular stochastic control on diffusion, we exploit optimal switching and impulse control on marked point processes. They have proven to be very effective in modeling order-book features such as price-order co-jump, volume, jump size, price-time priority, as well as market orders.
By leveraging the well-known classification of order types in market microstructure and assuming an even distribution of limit orders from a small market maker, the control problem is significantly simplified as we do not need to keep track of the order book shape and the priority of each limit order from the market maker. By further assuming non-stochastic intensities for the arrival processes, the optimal control can be computed numerically by solving an explicit finite-difference scheme for the associated Hamilton-Jacobi-Bellman quasi-variational inequality. Since the scheme is highly parallelizable and an equilibrium is reached very quickly, the computation can be finished within 5 minutes using a 16 cores machine.
The ultimate market-making models may involve full-blown LOB, but currently it is all but impossible to perform optimization on such a high-dimensional object. Our weakly consistent reduced-form model provides a tractable alternative which still includes many of the important order-book features. Our numerical analysis shows that it constitutes a valuable risk-management tool for market makers, greatly reducing the risks associated with providing market liquidity.
Finally, we would like to point out that equation (66) is in fact a system of QVIs (with index ) involving two nonlocal operators (integral and intervention operators). As far as we know, the theoretical foundations, such as existence, uniqueness, comparison principle, continuity, and linkage with the value function of the stochastic control problem, of the associated viscosity solution have not yet been rigorously established. Moreover, the framework of Barles and Souganidis [43], which is commonly used to assert the convergence of numerical schemes to viscosity solutions of PDEs, IPDEs [44] and QVIs [45], needs to be extended, in order to prove the convergence of our numerical scheme (87).
8 Acknowledgments
The authors would like to thank the participants, in particular Sebastian Jaimungal, in the Stevens High Frequency Finance and Data Analytics Conference 2019, for their comments and suggestions as well as the two anonymous referees for their invaluable feedback.
Appendix A Brief History of Market-Making Models
The early literature on market making appears mostly in the field of market microstructure in finance where researchers study the behavior of various market participants in the financial system. The early models, namely Garman [46], Amihud and Mendelson [47], Stoll [48], Ho and Stoll [4], are commonly called agent-based models where a monopolistic market maker continuously adjusts his bid and ask quotes in order to control her inventory level. Such models provide a lucid framework to understand the interactions between different market players as well as their impact on the quote-driven market, at the time when the dominant mechanism of security transaction is voice trading and the designated market makers execute majority of the transactions via open outcry.
Another type of market-making models are the pure stochastic models as in Avellaneda and Stoikov [1], Guéant et al. [6], Guilbaud and Pham [7]. In those models, the market maker is assumed to be small enough so that she has negligible influence on the order flow. With the rise of electronic LOBs, that allow direct interaction between buyers and sellers, this plausible assumption provide a tractable framework to study market making in the new era.
A.1 Garman (1976)
Garman’s [46] model is often regarded as the earliest model of market making, and the title of his paper, market microstructure, develops into a discipline of rigorous study of market mechanism in the field of finance. In Garman’s model, there is only one monopolistic market maker and no direct exchange between buyer and seller is allowed. As a result, the market maker has the full price control. However, the rate of incoming Poisson buy and sell order will depend on the ask and bid price , which he sets at time 0 and the prices will remain the same throughout the whole trading period. At time [math], he has cash and inventory and he will go bankrupt when either of them drops to zero. In Garman’s setting, the market maker is risk-neutral and he seeks only to maximize the expected profit while avoiding bankruptcy.
Assuming a linear rate function with , in order to avoid running out of inventory or holding infinite amount of stock, the market maker will set the bid and ask prices such that . At the same time, she seeks to maximize the profit by solving the static optimization problem
[TABLE]
The solution is where .
Under Garman’s setting, the inventory is a birth and death process with birth rate and death rate . From the theory of continuous-time Markov chain, when , the stock ruin probability . In other words, fixing the bid and price at is not viable as the market maker will run out of inventory almost surely.
A.2 Ho and Stoll (1981)
Ho and Stoll [4] extend Garman’s model by allowing the bid and ask prices to change continuously over time and they use the stochastic optimal control technique to solve the market-making problem. Same as Garmen, the authors use linear demand/supply functions for the Poisson process of buy and sell orders , and the dollar value of inventory follows a jump diffusion, where the randomness coming from both maker-making activities and the price fluctuations of the asset. , the cash generated from the market-making activities, grows at risk-free rate while , the wealth of market maker with investment yield , follows a geometric Brownian motion. is a fixed fair price decided by the market maker. Unlike Garmen, the market maker is now risk-averse with a concave utility function . The optimal control problem for market making is stated below:
[TABLE]
A.3 Avellaneda and Stoikov (2008)
After 27 years, Avellaneda and Stoikov [1] propose a refinement of Ho and Stoll [4], that forms the foundation of contemporary market-making models. The major difference with Ho and Stoll [4] is that instead of modeling a monopolistic market maker, the authors consider a small market maker as price-taker and thus they replace the market-maker’s fair price with an exogenous mid price process , which follows Brownian motion.
Based on some empirical studies of LOB [30, 31, 49, 50, 51], Avellaneda and Stoikov suggest to portray the intensity of market order, hitting a limit order at a distance of (half-spread) from the mid price, in an exponential form where are constants. Instead of describing the dollar value of inventory , the authors use the inventory quantity (no. of shares). Finally, the interest rate and dividend yield are ignored as the time horizon of a single session of market-making activity is usually just one trading day.
[TABLE]
Although the title of Avellaneda and Stoikov’s article is called High-frequency trading in a limit order book, they do not incorporate any LOB features such as price tick, price-time priority, order size, fee and rebate into their model. The only LOB related claim is that the exponential form of arrival intensity is coming from empirical studies of LOB.
A.4 Guilbaud and Pham (2013)
Guilbaud and Pham [7] introduce a number of LOB features not seen in the AS framework, and the formulation of their control problem is also significantly different. First, the prices of market maker’s limit orders are no longer continuous decision variables, but are either pegged to the best bid/ask404040The best bid and ask prices are still not in the price grid as the mid price is continuous. or one tick better. When the bid-ask spread is only one tick, a one-tick-better limit order means market order. Second, the mid price is extended to jump diffusion (Lévy process)414141 in equation (107) is the continuous jump size of Lévy process. and the discrete bid-ask spread is modeled by an independent continuous-time Markov chain. Besides, market maker can choose the size of limit orders as well as the time and size of market orders, which are used to remove excess inventory. Lastly, the final liquidation value includes the cost of crossing the spread and a non-proportional exchange fee .
[TABLE]
where are constants.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Avellaneda and Stoikov [2008] M. Avellaneda and S. Stoikov. High-frequency trading in a limit order book. Quantitative Finance , 8(3):217–224, 2008.
- 2Glosten and Milgrom [1985] L. Glosten and P. Milgrom. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders. Journal of Financial Economics , 14(1):71–100, 1985.
- 3Kyle [1985] A. S. Kyle. Continuous auctions and insider trading. Econometrica , 53(6):1315, 1985.
- 4Ho and Stoll [1981] T. Ho and H. Stoll. Optimal dealer pricing under transactions and return uncertainty. Journal of Financial Economics , 9(1):47–73, 1981.
- 5Fodra and Labadie [2012] P. Fodra and M. Labadie. High-frequency market-making with inventory constraints and directional bets. ar Xiv preprint ar Xiv:1206.4810 , 2012.
- 6Guéant et al. [2013] O. Guéant, C.-A. Lehalle, and J. Fernandez-Tapia. Dealing with the inventory risk: A solution to the market making problem. Mathematics and financial economics , 7(4):477–507, 2013.
- 7Guilbaud and Pham [2013] F. Guilbaud and H. Pham. Optimal high-frequency trading with limit and market orders. Quantitative Finance , 13(1):79–94, 2013.
- 8Fodra and Labadie [2013] P. Fodra and M. Labadie. High-frequency market-making for multi-dimensional markov processes. ar Xiv preprint ar Xiv:1303.7177 , 2013.
