Inventory Management in Customised Liquidity Pools

We consider customised liquidity pools (CLP), which are trading venues that offer over-the-counter brokerage and dealer services to selected market participants. The dealer activity, whereby two-sided liquidity is offered to a limited pool of clients, shares in common similarities with the market-making problem. The arrival flow of client orders is assumed random. The CLP offers a stream of two-way prices to its clients, which are functions of the amount traded by the client and the CLP holding. The concern is inventory risk, which increases for critically small or large numbers of held positions. The CLP controls its inventory by choosing the size and the skew of its spread, so to encourage, e.g., buy orders instead of sell orders. Furthermore, it can submit limit orders to standard exchanges, of which execution is uncertain, and market orders, which are expensive. In either case, the CLP risks information leakage, which is discouraged by a penalty for trading in standard exchanges. We numerically solve a double-obstacle impulse-control problem associated with the optimal management of the inventory. We observe that the CLP skews its spread before resorting to limit orders, and ultimately crosses the spread in the standard exchange. We learn that it is optimal to post limit orders deeper in the book when the inventory is relatively small and to progressively move towards the best price as the inventory increases. The CLP adjusts its pricing-hedging strategy according to its P&L target, a feature we analyse by considering various degrees of the CLP's risk appetite.


Introduction
Market makers are liquidity providers. They set bid and ask quotes and trade with impatient investors who seek to immediately buy or sell a certain quantity of a financial asset.
A portion of the market-maker's P&L derives from the spread charged to the clients. On the other hand, holding a non-zero inventory carries an intrinsic risk associated with the unpredictable changes to which an asset price is subject. This risk is further increased by a potential information asymmetry due to which a market maker trades in the wrong direction.
We consider a financial entity that offers broker-dealer services to its clients. Such an entity may be a small financial shop, an individual trading desk of large institutions, as well as large firms which provide liquidity to a selected pool of clients. Among these, we find, e.g., investment banks, hedge funds and high-frequency traders. In the industry, such financial entity is sometimes referred to as customised liquidity pool 1 (CLP). These bespoke liquidity pools share some characteristics with so-called dark pools, while additionally providing the dealer service. As such CLPs may be viewed as "grey pools", that is, a kind of hybrid between a dark pool and a 'lit' pool. A 'lit' pool is a transparent venue where prices and trading orders are publicly displayed, while dark pools are venues that do not display prices and guarantee anonymity to the selected group of customers which trade within them. CLPs typically offer two-way prices to their clients while preserving their anonymity. Clients can compare prices from various dealers through an internal graphic user interface (GUI). applications, but there is no centralised liquidity pool 2 that displays those prices, which are streamed directly to the clients in conditions of market opacity and confidentiality. CLPs thus offer for all practical purposes a market-making service, though they have no obligation to offer two-sided liquidity at any time. In the remainder of the paper, we use the terms "dealer activity" and "market making" interchangeably.
In this paper we consider the optimal management of a CLP inventory. In our situation the CLP (i) offers liquidity to its clients (who may be both, buyers and sellers) and (ii) may post limit and market orders in a standard exchange ('lit' exchange, centralised liquidity pool) to control the level of its inventory. We emphasise that the work presented here has no particular asset class in mind, since the CLP may specialise in, e.g. stocks, commodities and foreign exchange trading. When we refer to standard exchanges, we consider centralised exchange platforms, which in principle are accessible to any market participant and which follow the price-priority rule, with first-in-first-out (FIFO) applied for limit orders posted at the same price.
A good summary of the algorithmic and high-frequency trading literature is provided in the books by Cartea et al. [5] and Gueànt et al. [11]. Previous work on market making includes Amihud & Mendelson [1] who, based on Garman [10], relate the bid-ask prices to the share holding of a risk-neutral agent. They find a relationship between the optimal quotes and the distance from the "preferred" inventory position. Stoll [19] considers a twoperiod model in which a risk-averse agent supplies liquidity and maximises his expected utility. Ho & Stoll [15] use the dynamic programming principle (DPP) to obtain the optimal quotes which maximise the terminal wealth in a single-dealer market.
The recent evolution in financial markets, arisen with algorithmic and high-frequency trading, has shifted the optimal market-making problem to an order-driven market environment where optimal quotes and trading strategies are computed and submitted by electronic machines. For example Avellaneda & Stoikov [2] treat a market-making problem in a limit order book (LOB). They consider the maximisation of the agent's expected utility and consider both, the finite and the infinite-time cases. They model the arrival of buy and sell orders by Poisson processes and the dynamics of the mid-price by an arithmetic Brownian motion. They find and numerically solve the Hamilton-Jacobi-Bellman (HJB) PDE. This type of problem has been investigated elsewhere, too. The works by Cartea & Jaimungal [4] on risk metrics and by Cartea et al. [3] consider ambiguity and self-exciting processes, respectively. Guéant et al. [12] deal with the inventory risk and reduce a complex optimisation problem to a system of ODEs. Guilbaud & Pham [13] consider a market maker who continuously submits limit orders at the best quoted prices and resorts to market orders when the inventory becomes too large. They numerically solve a finite-time impulse-control problem and find the optimal order sizes and quotes to be posted in the standard exchange.
The model presented in this paper is inspired by Guilbaud & Pham [13]. In the present work we formulate a double-obstacle impulse-control problem and we use the viscosity theory to characterise the solution of the associated system of quasi variational inequalities (QVIs). We refer the reader to Crandall et al. [7], Fleming & Soner [9] and Pham [17] for a comprehensive treatment of viscosity solutions. This paper is organised as follows. After the introduction, in Section 2, we present the trading strategies of the CLP for the purpose of inventory management. In Section 3, the optimisation problem is introduced and, by making use of the DPP, we derive the HJB equation. Section 4 is devoted to a numerical example of the CLP strategies, and in Section 5 we summarise the results and research contributions of this work. All propositions, necessary to characterise the value function by the unique viscosity solution of the system of QVIs, and their proofs can be found in the appendix.
The main contributions of the present work can be summarised as follows. First, the study of the inventory management of a firm, which can hedge via limit and market order, is a novelty. Second, the model presented in this work is intuitive, suitable for calibration and the results are in line with real-world practice. Additional (though more technical) innovations include the possibility of making the CLP's prices a function of the size traded by clients. Finally, we construct a flexible setup which can be adapted to various needs, e.g. different ways of calculating revenues, presence of transaction fees, different market-spread properties, etc.

Inventory management
We consider a CLP that supplies liquidity to its clients by providing bid and ask quotes. The pool trades with buyers and sellers by being their counterparty. It executes incoming buy and sell orders by its clients over a finite period of time 0 ≤ u ≤ T < ∞ and may resort to the centralised exchange platform if its inventory becomes critically small or large. The CLP derives a profit by choosing an optimal spread at which it is willing to offer liquidity to its clients.
In particular, we assume that the CLP price is aligned with the standard exchange mid-price S u , for which we need a model. We fix a filtered probability space (Ω, , { u } 0≤u≤T , ) satisfying the usual conditions. Along the lines of Guilbaud & Pham [13], we model the LOB bid-ask half spread by a continuous-time Markov chain {k u } 0≤u≤T with a discrete state space := {k 0 , k 1 , k 2 , . . . , k n }, where k 0 < k 1 < k 2 < · · · < k n are set so to reflect the granularity of the standard-exchange prices. In particular, we let k j −k j−1 =k, which means that the LOB prices are at least 2k units apart. The chain is generated by and [k u+du = k i |k u = k i ] = 1 + r ii du + o(du), with r i j ≥ 0 for all j = i and r ii = − j =i r i j .
Such a choice has interesting financial justifications. Because the spread is a measure of the market liquidity, lower states in (e.g. k 0 ) may be associated with periods of higher liquidity compared to higher states (e.g. k n ). Also, by correctly choosing the transition probabilities, one can postulate the existence of a "normal" level of the spread-for each particular class of assets-from which deviations are unlikely to happen. Furthermore, the transition from one state to another can be associated with the submission of both, aggressive and passive orders by market participants. We remark that when we write k u , we mean the level of the spread at time u, whereas with the notation k ∈ we specify a particular state k j , for j = 0, 1, 2, . . . , n.
We define the LOB mid-price by where {M u } 0≤u≤T is a Poisson process with intensity λ m andk ± i is a collection of i.i.d. random variables valued in {−k,k}. At u ∈ [0, T ], the best LOB bid and ask prices are given by S b u = S u − k u and S a u = S u + k u , respectively. We choose such simple dynamics in Equation (2.1)-i.e. the mid price can only move half a tick almost surely-because our intention is to focus on the market-making activity of the CLP, disregarding any potential market-view it may have, or sudden price moves. At each time u ∈ [0, T ], we consider three options for the inventory management: i) the CLP's order flow may be controlled by accordingly choosing the prices offered to its clients, ii) a limit order-of which execution is uncertain-is posted to the standard exchange, or iii) a costly market order is submitted to the standard exchange.
Our goal is thus to obtain the critical levels of the inventory for which it is optimal to (i) skew the CLP prices, (ii) submit limit orders, and (iii) submit market orders. Such critical levels derive from the impulse-part of the optimisation problem presented in Section 3 and determine the hedging strategy of the CLP. In particular, if either of such levels is exceeded by the CLP's inventory, the CLP starts to post orders in the standard exchange so to reduce the magnitude of its inventory.
(i) Pricing strategy. We consider the processes δ + u , δ − u to be (i) the controls of the optimisation problem presented in Section 3 and (ii) part of the optimal strategy of the CLP (which also includes the impulse-part). We define by S u − δ − u and S u + δ + u the base prices and by δ + u + δ − u the base spread. The CLP optimally chooses such processes, from which it derives the prices offered to its clients. In fact, the actual spread paid by the client to the CLP is also a function of the client's order size, see Equation (2.3). The CLP does not bet on the future price movements, and its earnings are a function of the volume traded since it charges the spread.
In order to maintain competitiveness with respect to standard exchanges and other liquidity providers, we assume that the CLP base spread does not exceed the standard exchange spread, i.e. the market spread, under normal circumstances (i.e., acceptable inventory levels). Nonetheless, it may be wider than the 'lit'-exchange spread on the protect side (e.g. the sell side when the CLP has a negative inventory), while we assume that the aggress side (e.g. the buy side when the CLP has a positive inventory) shall not cross the mid-price level.
This last assumption is justified since crossing the mid-price provides buy-side agents with very sensitive information regarding the CLP level of inventory.
We thus suppose that δ + u , δ − u are predictable processes valued in [0,δ], where the upper bound is justified by practical considerations (N.B., an infinite spread results in an infinite price), as well as by the incentive for the CLP to maintain its quotes within a constant range.
The CLP flow of client orders can be affected by changing δ + u and δ − u . We might assume for example that the CLP has a positive inventory at time u ∈ [0, T ]. It can make trading more attractive to buyers rather than sellers, so to rebalance its inventory level. In particular, by lowering δ + u and increasing δ − u , the CLP encourages buyers to place orders while sellers are discouraged to do so.
We shall now define the evolution of the CLP's inventory and the respective variations Throughout the market-making activity (i.e., between hedging times), we define the CLP inventory process {X u } 0≤u≤T by where we include short-selling for the case sign[X u ] = −1. We model the CLP cash process . The function f allows the CLP to offer a stream of prices related to the size of the client's order. In particular the CLP offers tighter spreads for smaller sizes and wider spreads for larger sizes. The function f allows also for various ways to calculate P&L. Equations (2.2) and (2.3) are strongly coupled. For example, the arrival of a seller at time u increases the inventory X u − by q − u − and reduces the cash amount The analogous holds for the arrival of buyers. We assume that the CLP accepts clients' orders at time u (i.e., it keeps streaming dealable prices to clients) only if the inventory at u − lies within [−X ,X ], whereX > 0 so that, if either boundary is reached, the CLP may only trade in one direction. Such an assumption is supported by the following financial interpretation: the CLP is subject to regulatory constraints (e.g. internal risk-management) which make it hard to hold or short-sell an amount of positions bigger than a fixed authorised quantity.
It is realistic to assume that the CLP is risk-averse and thus, we shall assume that it can reduce its inventory by submitting orders in the 'lit' pool. Each of such orders gives an impulse to the system by modifying the inventory and cash holdings of the CLP. In what follows, we explain what actions the CLP may take and how such decisions impact the system.
The CLP can resort to the standard exchange to liquidate (respectively refill) part of its inventory; we assume that it cannot post speculative orders. This means that at time u ∈ [0, T ] a buy order can be posted only if X u < 0 while a sell order can be posted if X u > 0. We also assume that-if the boundaries are reached-the CLP may only trade in one direction.
(ii) Limit orders strategy. The CLP can post a limit order by specifying a quantity η and a limit price S ±(k +κ), where κ is the optimal distance from the best price, at which it wants to buy or sell. We only consider immediate-or-cancel orders and we model their execution percentages by a [0, 1]-valued sequence of i.i.d. random variables z i , of which cumulative distribution function heavily depends on the limit-price chosen by the CLP. In particular, if a limit order is posted at time τ i , for i = 1, 2 . . . , then it impacts the inventory and the cash processes as follows: Since the CLP cannot post speculative orders in the 'lit' pool, it must hold For example a limit buy order (η > 0), which if executed increases the inventory, can only be posted if the CLP holds a negative inventory, and vice versa. The cash process changes accordingly. We state these assumptions rigorously in the appendix. We let T be the set of stopping times not greater than T , and be the set of all admissible control actions. A limit-order strategy is a collection of stopping the price-granularity of the exchange.
(iii) Market orders strategy. Alternatively, the CLP can submit a market order, which (i) is more expensive and (ii) benefits of sure execution as it is matched with existing limit orders. A market order of size ξ i posted at a time τ m i impacts the inventory and cash processes as follows: A market-order strategy is a collection of stopping times and The level of generality in the limit-order and the market-order impulses offers the flexibility to include various features. For example, there are different methods to compute the P&L. Furthermore, one may like to account for the fees paid to the exchange for using their services and for possible liquidity rebates for limit orders.
By solving the optimisation problem presented in the next section, the CLP finds-at each time-the critical levels of inventory for which it is optimal to start hedging by means of limit and market orders.

Optimisation problem and viscosity solution
We consider the problem of maximising expected terminal cash subject to a terminal penalty for holding a non-zero inventory by the terminal date. In defining the objective function, we are led by Guilbaud & Pham [13]. We define the value function by where D := (δ + u , δ − u ) u≥t , the function U is the utility derived from the cash and inventory holdings at time T , and g is a running penalty for the risk of holding the inventory. In the summations of Equation (3.1), we include the penalties ε m and ε for submitting market and limit orders in the standard exchange, where ε m > ε l > 0. Throughout the paper we have the vector of state variables x := [x, y, s] ∈ × + =: and we let T be the set of all stopping times less than T . Equation (3.1) satisfies the DPP, see Fleming & Soner [9]. That is, for all τ ∈ T , we have This is an optimal double-obstacle impulse control problem. We define the non-local operators and , for limit and market orders respectively, by where the expectation is taken with respect to the random variable z, and We introduce the operator¯ defined bȳ where the expectations are taken with respect to the random variablesk ± , q + and q − , re- We thus consider intervention times (τ i and τ m i ) and impulses (η i and ξ i ) by which the CLP can control the evolution of the state variables X u and Y u . For this purpose, we define the continuation region (CR), the limit orders impulse region (L I) and the market orders impulse region (M I) by (3.7) The system of QVIs introduced in Equation (3.6) is highly non-linear and somewhat similar to the one studied in Guilbaud & Pham [13], although in the present model two distinct impulses can take place. Some dimension reduction is possible if the mid price is assumed to be a martingale (see e.g. Cartea & Jaimungal [4], Guilbaud & Pham [13] and Guilbaud & Pham [14]), since the optimal strategy in feedback-form will only be a function of the inventory. We make this assumption also in the numerical section that follows, while keeping the general model presented in this section at a higher degree of generality.
A possible structure of the intensities function has been extensively studied in, e.g., Cartea et al. [3]. In particular, they set λ ± δ =λe −ζδ ± , forλ, ζ > 0. The exponential decay of the intensity model describes an increasing likelihood of receiving clients' orders for lower values of the base spread charged. With such a structure, first-order conditions for optimality can be applied to Equation (3.6) to find the optimal base spread to be charged.
While keeping the model general, in the numerical example we take a slightly different approach (more similar to Guilbaud & Pham [13,14]). We assume that the CLP can only display three different types of quotes, i.e. skewed quotes (up or down) and non-skewed quotes. Thanks to this choice, we can show the time and inventory levels for which skewing is optimal, as opposed to the case of having processes valued in a closed subset of + .
In the next section we provide some explicit examples of the model and we find numerically the optimal strategy by means of the solving algorithm proposed in Guilbaud & Pham [13] and Guilbaud & Pham [14]. The existence and uniqueness of the viscosity solution (to which the numerical scheme converges) are shown in the appendix.

