Efficiency of the Price Formation Process in Presence of High Frequency Participants: a Mean Field Game Analysis
This paper deals with a stochastic order-driven market model with waiting costs, for orderbooks with heterogenous traders. Offer and demand of liquidity drives price formation and traders anticipate future evolutions of the orderbook. The natural framework we use is mean field game theory, a class of stochastic differential games with a continuum of anonymous players. Several sources of heterogeneity are considered including the mean size of orders. Thus we are able to consider the coexistence of Institutional Investors and High Frequency Traders (HFT). We provide both analytical solutions and numerical experiments. Implications on classical quantities are explored: orderbook size, prices, and effective bid/ask spread. According to the model, in markets with Institutional Investors only we show the existence of inefficient liquidity imbalances in equilibrium, with two symmetrical situations corresponding to what we call liquidity calls for liquidity. During these situations the transaction price significantly moves away from the fair price. However this macro phenomenon disappears in markets with both Institutional Investors and HFT, although a more precise study shows that the benefits of the new situation go to HFT only, leaving Institutional Investors even with higher trading costs.
Keywords: orderbook modeling, mean field games, order-driven market, waiting cost, liquidity equilibrium, high frequency trading. JEL codes: C730 (Stochastic and Dynamic Games), G140 (Information and Market Efficiency)
This work has been partially granted by the Crédit Agricole Cheuvreux Research Initiative in partnership with the Louis Bachelier Institute, the Collège de France and the Europlace Institute of Finance. Authors thank Ioanid Roşu for fruitful discussions about the orderbook model.
With the recent changes in regulation on financial markets (MiFID, 2007, in Europe and Reg NMS, 2005, USA) the competition across trading venues favored the appearance of new trading rules, in a global attempt to capture most of the decreasing liquidity available in the post-2008 financial crisis world. Trading venues thus proposed innovative ways to trade in electronic orderbooks (that have the favor of regulators and policy makers because of their native traceability):
low latency networks and matching engines, to allow high frequency players to decrease their exposure to market risk, in attempts to give them incentive to provide more liquidity Madhavan (2011),
maker/taker fee schedules to pay Liquidity Provider orders inserted in orderbooks, in order to attract liquidity,
creation of Dark Pools of various kinds (see Ganchev et al. (2010)), to promote anonymous liquidity seeking so that large investors can continue to exchange blocks in an electronic manner,
size-priority and pro-rata matching rules Mendelson and Amihud (1991) to complement the usual time-priority models,
are among these changes in market microstructure.
The analysis of the efficiency of the emerging ecology of partially connected trading pools is questioned, especially since the flash crash Madhavan (2011), Kirilenko et al. (2010) during which the US equity market has lost around 10% of its value in 10 minutes, regaining it in 20 minutes. The resiliency of the liquidity provided by HFT (High Frequency Traders Menkveld (2010)) raised concerns. So did the dispersion of liquidity on such an heterogeneous network of pools.
Addressing these points is difficult because the market microstructure is not only a set of trading rules that could be studied statically, it changes with market participants behaviors, each of them trying to optimize her own utility function and anticipating others’ moves (see Lehalle et al. (2013) and Foucault et al. (2013) for more details).
This article provides an order-driven market modeling, where the volume of arriving flows is the risk source and where the key driver is the demand/offer of liquidity.
Yet only a limited number of papers have explored such models, the most notables being Roşu (2009) (modeling the orderbook queue dynamics) and Gareche et al. (2013) (empirically studying orderbook data to extract the main components of the dynamics). The present paper can be seen as a very good complement to those two very interesting ones: with an accurate economic modeling on the one hand, and empirical results on the other hand. The MFG approach links them together since we provide for instance Partial Derivative Equation formulations (compatible with the Fokker-Planck equation described in the second paper) arising from a structural modeling (compatible with the modeling of the first one). The problem is very complex, and the topic deserves for more studies and publications. Indeed, such liquidity models involve a very large number of traders who arrive and leave the system at different times and strategically interact. Such components lead necessarily to complex situations.
In our model we consider smart traders (we call them players as soon as we use the game theory environment) that arbitrate between limit and market orders. That is they have to choose between the immediate transaction price and expected later transaction prices. The dynamic model is in continuous time, in infinite horizon. Since patience is at the heart of our model, the present approach belongs to the family of waiting cost order-driven market models. Closely related papers are the work of Foucault et al. (2005), and the more recent paper by Roşu (2009). The former is the seminal waiting cost based model (as opposed to asymmetry information models) in discrete time. The latter is a continuous time approach where traders have the possibility to cancel their orders for free. This late assumption greatly simplifies the problem and allows the author to describe the equilibrium in an elegant manner.
Like in Roşu (2009), we use a continuous time model with Poisson processes used to model newcomers’ arrivals. Nevertheless our model present some important dissimilarities. First the patience structure of traders is more endogenous since no cancellation of orders are permitted. Choices made by the players are thus irreversible and traders’ anticipations of future events become a core issue. Their is a deep impact on the equilibrium equations: the problem becomes nonlinear. Secondly, the goal of our paper is to study the case with heterogenous traders, in particular to model the interactions of Institutional Investors and High Frequency Traders. In Roşu (2009) several types of traders are considered, but the strategical arbitrage between market and impact orders is allowed only for one of the types. This is not the case in our model, where all types make choices.
Game theory is necessary as soon as markets are incomplete. When markets are complete, strategy is unnecessary and the only task agents have to perform is to optimize in regards to the price. Order-driven markets are by essence incomplete since the source of risk is the random arrival of traders, and it is impossible to hedge this risk because choices made by traders are irreversible (note that the more realistic modeling where the modeler considers costly cancellation of orders must lead to a similar incompleteness). Consequently we are convinced that game theory offers a proper framework.
Mean Field Games (MFG monotone systems, as detailed in the next section) are the suitable class of games that naturally allow to take into account the specific components of the order-driven market we consider, that is: a continuum of anonymous players, irreversibility of the actions, recursivity (anticipation of future prices). The resulting dynamics is thus a mix of backward-driven behaviors (based on actualized anticipations of future values of trades) and forward-driven ones (resulting from the immediate actions taken by agents). The MFG framework has been built to capture this two way dynamics, therefore this paper uses it to render the dynamics of a stylized orderbook, allowing to obtain results on different market configurations. In the paper we introduce a new kind of mean field games in which players take one strategic decision at their arrival into the game.
The paper is organized as follows. In section 2 we provide a quick introduction to Mean Field Game theory. In section 3 we introduce the modeling approach. We start with a one-sided orderbook as a base camp towards the two-sided orderbook exposed later. Section 4 and 5 are dedicated to the introduction and theoretical study of the recursive equations characterizing the equilibrium. Finally we conclude the paper in section 6, where we apply the model to several markets: markets with Institutional Investors only versus markets with both Institutional Investors and High Frequency Traders.
2 Mean Field Games: a quick introduction
Mean Field Games (MFG for short) are a class of stochastic differential games with a continuum of agents.
They have been introduced by Lasry and Lions (2007). Similar ideas have been introduced from an engineering viewpoint by Huang et al. (2007) and Adlakha et al. (2013). From then on, MFG have known numerous developments and applications to various fields, mainly in economics Lucas and Moll (2013); Guéant et al. (2010), statistics Pequito et al. (2011a, b), and human crowd behaviors Lachapelle and Wolfram (2011). The mathematics and numerics of MFG have been widely developed. Most of the mathematical tools for MFG have been the purpose of a 5 years course at Collège de France Lions (2012), and recent developments are described in Cardaliaguet et al. (2012) from an analysis viewpoint and Carmona et al. (2012) and Carmona and Lacker (2013) with a probabilistic approach.
In the continuum, agents are atomized, which means that their influence on the global state is reduced to nil. In economics, this aspect has to be linked with the notion of price taker agents as opposed to the case of a price maker monopolist for instance. This is precisely the whole continuum that makes the equilibrium.
The nil influence may have other sources than the presence of infinitely many players in the game. Indeed, a game with stochastic continuous entries and exits of players leads to the same property. This will be in particular the case of the model we propose in the present paper, where we consider Poisson entries and exits.
The information consists of a measure on the space of states . Being a measure, it is often denoted by in the literature, but to be consistent with the notations of the model developped in the next sections, we rather call it . Then quantifies the density of agents having state .
In a MFG, players individually optimize (by choosing actions) their expected pay-off, considering the evolution of the global dynamic of the collectivity as an observable parameter (and they anticipate its evolution). Simultaneously, the statistical evolution of the collective dynamic follows from the individual optimal behaviors. The equilibrium takes place as soon as the anticipated evolution coincides with the statistical evolution.
A core characteristic of Mean Field Games is that they are anonymous games. This notion is well known and means that the game is invariant for any permutation of the players. In other words, the players are not labelled. This assumption is very natural in complex systems involving numerous players.
Mean Field Games are approximations of anonymous games with finitely many players. But things are getting much simpler in MFG. The strategical powerlessness of individuals (i.e. the atomized characteristic of players) dramatically shrinks the traditional complexity (materialized by numerous coupling of the equilibrium equations) of -player games, which is well-known as being Achilles’ heel of classical stochastic differential games. Players interact with others only via the global state of the collectivity.
In -player stochastic differential games, each player optimizes her value function , depending upon every individual states of agents (including herself). The equilibrium is then characterized by a complex system of coupled differential equations.
In a Mean Field Game, the value functions become a single value function depending upon the the state of a generic player and the density of the continuum.
The MFG equilibrium is then characterized by a master equation verified by . The master equation is in general very tricky and mathematically challenging. Their is a natural classification of cases in term of risk structure.
Individual risk: in this case, the stochasticity of each player’s dynamic is independent of each other. This particular case was firstly introduced. A major simplification is that the value function does not depend on the density , but only on the state . Consequently the master equation reduces to a system of two coupled partial differential equations having a forward-backward structure. The dynamic of the collectivity is deterministic.
Shared risk: here the only risk that agents face is common to all of them. When agent’s space is finite (that is ), then the value function can be discretized
This class of cases have been deeply investigated and is referred to as the case of monotone systems (see Lions (2012)). The monotone system takes the following form:
We will see later the PDE of our orderbook model falls into this class of MFG.
Note that there is also a time dependent version of (1) with a time derivative term added.
Mix models: some classes of cases that mix both shared and individual risks are needed for economic modeling (e.g. for solving the Krussel-Smith problem Krusell and Smith (1998)).
The stylized orderbook used here is a two-sided one. We start with a simple single-queue model as a base camp towards the two-sided one that is exposed later.
3.1 A simple single-queue model with anticipations
The purpose of introducing first a single queue model is didactic and does not aim at directly providing insights on orderbook modeling. However we believe this single queue is the occasion to introduce some key concepts, such as endogenous strategic entries of agents that anticipate the future. Consequently, sellers entering the system are also called players since we locate the modeling approach in the game theoretic framework (agents perform actions optimizing their respective pay-off).
In particular, when new sellers arrive, they look at the queue size and decide whether to enter the queue or not (action), after considering their expected pay-off (value function assessment).
With this simplified model we introduce anticipatory behaviors in a very stylized one-sided orderbook, where patient sellers arrive at exogenous Poisson rate and where the arrival rate of impatient buyers increases as soon as the queue size increases. We will finally use it to provide insights on the modeling of distinct execution protocols, namely process sharing and First In First Out protocol.
The arrival rate of players is continuous and stochastic. In this simplified model, it is exogenous.
As usual, they arrive following a Poisson process with intensity .
Impatient buyers arrive at rate , a given increasing function of ; i.e. the more patient sellers in the queue, the higher arrival rate of impatient buyers.
The unit size of an order in the queue is . The queuing discipline is a process sharing one (with no priority), i.e. individual service in a queue of size is worth . In terms of trading rules, one may think about a pro-rata one Field and Large (2008).
The pay-off gained by a player per unit of order is a nonnegative decreasing function of the queue size: . Typical cases are and . On the other hand, there is a cost of waiting in the queue.
Now, as usual in game theory, there is a value function for any player. The value function depends upon the queue size . It is the expected Profit & Loss (P&L) of a player entering the queue. Note that we assume that agents are risk neutral and that their reservation utility is set to 0, which means that an agent decides to enter the queue as soon as the value function is positive: .
The value function dynamic comes from an infinitesimal expression of events impacting it:
a newcomer enters the queue as soon as (remember is the “expected value received if you enter the queue”).
in the scope of this toy model, the queue is consumed by an exogenous Poisson process of intensity . Each time an order already waiting in the queue is partially executed (according to a prorata rule): its owner will sell shares for a price . The new expected value for a participant waiting in the queue in this case is thus (i.e. the first part of the expression comes from the sell of shares and the second one from the expected value of the queue that is now of size ).
in all other cases, the expected value does not change.
the waiting cost is proportional to (the size of the orders); it decreases the expected value of by , where is the time unit.
A MFG formalization: 1. The Control.
A subtle aspect of the MFG is players enter into the game following , and take the decision to stay in the queue or to leave the game (paying a reference price of zero). The natural notation would be
the index of an anonymous player is ,
its control it naturally deduced from its value function (the value of staying in the queue). As soon as the value of staying in the queue is greater than paying the reference price, it solves the control problem of the agent:
The solution is hence easy to express:
note that , the size of the queue, is our mean field. Thanks to it is shared by all the players.
The mean field evolves according to a stochastic differential equation:
with the notations for the queue-consuming point process.
We see the mean field dynamics involves the value function and no more the control once we inject the solution of the control problem in it (namely ):
A MFG formalization: 2. Definition of the cost function.
The value function the th agent wants to minimize is driven by the following running cost
The additive waiting costs are compatible with the very short time scale having a sense for orderbook dynamics111 It can be noted here that another cost function could be defined here as: where is a random variable taking value 1 with a probability and 0 otherwise. In such a case, instead of a prorata rule, we will have a trading rule for which an order is fully executed with a probability , or not at all. This case covers the trading model of Roşu (2009), in which the orderbook matching rule is FIFO (First In, First Out), but any agent can modify and reinsert his order at any time. In such a case the probability for one specific agent to be first in the queue (and thus be fully filled), is . Since , the emerging dynamics are the same..
With such a formalism, the value function can be defined as
given , with “large enough” at the intraday time sale. Remind that in our specific class of MFG, the identity of the agent and the time are bound: , meaning players come into the game according to the point process .
A MFG formalization: 3. Expression of the mean field.
Thanks to the mean field , the value function can be anonymized:
And thus the dynamics of the mean field is agent-agnostic too:
A MFG formalization: 4. Stationary equilibrium as a fixed point of the value function.
Thanks to the previous steps we now look for the stationary value of . Below we detail the equilibrium equation for each probability event, giving birth in few paragraph to an ordinary differential equation describing the value function.
We can perform a Taylor expansion for small in the discrete equation above. In this way we derive the following differential equation:
where the second order term is the last one (blue term).
First order analysis.
Before approximating numerically the solution to (5), we propose to get some insights on the shape of the solution by doing a first order analysis. More precisely, the solution to the queuing system described above is characterized by the sign of the value function . Consequently we are interested in finding potential sign switching points of .
The core modeling ingredient is the value of the Poisson arrival rate relative to .
For the first order analysis we look at the first order equation:
Let us remark that equation (6) corresponds to a trivial shared risk Mean Field Game monotone system with , as described in the previous section. Note that in the framework of this model, the mean field aspect does not come from the continuum of agents (for every instant, the number of players is finite), but rather to the stochastic continuous structure of entries and exits of players.
Now we look at the case where the stylized limit orderbook presented here has an infinite resiliency, meaning once the orderbook is partially consumed by a marketable order, the remaining liquidity rearranges itself to fill the gap. Moreover, we will consider the non degenerated case where sellers arrive at rate , larger than the exogenous consuming rate for all .
An example with anticipatory behavior.
Assume the arrival rate of buyers has the specificity to take two values:
a low value below a certain queue size threshold ,
a higher value , above the threshold .
As a function depending upon the queue size variable , it reads:
Here there are at least two points where changes sign:
Figure 1 shows the plot of the solution (numerical approximation of the solution to equation (5)) for a certain set of parameters (for constant). We can see that the first switching point is close to the first order approximation , while the last sign switch significantly deviates from the first order approximation . It means that higher order terms have a non-negligible effect.
But most importantly, we observe that there is another sign switch strictly below the threshold . The existence of such a switching point means that players anticipate the improved service before the threshold is reached. Indeed, their value function becomes positive meaning that players enter the queue strictly before the improved service starts. This is why we talk about an anticipation switching point. Consequently, we can conclude that at the equilibrium, the strategical players adopt an anticipatory behavior.
First In First Out model.
Finally we want to show that our approach allows to model distinct execution processes, and how the resulting equilibrium equations are impacted.
To do so, we consider the First In First Out (FIFO) protocol. This is the only change we make in the model. To consider such a priority protocol, we have to introduce a new variable denoting the position of a trader in the queue of size . Consequently the problem becomes bi-dimensional.
The equation becomes:
in the domain , and the boundary condition for is:
3.2 The orderbook model
The matching mechanisms of order books.
One of the roles of financial markets is to form prices according to the balance between offer and demand. In modern markets, this mechanism takes place inside electronic order books where multilateral trading takes place. They implement the following dynamic:
buyers and sellers can send electronic messages to a “matching engine”. These messages, called orders, contain a side (“buy” or “sell”), a limit price and a quantity.
The matching engine contains a list of all pending orders it received in its memory. When it receives a new buy (respectively sell) order, it looks if pending sell (resp. buy) orders at a lower (resp. higher) price are available.
If it is the case, it generates transactions between the owner of the incoming order and the owners of the compatible opposite orders, and removes the corresponding quantities in its list of pending orders;
if the incoming order has a remaining quantity, it is inserted in the list of pending orders.
The list of pending orders waiting in the matching engine is called its “limit order book” (LOB).
During the matching process, it is possible that the quantity of an incoming order does not match exactly the quantity made available at a compatible price (i.e. lower prices for a buy order and higher prices for a sell order) by opposite orders in the order book. To handle such cases, matching engines need to implement a priority mechanism. The most used (see Mendelson and Amihud (1991) for more details) are:
time priority: the “oldest” pending orders in the order book are matched first;
size priority: the largest pending orders are matched first in case of competition between resting orders at the same price;
pro rata: pending orders are matched for a fraction of their quantity proportionally to their relative size to the one of the whole queue (see Field and Large (2008)).
Each trading platform discloses its matching mechanism in detail to market participants in a rulebook (like Euronext (2006)).
Matching dynamics and trading styles.
Market participants thus have to cope with rules of the matching engine they trade into while fulfilling their day-to-day goals. Recent regulatory discussions raised questions on the potential negative interactions between the following classes of market participants in the same order book:
Institutional investors, that buy and sell large quantities of shares to manage their portfolios on the long term. They take the decision to buy or sell independently from the immediate state of the order book. They are in essence impatient since they interact with other participants in the order book with the final goal to really buy or sell given quantities before a given deadline. They will not change their mind during the trading process given the state of the liquidity in the order book.
High Frequency Traders are far more opportunistic. Even if they do not have all the same behavior (see Brogaard et al. (2012) for more details), they have in common the fact that: (1) they send very small orders to trading platforms, (2) they do it very often (i.e. at high frequency), (3) they have no other reason to trade than the immediate state of the order book.
Concerns raised focused on the integrity of the price dynamics when so different participants are mixed in order books. The “Flash Crash” Kirilenko et al. (2010) has shown that liquidity glitches could cause large variations of prices formed in electronic order books with no fundamental reasons. Academics studying the price formation process in order books usually name “temporary market impact” the way prices temporally deviate from their stable value due to high consumption of liquidity (i.e. of pending orders) in an order book (see Almgren et al. (2005), Gatheral (2010)).
Recent regulatory changes unexpectedly favored HFTs activity Lehalle et al. (2013) (they are said to now be part of 70% of transactions in the US, 40% in Europe and 30% in some Asian markets, like Japan).
Dedicating a model to study liquidity games in order books.
The way market participants interact in order books is sophisticated, due to the fact that they continuously try to anticipate actions of other participants to take an adequate decision. Their classical dilemna is the following. On the one hand they want to trade as slow as possible to avoid to be detected nor consume liquidity too fast thus moving the price an unfavorable way (i.e. adverse selection costs). On the other hand they cannot afford to trade too slow to avoid to be exposed to adverse market moves (i.e. opportunity costs).
A large literature proposes mathematical frameworks for market participant to optimize their trading kinematics: first mean-variances approaches Almgren and Chriss (2000), then stochastic control ones Bouchard et al. (2011), and more recently stochastic algorithms have been designed to capture optimally liquidity at the smallest time scale Pagès et al. (2011). In all these approaches, each market participant tries to optimize her behavior assuming that the aggregation of other players is “martingale” in the sense that it is submitted to price moves and to some order books characteristics (like the volatility, the market depth, the intensity of orders reaching the matching engine, etc.) emerging from the activity of other participants without influencing it (in most cases a market impact function is introduced, exogenously from the activity of other participants).
The MFG approach presented here takes into account the way strategies of market participants change the dynamics of the order book. It opens the door to more endogenous models. The previous section is a simple illustration of this approach: the mean field is the state of the one-sided order book, and since each player implements an optimal strategy (in the sense that she values the time to wait in the queue and compares it to an immediate price to pay), it is possible to understand the dynamics of the value function shared by all market participants.
In this section we will go one step further: the consuming rate of the one-sided order book (say it is the queue of sellers) of section 3.1 will be linked to the size of the queue , but in an endogenous way: that is via optimal strategies followed by participants in the other queue (the one of buyers). The flow consuming the selling queue is the one of buyers deciding on their side to pay immediately instead of waiting in the queue (of buyers). It will enable the emergence of coupled dynamics taking into account the states of the two queues.
To render a market impact effect, we will model the way impatient buy or sell orders consume the queue of sellers or buyers. For the ease of presentation, in this paper we will consider that at our time scale the “fair price” (that can be understood as a latent price like in Robert and Rosenbaum (2011) or Bacry et al. (2012), or as a fundamental price like in Ho and Stoll (1983)) does not change significantly. But the reader can note that extending this model pegging a diffusive behavior on this fair price will do no more than adding an Ito term to the considered dynamics. Mean Field-inspired models at a largest time scale, targeting the understanding of the latent price dynamics have been already proposed, but not at the level of the order books (for instance in Lehalle et al. (2010), the dynamics of a latent order book is submitted to an MFG like mechanism, but the realizations of the order book is modeled via a forward only scheme).
Hence, we introduce here a market-impact like relation between the size of the order book queues and the transaction prices around the fair price : consuming a quantity of the queue of pending selling orders of size will temporally move the price from to . Qualitatively, it implies an almost linear market impact with elasticity (i.e. can be compared to Kyle’s lambda Kyle (1985)). Moreover, the modelled orderbook will have an infinite resiliency: once liquidity is consumed in a queue, the remaining quantity will reshape itself to fill the created gap.
The details of the MFG model are exposed in the following sections. In short, it contains these following ingredients:
market participants are able to act strategically, anticipating others’ moves;
the dynamics of the two queues (patient buyers and patient sellers) are coupled thanks to the fact that the flow consuming each of them is provided by agents of the other side choosing to be impatient (either because they do not use a smart routing strategy, or because the outcome of their smart strategy is to send a market order);
market impact is introduced dynamically (related to the size of the queues), modifying the premium to be paid by impatient traders, thus influencing their choices.
Moreover, our order book model needs a priority rule, for simplicity reasons we will use a pro-rata rule (since it keeps the dimensionality of the model tractable). As it will be seen later, it allows to render enough complexity to obtain meaningful results.
Rendering different trading styles in an order book model.
To understand the features of our MFG model, we will first study its dynamics in a market with homogenous participants. Since we are in a MFG framework, it will render a continuum of agents, at this stage they share the same macroscopic parameters:
the same messaging intensity ,
the same size of orders they send ,
the same waiting cost .
Beside, we enrich the model with one more feature: the use of SOR (Smart Order Router). A Smart Order Router (see Foucault and Menkveld (2008) for an efficiency study or Lehalle et al. (2013) for a generic presentation) is a device containing a software dedicated to “smartly route” orders. In our model, only SOR users will be able to act strategically instead of being blindly impatient.
It can be considered that agents not using a SOR have an infinite waiting cost. Since institutional investors take decisions independently of the current state of the orderbook, it is realistic to consider that a fraction of them will not take time to implement sophisticated microscopic strategies on some of their orders.
The proportion of market participants using a SOR (i.e. not infinitely impatient market participants) will be parametrized thanks to a specific flow of intensity .
|SOR||often used||always used|
In a second stage we will mix heterogenous agents, with different behaviours summarized in Table 1:
Institutional investors, trading large quantities not using systematically a SOR;
HFT (High Frequency Traders), faster than the former participants, using smaller orders, more patient (in the sense that they bare a lower cost per share waiting in a queue), and all of them using a SOR.
The market price will be centered on a constant . The market depth is , meaning that no transaction will take place at a price lower than or higher than . The (time varying) size of the bid queue (waiting buy orders) is and the size of the ask one (waiting sell orders) is .
When a market (buying) order hits the ask queue, the transaction price is and when the bid queue is lifted by a market (selling) order, the transaction price is . The price takes into account instantaneous queue size adjustments depending upon the order size .
Qualitatively, it means that the market impact is linear. Boundary conditions, to be introduced later, impose , so that there is no definition problem of the transaction prices
The value function for a trader submitting a buy order in the bid queue is and the one of a sell order in the ask queue is . In the model agents have risk-neutral preferences, thus the utility functions coincide with price expectations.
Orders arrival rates.
We distinguish between SOR and non-SOR orders. The proportion of these two types of orders is exogenous, and set as an input of the model.
Buy and sell SOR orders arrive according to two Poisson processes with intensity and . Several cases can be considered:
Homogeneous Poisson processes:
Heterogeneous (in space) Poisson processes
where is a decreasing function. Typical instances are , likewise.
However, we will focus in this paper on the homogenous case.
Let us remark that the previous rates could be endogenized and set as the result of an optimization problem involving the utility functions, consequently depending upon the queue sizes .
Non-SOR orders (i.e. belonging to very impatient investors or traders) are always liquidity remover, with arriving rate (equally distributed between buyers and sellers).
Market participants decision processes.
When a buy (resp. sell) order arrives, its owner has to make a routing decision (see Figure 2 for an idealized diagram of this process):
if (resp. ) it is more valuable to route the order to the bid (resp. ask) queue (i.e. sending a limit order). In such a case the order will be a Liquidity Provider (LP). We define symmetrically Liquidity Consumer (LC) orders. This decision is formalized in the model by setting the variable to 1 when , and to zero otherwise:
otherwise the order goes Liquidity Consumerly to the ask (resp. bid) queue to obtain a trade. It will be a liquidity remover in this case:
The price of such a transaction is (resp. ) as defined by equality (10). Note that we omit the dependence on when it is unnecessary for the understanding of the equations.
We impose the following boundary conditions:
In particular, conditions (13) ensure that .
A MFG formalization: 1. The Control.
Like in Section 3.1, we will adopt a more standard MFG formalism. First of all note the identity of an agent has a one-to-one correspondance with the sum of the two Poisson processes and containing all the arrivals arrivals. When at time a th agent enters the game, it can be a selling agent (in this case ) or a buying agent (in this case ); in any case .
A selling agent can control its cost setting (in such a case he will stay in the queue) or (in such a case he will consume the other queue). For a buying agent, the control is .
The decision is taken to minimize his cost function:
on the one hand the selling agent knows the immediate price if he consumes liquidity on the bid queue (it is , defined by equality (10));
on the other hand, by construction the expected value to wait in the queue is .
Like in the one queue toy model (equation (2)), his optimal control is hence chosen to maximize the selling price:
A MFG formalization: 2. Definition of the cost function.
The dynamics associated with this matching mechanism can be written:
for the size of the ask queue (it is equivalent to equation (3) of the one queue toy model):
where is the identity of the selling agent taking a decision at (i.e. ) and is the identity of the buying agent taking a decision at (i.e. ).
and for the running cost function at the ask (similarly to equation (4) of the one queue toy model):
The index underlines the agents interacting with the cost function associated to wait on the ask side are the buying ones, and the index underlines the agents taking decision using this cost function to choose their control are sellers.
Again, with large enough, given .
A MFG formalization: 3. Expression of the mean field.
In this case the mean field is two dimensional. It it made of the sizes of the two queues . One can note the identity of the agents and has no importance in equations (14) and (3.2), all the dynamics are summarized by .
Thanks to this remark we can write the forward dynamics of the mean field
in which we can plug the solution of the optimal control choices
Again, thanks to the mean field the indices and are no more needed. To be able to make the optimal choice, the agents have to solve the dynamics of the value function
where and are now defined without any reference to the identity of the agent or ; definition (3.2) now becomes:
and is naturally defined a similar way.
The last step of the mean field game formalisation for our MFG orderbook is developed in the next section.
Remark about the matching process.
Before this last step, note that
the matching process is close to a pro-rata one Field and Large (2008): in case of a liquidity consuming buy order of size to be matched, all market participants having a quantity resting in the ask queue will obtain a transaction for a fraction of its order at price , the remaining quantity staying in the orderbook.
At a first glance one may think that this matching process will induce intricate terms in the equations, but in fact it will not since we only consider utilities by units of good transactions.
The orderbook shape is assumed to be linear (in the price), meaning that if a newcomer decide to provide liquidity to the market, her order will be split proportionally to the liquidity already present in the book: the orderbook will remain linear in price with a higher slope.
Hence when a Liquidity Consumer order occurs, it will partially fill all Liquidity Provider orders according to a proportional rule.
4 The PFP (Price Formation Process) dynamics
4.1 Stationary equilibrium as a fixed point of the value function: introducing the equations
The fourth step of the MFG formalisation of our mean field game orderbook allows us to characterize an equilibrium via recursive equations of the expected value of future payoffs (value functions).
Symmetrically, we have :
Remind that and are functionals of and and also implicitly depends on and . Of course the previous principles hold for , which is always the case thanks to conditions (13). In the equations above, and are positive constants modeling the cost to maintain inventory per unit, that is the cost of never being processed once waiting in the queue.
4.2 Symmetric case
In the case where , and , we have the following results.
For the sake of simplicity we will often use new notations for the queue size variables: and stand for and .
This simple symmetry result is useful to get a necessary condition for the solution.
4.3 Continuous approximation
In this paragraph we formally derive differential equations corresponding to the PFP dynamic discrete equations (20-21) as presented in the previous section. Hopefully, this will lead us to get easily some qualitative insights on the solutions and .
To do so, we write the Taylor expansion of order 1 at the point in system (20-21). After a quick computation, we get the following system of Partial Differential Equations (PDEs). Note that for the sake of simplicity we shorten the notations as follows: becomes , becomes , becomes and becomes .
Recall that are estimated at and depends upon , resp. depends upon . Consequently, and are the coupling terms in the PDE system (Ask)-(Bid).
The system has to be understood locally in the four regions
Now we can write the general form of the first order system of coupled PDEs.
where , have some good symmetry properties to be described later on.
The MFG framework.
The model is of course a Mean Field Game. As mentioned in section 2, there are continuous entries and exits of players (modeled with Poisson processes). Therefore the basis assumptions are fulfilled: continuum of atomized and anonymous players.
Comparing equations (22)-(23) and (1), it is easy to notice that the equilibrium equations have the same form as the monotone system characterizing some MFG equilibria.
Second order terms.
We kept only the first order terms in the equations. The second order terms to be added to the equations are:
5 Equilibrium analysis
5.1 Change of variables
From now on we focus on the symmetric case where and . First it is convenient to notice that in this important case, we have the following property:
We will see later that this property allows to solve the problem thanks to the characteristics method.
There is a very welcome change of variables that we will use throughout this section. We define
Then the (Ask)-(Bid) system reads
Assume that system (25) admits a unique solution , then it is antisymmetric, that is:
The general form of the system (25) is as follows:
5.2 First Order Analysis
Here we explore formally some aspects of the first order approximation to the solution.
The key point of the analysis is that in the two equations of system (25), the derivative terms are the same, so that we conclude that the characteristics satisfy
Note that the reasoning of this paragraph holds on the region below the diagonal, but can be trivially extended to the whole domain by symmetry arguments.
We heuristically suppose that for a given , and along the characteristic line , there is a first point where the sellers become Liquidity Consumer, that is is a point at the boundary of the regions and .
Then there is a second point , with and where the buyers become Liquidity Consumer, that is is a point at the boundary of the regions and .
First recall that: