Incorporating signals into optimal trading

We incorporate a Markovian signal in the optimal trading framework which was initially proposed by Gatheral et al. (Math. Finance 22:445–474, 2012) and provide results on the existence and uniqueness of an optimal trading strategy. Moreover, we derive an explicit singular optimal strategy for the special case of an Ornstein–Uhlenbeck signal and an exponentially decaying transient market impact. The combination of a mean-reverting signal along with a market impact decay is of special interest, since they affect the short term price variations in opposite directions. Later, we show that in the asymptotic limit where the transient market impact becomes instantaneous, the optimal strategy becomes continuous. This result is compatible with the optimal trading framework which was proposed by Cartea and Jaimungal (Appl. Math. Finance 20:512–547, 2013). In order to support our models, we analyse nine months of tick-by-tick data on 13 European stocks from the NASDAQ OMX exchange. We show that order book imbalance is a predictor of the future price move and has some mean-reverting properties. From this data, we show that market participants, especially high-frequency traders, use this signal in their trading strategies.


Introduction
The financial crisis of 2008/2009 raised concerns about the inventories kept by intermediaries. Regulators and policy makers took advantage of two main regulatory changes (Reg NMS in the US and MiFID in Europe) which were followed by the creation of worldwide trade repositories. They also enforced more transparency on the transactions and hence on market participants' positions, which pushed the trading processes towards electronic platforms [30,Introduction]. Simultaneously, consumers and producers of financial products asked for less complexity and more transparency.
This tremendous pressure on the business habits of the financial system shifted it from a customised and high margins industry, in which intermediaries could keep large (and potentially risky) inventories, to a mass market industry where logistics have a central role. As a result, investment banks nowadays unwind their risks as fast as possible. In the context of small margins and high velocity of position changes, trading costs are of paramount importance. A major factor of the trading costs is the market impact: the faster the trading rate, the more the buying or selling pressure will move the price in a detrimental way.
Academic efforts to reduce the transaction costs of large trades started with the seminal papers of Almgren and Chriss [6] and Bertsimas and Lo [11]. Both models deal with the trading process of one large market participant (for instance, an asset manager or a bank) who would like to buy or sell a large amount of shares or contracts during a specified duration. The cost minimisation problem turned out to be quite involved, due to multiple constraints on the trading strategies. On the one hand, the market impact (see [8] and references therein) demands to trade slowly, or at least at a pace which takes into account the available liquidity. On the other hand, traders have an incentive to trade rapidly, because they do not want to carry the risk of an adverse price move far away from their decision price.
The importance of optimal trading in the industry generated a lot of variations for the initial mean-variance minimisation of the trading costs (see [17,Chaps. 6 and 7], [25,Chap. 2.3] and [30,Chap. 3] for details). In this paper, we consider the meanvariance minimisation problem in the context of stochastic control (see e.g. [29,12]). In this approach, some more realistic control variables which are related to order book dynamics and specific stochastic processes for the underlying price can be used (see [26,32] for related work).
In this paper, we address the question of how to incorporate signals, which are predicting short term price moves, into optimal trading problems. Usually optimal execution problems focus on the tradeoff between market impact and market risk. However, in practice many traders and trading algorithms use short term price predictors. Most of such documented predictors relate to order book dynamics (see e.g. [18] and [16]). They can be divided into two categories: signals which are based on liquidity consuming flows [16], and signals that measure the imbalance of the current liquidity. In [31], an example of how to use liquidity imbalance signals within a very short trading tactic was studied. These two types of signals are closely related, since within short terms, price moves are driven by matching of liquidity supply and demand (i.e., current offers and consuming flows).
As mentioned earlier, one of the major influencers on transaction costs is the market impact. Empirical studies have shown that the influence of the market impact is transient, that is, it decays within a short time period after each trade (see [8] and references therein). In this paper, we focus on two frameworks which take into account different types of market impact: -Gatheral, Schied and Slynko (GSS) framework [24], in which the market impact is transient and strategies have a fuel constraint, i.e., orders are finished before a given date T ; -Cartea and Jaimungal (CJ) framework [13], where the market impact is instantaneous and the fuel constraint on the strategies is replaced by a smooth terminal penalisation.
Note that [24] is not the only framework with market impact decay. This kind of dynamics was originally introduced in [33] and reused in [2] as well as in some other papers. We decided to focus on these two frameworks since they are extensively used in the financial literature. The model and analysis which are developed in this paper could be applied also to other optimal trading frameworks.
The main theoretical result of this work deals with the addition of a Markovian signal into the optimal trading problem which was studied in [24]. We argue in Sect. 2.1 that this is modelled mathematically by adding a Markovian drift to the martingale price process. We formulate a cost functional which consists of the trading costs and the risk of holding inventory at each given time. Then we prove that there exists at most one optimal strategy that minimises this cost functional. The optimal strategy is formulated as a solution to an integral equation. We then derive explicitly the optimal strategy for the special case where the signal is an Ornstein-Uhlenbeck process. From the mathematical point of view, this is the first time that a non-martingale price process is incorporated into an optimal liquidation problem with a decaying market impact. Therefore the results of Theorems 2.3 and 2.4 extend [24, Proposition 2.9 and Theorem 2.11], respectively. Later we show that in the asymptotic regime where the transient market impact becomes instantaneous, the singular optimal strategies which were derived in the GSS framework become continuous. Moreover, we show that the asymptotics of the optimal strategy in the GSS framework coincide with the optimal strategy which is obtained in the CJ framework (see Remark 2.8 and Sect. 3). This benchmark between different trading frameworks provides researchers and practitioners a wider overview when they are facing realistic trading problems.
The use of predictive signals in optimal trading in the context described above is relatively new (see [16]). To the best of our knowledge, this is the first time that a Markovian signal and a transient market impact are confronted. The GSS framework already includes a transient market impact, without using signals. The CJ framework includes only a bounded Markovian signal and not a decaying market impact. Moreover, our results on optimal trading in the GSS framework incorporate a risk aversion term into the cost functional, which was not taken into account in the results of [24].
The main contribution of this work is in providing a new framework for optimal trading, which is an extension of the classical frameworks of [13] and [24], among others. The motivation to use this framework arises from market needs as our data analysis in Sect. 4 suggests. From a theoretical point of view, these models of trading with signals provide some new mathematical challenges. We describe in short two of these challenges.
The optimal strategies that we derive in Theorem 2.4 and Corollary 2.7 (i.e., in the GSS framework) are deterministic, and they use only information on the signal at time 0. One of the challenging questions which remains open is how to optimise the trading costs over strategies which are adapted to the signal's filtration (see Remark 2.9).
An interesting phenomenon which arises from our results is that the optimal strategies may be not monotonic once we take into account trading signals (see Fig. 1). This implies that price manipulations triggered by trading strategies are possible. Another challenge is to establish conditions on the market impact kernel function and on the signal that prevent price manipulations (see Remark 2.10).
Another contribution of this paper is a statistical analysis of the imbalance signal and its use in actual trading, which we present in Sect. 4. In order to validate our assumptions and theoretical results, we use nine months of real data from Nordic European equity markets (the NASDAQ OMX exchange) to demonstrate the existence of a liquidity-driven signal. We focus the analysis on 13 stocks, accounting for more than 9 billions of transactions. We also show that practitioners are conditioning, at least partly, their trading rate on this signal. Up to 2014, this exchange provided with each transaction the identity of the buyer and the seller. This database was already used for some academic studies; hence the reader can refer to [38,Sect. 2] for more details. We added to these labelled trades a database of Capital Fund Management (CFM) that contains information on the state of the order book just before each transaction. Thanks to this hybrid database, we were able to compute the imbalance of the liquidity just before decisions are taken by participants (i.e., sending market orders which consume liquidity).
We divide most members of the NASDAQ OMX into four classes: global investment banks, institutional brokers, high-frequency market makers and high-frequency proprietary traders (the classification is detailed in the Appendix). Then we compute the average value of the imbalance just before each type of participant takes a decision (see Fig. 4). The conclusion is that some participants condition their trading rate on the liquidity imbalance. Moreover, we provide a few graphs that demonstrate a positive correlation between the state of the imbalance and the future price move. These graphs also provide evidence for the mean-reverting nature of the imbalance signal (see Figs. 5-7). In Fig. 9, we present the estimated trading speed of market participants as a function of the average value of the imbalance, within a medium time scale of 10 minutes. The exhibited relation between the trading rate and the signal in this graph is compatible with our theoretical findings. This paper is structured as follows. In Sect. 2, we introduce a model with market impact decay, a Markovian signal and strategies with a fuel constraint (i.e., in the GSS framework). We provide general existence and uniqueness theorems, and then give an explicit solution for the case of an Ornstein-Uhlenbeck signal. The addition of a signal to the market impact decay is the central ingredient of this section. In Sect. 3, we compare our results from Sect. 2 to the corresponding results in the CJ framework. We show that the optimal strategy in the GSS framework coincides with the optimal strategy in the CJ framework in the asymptotic limit where the transient market impact becomes instantaneous and the signal is an Ornstein-Uhlenbeck pro-cess. In Sect. 4, we provide empirical evidence for the predictability of the imbalance signal and its use by different types of market participants. We also perform a statistical analysis which supports our focus on an Ornstein-Uhlenbeck signal in the example which is given in Sect. 2. The last section is dedicated to the proofs of the main results.

Model setup and definition of the cost functional
In this section, we define a model which incorporates a Markovian signal into the GSS optimal trading framework. Definitions and results from [24] are used throughout this section.
We consider a probability space ( , F, (F t ), P) satisfying the usual conditions, where F 0 is trivial. Let M = (M t ) t≥0 be a right-continuous martingale and I = (I t ) t≥0 a homogeneous càdlàg Markov process, independent from M, and satisfying Here E ι represents the expectation conditional on I 0 = ι. In our model, I represents a signal that is observed by the trader. We assume that the asset price process P , which is unaffected by trading transactions, is given by dP t = I t dt + dM t , t≥ 0; hence the signal interacts with the price through the drift term. This setting allows us to consider a large class of signals. The visible asset price, which is described later, also depends on the market impact that is created by the trader's transactions. Let [0, T ] be a finite time interval and x > 0 the initial inventory of the trader. Let X t be the amount of inventory held by the trader at time t. We say that X is an admissible strategy if it satisfies (i) t → X t is left-continuous and adapted; (ii) t → X t has P-a.s. bounded total variation; (iii) X 0 = x and X t = 0 P-a.s. for all t > T .
In what follows, we often consider integration, with respect to an admissible strategy X, as an integration with respect to the measure dX t which is supported on [0, T ].
As in [24,20,19], we assume that the visible price S = (S t ) t≥0 is affected by a transient market impact and is given by where the decay kernel G : (0, ∞) → [0, ∞) is a measurable function such that We interpret the integral in (2.1) as a Lebesgue-Stieltjes integral.
Next we derive the transaction costs which are associated with the execution of a strategy X. Note that if X t is continuous in t, then the trading costs that arise by an infinitesimal order dX t are S t dX t . When X t has a jump of size X t at t, the price moves from S t to S t+ = S t + G(0) X t , and the costs associated with the trade X t are given by (see [24,Sect. 2]) It follows that the trading costs which arise from the strategy X are given by where the summation is performed over all the jumps of X in [0, T ]. From [24, Lemma 2.3], we get a more convenient expression for the expected trading costs, namely We are interested in adding a risk aversion term to our cost functional. A natural candidate is T 0 X 2 t dt, which is considered as a measure for the risk associated with holding a position X t at time t; see [4,22,37] and the discussion in [35,Sect. 1.2]. Hence our cost functional which is the sum of the expected trading costs and the risk aversion term has the form, dropping the fixed term −P 0 x, The main goal of this work is to minimise the cost functional (2.3) over the class of admissible strategies. Before we discuss our main results in this framework, we introduce the following class of kernels. We say that a continuous and bounded G is strictly positive definite if for every admissible strategy X, we have

Results for a Markovian signal
In this section, we introduce our results on the existence and uniqueness of an optimal strategy when the signal is a càdlàg Markov process. As in [24, Sect. 2], we restrict our discussion to deterministic strategies. The minimisation of the cost functional over signal-adaptive random strategies is discussed in Remark 2.9.
We consider the class of strategies Note that for any X in (x), the cost functional (2.3) has the form In our first main result, we prove that there exists at most one strategy which minimises the cost functional (2.5).

Theorem 2.3
Assume that G ∈ G. Then there exists at most one minimiser to the cost functional (2.5) in the class (x) of admissible strategies.
In our next result, we give a characterisation for the minimiser of the cost functional (2.5).
A few remarks are in order. Remark 2. 6 Dang [20] studied the case where the risk aversion term in (2.3) is nonzero, but again I = 0. In [20,Sect. 4.2], a necessary condition for the existence of an optimal strategy is given when the admissible strategies are deterministic and absolutely continuous. Our condition in (2.6) coincides with Dang's result in that case. Note, however, that the question whether the condition in [20] is also sufficient and the uniqueness of the optimal strategy remained open even in the special case I = 0.

Result for an Ornstein-Uhlenbeck signal
As mentioned in the introduction, special attention is given to the case where the signal I is an Ornstein-Uhlenbeck process, where W is a standard Brownian motion and γ > 0, σ > 0 are constants. In the following corollary, we derive an explicit formula for the optimal strategy in the case of zero risk aversion and when G has an exponential decay. This generalises the result of Obizhaeva and Wang [33] who solved this control problem when there is no signal.
to the cost functional (2.5), which is given by Note that 1 − b 0 (T +) = 0 and b i (T +) = 0 for i = 1, 2, 3; moreover, the optimal strategy is linear in both x and ι.
In Fig. 1, we present some examples of the optimal strategy with the parameters γ = 0.9, κ = 0.1, T = 10, x = 10. These particular values are compatible with the empirical parameters which are estimated at the end of Sect. 4.2. Arbitrary initial values (−0.5, 0 and +0.5) are taken for the signal ι. The special case where ι = 0 gives results similar to Obizhaeva and Wang [33]. The parameter ρ, which controls the market impact decay, cannot be estimated from the data that we have; hence we take two arbitrary but realistic values (1.0 and 2.5). We observe that for large values We demonstrate different scenarios for selling 10 shares: without a signal, with a positive signal, and with a negative signal. We distinguish between a slow decay of the market impact (solid lines) and a fast decay (dashed lines). In the top graph, we show the remaining inventory; in the bottom graph, the trading speed (for 0 < t < 10) is presented of ρ, the initial jump in the optimal trading strategy is larger than the corresponding jump in the small ρ strategies, but the trading speed tends to have less variation. We particularly notice that when the initial signal is in the opposite direction to the trading (ι > 0 for a sell order), the trading starts with purchases as expected, and afterwards the trading speed eventually becomes negative. On the other hand, when the initial signal is in the same direction as the trading, it is optimal to start selling immediately, and most of the inventory is sold before T /2.
In the following remarks, we discuss the result of Corollary 2.7.
Remark 2.8 Note that in the limit where ρ → ∞, the market impact term in (2.5), formally corresponds to the costs arising from an instantaneous market impact, that is, G(dt) = κδ 0 (dt), where δ 0 is Dirac's delta measure. We briefly discuss the asymptotics of the optimal strategy X * = X * (ρ) in (2.8) when ρ → ∞. It is easy to verify that in the limit, the jumps of X * vanish (see A and D in (5.11) for the explicit expression of the jumps), and the limiting optimal strategy X * (∞) is a smooth function which is given by Motivated by these asymptotic results, we further explore in the next section absolutely continuous strategies which minimise the trading costs/risk aversion functional. We assume there that the market impact is instantaneous, that is, G(dt) = κδ 0 (dt), and drop the fuel constraint (X t = 0 for t > T ) from the admissible strategies. Then explicit formulas for the optimal strategy are derived when the risk aversion term is nonzero.
Remark 2.9 (An adaptive version of (2.8)) Equation (2.8) gives an optimal strategy for a trader with inventory X 0 = x at t = 0, who is observing the initial value of the signal ι = I 0 and wishes to minimise (2.5) for an exponentially decaying kernel and φ = 0. The cost functional is therefore given by . In this setting, once the trading has started, it is no longer possible to update the strategy by taking into account new information, i.e., new values of the signal. This can be compared to simpler frameworks like the one of Sect. 3, in which the optimal strategy is updated for any 0 ≤ t ≤ T . We therefore add a short discussion on an adaptive framework for (2.8).
A natural way to update the optimal strategy at any time t is to define the process (X s ) t≤s≤T as the optimal strategy of the cost functional Note, however, that This implies that ifX is used in place of X * for some τ ∈ (t, T ), the trader will have an (F t )-adapted control, but it will not necessarily be consistent with X * which minimises U([0, T ]). Therefore, in practice, one can choose between the following options: -the optimal strategy X * , limited to the information on the signal at t = 0; -an approximate strategyX updated at each time t ∈ (0, T ), which takes into account the whole trajectory of (I t ); -the optimal strategy which corresponds to a market impact without a decay (as shown in Sect. 3).
The question which of these strategies gives the best results remains open. Note that in the cost functional U , the time-inconsistency is a result of the transient market impact term. In [36], time-inconsistent optimal liquidation problems were also studied. However, the inconsistency of the problems in [36] arises from the risk aversion term.  [24] implies that transaction-triggered price manipulations are impossible for the cost functional in (2.6), over the class of admissible strategies, in the case where I ≡ 0 and φ = 0. However, Fig. 1 shows that adding signals to the same market impact model can create optimal strategies which are not monotonically decreasing, and therefore implies a possible price manipulation. It would be very interesting to investigate the conditions on the market impact kernel and the trading signals which ensure that there are no price manipulations. A study of the possible implications of these price manipulations for other market participants is also of major importance.

Optimal strategy for temporary market impact
In this section, we study an optimal trading problem that has some common features with the problem introduced in Sect. 2.1. We consider again a price process which incorporates a Markovian signal. The main change in this section is that the market impact in (2.1) is temporary, i.e., the kernel is given by G(dt) = κδ 0 (dt), where δ 0 is Dirac's delta measure and κ > 0 is a constant. Note that this type of kernel is not included in the class G of kernels introduced in (2.1). The main goal of this section is to show how to incorporate trading signals in the CJ framework [13]. The results we obtain could be compared to the results of Sect. 2 (see Remark 2.8). Recall that we heuristically obtained the optimal strategy when the kernel G = G ρ 'converges' to Dirac's delta measure as ρ → ∞.
We continue to assume that I is a càdlàg Markov process as in the beginning of Sect. 2, but we add the assumption that for some constant C(T ) > 0. For the sake of simplicity, we assume that M = σ P W so that where (W t ) t≥0 is a Brownian motion and σ P > 0 is a constant. In the following example, the fuel constraint on the admissible strategies is replaced with a terminal penalty function. This allows us to consider absolutely continuous strategies as in the framework of Cartea and Jaimungal (see e.g. [14,15,16]). We introduce some additional definitions and notations which are relevant to this setting.
Let V denote the class of progressively measurable control processes r = (r t ) t≥0 for which T 0 |r t |dt < ∞ P -a.s. For any x ≥ 0, we define Here X r t is the amount of inventory held by the trader at time t. We often suppress the dependence of X on r to ease the notation. The price process, which is affected by the linear instantaneous market impact, is given by For the sake of consistency with earlier work of Cartea and Jaimungal in [14,15,16], we define the liquidation problem as a maximisation of the difference between the cash and the risk aversion. As mentioned earlier, the fuel constraint on the admissible strategies is replaced by a penalty function, which is given by X T (P T − X T ), where > 0 is a constant. The cost functional is given by where φ ≥ 0 is a constant and E t,ι,c,x,p represents the expectation conditioned on Note that this control problem could be easily transformed to a minimisation of the trading costs and risk aversion as in Sect. 2. Let L I be the generator of the process I . Then the corresponding HJB equation is with the terminal condition Let E t,ι represent the expectation conditional on I t = ι. In the following result, we derive a solution to (3.4). The proof of Proposition 3.1 follows the same lines as the proof of [16,Proposition 1].
Then there exists a solution to (3.4), which is given by and the constants ζ and β are given by In the following result, we prove that the solution to (3.4) is indeed an optimal control to (3.3). Proposition 3.2 Assume that = √ κφ. Then: (a) (3.5) maximises the cost functional in (3.3). The optimal trading speed r * is given by (b) Assume further that I follows an Ornstein-Uhlenbeck process as in (2.7). Then the optimal trading speed r * is given by The proofs of Propositions 3.1 and 3.2 are given in Sect. 5.2.
In the following remarks, we compare the results of Sects. 2 and 3.

Remark 3.3
If we set the risk aversion and penalty coefficients φ, in (3.3) to 0, then from the proof of Proposition 3.1, it follows that v 2 ≡ 0. Under the same assumptions on the signal as in Proposition 3.2 (b), the optimal strategy is given by which is consistent with X * t (∞) from Remark 2.8.

Remark 3.4
One can heuristically impose a 'fuel constraint' on the optimal strategy in Proposition 3.2 (b) by using the asymptotics of r * t when → ∞. In this case, ζ → 1 and the limiting optimal speed which we denote by r f t is Remark 3.5 It is important to notice that (2.8) gives the optimal strategy on the time horizon [0, T ] in the GSS framework by using only information on the OU signal at t = 0. On the other hand, (3.6), which is the optimal trading speed r t in the CJ framework, is using the information on the signal at time t. A crucial point here is that if one tries to solve repeatedly the control problem in the GSS framework on time intervals [t, T ] for any t > 0, by using I t and S t as an input, the optimal strategy will not necessarily minimise the cost functional ( (see Remark 2.9 for more details). Note that this phenomenon does not occur in the instantaneous market impact case (i.e., in the CJ framework).
In Fig. 2, we simulate the optimal inventory X * which corresponds to the optimal trading speed r * from Proposition 3.2 (b). In the black solid line, we present the optimal inventory in the case where there is no signal. In this case, the optimal strategy is deterministic. The red region in Fig. 2 is a 'heat map' of 1000 realisations of the optimal inventory X * . The parameters of the signal (2.7) are γ = 0.1, σ = 0.1 and I 0 = 0. We also set T = 10, κ = 0.5, φ = 0.1, X 0 = 10 and = 10 in the cost functional (3.3). We observe that the random strategies are a perturbation of the classical deterministic optimal strategy. In Fig. 3, we present the value function (3.5) at t = 0 under the same assumptions as in Fig. 2, that is, assuming that I is an OU process and that the model parameters are similar. More precisely, we plot V (0, ι, c, x, p) − (c − xp); hence we omit constants which do not contribute to the behaviour of the model. We observe that the revenue which corresponds to the optimal sell strategy r * is affected by the direction and value ι of the signal. The revenue of a sell strategy when the signal is positive, which indicates a potential price increase, is higher than with negative signal scenarios. Fig. 2 Simulation of the optimal inventory X * which corresponds to the trading speed r * from Proposition 3.2 (b). In the black curve, we present the optimal inventory in the absence of a signal. The red region is a plot of 1000 trajectories of the optimal inventory X * . The parameters of the model are γ = 0.1, σ = 0.1, I 0 = 0, T = 10, κ = 0.5, φ = 0.1, X 0 = 10 and = 10

Evidence for the use of signals in trading
In this section, we analyse financial data which is related to the limit order book imbalance. The data analysis in this section is directed to support the models which were introduced in Sects. 2 and 3. In Sect. 4.1, we describe our data base and provide empirical evidence for the use of the imbalance signal, which is a liquidity-driven signal. In Sect. 4.2, we study the statistical properties of the signal and motivate our model from Sect. 2.3 of an Ornstein-Uhlenbeck signal. Finally, in Sect. 4.3, we study the use of this signal during liquidation by different market participants. Note that in Sects. 2 and 3, we also discussed more general signals which are not necessarily liquidity-driven.
Before we start with the detailed analysis of the limit order book imbalance signal, we survey some related work on other processes which are known to affect asset prices and have mean-reverting properties. Each of these processes may serve as a signal in the optimal trading framework of Sect. 2.3. We mention these specific examples as they demonstrate predictive signals which are affective at different time scales.
The order flow imbalance has been extensively studied in the literature (see e.g. [18] and references therein). The correlation between the current order flow and the future price move in 10 seconds intervals was studied by Cont et al. in [18]. The mean-reverting properties of the order flow were studied by Bechler and Ludkovski in [9] (see also [10]).
Pairs-trading refers to the case where two assets Q and P are in the same industry or have similar characteristics. In this case, one expects the returns of these two assets to track each other (see e.g. [7, Sect. 1]). Let S Q and S P be the price processes of the assets. Then the difference between the weighted returns of P and Q, dJ t := dS P t /S P t − βdS Q t /S Q t , for a certain constant β > 0, can be approximated in many cases by a stationary mean-reverting process. Hence a trader who wants to liquidate a large amount of asset P , for example, may consider J t as a trading signal. The typical mean-reversion time of such signals may vary between half a day to a month (see [7, Fig. 8]). More examples of trading signals which are used in optimal execution can be found in a presentation by Robert Almgren [5]. In Sect. 4.3, we show that the LOB imbalance signal affects the trading speed of high-frequency proprietary traders in the following 10 minutes time interval.

The database: NASDAQ OMX trades
The database which is used in this section is made of transactions on the NASDAQ OMX exchange. This exchange used to publish the identity of the buyer and seller of each transaction until 2014. To obtain order book data, we use recordings made by Capital Fund Management (CFM) on the same exchange, which were matched with NASDAQ OMX trades thanks to the timestamp, quantity and price of each trade. On a typical month, the accuracy of such matchings is more than 97% (see Table 2).
The NASDAQ OMX trades were already used for academic studies (see [38] and [31] for details). We study 13 stocks traded on NASDAQ OMX Stockholm from January 2013 to September 2013. The purpose of this section is not to conduct an extensive econometric study on this database; such work deserves a paper of its own. Our goal here is to show qualitative evidence for the existence of the order book imbalance signal and to study how market participants' decisions depend on its value. The 13 stocks which are used in this section have been selected for this research since high-frequency proprietary traders took part in at least 100'000 trades on each of them during the studied period. More details on the classification of the traders into different classes are given later in this section. Table 1 shows descriptive statistics on the considered stocks in the database. Stocks are ranked by the average daily traded value (in units of 10 6 of the local currency, the Swedish krona), which can be considered as an indicator of liquidity. We also included in Table 1 the average price during the study period, since European exchanges apply dynamic tick size schedules: the lower the average stock price, the lower is the tick size (see [30, Chap. 1, Sect. 3]). The minimum tick size is the smallest tick size which was applied to the stock price during our study period. If the price changes are large enough, different tick sizes could have been applied during the study period; therefore we also added the yearly estimated Garman and Klass (GK) volatility to the table (see [23]). Last but not least, the average bid-ask spread has to be compared with the tick size: for all these stocks, the bid-ask spread lies between one and two ticks. All these stocks are therefore liquid and large-tick stocks. The NASDAQ OMX database contains the identity of the buyer and the seller from the viewpoint of the exchange, that is, the members of the exchange who made the transactions. Asset managers, for example, are not direct members of the exchange. On the other hand, brokers, banks and some other specific market participants are members. We classify the market members into four types (for more details, see Appendix A.1, Tables 5-7): -global investment banks (GIB); -institutional brokers (IB); -high-frequency market makers (HFMM); -high-frequency proprietary traders (HFPT). Table 2 gives some plain statistics about the number of trades on each stock of our database involving these types of participants. Keep in mind that the database covers 180 trading days. It can be read in the last line that on average, global investment banks are involved in 58% of the trades while high-frequency traders are involved in 32% of them; the remaining 10% involve institutional brokers. The percentage of identified participants is on average 78%, that is, 22% of the trades took place between two participants which we could not associate with any of our four classes (GIB, IB, HFMM, HFPT). Moreover, we had to filter around 2% of the trades (see last column) because in some cases we could not match limit order book records with the observed transactions. We expect institutional brokers to execute orders for clients without taking additional risks (i.e., act as 'pure agency brokers'). Such brokers often have medium-size clients and local asset managers. They do not spend a lot of resources such as technology or quantitative analysts to study the microstructure, and they do not react fast to microscopic events.
Global investment banks can take risks at least on a fraction of their order flow. Most of them already had proprietary trading desks and high-frequency trading activities in 2013 (i.e., during the recording of the data). They usually have large international clients and have the capability to react to changes in the state of the order book.
High-frequency market makers are providing liquidity on both sides of the order book. They have a very good knowledge on market microstructure. As market makers, we expect them to focus on adverse selection and not to keep large inventories. On the other hand, high-frequency proprietary traders take their own risks in order to earn money, while taking profit of their knowledge of the order book dynamics.
The data in Table 3 is compatible with our prior knowledge on the different classes of traders: -HFMM trade far more with limit orders (73%), than with market orders; -IB use more market orders than limit orders; -on average, HFPT and GIB have balanced order flows.  Moreover, high-frequency participants (HFMM and HFPT) both use market orders to consume liquidity on the weak side of the book (i.e., buying when the imbalance is on average 0.60 and selling when it is on average −0.60), and provide liquidity when the imbalance is less intense than −0.5. The later observation is compatible with HF participants who contribute to stabilise the price with their limit orders.
These numbers are only averages; in Fig. 4, we give their dispersion across our 13 stocks. It can be seen in Fig. 4 that the asymmetry between HFPT and IB is observed for all stocks (see left panel). Moreover, the left panel suggests that high-frequency participants use market orders and limit orders when the imbalance is in their favour.

The imbalance signal
The order book imbalance has been identified as one of the main drivers of liquidity dynamics. It plays an important role in order book models, and more specifically it drives the rate of insertions and cancellations of limit orders near the mid price (see [1,Chap. 10] and [28]). As an illustration of the theoretical results of this paper, we document here the imbalance signal and its use by different types of participants. This signal is computed by using the quantity Q B of the best bid and Q A of the best ask of the order book, just before the occurrence of a transaction at time τ +. Note that our 13 stocks are considered as "large-tick stocks"-except for Sandvik AB (SAND.ST) and Telia Co AB (TLSN.ST)-for which the average bid-ask spread is greater than 1.4 times the tick size. This means that the liquidity at the best bid and ask gives a substan-  Table 4 Results of linear regressions involving the imbalance. The first column is the result of a regression of the price move after 10 trades given the imbalance immediately before the first of these trades. This can also be shown in the slope of Fig. 5. The p-value is very close to zero for all stocks, meaning they are highly significant. The R 2 varies between 1% (Nokia) to 16% (Volvo AB and Nordea Bank AB). Other columns are the results of the regression of future imbalance (respectively after 3, 5, 7, 10 and 100 trades) with respect to the imbalance immediately before the first of these trades, given that the imbalance is between −0.5 and 0.5. This regression corresponds to the slopes at the center of Fig. 7 tial information on the price pressure (see [27] for details about the role of the tick size in liquidity formation). For smaller-tick stocks, several price levels need to be aggregated in order to obtain the same level of prediction for future price moves.
In order to demonstrate the predictive power of the imbalance, we consider the average mid-price move after 10 trades as a function of the current imbalance (see Figs. 5 and 6). Table 4 gives data which is associated to these curves. The column 'd price' shows the price change renormalised by the average bid-ask spread on each stock after 10 trades. This price move is on average close to 0.6 times the imbalance just before the first of these trades. Figure 7 shows the average value of the imbalance after T = 3, 5 and 7 trades as a function of its current value. The colours of the curves represent the same stocks as in Fig. 5. The decreasing slopes around Imb(t) = 0 are underlined by the columns 4-7 of Table 4. This demonstrates the mean-reverting property of the imbalance. We do not comment too much on the decreasing slopes for large imbalance values. We just mention that a strong imbalance may imply a future price change, which in turn can create a depletion of the 'weak side of the order book' (in the sense of [21]). This phenomenon may cause an inversion of the imbalance, since the queue in the second-best price level of the order book, which is now 'promoted' to be the first level, could be large. See [28] for details about queues dynamics in order books. Fig. 7 Mean-reversion of the imbalance: the average value of the imbalance after 3 (solid lines), 5 (dashed lines) and 7 (dotted lines) trades (y-axis) as a function of the current imbalance (x-axis). The colours of the lines represent the same stocks as in Fig. 5 To approximately fit Ornstein-Uhlenbeck (OU) dynamics to the imbalance data, we use 'trade time' instead of 'calendar time' (i.e., seconds) in order to compensate on different frequencies of trading for each of our 13 stocks (see columns dt in Table 9 in the Appendix). This yields a discrete version of an OU process,

Mean-reversion of the imbalance
where n is the number of future trades, γ the mean-reversion parameter and σ the standard deviation of the innovation ξ n+ n . The linear regressions on the last columns of Table 4 are following the model I n+ n = a n I n +σ n n+ n .
This leads to the estimators of γ and σ aŝ γ 1 − a n n ,σ σ n √ n . Figure 8 shows the frequencies of values ofγ for the 13 stocks over the scales n = 3, 5, 7, 100. Table 8 gives the associated values of theseγ . In Table 9, different estimates ofσ are given.
Some numerical values of the model parameters At a time scale of 35 seconds or 7 trades, γ should be taken close to 0.92 and σ close to 0.22. We also provide an estimator for the instantaneous market impact κ using the empirical average of the mid-price move 1 after a trade times the sign of the trade. Table 9 in the Appendix shows that the average value of κ divided by the average bid-ask spread is close to 0.1. We summarise the main findings of this section: (i) the imbalance can be considered as a liquidity-driven short-term signal; (ii) this signal has mean-reverting properties; (ii) market participants, especially high-frequency traders, take the imbalance into account while trading (see Table 3 and Fig. 4).

Use of signals by market participants
As previously mentioned, we expect HF proprietary traders, HF market makers and global investment banks to pay more attention to order book dynamics than institutional brokers. However, as market makers, HFMM are expected to earn money by buying and selling when the mid price does not change much (relying on the bid-ask bounce). On the other hand, HFPT are typically alternating between intensive buy and sell phases which are based on price moves. Our expectations are met in Table 3, where the average imbalance just before a trade is shown for each type of market participant. All the trades in this table are normalised as if all orders were buy orders. The imbalance is positive when its sign is in the direction of the trade, and negative if it is in an opposite direction.
We notice the following behaviour: -When the transaction is obtained via a market order, the market participant had the opportunity to observe the imbalance before consuming liquidity. -When the transaction is obtained via a limit order, fast participants have the opportunity to cancel their orders to prevent an execution and potential adverse selection. Table 3 underlines that HF participants and GIB make 'better choices' on trading according to the market imbalance. Institutional brokers seems to be the less 'imbalance aware' when they decide to trade. This could be explained either by the fact that they invest less in microstructure research, quantitative modelling and automated trading, or because they have less freedom to be opportunistic. Since they act as pure agency brokers, they do not have the choice to retain clients' orders, and this could prevent them from waiting for the best imbalance to trade.
Strategic behaviour Once we suspect that some participants take into account the imbalance in their trading decisions, we can look for a relation between the trading rate and the corresponding imbalance for each type of participant. This is motivated by the optimal trading frameworks of the previous sections, where we used the trading rate as a control.
In order to learn more about the relation between the imbalance signal and the trading speed, we compute the imbalance-conditioned trading rates R + and R − for each type of market participant, during all consecutive intervals of 10 minutes from January 2013 to September 2013 (within the trading hours, i.e., from 9:00 to 17:30). Note that in the following analysis, the signal, time and trading quantities are discrete.

Definition 4.1
The imbalance-conditioned trading rates of market participants of type P during the time interval T are given by where ε(t) is the sign of the trade at time t; -δ ε(t)sign(Imb(t)) (±1) is 1 if at time t the imbalance sign times the sign of the trade is equal to ±1, and 0 otherwise; -A t is the traded amount of the trade at time t; -δ P (t) is 1 if the trade at time t involved a participant of type P, and 0 otherwise; -δ |Imb(t)| (ι) is 1 if the absolute value of the imbalance at time t equals ι, and 0 otherwise; -N(T , P, ι) is the number of trades involving participant P in T when the imbalance equals ι.
Qualitatively, R ± have the following interpretation: -R + (T , P | ι) is an estimate of the amount traded in the direction of the imbalance when the absolute value of the imbalance is ι, by participants of type P during the time interval T ; -R − (T , P | ι) is an estimate of the amount traded in the opposite direction of the imbalance when the absolute value of the imbalance is ι, by participants of type P during the time interval T .
In order to get the imbalance-conditioned trading rates, we renormalise R ± by Note that A(T | ι) is the traded amount during the interval T given that the imbalance is ι. Then R + (T , P | ι) divided by A(T | ι) is an estimate of the probability that a  | ι) is an estimate of the probability that a stock is traded by a participant of type P during interval T in the opposite direction of the imbalance, given that the imbalance is ι. Let N T be the number of ten minutes intervals in our data base. We define which are unbiased estimators for the probability that a participant of type P trades in the direction (respectively, opposite direction) of the imbalance, given that the absolute value of the imbalance is ι. To be able to put all the stocks on the same graph, we drawr k ± (P | ι) = r k ± (P | ι)/r ± (P | 0) in Fig. 9. Herer ± (P | 0) is the average of r k ± (P | 0) over all stocks k. Figure 9 shows the variations ofr + (the relative speed of trading in the direction of the imbalance, in solid lines) andr − (the relative speed of trading in the opposite direction to the imbalance, in dashed lines) with respect to the imbalance ι before the trade, for each type of market participant and for each stock. From this graph, we observe the following: -For high-frequency market makers, the higher the imbalance in the order book, the less they trade. This effect does not seem to be related to the direction of their trades. It corresponds to an expected behaviour from market makers. -For high-frequency proprietary traders, the higher the imbalance, the more they trade in a similar direction, and the less they trade in the opposite direction. -Institutional brokers do not seem to be influenced by the imbalance. Additional data analysis shows that they trade more with limit orders when the imbalance is intense; this may drive the price to move in the opposite direction. -The behaviour of global banks seems to be influenced by the imbalance for part of the stocks in our sample.
Towards a theory of strategic use of signals The analysis in this section suggests that some market participants are using liquidity-driven signals in their trading strategies. The liquidity imbalance, computed from the best bid and ask prices of the order book for medium-and large-tick stocks, appears to be a good candidate. Moreover, its dynamics exhibit mean-reverting properties. The theory developed in Sects. 2 and 3 can be regarded as a tentative framework to model the behaviour of the following participants. Global investment banks who execute large orders seem to be a typical example for participants who adopt the type of strategies that we model. High-frequency proprietary traders who are combining slow signals (which may be considered as execution of large orders) along with fast signals could also use our framework. We could moreover hope that thanks to the availability of such frameworks, institutional brokers could optimise their trading and increase the profits for more final investors.

Proofs of Theorems 2.3, 2.4 and Corollary 2.7
The proofs of Theorems 2.3 and 2.4 use ideas from the proofs of [24, Proposition 2.9 and Theorem 2.11].
Proof of Theorem 2.3 Let x ≥ 0. For any X ∈ (x), define where Note that C(X) is the cost functional in (2.5).
Since G is strictly positive definite, we have for any X ∈ (x) that Also C 2 (·) is quadratic in X, and therefore we have Let X, Y ∈ (x). We define the cross-functionals Note that From (5.2), it follows that C 1 (X − Y ) > 0, and together with (5.4), we get Repeating the same steps, using (5.3) instead of (5.2), we get Since K(X) is linear in X, we have From (5.1), it follows that Let α ∈ (0, 1). The claim that follows from the continuity of C(αX) in α by a standard extension argument. As C(·) is strictly convex, we get that there exists at most one minimiser to C(X) in (x).
Proof of Theorem 2.4 First we prove that the condition (2.6) is necessary for optimality. Let 0 ≤ t < t 0 ≤ T and consider the round trip For all α ∈ R, we have and Let Z := X * + αY , and recall that C(Z) = C 1 (Z) + C 2 (Z) + K(Z). Using (5.5) and (5.6), we can differentiate C(Z) with respect to α and get From optimality, we have C(X * ) ≤ C(Z), and therefore we expect that Note that We get that (5.7) is equivalent to Since t and t 0 were chosen arbitrarily, this implies (2.6). Assume now that there exists X * ∈ (x) satisfying (2.6). We show that X * minimises C(·). Let X be any other strategy in (x). Define Z = X − X * . Then from (2.6), we have where we have used the fact that X([0, ∞)) = X * ([0, ∞)) = x in the last equality. From (5.5) and (5.8), we have From the linearity of K(·), we get It follows that Recall that Z 0 = 0 and Z t = 0 for every t > T ; hence integration by parts gives and since C i (Z) ≥ 0 for i = 1, 2, we get Proof of Corollary 2.7 From (2.7), it follows that E ι [I t ] = ιe −γ t . Since φ = 0, (2.6) reduces to Moreover, we have the fuel constraint From the first equation, we get B = ι ρ 2 − γ 2 2κρ 2 γ , and then The optimal strategy is therefore which is equivalent to (2.8). Optimising over r, it follows that
This implies (5.16). To prove that r * is admissible, it is enough to show that we have T 0 |r * t |dt < ∞. Since v 2 is bounded, we notice that where we used (3.2) in the last inequality. From the Gronwall inequality, we have hence r * is admissible. (b) Note that an Ornstein-Uhlenbeck process satisfies (3.1). Hence the proof follows immediately from (a).