Numerical solutions
In this section we explore some explicit examples of the impulse-control problem presented in this work and we analyse in detail their properties. While it would be desirable to ground the analysis on CLPs' real data, we note that such sensitive information is strictly private and not shared outside firms.
Throughout this section, we assume that the mid-price is modelled by Equation (2.1) and that limit orders in the 'lit' exchange cannot be partially filled. This is not a strong assumption as long as we consider unit-sized orders posted in the standard exchange. In fact, the majority of the times, posting unit-sized orders in a 'lit' market is a means to avoid consistent price slippage. We assume that clients pay the "adjusted base spread" to the CLP, where in the latter the size of the client's order is taken into account. We thus assume that the inventory and the cash processes evolve according to where 0 < c < 1 is a pre-determined fixed constant. The convexity of the non-linear function (1 + c) q + reflects the fact that for the CLP it is more expensive to hedge a larger order due to the price slippage in the exchange. Thus, the CLP will charge more for each unit of a larger order.
Next, we introduce the possibility of submitting unit-sized market and limit orders in the standard exchange. At each time t i , the CLP checks whether it is more convenient to (i) execute trades in the CLP only, (ii) submit a market order such that where ξ i ∈ := {− {x>0} , {x<0} }, or (iii) submit a limit order such that We start by presenting a toy model in Section 4.1. Our intention is to look first at a reduced set of controls so to gain a better understanding of the behaviour of the optimal strategy that one should expect. Reducing the number of variables that play a role in the model and progressively removing the simplifying assumptions we make is, in our eyes, a good way to understand the structure of the model and the properties of the solution.

Toy model
Mathematical models designed for financial applications can sometimes be rather abstract and might have a degree of complexity that make real-world applications difficult. In the toy model that follows, we reduce the mathematical complexity of the model presented in Section 3 considerably in order to allow for a good understanding of the modelling approach we propose for the optimal inventory management in CLPs. We first lead through the basic features of the toy model and then, step by step, add structure to the toy model in parts-the CLP market-making activity, the market orders and the limit orders, respectively.
We have:  The symmetry around the zero inventory level in Figure 1 is due to the particular choice made for the arrival flow of buyers and sellers, i.e. λ + = λ − . In Figure 2 we lose such a symmetry and see a shift upwards (resp. downwards) of the optimal boundaries when the arrival intensity of sellers λ − decreases (resp. the arrival intensity of buyers λ + decreases).

Optimal CLP base spread
The model presented in Section 4.1 is limited in that, e.g., it does not allow the CLP to skew its prices to control the incoming flows of buyers and sellers. We remove this assumption here and we let the CLP choose between three possible scenarios. (i) It can choose not to skew the prices and thus to let δ + = δ − and λ + = λ − (which we call "no skew" ), (ii) it may skew the prices downward such that δ + < δ − and λ + > λ − (which we call "left" or "downward" skew), and (iii) it may skew the prices upward such that δ + > δ − and λ + < λ − (which we call "right" or "upwar" skew). The upward skew penalises buyers over sellers while the opposite holds for the downward skew. Mathematically, the above reduces to replacing assumption (a) with (a') the CLP optimally chooses the prices (δ + , δ − ) ∈ := (δ + n , δ − n ), (δ + r , δ − r ), (δ + l , δ − l ) for the no skew, the right skew and the left skew scenarios, respectively. Associated to such prices, we assume arrival intensities of the form (λ + (δ + ), λ − (δ − )) ∈ := We further relax assumption (c) and substitute it with That is, the CLP is subject to a quadratic running penalty for holding a non-zero inventory. This manifests the CLP's risk-adversity since a large inventory reduces the value function of the pool. In Cartea et al. [3] it is shown that such a choice may also be linked to both, the variance of the portfolio and the model's ambiguity.
In what follows, we indicate by λ ± (δ ± ) the dependence of the arrival flows of buyers and sellers on the prices offered by the CLP. As mentioned before, a higher price is reflected in a lower arrival of the respective side of clients (that is, The QVI now reads: As before, we numerically solve (4.7) to find the optimal CLP pricing and hedging strategy. We use an explicit finite-difference scheme to solve Equation (4.7) backward in time.
At each time step, we plug in the three alternatives (namely δ ± n , δ ± r , δ ± l ) and store the combination which maximises the value function V . Such an optimal combination depends, at each time, on the inventory level of the CLP and the time-to-maturity. We thus expect to find additional boundaries to the one obtained in Section 4.1 since we do now have different pricing options in the CLP.  In Figure 3 we see that when the inventory is relatively small, it is optimal not to skew the prices so to receive on average an equal number of buy and sell orders (here we assume that no-skewing implies equal arrival intensities of buyers and sellers, which may not be the case in particular market conditions, e.g. new information is available to a number of clients which are incentivised to trade in the same direction). If the inventory increases (resp. decreases), the CLP employs a left/downward (resp. right/upward) skew so to encourage buyers (resp. sellers). As in the toy model, there are inventory levels for which it is optimal to resort to the standard exchange. The critical inventory level at which the CLP begins placing orders in the standard exchange falls as the terminal liquidation date is approached.
We plot the optimal boundaries for the case of moderate risk aversion (right panel) and high risk aversion (right panel). We notice that the hedging activity of the CLP is highly correlated to its degree of risk aversion. Indeed, for high values ofφ, the CLP starts posting orders to the standard exchange for smaller inventory values and vice versa.

Optimal posting to a standard exchange
In the previous section we have included the option of skewing the prices that the CLP offers, but the model is still limited in that the hedging in the standard exchange by means of limit orders can only be done at the top of the book. Here we modify this assumption and we allow the CLP to also post at the second best and third best prices.
In this section we still keep the 'lit' exchange half-spread k constant. This assumption will be removed in the next and last numerical example. According to our LOB model, we defined the minimum price tick by 2k, and thus allow the CLP to post limit sell orders at prices s + k, s + k + 2k and s + k + 4k, while limit buy orders can be posted at prices s − k, s − k − 2k and s − k − 4k. According to the notation used in Equation (4.4), we modify assumption (b) and replace it with (b') the limit price at which the CLP posts in the standard exchange can be optimally chosen between κ ∈ := {0, 2k, 4k}.
By posting deeper in the book, the CLP earns a higher spread if its order gets executed, while the filling probability of such order is reduced. In fact, for a deep limit order to be executed a market order that walks the book is needed, and the latter are quite rare. To reflect the fact that the filling-probability of a limit order depends on how far from the midprice such an order is posted, we assume that  In Figure 4, the optimal strategy obtained by solving (4.8) is shown. We notice that after skewing the prices, the CLP should start submitting limit orders deep in the book and progressively moves towards the top of the book. Shortly before the end of the trading period, it should resort to market orders. Again, we show the different strategies employed by a highly risk-averse and a moderately risk-averse CLP (in the left and right panels, respectively). In Figure 5 we show the different strategies for high and low values of the terminal-penalty parameter α. When the penalty for holding a non-zero inventory at T increases, we notice that the boundaries shrink dramatically, especially towards the end.  We emphasise that if the terminal preferred inventory level were non-zero, it would produce a shift in the optimal boundaries by an equal amount.

Stochastic standard exchange spread
In the last simulation we relax assumption (d) and introduce a stochastic bid-ask spread.
We let := {1, 2}, that is the market can be in a tight-spread regime and a wide-spread regime, depending on whether there is good or poor liquidity in the market, respectively.
The generator matrix can be chosen in various ways, so to model the specific features of the market under consideration. For example, we could consider a "seasonal" pattern where transitions between regimes happen rarely and last for longer periods of time. Also, we could reproduce features similar to mean-reversion by choosing a "preferred" state and make any deviation from that state very unlikely while reversion to that state more likely. The matrices Q 1 and Q 2 are examples of seasonal and mean-reverting patterns, respectively: where r, r l ow , r hi gh > 0. In Q 1 the lower r, the rarer the transition between states happens.
In Q 2 , we choose k = 1 as the preferred state, and the higher r hi gh , compared to r low , the higher is the transition rate to state 1.
The value function satisfies now a two-dimensional system of QVIs. We consider the ansatz V (t, x, y, s; k) = y + xs + h k (t, x), where the subscript k indicates that we refer to the regime k ∈ , and the function h satisfies the following system of QVIs:   In Figures 6 and 7 we plot the optimal strategy found by solving (4.10) for the case of seasonal and mean-reverting patterns, respectively. We first note that in the case of high-spread regime in Figure 6, the CLP starts (i) earlier to submit limit orders and (ii) later to submit market orders, compared to the case of low-spread regime. The same shape is observable in Figure 7, although it is more evident since the return to the state of low-spread regime (preferred state) is highly likely. This behaviour has the following financial interpretation: when the spread is high, limit orders are more remunerative (or, better, cheaper if we also consider the penalty for posting to the standard exchange), while market orders are more expensive and thus their submission is postponed.

20
In the present work we study an optimal market-making problem faced by a CLP. The CLP earns the optimally selected spread by trading with its clients. Market participants, who consider trading via CLPs, may be of the view that it is desirable to take advantage of favourable prices offered by the CLPs and to benefit from avoiding price impact-to which they would be otherwise exposed-especially if forced to submit market orders in a 'lit' exchange.
A stream of two-way prices is offered to each client. Such prices are functions of the size traded by the client and the CLP holding. Throughout the activity the pool faces an inventory risk, which can be reduced (i) by controlling the width and the skew of the CLP spread, and (ii) by resorting to the standard exchange via both, market and limit orders.
Internal CLP transactions are preferred since it protects from information leakage. Such a feature is modelled via a fixed penalty incurred by the CLP whenever it submits an order to the 'lit' exchange.
As confirmed by the numerical results, the CLP will refrain from placing orders in a standard exchange as long as the size of the inventory is small. Whenever the optimal boundary is exceeded, the CLP resorts to the standard exchange by means of limit orders. A limit order is cheaper though its execution is uncertain. The CLP can choose the limit price; we find that the more the inventory grows, the closer to the mid-price the CLP will post. This is reasonable since the filling-intensity of limit orders depends on how far from the mid-price they are posted. If the inventory becomes critically large, market orders will be preferred instead, which are costly but benefit of sure execution. When the end of the market-making activity approaches (which, e.g., might be thought of as the end of the trading day) the market-orders region in the 'lit' exchange widens while the CLP and limit-order regions in the standard exchange diminish. In fact, the market maker will incur in a higher penalty for holding a large inventory at the terminal date. (v) U : × → satisfies Lipschitz continuity and the linear growth conditions for all x 1 , x 2 ∈ and k ∈ .
For each k ∈ , let us consider the upper and lower semi-continuous envelopes of the function V (·; k) defined by supersolution), of (3.6) if x ; k)) attains its maximum (resp. minimum) at (t,x ,k) ⊂ [t, T ) × × . Proof. We use definition 6.1 and we show that the system of functions V (t, x; k) is a viscosity solution by proving that it is both a supersolution and a subsolution.
We note that we have V (T, x ; k) = U(x ; k) on {T } × × , thus we need to prove the viscosity property only on [t, T ) × × . Results in, e.g., Ly Vath et al. [16] ensure that That is, to prove the supersolution property, it suffices to show that −g(t,x)− t ,x ,k, ∂ t φ, φ ≥ 0. We observe that if V * ≤ V * or V * ≤ V * , the subsolution property is immediately satisfied. We assume therefore that V * > V * and V * > V * ; we then need to show that −g(t,x)− t ,x ,k, ∂ t φ, φ ≤ 0. (6.11) By continuity of the mapping in (6.11), we assume on the contrary that there exists a ε 1 > 0 and an ε 2 > 0 such that −g(t,x) − t ,x ,k, ∂ t φ, φ ≥ ε 1 , for all Xt ,x (u) ∈ B ε 2 (t,x ).
We take the sequences h m → 0 and (t m , x m ) → (t,x ) valued in B ε 2 (t,x ) and we define the stopping times θ m by (6.8) with η < ε 2 and θ * m := θ m ∧ (t m + h m ) ∧ θ * ∧ τ i . By Itô's formula and the dynamic programming principle, there exists an admissible control strategy Proof. We write v and u in place of v * and u * , for simplicity. We first prove that there exists a ζ-strict supersolution, where 0 < ζ < ε l . We refer to, e.g., Seydel [18] for technical details.
Finally we take into consideration the PIDE part. We let φ ζ be the test function for v ζ . Then maximum over a compact set.