Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order...

131
Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book By Zhao Ruan A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Engineering – Industrial Engineering and Operations Research in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Xin Guo, Chair Professor Ilan Adler Professor Rhonda Righter Professor James Pitman Spring 2015

Transcript of Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order...

Page 1: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Optimal Placement and Dynamics of Order Positions with Related Queuesin the Limit Order Book

By

Zhao Ruan

A dissertation submitted in partial satisfaction of the

requirements for the degree of

Doctor of Philosophy

in

Engineering – Industrial Engineering and Operations Research

in the

Graduate Division

of the

University of California, Berkeley

Committee in charge:

Professor Xin Guo, ChairProfessor Ilan Adler

Professor Rhonda RighterProfessor James Pitman

Spring 2015

Page 2: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book
Page 3: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Abstract

Optimal Placement and Dynamics of Order Positions with Related Queuesin the Limit Order Book

by

Zhao Ruan

Doctor of Philosophy in Industrial Engineering and Operations Research

University of California, Berkeley

Professor Xin Guo, Chair

The optimal placement problem studies how to optimally place orders in alimit order book to purchase/sell a fixed number of shares of a stock. Undera correlated random walk model with mean-reversion for the best ask/bidprice, optimal placement strategies for both single-step and multi-step casesare derived in this thesis. In the single-step case, the optimal strategy involvesonly the market order, the best bid, and the second best bid. In the multi-step case, the optimal strategy is of a threshold type. Critical to the analysisis a generalized reflection principle for correlated random walks.

Furthermore, a simple linear price impact model is also presented, whichgives insight into the price impact of executing large orders on placementdecisions.

The availability of detailed limit order book information enables moreaccurate estimation of the order execution probability and price dynamics.Motivated by various optimization problems and models in algorithmic trad-ing, a limiting behavior for order positions and related best bid/ask queuesin a limit order book is studied in this thesis. In addition to the fluid anddiffusion limits for the processes, fluctuations of the order position and re-lated queues around their fluid limit are analyzed. As a corollary, explicitanalytical expressions for various quantities of interests in a limit order bookare derived.

1

Page 4: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Contents

1 Introduction 11.1 Financial markets and algorithmic trading . . . . . . . . . . . 1

1.1.1 History of financial markets . . . . . . . . . . . . . . . 11.1.2 Limit order book (LOB) . . . . . . . . . . . . . . . . . 21.1.3 High frequency trading (HFT) . . . . . . . . . . . . . . 4

1.2 Optimal execution of large transactions . . . . . . . . . . . . . 41.2.1 TWAP and VWAP strategies . . . . . . . . . . . . . . 5

1.3 Optimal placement problems and LOB dynamics modelling . . 61.3.1 Optimal placement problems . . . . . . . . . . . . . . . 61.3.2 LOB dynamics modelling . . . . . . . . . . . . . . . . . 7

1.4 Outline of the thesis . . . . . . . . . . . . . . . . . . . . . . . 8

2 Optimal placement in an LOB 92.1 Review of the optimal placement models . . . . . . . . . . . . 9

2.1.1 Hult and Kiessling’s model . . . . . . . . . . . . . . . . 92.1.2 Cont, Stoikov, and Talreja’s model . . . . . . . . . . . 14

2.2 Summary of contributions . . . . . . . . . . . . . . . . . . . . 162.3 A correlated random walk model . . . . . . . . . . . . . . . . 18

2.3.1 Probability distribution of the best ask price and run-ning minimum price . . . . . . . . . . . . . . . . . . . 19

2.4 Optimal strategy for the placement problem . . . . . . . . . . 212.4.1 Single-step trade . . . . . . . . . . . . . . . . . . . . . 212.4.2 Multi-step trade . . . . . . . . . . . . . . . . . . . . . . 25

3 A model with price impact 303.1 Review of optimal execution models . . . . . . . . . . . . . . . 30

3.1.1 Bertsimas and Lo’s model . . . . . . . . . . . . . . . . 303.1.2 Optimal execution with market orders and limit orders 34

i

Page 5: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

3.1.3 Market making problems . . . . . . . . . . . . . . . . . 353.2 A price impact model with best bid orders and market orders 38

3.2.1 Summary of contributions . . . . . . . . . . . . . . . . 383.2.2 Dynamics of the price model and analysis. . . . . . . . 38

4 Dynamics of order positions in an LOB 444.1 Review of the heavy traffic limits and the LOB modelling . . . 44

4.1.1 Heavy traffic limits . . . . . . . . . . . . . . . . . . . . 444.1.2 Kruk’s model . . . . . . . . . . . . . . . . . . . . . . . 454.1.3 Cont and de Larrard’s model . . . . . . . . . . . . . . 474.1.4 Horst and Paulsen’s model . . . . . . . . . . . . . . . . 50

4.2 Summary of contributions . . . . . . . . . . . . . . . . . . . . 534.3 Fluid limits of order positions and related queues . . . . . . . 54

4.3.1 Fluid limits for order positions and related queue lengths 554.3.2 Discussions . . . . . . . . . . . . . . . . . . . . . . . . 61

4.4 Fluctuation analysis . . . . . . . . . . . . . . . . . . . . . . . 634.4.1 Diffusion limits for the best bid and best ask queues . . 634.4.2 Applications to LOB . . . . . . . . . . . . . . . . . . . 664.4.3 Remarks and discussions . . . . . . . . . . . . . . . . . 714.4.4 Fluctuation analysis . . . . . . . . . . . . . . . . . . . 72

A Appendix 87A.1 Technical Reviews . . . . . . . . . . . . . . . . . . . . . . . . . 87

A.1.1 Markov chain and Markov decision process . . . . . . . 87A.1.2 Some basic reviews on stochastic process limits . . . . 89A.1.3 Convergence of stochastic processes by Kurtz and Prot-

ter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91A.1.4 Some large deviations results . . . . . . . . . . . . . . 92

A.2 Technical proofs . . . . . . . . . . . . . . . . . . . . . . . . . . 93A.2.1 Proof of Theorem 2.1 . . . . . . . . . . . . . . . . . . . 93A.2.2 Proof of Proposition 2.2 . . . . . . . . . . . . . . . . . 95A.2.3 Proof of Lemma 2.1 . . . . . . . . . . . . . . . . . . . . 97A.2.4 Proof of Lemma 2.3 . . . . . . . . . . . . . . . . . . . . 97A.2.5 Proof of Proposition 2.3 . . . . . . . . . . . . . . . . . 98A.2.6 Proof of Proposition 2.4 . . . . . . . . . . . . . . . . . 99A.2.7 Proof of Proposition 2.5 . . . . . . . . . . . . . . . . . 101A.2.8 Proof of Proposition 2.6 . . . . . . . . . . . . . . . . . 101A.2.9 Proof of Lemma 2.4 . . . . . . . . . . . . . . . . . . . . 102

ii

Page 6: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.10 Proof of Theorem 2.2 . . . . . . . . . . . . . . . . . . . 103A.2.11 Proof of Proposition 4.2 . . . . . . . . . . . . . . . . . 105A.2.12 Proof of Lemma 3.1 . . . . . . . . . . . . . . . . . . . . 108A.2.13 Proof of Theorem 3.1 . . . . . . . . . . . . . . . . . . . 109A.2.14 Proof of Theorem 4.2 . . . . . . . . . . . . . . . . . . . 110A.2.15 Proof of Theorem 4.3 . . . . . . . . . . . . . . . . . . . 111A.2.16 Proof of Theorem 4.4 . . . . . . . . . . . . . . . . . . . 115A.2.17 Proof of Theorem 4.5 . . . . . . . . . . . . . . . . . . . 116A.2.18 Proof of Theorem 4.6 . . . . . . . . . . . . . . . . . . . 117A.2.19 Proof of Theorem 4.7 . . . . . . . . . . . . . . . . . . . 119A.2.20 Proof of Theorem 4.8 . . . . . . . . . . . . . . . . . . . 120A.2.21 Proof of Lemma 4.2 . . . . . . . . . . . . . . . . . . . . 121A.2.22 Proof of Theorem 4.9 . . . . . . . . . . . . . . . . . . . 123A.2.23 Proof of Corollary 4.7 . . . . . . . . . . . . . . . . . . 124

iii

Page 7: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Acknowledgements

I would like to thank foremost my advisor, Professor Xin Guo, for herwise guidance, creative insights, kind understanding and strong support tomy doctoral study, which has left me with an extremely rewarding experienceat Berkeley. I have learned a lot from her professionally and personallyvia numerous discussions, which has extraordinarily improved my researchcapability, and will be helpful in the future. I am also grateful to ProfessorIlan Adler, Professor James Pitman, and Professor Rhonda Righter for beingmy qualifying and dissertation committee and for their helpful feedback onmy research, and their encouragement.

I want to thank Dan Bu, Kelly Choi, Long He, Te Ke, among all otherfriends here in Berkeley. The memorable time spent together with themon course studies, research discussions, and leisure activities will be valuableforever. I also want to thank my calibrators Adrien de Lerrard and LingjiongZhu for their support.

I would like to thank my mother, who spends most of her love on me anddoes not even expect any return. I would also like to thank my father, whopassed away five years ago just before I came to the United States for mydoctoral study. He lives in my heart forever and is with me whenever I needhim. I thank all my relatives and friends in China, as their support helps meovercome all the difficulties in life.

Finally, I would like to thank Shiman Ding, my lovely girlfriend, for hercontinual and unconditional support. The joyful time spent with her will bean unparalleled treasure throughout my whole life.

iv

Page 8: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Chapter 1

Introduction

1.1 Financial markets and algorithmic trad-

ing

1.1.1 History of financial markets

As early as the 12th century, the Courretiers de Change managed and regu-lated the debts of agricultural communities for banks in France. This couldbe viewed as the beginning of the financial markets. In 1602, the first stockswere issued by Dutch merchants to build the Dutch East India Company,which became the first joint-stock company, to protect the trade in the In-dian Ocean. The company stock was traded on the Amsterdam Exchange,and various derivatives, including options and repos, emerged on the marketas well. Moreover, short selling was allowed in practice in 1610 by the Dutchauthorities. In the 1600s, more trade companies were built by British andFrench governments, raising funds from the stock market and sharing profitby paying dividends to shareholders. In 1792, the New York Stock Exchange(NYSE) was established by 24 stock brokers and soon became the most im-portant exchange in the United States. In 1971, the National Association ofSecurities Dealers Automated Quotations (NASDAQ), as the first electronicmarket, was created. The NASDAQ trading volume increased quickly overthe years as its automated trading system developed. Now, with approx-imately 3,200 companies from 37 countries and across all industry sectorslisted, the NASDAQ has become the largest stock exchange in the UnitedStates in terms of market share and volume traded.

1

Page 9: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

With the quick expansion of the NASDAQ, automatic and electronicorder-driven trading platforms have largely replaced the traditional floor-based trading for virtually all financial markets.

1.1.2 Limit order book (LOB)

In an order-driven market, there are two types of buy/sell orders for marketparticipants to post: market orders and limit orders. A limit order is an orderto trade a certain amount of security (stocks, futures, etc.) at a specifiedprice. The lowest price for which there is an outstanding limit sell order iscalled the best ask price and the highest limit buy price is called the best bidprice. Limit orders are collected and posted in the LOB, which contains thequantities and the prices at different levels for all limit buy and sell orders.A market order is an order to buy/sell a certain amount of the equity at thebest available price in the LOB. It is then matched with the best availableprice and a trade occurs immediately. The LOB is updated accordingly.A limit order stays in the LOB until it is executed against a market orderor until it is canceled; cancellation is allowed at any time before gettingexecuted. In essence, the closer a limit order is to the best bid/ask, thefaster it may be executed. Most exchanges are based on the first-in-first-out(FIFO) policy for orders on the same price level, although some derivativeson some exchanges have the pro-rate microstructure, that is, an incomingmarket order is dispatched on all active limit orders at the best price, witheach limit order contributing to execution in proportion to its volume.

Order books are available with different levels of details. For example,the so-called “level-1 order book” contains the best price level of the orderbook, while the “level-2 order book” provides the prices and quantities ofthe best five levels on both the ask and the bid sides. The following is anillustration of the top-5 level LOB:

2

Page 10: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

-­‐500

-­‐400

-­‐300

-­‐200

-­‐100

0

100

200

300

400

500

9.03 9.04 9.05 9.06 9.07 9.08 9.09 9.1 9.11 9.12 Volume

Prices

Limit bid (buy)

Limit ask (sell)

Figure 1.1: A screen shot of LOB

The following table is a typical example showing the dynamics of the limitorder book of the top 5 levels: a market sell order of size 1200, followed bya limit ask order of size 400 at the price 9.08, and then a cancellation of size23 for limit ask order at the price 9.10.

Price Size Price Size Price Size

Ask

9.12 1,525

Ask

9.12 1,525

Ask

9.12 1,5259.11 3,624 9.11 3,624 9.11 3,6249.10 4,123 9.10 4,123 9.10 4,1239.09 1,235 9.09 1,235 9.09 1,2359.08 3,287 9.08 3,287 9.08 3,687

Bid

9.07 4,895

Bid

9.07 3,695

Bid

9.07 3,6959.06 3,645 9.06 3,645 9.06 3,6459.05 2,004 9.05 2,004 9.05 2,0049.04 3,230 9.04 3,230 9.04 3,2309.03 7,246 9.03 7,246 9.03 7,246

Table 1.1: A market sell order with size of 1200, and a limit ask order withsize of 400 at 9.08 in sequence.

3

Page 11: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

1.1.3 High frequency trading (HFT)

Algorithmic trading, also called automated trading, black-box trading, oralgo trading, uses algorithms with pre-programmed execution instructions,which usually account for price, timing, volume, along with many other vari-ables. HFT is considered as a primary form of algorithmic trading in finance(Lin, 2014). More specifically, based on sophisticated mathematical modelsand algorithms, HFT moves in and out of positions in seconds or fractions ofa second in the financial market and do not hold portfolios overnight. Theexecutions are completed by computers automatically according to the exe-cution rules that are pre-programmed. As of 2009, it is estimated that HFTaccounts for at most 73% of all US equity trading volume (Iati, 2009). Gen-erally, HFT firms earn low margins with very high volumes of trading. Thereare very different opinions toward HFT in both academia and industry. Jones(2013) points out that HFT improves the market liquidity, reduces tradingcosts, and makes stock prices more efficient. However, concerns on the newrisks brought by HFT rises as it was believed to be a critical factor in theMay 6, 2010, Flash Crash. Moreover, there are also complaints against HFTby claiming that it takes profits from investors when index funds re-balancetheir portfolio.

HFT is based on modelling the microstructure of the market and attemptsto take statistical arbitrage. In other words, LOB is the main source of datathat high frequency traders are trying to understand and utilize. Unlike thetraditional quantitative strategies based on price and volume, HFT takes intoaccount all orders received in the LOB, including limit orders, market orders,and cancellations.

1.2 Optimal execution of large transactions

Large institutional investors, such as mutual funds, hedge funds, investmentbanks, etc., need to execute large portfolio transactions frequently. To them,the execution costs including bid/ask spreads, commission fees, opportunitycosts of waiting, price impact from trading, and act as an important role inoverall investment performance. Further discussion could be found in Loeb(1983) and Wagner (1993). How to measure and minimize the executioncosts for a given portfolio transaction becomes critical to quantitative trad-ing strategies. To purchase a large block of equity, if one places the large

4

Page 12: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

order into the market directly, there will be a significant price impact whichincreases the execution cost. However, if one splits the large block into smallpackets and places them sequentially over time, the price impact is reducedwhile the transaction is exposed to more price uncertainty. Optimal execu-tion models mainly focus on the price impact from large orders and the priceuncertainty from the long execution horizon. However, they usually assumeplacing market orders, which means the execution is guaranteed. In fact,traders also face the trade-off between market orders and limit orders – theformer one has higher cost with guaranteed execution while the latter onehas lower cost with risk of non-execution.

1.2.1 TWAP and VWAP strategies

Time-weighted average price (TWAP) and Volume-weighted average price(VWAP) strategies are commonly used for executing large orders. TheTWAP strategy is relatively simple. It allocates the total target volumeuniformly over the given trading period. For example, suppose the agentis going to buy 240, 000 shares of Bank of America from 10:00 AM to 2:00PM, then the TWAP strategy first chooses how many orders to send, say oneevery 1 minute. Then the agent will send an order to buy 1, 000 shares everyminute to the exchange. A VWAP strategy is to allocate the total targetvolume according to the market trading volume for each period. For theprevious example, the VWAP strategy first calculates the intra-day volumecurve every minute from 10:00 AM to 2:00 PM to get (V1, · · · , VT ), T = 240.And then for the ith minute, 1 ≤ i ≤ T , an order to buy 240, 000 × Vi∑T

i=1 Vi

shares will be sent to the exchange. Generally speaking, VWAP is less pre-dictable then the TWAP and highly depends on the intra-day market tradingvolume curve. In practice, the VWAP is widely used as the benchmark foraccessing large order execution quality (Madhavan (2002)). Mathematically,the market VWAP is defined as

P VM =

∫ T0P (t)dV (t)

V (T ), (1.1)

where V (t) is the market trading volume up to time t. A strategy n =n(t), 0 ≤ t ≤ T is called a VWAP strategy if there exists a positive constantγ, such that n(t) = γV (t). Here, n(t) is the holding volume for the agent at

5

Page 13: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

time t, and the VWAP of this strategy is defined as

P V (n) =

∫ T0P (t)dn(t)

n(T )(1.2)

It is easy to see that P V (n) = P VM when n is a VWAP strategy. However, in

practice, usually the number of shares to purchase, say N shares, is given.Then a VWAP strategy is given by n(t) = N

V (T )V (t). However, V (T ), the

total market trading volume, is unknown at the beginning. Therefore, thisstrategy is not applicable in practice. The difference, P V (n)− P V

M , is calledVWAP slippage. Minimizing the VWAP slippage is studied in the literature,for instance, Konishi (2002), Frei and Westray (2013), and Gueant and Royer(2014). Moreover, in a recent paper Kato (2014) introduces a trading volumeprocess into the Almgren–Chriss model, which is reviewed later, and showsthe VWAP strategy is optimal for a risk-neutral trader.

1.3 Optimal placement problems and LOB

dynamics modelling

This thesis is mainly devoted to solve two problems in the LOB.

1.3.1 Optimal placement problems

Optimal placement studies how to place an order in a LOB for optimizingan objective such as minimizing the cost. Given a number of shares to buyor sell, traders must decide between using market orders, limit orders, orboth, decide on the number of orders to place at different price levels, anddecide on the optimal sequence of order placement in a give time framewith multi-trades. Specifically, when using limit orders, traders do not needto pay the spread and most of the time even get a rebate.1 This rebate,however, comes with an execution risk as there is no guarantee of executionfor limit orders. On the other hand, when using market orders, one has topay both the spread between the limit and the market orders and the fee in

1This rebate structure varies from exchange to exchange and leads to different opti-mization problems. For instance, in the Hong Kong stock exchange, successful executionsof limit orders get a discount (i.e., a fixed percentage of the execution price) whereas inother places such as the London stock exchange, the discount may be a fixed amount.

6

Page 14: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

exchange for a guaranteed immediate execution. Essentially, traders have tobalance between paying the spread and fees when placing market orders vs.execution/inventory risks when placing limit orders.

Technically, the optimal placement problem can be stated as follows. Con-sider a setting where N shares are to be bought by time T > 0 (T ≈ 1/5minutes). One may split the N orders into (S0,t, S1,t, · · · ), where S0,t ≥ 0 isthe number of shares placed as the market order at time t = 0, 1, . . . , T , S1,t

is the number of shares placed at the best bid at time t, S2,t is the numberof shares placed at the second best bid at time t, and so on. If the limitorders are not executed by time T , then one has to buy the non-executedorders at the market price at time T . When one share of the limit orderis executed, the market gives a rebate r > 0 and when a share of marketorder is submitted, a fee f > 0 is incurred. Although no intermediate sellingis allowed at any time, one nevertheless can cancel any non-executed orderand replace it with a new order at a later time. Now, given N and T , thegoal is to find the optimal strategy (S0,t, S1,t, · · · , Sk,t)t=0,1,··· ,T to minimizethe overall total expected cost.

1.3.2 LOB dynamics modelling

For the decisions on the optimal placement problem, how to estimate theprobabilistic quantities in LOB is essential to the optimal strategies. There-fore, quantitative models for the dynamics of the LOB are needed to calculatequantities including the probability of a price increase, limit order execution,etc., given the current LOB details. Due to the high frequency nature ofthe LOB, heavy traffic limit is a useful tool for approximating the queue-ing system of the LOB as well as those quantities of interest. Generally,when people are interested in the evolution of the queueing system over timescales much larger than the interval between arrivals, the dynamics of thetime scaled queue lengths could be described in terms of a simpler process,which is called the heavy traffic limit. There are many classical studies onthis topic, for instance, Iglehart (1973a), Iglehart (1973b), Borovkov (1976),Harrison (1985), Billingsley (1968), and Whitt (2002). In mathematics, theheavy traffic limits are essentially based on the functional law of a largenumber (FLLN) and the functional central limit theorem (FCLT).

Technically, let Qb(t) and Qa(t) denote the best bid queue length andthe best ask queue length at time t, respectively. And Z(t) stands for theposition of a particular order the agent placed in the best bid queue. We want

7

Page 15: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

to derive the dynamics of (Qb(t), Qa(t), Z(t) and compute the quantities ofinterest, for example, the probability of Z(t) hits zero level before Qa(t) doesso.

1.4 Outline of the thesis

Chapter 2 proposes a correlated random walk model for the best ask/bidprice and solves the optimal placement problem under both single-step andmulti-step settings. Chapter 3 reviews optimal execution models and marketmaking problems, then proposes a simple optimal execution model with alinear price impact, where both market order and limit order are available.In Chapter 4, a queueing model is studied for the dynamics of a particularorder and the best bid/ask. Fluid and diffusion limits are derived underdifferent time scaling, and some applications are also presented. Reviews ofsome mathematical techniques used in my thesis and some proofs are hiddenin the Appendix A.

8

Page 16: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Chapter 2

Optimal placement in an LOB

2.1 Review of the optimal placement models

To the best of my knowledge, there are few analytic results on the optimalplacement problem. The most relevant work is from Hult and Kiessling(2010), who develops a high-dimensional Markov chain model for the limitorder book and, therefore, the potential order placement strategies.

2.1.1 Hult and Kiessling’s model

Basically, their model is a Markov chain representation of a LOB. Let π1 <π2 < · · · < πd denote all possible price levels in the LOB, and Xt =(X1

t , · · · , Xdt ) represents the volume at time t > 0 of bid orders (negative

value) and ask orders (positive value) at each price level. Assume thatXjt ∈ Z for each j = 1, · · · , d. Define S ⊂ Zd as the state space of the

Markov chain. For any x ∈ S, define jB = jB(x) = max(j, xj < 0), which isthe highest bid level, and jA = jA(x) = min(j, xj > 0), which is the lowestask level. Then define πB = πjB and πA = πjA as the best bid price andbest ask price. Assume that xd > 0 and x1 < 0, jB < jA. By definition ofjB and jA, we have xj = 0 for jB ≤ j ≤ JA. jA − jB is the spread. Letej = (0, 0, · · · , 1, 0, · · · , 0) denote a vector in Zd with 1 in the jth position.

• A limit bid order of size k at level j: x 7→ x− kej, j < jA,

• A limit ask order of size k at level j: x 7→ x+ kej, j > jB,

9

Page 17: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

• A market buy order of size k at level j: x 7→ x − kejA , knock out askorder at jA if k > xjA ,

• A market sell order of size k at level j: x 7→ x + kejB , knock out bidorder at jB if k > xjB ,

• A cancellation of bid order of size k at level j: x 7→ x + kej, j ≤ jBand 1 ≤ k ≤ |xj|,

• A cancellation of ask order of size k at level j: x 7→ x − kej, j ≥ jAand 1 ≤ k ≤ xj.

Let Q = (Qxy) denote the generator matrix of X, where Qxy is the transitionintensity from stat (x1, · · · , xd) to state y = (y1, · · · , yd). And let P = (Pxy)denote the transition matrix of the jump chain of X. First, we have

Pxy =Qxy∑y 6=xQxy

(2.1)

A Markov chain is completely determined from the initial state and P or Q.

Order execution probability Now we consider the probability of an or-der being executed. Define Vc = 0 and

VT =

1 if the position hits 0

0 otherwise(2.2)

To study the probability of the execution of a particular order, we need totrack the position of that order, in addition to the state of the LOB. Supposethe agent put a limit buy order at level J0. Moreover, we focus on the jumpMarkov chain and use n ∈ N as the index. Let Yn denote the number oforders at level J0 that are in front of the agent’s order at time n. The initialcondition gives Y0 = XJ0

0 − 1 and Yn can only move up if J0 becomes thebest bid level and there is a market sell order, or if an order in front of theagent’s order is canceled. Note that (Xn, Yn)n≥0 is also a Markov chain withstate space S × 0,−1, · · · with transition matrix P . We want to derivethe probability that an order is executed before the best ask level is at leastJ1 > JA(x0). Therefore,

∂D = (x, y) ∈ S, y = 0 or xj ≤ 0 for allJ0 < j < J1, (2.3)

10

Page 18: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

VT (x, y) =

1 if y = 0,

0 otherwise,(2.4)

Φ(s) = E[VT (Xτ , Yτ )Iτ<∞|(X0, Y0) = s

], (2.5)

where I is the indicator function.

Optimal strategy for buying one unit Suppose the initial state of theLOB is X0, and the agent wants to buy one unit. After n transitions ofthe LOB, (Xn, Yn, jn) defines a discrete Markov chain, where Yn denotes thenumber of orders in front of the agent’s order, and jn is the level where theagent’s order is posted. The set of possible actions depends on the currentstate (x, y, j). In each state where y < 0, the agent has three options:

1. Do nothing and wait for a market transition.

2. Cancel the limit order and place a market order.

3. Cancel the existing limit order and place a new limit bid at level J0 ≤j′ < jA(x).

The action set is −2,−1, 0, J0, · · · , jA(x) − 1, where −2 represents y = 0as the Markov chain is terminated; −1 represents the agent cancels the limitorder and use a market order to terminate the process; 0 represents the agenttakes no actions; and j′, J0 ≤ j′ < jA(x), represents the agent cancels theold limit order and submits a new limit order at level j′. The expected buyprice V (s, α) from a state s = (x, y, j) with jA(x) < J following a stationarypolicy α = (α, α, · · · ) is

V (s, α) =

∑s′

Pss′V (s′, α) for α(s) = 0,

V (sj′ , α) for α(s) = j′, J0 ≤ j′ < jA(x)

πjA(x) for α(s) = −1,

πjB(x) for α(s) = −2,

(2.6)

And it claims that an optimal buy strategy is the stationary policy α∞, withthe expected buy price V∞ satisfying,

V∞(s) = min(∑s′∈S′

P ′ss′V∞(s′), V∞(sJ0), · · · , V∞(sjA(x) − 1), πjA(x)), (2.7)

11

Page 19: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

for jA(x) < J1, y < 0, and

V (s, α) =

πJ , for jA(x) = J1, y < 0,

πj, for y = 0.(2.8)

It would be very difficult to implement the Markov chain model directly inthe LOB as the transition intensity matrix is huge. Therefore, further modelspecification is needed for applications. Hult and Kiessling (2010) provides asimple parameterization of the Markov chain for the LOB in order to allowfor simple calibration. Assume the following:

• limit buy (sell) orders at a distance of i levels from the best ask (bid)level intensity λBL (i) (λSL(i)).

• Market buy (sell) orders arrive with intensity λBM (λSM).

• The size of limit and market orders follow discrete exponential distri-butions with parameters αL and αM , respectively. That is, the distri-butions (pk)k≥1 and (qk)k≥1 of limit and market order sizes are givenby

pk = (eαL − 1)e−αLk, qk = (eαM − 1)e−αMk (2.9)

• The size of cancellation orders is assumed to be 1. Each individualunit size buy (sell) order located at a distance of i levels from the bestask (bid) level is canceled with a rate λBC(i) (λSC(i)). At the cumulativelevel, the cancellations of buy (sell) orders at a distance of i levelsfrom opposite best ask (bid) level arrive with a rate proportional tothe volume at the level: λBC(i)|xjA−i| (λSC(i)|xjB+i|).

P = (Pxy) is given as

• Limit order:

– x 7→ x+ ejk for j > jB, k ≥ 1 with rate pkλSL(j − jB(x))

– x 7→ x− ejk for j < jA, k ≥ 1 with rate pkλBL (jB(x)− j)

• Market order of size at least 2:

– x 7→ x+ kejB for k ≥ 2 with rate qkλSM

12

Page 20: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

– x 7→ x− kejA for k ≥ 3 with rate qkλBM

• Cancellation:

– x 7→ x− ej for j > jA(x), with rate λSC(j − jB(x))|xj|– x 7→ x+ ej for j < jB(x), with rate λBC(j − jA(x))|xj|

• Market order of unit size and cancellation at the best ask/bid level:

– x 7→ x+ ejB with rate qkλSM + λBC(jA(x)− jB(x))|xjB |

– x 7→ x− ejA with rate qkλBM + λSC(jA(x)− jB(x))|xjA|

Calibration of this model amounts to calculating the following parameters:

(λL, λC , λBM , λ

SM , αL, αM). (2.10)

With historical data, we can estimate those parameters by

ˆλBL (i) =NBL (i)

T, (2.11)

where NBL (i) denote the number of limit bid orders arrived at the distance of

i levels from the best ask, and T is the length of the data collection period.Similarly, we can estimate λSL, λBM , and λSM . Let bit denote the number of bidorders at the distance i levels from the best ask at time t, then

bi∗ =1

T

∫ T

0

bitdt. (2.12)

and an estimation of the cancellation rate λBC(i) is given by

ˆλBC(i) =NBC (i)

bi∗T. (2.13)

And similarly for λSC . Let l be the mean limit order size, then the maximumlikelihood estimate for αL is

αL = logl

l − 1. (2.14)

And similarly for αM .

13

Page 21: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

2.1.2 Cont, Stoikov, and Talreja’s model

Similar to the calibration example in Hult and Kiessling (2010), Cont et al.(2010) models the LOB as a multiple queueing system. Assume that thereare n price levels for the LOB, from 1 to n. Let X(t) = X1(t), · · · , Xn(t)t≥0

denote the state of the LOB at time t, where |Xp(t)| is the number ofoutstanding limit orders at price p, 1 ≤ p ≤ n. Xp(t) < 0 means thereare −Xp(t) shares of limit bid orders at price p, while Xp(t) > 0 meansthere are Xp(t) shares of limit ask orders at price p. The best ask pricepA(t) = infp = 1, · · · , n,Xp(t) > 0 ∧ (n + 1) and the best bid pricepB(t) = supp = 1, · · · , n,Xp(t) < 0 ∨ 0. Now define QB

i (t) as the queuelength at the distance i below the best ask price,

QBi (t) =

XpA(t)−i(t) 0 < i < pA(t)

0 pA(t) ≤ i < n,(2.15)

Similarly, QAi (t) is defined by

QAi (t) =

XpB(t)+i(t) 0 < i < n− pB(t)

0 n− pB(t) ≤ i < n,(2.16)

Assume the system evolves as follows:

• Limit orders arrive at a distance i from the opposite best price atindependent, exponential times with rate λ(i),

• Market orders arrive at independent, exponential times with rate µ,

• Cancellations at a distance i from the opposite best price at a rateproportional to the corresponding queue length,

• The above event arrival processes are all independent,

• All orders and cancellations are of size 1 unit.

14

Page 22: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Let xp±1 = x± (0, · · · , 1, · · · , 0), where 1 is in the pth component. Then theXtt≥0 is a continuous-time Markov chain with transition rates given by

x→ xp−1 with rate λ(pA(t)− p) for p < pA(t),

x→ xp+1 with rate λ(p− pB(t)) for p > pB(t),

x→ xpB(t)+1 with rate µ,

x→ xpA(t)−1 with rate µ,

x→ xp+1 with rate θ(pA(t)− p)|xp| for p < pA(t),

x→ xp−1 with rate θ(p− pB(t))|xp| for p > pB(t).

The first main result is

• They show that Xtt≥0 is an ergodic Markov chain, which means ithas a proper stationary distribution.

Moreover, focusing on the best bid/ask queue, both of them are birth-deathprocesses. Therefore, when the best bid queue is depleted before the askqueue hits zero, then the mid-price moves down, and vice versa. Let fY (s) =∞∫−∞

e−stfY (t)dt be the two-sided Laplace transform of fY (t), where fY (t) is

the probability density function of random variable Y . Define

Φnk=1

akbk

= t1 t2 · · · tn(0), n ≥ 1, tk(u) =ak

bk + u, k ≥ 1,

where denotes the composition of functions. Let τm denote the first-passagetime of this process to 0 with starting from m and the spread is S. Then,define

fSσm(s) = fSm(s) =(− 1

λ

)m( m∏i=1

Φ∞k=i

−λ(S)(µ+ kθ(S))

λ(S) + µ+ kθ(S) + s

).

Then the second main result of this paper is

• Given that XpA(0)(0) = a, XpB(0)(0) = b, and pA(0)− pB(0) = S. Thenthe probability that the next price change is an increase is given by the

15

Page 23: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

inverse Laplace transform of

F Sa,b(s) =

1

s(fSa (

S−1∑i=1

λ(i) + s) +

∑S−1i=1 λ(i)∑S−1

i=1 λ(i) + s(1− fSa (

S−1∑i=1

λ(i) + s)))

·(fSb (S−1∑i=1

λ(i) + s) +

∑S−1i=1 λ(i)∑S−1

i=1 λ(i) + s(1− fSb (

S−1∑i=1

λ(i) + s))).

(2.17)

When S = 1, that is, the spread is 1 tick, then (2.17) reduces to

F 1a,b(s) =

1

sf 1a (s)f 1

b (s). (2.18)

Now define gSm =m∏i=1

µ+θ(S)(i−1)µ+θ(S)(i−1)+s

. Then another important result given in

this paper is

• Given that XpA(0)(0) = a, pA(0)−pB(0) = S, and there are b−1 ordersat the best bid price in front of the agent’s order. Then the probabilitythat the agent’s order gets executed before the price moves is given bythe inverse Laplace transform of

GSa,b(s) =

1

sgSb (s)

(fSa (2

S−1∑i=1

λ(i)− s)

+2∑S−1

i=1 λ(i)

2∑S−1

i=1 λ(i)− s(1− fSb (2

S−1∑i=1

λ(i)− s)))

(2.19)

2.2 Summary of contributions

The optimal placement problem is analyzed with the additional constraintof no price impact of a large trade. With this constraint, it is without lossof generality to assume N = 1. Both single-step and multi-step trades areconsidered: the former means that one is only allowed to place the order attime 0, and the latter means that one is free to place orders and cancel andreplace existing orders at any step between 0 and T .

The analysis is based on a correlated random walk model with mean-reversion for the bid/ask price. Despite its apparent simplicity, this model is

16

Page 24: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

strong enough to capture several key LOB characteristics such as the mean-reverting nature of algorithmic trading, the depth of the LOB (i.e., the prob-ability that a best bid is executed within a certain time), and a proxy for theLOB imbalance, captured by the ‘initial’ probability of price movement.

Under this model, the optimal strategy for single-step trades is proved toinvolve placing orders only at three levels: the second best bid, the best bid,and the market order. This result significantly reduces the complexity anddimensionality for the optimal placement problem. It is also consistent withthe empirical work in Cont and De Larrard (2013), which shows that mostof the trading activities are concentrated at the top two levels of the LOB.

The optimal placement strategy for multi-step trades is shown to be athreshold type, with two thresholds that can be explicitly computed. Astime goes by, the optimal strategy shifts from aggressive types to conservativetypes as illustrated in Figure 1. This particular behavior is intuitive giventhe Markovian structure and the mean-reverting nature of the underlyingprice model. It also provides some useful insight, albeit intuitive and mayhave been well used in practice: (i) as the LOB becomes more unbalanced,the optimal trading strategy shifts from the market order to the lower levelof limit bid order (i.e., first the best bid, then to the second best bid); (ii) inthe degenerate case of a simple symmetric random walk model, the optimalplacement strategy is to always follow the best bid; and (iii) as the transactioncost between the market order and the limit order decreases, the optimaltrading strategy moves toward the market order.

Technically speaking, the analysis with the correlated random walk modelis harder than one would expect. The main difficulty is to establish thepartial reflection principle and a certain monotonicity property for its runningmaximal process, which is critical for the dimension reduction: instead ofcomparing the expected cost at all levels, which is infeasible, we show thatthe critical ones are the top three levels for the one-step case. From here, astraightforward application of the Markov decision analysis via cumbersomecalculations yields the threshold type optimal trading strategy for the multi-step case.

The explicit solution structure for the optimal placement problem underthe simple correlated random walk model potentially paves the way for abetter structural understanding of the more complex market-making prob-lem. At the very least, these explicit solutions can be useful for comparingvarious numerical solutions under much more sophisticated models. We alsohope that beyond analyzing the optimal placement problem, the technique

17

Page 25: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

we develop in analyzing the correlated random walk may be of independentmathematical interest. The ”reflection principle” for random walk or Brow-nian motion is one of the most well-known results in probability theory. Thisprinciple was initially introduced by Feller as a combinatorial trick for count-ing and comparing sample paths. The “mapping” technique exploited in ourwork differs from the scaling technique via its symmetry for the Brownianmotion or Levy process by Bayraktar and Nadtochiy (2013), though still inthe spirit of Feller.

2.3 A correlated random walk model

The model. To analyze the optimal placement problem, a correlated ran-dom walk model is first proposed for the dynamics of the bid/ask price. Inthis model, we will assume that

1. the spread between the best bid price and the best ask price is always1 tick;

2. the best ask price increases or decreases 1 tick at each time step t =0, 1, . . . , T.

Let At be the best ask price at time t. Then,

At =t∑i=1

Xi, A0 = 0, (2.20)

where Xt (1 ≤ t ≤ T ) is a Markov chain on ±1 with P(X1 = 1) = p =1− P(X1 = −1) for some p ∈ [0, 1], and for i = 1, · · · , T − 1,

P(Xi+1 = 1 | Xi = 1) = P(Xi+1 = −1 | Xi = −1) = p <1

2. (2.21)

Such a model is also called a correlated random walk model. (For earlier workon this type of model, see Goldstein (1951), Mohan (1955), Gillis (1955),and Renshaw and Henderson (1981).) The particular choice of p < 1

2makes

the price “mean revert”, a phenomenon often observed in high-frequencytrading; see, for instance, Chen et al. (2013) for some statistical analysis onthis phenomenon.

18

Page 26: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

In order to analyze the optimal placement problem under this model, itis critical to characterize Yt (0 ≤ t ≤ T ), where

Yt = min0≤s≤t

As. (2.22)

In the subsequent analysis, when there is little risk of confusion, we calla particular sample path ω instead of Xt(ω)1≤t≤T . Consistent with thisconvention, At(ω) is the (best) ask price on a sample path ω at time t, Xt(ω)is the price change at the tth step of a particular sample path ω, and YT (ω)is the lowest level that a particular sample path ω has ever hit by time T .

2.3.1 Probability distribution of the best ask price andrunning minimum price

It is easy to see from (2.21) that (Ai, Ai−1)i≥1 is a two-dimensional Markovchain. Compared to the simple random walk, the key to analyzing At is todifferentiate the sequences with different number of direction changes whenthey have the same number of “upward” edges (i.e., with the same valuefor AT ). We call it a direction change when a sequence of 1’s is followedby a −1 or when a sequence of −1’s is followed by a 1. For instance, both1, 1, 1,−1,−1, 1 and 1, 1,−1, 1,−1, 1 have four 1’s (upward edges) and two−1’s (downward edges), yet the former one has two direction changes whilethe latter has four direction changes.

It is easy to see that if the numbers of 1’s and −1’s and the position ofthe direction changes are given, then the sequence is determined as long asthe first edge is also given. For instance, if T = 5, AT = 1, X1 = 1, andthe number of direction changes is 2, then we need to know the positions ofthe direction changes in order to identify the sequence from the two possiblechoices: 1, 1,−1,−1, 1 or 1,−1,−1, 1, 1.

A bit of thinking with some calculations yields

P(AT = k and number of direction change is i)

=

pT−i−1(1− p)iLiT,k,T + k

2∈ N and |k| ≤ T,

0, otherwise,(2.23)

19

Page 27: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

where

LiT,k = (1− p)( T+k

2− 1

b i+12c − 1

)( T−k2− 1

b i+22c − 1

)+ p

( T+k2− 1

b i+22c − 1

)( T−k2− 1

b i+12c − 1

).

(2.24)

From which, it is clear to see

Proposition 2.1.

P(AT = k) =

T−|k|∑i=1

pT−i−1(1− p)iLiT,k,T + k

2∈ N and |k| ≤ T,

0, otherwise.

(2.25)

Using this, we obtain the following.

Theorem 2.1 (Partial Reflection Principle). If T−k2∈ N and k > 0, then

P(YT = −k) = P(AT = −k).

In the limiting case of p = 1/2 when a correlated random walk becomesa simple random walk, this theorem is consistent with the classical reflectionprinciple (see, for instance, (Redner, 2001, pp. 97–100)) . For the more gen-eral case, however, we are not aware of any prior results like ours despite richliterature on the correlated random walk. In fact, the proof requires somecareful design of mappings to enable the comparison of different sample paths.Unlike the simple random walk, direct rescaling or reflection of sample pathdoes not seem to work, as seen from the proofs in the Appendix. Anotherrelated work is the Markov additive process, where the random walk (includ-ing the correlated random walk) is studied under a more general framework(for instance, Arjas and Speed (1973)). The correlated random walk processin our model is a degenerate case of Miller (1962), where a random walkdefined on a Markov chain with finitely many states is studied and a matrixWiener-Hopf factorization is obtained.

Next, we show that the distribution of Yt satisfies a monotone property,which seems intuitively clear although its proof is not that obvious. Notethe “non-intuitive” part comes from P(YT = −k), which is different fromP(YT ≤ −k).

Proposition 2.2. P(YT = −k) is a decreasing function of k for k = 1, . . . , T .

This proposition turns out to be critical for our analysis of the optimalplacement problem.

20

Page 28: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

2.4 Optimal strategy for the placement prob-

lem

2.4.1 Single-step trade

We now consider the optimal placement with a single-step trade, where theinvestor needs to buy one share by time T . The investor decides where toplace her buy order only at time t = 0 and could not change until t = T . Ifthe order is placed as a limit order and it is not executed before time t = T ,then she has to buy with a market order at time t = T .

In addition to our correlated random walk model, we need to specify thefollowing:

• if At ≤ −k for some t ≤ T , then a limit order at price −k will beexecuted with probability 1;

• if At > −k + 1 for all t ≤ T , then a limit order at price −k will beexecuted with probability 0;

• If At = −k + 1 and At+1 = −k + 2, then a limit order at price −k hasa chance q to be executed between t and t+ 1.

Based on the above assumptions, if YT (ω) = −k + 1 for a particular samplepath ω, then we have

qk(ω) = 1− (1− q)nk(ω), (2.26)

where qk(ω) denotes the probability of a limit order placed at −k beingexecuted along that particular path ω, and nk(ω) is the number of timesAt(ω) = −k + 1 strictly before T . Note that with q = 0, there is no chancefor a limit order placed at −k to be executed when YT = −k+1; when q = 1,a limit order placed at −k is guaranteed for execution when YT = −k + 1.In addition, at time T , if there is a non-executed order at AT − 1, this orderwill never be executed. Hence it suffices to count nk(ω). Moreover, qk(ω)increases as nk(ω) increases, meaning that the longer a limit order stays atthe best bid queue, the higher its chance of being executed.

Comparing expected costs at each level of LOB. Based on the abovesetup, solving the optimal placement problem amounts to comparing the

21

Page 29: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

expected costs of placing one order at each level of the LOB. Clearly, theexpected cost of an order placed at any price level depends on all the param-eters f, r, T, p, q, p. For simplicity, however, we will highlight only variablesk, q, T, p to show the dependence of the cost on those variables. In particular,the expected cost of a limit order placed at the price k ticks lower than theinitial best ask price, given q and the total number of price changes T aswell as the probability of the first price change being upward p, is denotedby C(k, q, T, p). Here C(0, q, T, p) is the expected cost of a market order.Moreover, since all limit orders placed below −T − 1 will not be executeduntil T and will have to be filled by market orders at time T , their expectedcosts are the same and will be denoted by C(T+1, q, T, p). That is, it sufficesto consider the following minimization problem:

min0≤k≤T+1

C(k, q, T, p) (= min0≤k≤∞

C(k, q, T, p)).

It is easy to see

Lemma 2.1. For any 1 ≤ k ≤ T + 1,

C(k, q, T, p) =∑

ω∈YT=−k+1

P(ω)qk(ω)(−k − r − AT (ω)− f) + C(k, 0, T, p),

(2.27)

with C(0, q, T, p) = f .

Since AT (ω) ≥ YT (ω) = −k+ 1 for ω ∈ YT = −k+ 1, we have from theabove lemma that −k− r− f −AT (ω) < 0. Note that qk(ω) is an increasingfunction of q, we have the following:

Lemma 2.2. C(k, q, T, p) is a decreasing function of q, i.e., if 0 ≤ q1 < q2 ≤1, then

C(k, q1, T, p) > C(k, q2, T, p).

This result is quite intuitive: as the chance of execution increases for alimit order, its expected cost should decrease. And we also have the followingresult that leads to a partial order of the expected costs at different bid levels.

Lemma 2.3. For 1 ≤ k ≤ T − 2,

P(YT = −k)(k + E[AT |YT = −k])

≥P(YT = −k − 1)(k + 2 + E[AT |YT = −k − 1]). (2.28)

22

Page 30: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Lemma 2.2 and Lemma 2.3 lead to the following.

Proposition 2.3. If q = 0, then for any given r, f , T , p, and p,

C(1, 0, T, p) < C(2, 0, T, p) < · · · < C(T + 1, 0, T, p),

i.e., if q = 0, then the best bid order is better than any other level of limitorders.

It is easy to see that the above proposition does not hold for a general q.For example, C(1, q, T, p) < C(2, q, T, p) does not necessarily hold: if p = 0and q = 1, then the limit order placed at the level of −2 will also be executedand is strictly better than placing an order at the level of −1. However,when k ≥ 2, due to the mean-reversion property of the price process, theorder placed at a lower price level will have a lower chance of being executed,which leads to a partial order for the expected costs at different levels, asstated in the following.

Proposition 2.4. Given r, f , T , p, and p,

C(2, q, T, p) < C(3, q, T, p) < · · · < C(T + 1, q, T, p),

for general q 6= 0. In particular, an optimal placement strategy depends onlyon comparing the expected costs at three levels: C(0, q, T, p) for the marketorder, C(1, q, T, p) for the best bid, and C(2, q, T, p) for the second best bid.

Comparison among C(0, q, T, p), C(1, q, T, p), and C(2, q, T, p) can bemore explicit with more information on p.

Proposition 2.5. For fixed values of r, f, p, q, C(1, q, T, p) and C(2, q, T, p)are both increasing linear functions of p.

Since both C(1, q, T, p) and C(1, q, T, p) are increasing linear functions ofp, and C(0, q, T, p) is a constant, the optimal placement strategy will be ofa threshold type when focusing only on the parameter p. Depending on theintersections of C(0, q, T, p), C(1, q, T, p), C(2, q, T, p), (some of which maylie beyond [0, 1], the decision to use market order or limit order will depend

23

Page 31: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

on at most two of the three intersections p∗1, p∗2, p∗3, which are given by

p∗1 =r + f + 1

(2 + r + C(2, q, T − 1, p))(1− q),

p∗2 =1 + f − C(1, q, T − 1, 1− p)

2 + C(3, q, T − 1, p)− C(1, q, T − 1, 1− p),

p∗3 =

r + C(1, q, T − 1, 1− p)(2 + r + C(2, q, T − 1, p))(1− q)− (2 + C(3, q, T − 1, p)− C(1, q, T − 1, 1− p))

,

where p∗1 is the intersection of C(1, q, T, p) and C(0, q, T, p), p∗2 is the intersec-tion of C(2, q, T, p) and C(0, q, T, p), and p∗3 is the intersection of C(1, q, T, p) andC(2, q, T, p). In particular, if all of them are outside [0, 1], then it means we willstay with only 1 order for all p ∈ [0, 1]. (See Figures 1 below.)

0 0.2 0.4 0.6 0.8 1−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

p

Expectedcosts

Expected costs against different p

Expected cost of best bid

Expected cost of second best bid

Expected cost of market order

The optimal expected cost

p∗

2

p∗

3

p∗

1

(a) Two thresholds

0 0.2 0.4 0.6 0.8 1−2

−1.5

−1

−0.5

0

0.5

1

p

Expectedcosts

Expected costs against different p

Expected cost of best bid

Expected cost of second best bid

Expected cost of market order

The optimal expected cost

p∗

1

p∗

2

p∗

3

(b) One threshold

Figure 2.1: Expected costs against different p.

24

Page 32: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

0 0.2 0.4 0.6 0.8 1−1.5

−1

−0.5

0

0.5

1

1.5

pExpectedcosts

Expected costs against different p

Expected cost of best bid

Expected cost of second best bid

Expected cost of market order

The optimal expected cost

p∗

2

p∗

3

p∗

1

(c) One threshold

Figure 2.1: Expected costs against different p.

Proposition 2.6. If p ≥ 1− p, then C(1, q, T, p) < C(2, q, T, p), i.e., the optimalplacement strategy involves only the market order and the best bid order.

2.4.2 Multi-step trade

Next we continue our analysis with a multi-step trade, where we assume that aninvestor needs to get one share of stock by time T and she is allowed to place anorder at any level at any time t between 0 and T . Consistent with the single-stepcase, we make the following assumptions:

• a limit bid order placed at price of At − 1 will be executed with probability1 if At+1 = At− 1, and will be executed with probability q if At+1 = At + 1;

• if the order does not get executed by time T , she needs to cancel the previousorder and use the market order at time T ;

• after each price change at each time step 1, . . . , T − 1, she can do nothing(denote this action as NO) or cancel the non-executed order and replace itwith a market order (denote this action as MO) or replace it with the bestbid (denote this action as BB).

Note that due to these assumptions, among all limit orders, only the best bidwill be used at any time t. The objective of the optimal placement problem isthen to calculate the expected cost for using each action at each step and thendetermine the action with the lowest expected cost. This can be solved quitestraightforwardly using Markov decision theory.

25

Page 33: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Optimal strategy for multi-step trading

A review of Markov decision process is provided in the appendix. Note that(At, Xt)1≤t≤T is a Markov chain. At at each time t, we can take actions fromthe set A = NO,BB,MO. Since all the transactions are made in a short time,we do not discount the value function in the future. Moreover, let Vt((At, Xt), α)be the expected cost for purchasing one share of stock by time T with policy α attime t. At time T , we have

VT ((AT , XT ), α) = AT + f,

as we could only use market order at time T . By symmetry, Vt((At, Xt), α) =Vt((0, Xt), α)+At. Therefore, to simplify notation, we use Vt(Xt, α) for Vt((0, Xt), α).Now denote the expected cost with adopting the optimal policy by

V ∗t (xt) := mina∈AVt(xt, a),

α∗t (xt) = arg mina∈AVt(xt, a),

α∗T (xT ) = MO,

V ∗T (xT ) = f,

(2.29)

Then, DP leads to the following backward recursion: for 1 ≤ t < T ,

Vt(1, BB) = p(1− q)(V ∗t+1(1) + 1) + (1− p+ pq)(−1− r),Vt(1, NO) = pV ∗t+1(1) + (1− p)V ∗t+1(−1)− 1 + 2p,

Vt(−1, BB) = (1− p− q + pq)(V ∗t+1(1) + 1) + (p+ q − pq)(−1− r),Vt(−1, NO) = pV ∗t+1(1) + (1− p)V ∗t+1(−1) + 1− 2p,

Vt(1,MO) = Vt(−1,MO) = f.

(2.30)

Let αt = (αt, αt+1, ..., αT ) be a truncated policy starting at time t. It isclear that at time t − 1, αt−1 = (αt∗,MO) gives Vt−1(xt−1, α

t−1) = V ∗t (xt) =V ∗t (xt−1). That is, V ∗t−1(1) ≤ V ∗t (1) and V ∗t−1(−1) ≤ V ∗t (−1). Therefore we havethe monotonicity for V ∗t (1) and V ∗t (−1).

Proposition 2.7. Both V ∗t (−1) and V ∗t (1) are non-decreasing functions of t.

To derive an analytic result for V ∗t (1) and V ∗t (−1), we first state the followinglemma.

Lemma 2.4. For any t, 1 ≤ t ≤ T − 1, the following inequalities always hold:

f ≥ V ∗t (1) > −r − 2 +p

(1− p)(p+ q − pq),

Vt(1, BB) < Vt(1,MO),

Vt(−1, BB) < Vt(−1, NO).

(2.31)

26

Page 34: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

That is, if Xt = 1, then one should either wait or use the best bid order; if Xt = −1,then one should use either market order or the best bid.

Now, given the Markov property of (At, At−1) or equivalently that of (At, Xt),a threshold-type optimal strategy is expected. Indeed, we can derive explicitly theoptimal strategy and the corresponding value function.

Theorem 2.2 (Optimal policy). There exist two integers t∗1, t∗2 with t∗1 < t∗2 such

that

• for any t < t∗1, α∗t (−1) = BB, α∗t (1) = NO;

• for any t∗1 ≤ t < t∗2, α∗t (−1) = α∗t (1) = BB;

• for any t∗2 ≤ t, α∗t (−1) = MO, α∗t (1) = BB.

Here,

t∗1 = T−⌈

1

log(p− pq)

· logq(1− 2p)

((1− p+ pq)(f + 2 + r)− 1)(1− q)(p2q + 1 + p2 − 2p)

⌉− 1,

(2.32)and

t∗2 = T −⌈

1

log(p− pq)· log

(f + r + 1)(1− p+ pq)− (1− p)(1− q)(1− p)(1− q)((f + 2 + r)(1− p+ pq)− 1)

⌉. (2.33)

(See Figure 2.2.) Moreover, one has explicit expressions for V ∗t (1) and V ∗t (−1)(t ≤ T ) as follows:

V ∗t (1) =(p− pq)(T−t)

(f + 2 + r − 1

1− p+ pq

)− 2− r +

1

1− p+ pq, t∗1 ≤t ≤ T,

A ·

(a1 +

√a2

1 + 4a2

2

)t∗1−t+1

+B ·

(a1 −

√a2

1 + 4a2

2

)t∗1−t+1

+ a4, t < t∗1,

(2.34)

where a1 = p, a2 = (1− p)(1− p− q + pq), a3 = 2p− 1− (1 + r)(1− p)(p+ q −pq) + (1− p)(1− p− q+ pq), a4 = a3

1−a1−a2, and coefficients A and B are given by

the following linear equation system:

A+B = V ∗t∗1+1(1)− a4,

Aa1 +

√a2

1 + 4a2

2+B

a1 −√a2

1 + 4a2

2= V ∗t∗1(1)− a4.

(2.35)

27

Page 35: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

V ∗t (−1) =

f, for t ≥ t∗2,(p+ (1− p)q)(−1− r) + (1− p)(1− q)(1 + V ∗t+1(1)), for t < t∗2.

(2.36)

Note that both t∗1 and t∗2 could be negative in these expressions. This is hardlysurprising since what really matters here is the remaining time until T , i.e., T − t.At T , both t∗1 and t∗2 could then be negative.

0 t1

* t2

*

Wait Best

bidTBest bid

Best bid

Market order

When Xt-1

=-1

When Xt-1

=1

Figure 2.2: Illustration of the optimal trading strategy for 1 < t ≤ T

Given the expressions for V ∗t (1) and V ∗t (−1) for t ≤ T , and the probabilitydistribution of the first step X1 without given X0, the expected costs at time 0 aswell as the optimal placement strategy can be derived in terms of p.

Corollary 2.1.

costL = (1− p+ pq)(−1− r) + (p− pq)(1 + V ∗1 (1))

= p(1− q)(2 + r + V ∗1 (1))− 1− r, (2.37)

costN = (1− p)(−1 + V ∗1 (−1)) + p(1 + V ∗1 (1))

= p(V ∗1 (1) + 2− V ∗1 (−1))− 1 + V ∗1 (−1), (2.38)

costM = f, (2.39)

where costL, costN , costM are the expected costs for purchasing 1 share if takingBB, NO, MO at t = 0, respectively. The optimal strategy at time 0 is a thresholdtype, based on comparison among these three expressions.

28

Page 36: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Simple calculations show that costL and costN are linear functions with respectto p with positive first order coefficients. Since costM is a constant, the optimalplacement strategy will be of a threshold type as we derived in the single stepmodel, when focusing only on the parameter p. Depending on the intersections ofcostL, costN , and costM , (some of which may lie beyond (0, 1),) the decision touse market order, the best bid order, or to wait, will depend on at most two of thethree intersections p∗∗1 , p∗∗2 , p∗∗3 , which are given by

p∗∗1 =f + r + 1

(1− q)(2 + r + V ∗1 (1)),

p∗∗2 =f + 1− V ∗1 (−1)

V ∗1 (1) + 2− V ∗1 (−1),

p∗∗3 =V ∗1 (−1) + r

V ∗1 (−1) + (1− q)r − 2q − qV ∗1 (1),

where p∗∗1 is the intersection of costL and costM , p∗∗2 is the intersection of costN

and costM , and p∗∗3 is the intersection of costN and costL. In particular, if allof them are outside [0, 1], then it means we will stay with only one order for allp ∈ [0, 1]. Moreover, if p = 0, then placing the best bid order is always better thanmarket order and if p = 1, then placing the best bid order is always better thanto wait.

Note that if T = 1, then both the single-step model and multi-step model yieldthe same optimal trading strategy: use the best bid if p < r+f+1

(r+f+2)(1−q) and usethe market order otherwise.

29

Page 37: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Chapter 3

A model with price impact

In the last chapter, the optimal placement problem is studied with the assumptionof no price impact from any market or limit orders. In this chapter, a martingaleprice model with an additive price impact is proposed. Moreover, the choices arerestricted to the best bid orders and the market orders. Price impact is usuallystudied in the optimal execution models, as reviewed in the following section.

3.1 Review of optimal execution models

The basic task for the agent is to buy (sell) a large block of shares of stock overa given period. And the essentials of the optimal execution problem are how tomodel the price impact from the orders placed by the particular trader and whatobjective function to optimize. Intuitively, the price might be driven up fast ifthe trader places orders too fast, and one might lose opportunities and bear largeruncertainty if the trader places orders too slow.

3.1.1 Bertsimas and Lo’s model

Bertsimas and Lo (1998) propose an optimal execution model which minimizesthe total expected trading cost when purchasing a large block of equity over afixed time horizon. Price impact considered in their model leads to the optimaltrading strategy which splits the volume as much as possible. Under a variety ofcircumstances, they showed that an optimal execution strategy could be derivedfrom the dynamic programming principle.

The model is described as follows. Let (0, 1, · · · , T ) be a sequence of timepoints where the trader places orders and N denote the number of shares thetrader needs to purchase over time [0, T ]. Assume that the price at time t is Pt

30

Page 38: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

and the trader buys St shares during the period t. Then the objective here is tominimize the expected total cost:

minS1,··· ,ST

E[ T∑t=1

PtSt

]subject to

T∑t=0

St = N & dynamics of Pt

(3.1)

Note that if no intermediate selling is allowed, it is equivalent to add an additionalconstraint: St ≥ 0, for 1 ≤ t ≤ T .

The model for Ptt≥1 is as follows. For 1 ≤ t ≤ T ,

Pt = Pt−1 + εt + θSt

= P0 +

t∑i=1

εi + θ

t∑i=1

St(3.2)

where θ > 0 represents the price impact from the particular trader, and εt1≤t≤T isan sequence of i.i.d. random variables with E[εt|St, Pt−1] = 0. From the expression,they actually made the following assumptions:

• Without the particular trader’s order, the price dynamics itself is a martin-gale with independent price increments.

• The price impact from the particular trader is permanent.

Dynamic programming principle (DPP) is applied to solve this problem. LetWt = Wt−1 − St−1 denote the number of shares left to purchase at time t, withW1 = N and WT+1 = 0.

• Pt−1, Wt are “State variables” at time t, containing all information to makedecisions for the next period.

• St is the decision variable at time t.

Suppose S∗1 , · · · , S∗T is an optimal solution to (3.1), then S∗t , · · · , S∗T is still

optimal for Et[∑T

k=t PkSk]. The Bellman equation could be formulated as follows.

Let Vt(Pt−1,Wt) denote the optimal expected cost at time t with Wt to purchaseand previous price Pt−1, then for t = T ,

VT (PT−1,WT ) = WT (PT−1 + θWT ) (3.3)

31

Page 39: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

as we have no choice but ST = WT . For a general t < T ,

Vt(Pt−1,Wt) = minSt

E[PtSt + Vt+1(Pt,Wt+1)], (3.4)

where Wt+1 = Wt − St.Now, observe the next-to-last period T − 1, the Bellman equation becomes

VT−1(Pt−2,WT−1) = minST−1

ET−1[PT−1ST−1 + VT (PT−1,WT )]

= θS2T−1 − θWT−1ST−1 + θW 2

T−1 + PT−2WT−1.

This is a convex and quadratic function w.r.t. ST−1. Take derivative w.r.t. ST−1

and set it to 0, we have S∗T−1 =WT−1

2 and

VT−1(PT−2,WT−1) =3

4θW 2

T−1 + PT−2WT−1. (3.5)

Continue this fashion, the optimal value function VT−k(PT−k−1,WT−k) could beobtained recursively,

S∗T−k =WT−kk + 1

(3.6)

VT−k(PT−k−1,WT−k) = WT−k(PT−k−1 +k + 2

2(k + 1)θWT−k). (3.7)

Moreover, take k = T − 1, we have

S∗1 =W1

T=N

T(3.8)

V1(P0,W1) = W1(P0 +T + 1

2TθW1) = P0N +

θN

2(1 +

1

T) (3.9)

Discussions There are variants of Bertsimas and Lo (1998). One of themconsiders market condition/private information as follows:

Pt = Pt−1 + θSt + γXt + εt

Xt = ρXt−1 + ηt ρ ∈ (−1, 1)(3.10)

where εtt≥1 and ηtt≥1 are two sequences of i.i.d. random variables with 0mean and finite variance, and they are mutually independent as well. Xtt≥1

represents the market condition/private information. Similar calculation leads tothe optimal solution:

S∗T−k = δW,kWT−k + δX,kXT−k, (3.11)

32

Page 40: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

where

δW,k =1

1 + k, δX,k =

ρbk−1

ak−1, (3.12)

ak =θ

2(1 +

1

k + 1) (ρ = 0 implies δX,k = 0), (3.13)

bk = γ +θρbk−1

2ak−1(> 0, if θ, ρ, γ > 0), (3.14)

Essentially, the optimal trading strategy is “deterministic” (independent of Pt),with adjustment for market conditions.

Almgren and Chriss (2001) extend this model with considering the variance ofthe total trading cost as a component of the objective function. Moreover, theyallow permanent price impact as well as temporary price impact for the trader’sorder to the price dynamics of the underlying asset. There are further studies basedthis model, for instance, Almgren and Lorenz (2007) develop adaptive strategies,while Brunnermeier and Pedersen (2005), Carlin et al. (2007) introduce predatorytrading strategies between two parties.

These models start with assumptions on the dynamics of the underlying as-set price and the impact from the particular trader’s order and then formulatethe objective functions. The LOB information does not appear in those stud-ies. Obizhaeva and Wang (2013) propose an optimal execution model with thedynamics of supply/demand from the limit order book.

A lot of further generalizations inspired by Obizhaeva and Wang (2013) havebeen done later on. For instance, Alfonsi et al. (2008), Alfonsi et al. (2010),Alfonsi and Schied (2010), and Predoiu et al. (2011) develop models with moregeneral settings on the shape functions for the density of the limit order book.Moreover, permanent price impact, as well as transient price impact are studiedin the literature.

Alfonsi and Blanc (2014) use Hawkes processes for modelling market buy andsell orders issued by other traders, which enables them to solve the optimal exe-cution problem explicitly. Moreover, a necessary and sufficient condition on theparameters of the Hawkes model is derived to rule out high-frequency arbitrages.

There are many studies on the optimal execution problem focusing on mod-elling the price impact and optimizing the total execution cost in different ways.Gatheral and Schied (2013) provide a detailed survey on price impact models withassociated optimal execution strategies.

33

Page 41: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

3.1.2 Optimal execution with market orders and limitorders

In the above studies, only market orders are used as the execution risk is notconsidered. Cartea and Jaimungal (2014) develop optimal execution strategieswith both market orders and limit orders, which is similar to market makingmodels with the micro-structure of the LOB. In this model, it is assumed that

• The mid-price of the underlying asset follows:

Pt = P0 + σ(Z+t − Z

−t ), (3.15)

where σ > 0 is the tick size and Z±t are mutually independent Poissonprocesses both with intensity γ.

• At any time t, there is always one unit of the limit order posted in the LOBat Pt − δt. δt is a control variable that determines how deep the limit orderis placed. Meanwhile, market orders will be executed at Pt + ∆ + f , where∆ is half of the spread and f denotes the transaction cost. Note that thereis no price impact

• Between time t and t + dt, the limit order is filled with probability −κδt,where κ > 0.

• At the beginning, the agent has no positions and needs to have N shares bytime T .

• At time T , if there are NT shares remaining to purchase, one has to usemarket orders to fulfil the position. The cost would be

NT (PT + ∆ + f + c(NT )), (3.16)

where c(NT ) represents the price impact from placing NT shares marketorder.

Let Lt denote the number of shares the agent bought via limit orders up to time t,and similarly Mt is for the number of shares bought via market orders up to timet. And let nt = Lt +Mt. With the above assumptions, the agent’s wealth processXt satisfies

dXt = −(Pt− − δt−)dLt − (Pt− + ∆ + f)dMt, (3.17)

And the value function for the agent is

H(t, x, P, n) = supa∈A

Et,x,P,n[XT − NT (PT + ∆ + f + c(NT ))− φ

∫ T

t(nu − nu)2du

].

(3.18)

34

Page 42: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A is the set of strategies, φ > 0, and n denotes the target inventor schedule. Thelast term in the value function penalizes the deviation from the target schedule.Moreover, NT = n − (nT − nt), and Et,x,P,n denotes the conditional expectationgiven that Xt− = x, Pt− = P , nt− = n. As an example studied in this paper, thetrading speed in the Almgren–Chriss model is used as the target inventory:

nt = N(1− sinh(κ(T − t))sinh(κT )

) (3.19)

where κ is determined by model parameters. The dynamic programming principleis used to claim that (3.18) is the unique viscosity solution to the quasi-variationalinequality (QVI):

maxHt + γ

(H(t, x, P − σ, n))− 2H(t, x, P, n) +H(t, x, P + σ, n)

)− φ(n− nu)2 + λ sup

δe−κδ

[H(t, x− (P − δ), P, n+ 1)−H(t, x, P, n)

];[

H(t, x− (P + ∆ + f), P, n+ 1)−H(t, x, P, n)]

= 0,

(3.20)for n = 0, 1, · · · , N − 1 and the value function is subject to the terminal andboundary conditions

H(T, x, P, n) = x− (N − n)(P + ∆ + f + c(N − n)), q = 0, 1, · · · , N − 1,

H(t, x, P,N) = x− φ∫ T

t(N − nu)2du.

Furthermore, with a fixed target inventory schedule like (3.19), numerical tech-niques are adopted for applications.

Compared to classical optimal execution model literature, this paper considersboth limit orders and market orders and benefits from earning the spread via limitorders. However, this model has volume restriction and the price impact is notcomplete. Huitema (2014) considers linear permanent price impact from executedorders as well as outstanding limit orders, and allows multiple outstanding limitorders simultaneously in the LOB. Then they derive the Hamilton–Jacobi–Bellmanequation by dynamic programming along with numerical techniques for practicalapplications. There are several more studies on the optimal use of market or-ders and limit orders in the execution problems have been discovered by differentresearchers.

3.1.3 Market making problems

The optimal placement problem and optimal execution problem are also related tothe well-known market-making problem, one of the central problems in algorithmic

35

Page 43: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

trading. Market-making strategies involve simultaneously placing limit and marketorders to buy and sell. The goal of the market maker is to maximize the profitby playing with the spread between the bid and ask prices, while controlling theinventory risk and the execution risk. Stochastic control was applied to tackle theoptimization problem in an order book in the early 1980s. Ho and Stoll (1981)study a single dealer with stochastic demand modelled by a Poisson process andreturn risk on stock modelled by diffusion processes and derived optimal bid andask quotes around a “true” price for the asset. Based on this model, Avellanedaand Stoikov (2008) also take the microstructure of actual limit order books intoaccount.

Avellaneda and Stoikov’s model

Let the underlying asset price evolve according to dPt = σdWt, where Wt is astandard one-dimensional Brownian motion and σ is constant. The agent’s valuefunction of simply holding q shares of stock until the terminal time T is

v(x, P, q, t) = Et[− exp(−γ(x+ qPT ))]

= − exp(−γx) exp(−γqP ) exp(γ2q2σ2(T − t)

2

) (3.21)

where x is the initial wealth, γ is the continuous discount rate. First, the agent’sreservation bid price rb could be derived by

v(x− rb(P, q, t), P, q + 1, t) = v(x, s, q, t). (3.22)

And this yields

rb(P, q, t) = P + (−1− 2q)γσ2(T − t)

2(3.23)

Similarly, the reservation ask price ra is given by

rb(P, q, t) = P + (1− 2q)γσ2(T − t)

2(3.24)

Now assume that the agent quotes the bid price pb and the ask price pa, and iscommitted to respectively buy and sell one share of stock at these prices. Moreover,the market buy/sell orders against the agent’s ask/bid orders at the Poisson rateλa(δa)/λb(δb), where δb = P − pb, δa = pa − P are the distances between thequoted prices and the mid-price, and both λa and λb are decreasing functions. LetNat denote the amount of shares sold and N b

t denote the amount of shares bought.Then both of them are Poisson processes with intensities λa(δa) and λb(δb). Thecash held by the agent is given by

dXt = paDNat − pbdN b

t . (3.25)

36

Page 44: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

The number of shares held at time t is given by

qt = N bt −Na

t . (3.26)

The objective of the agent is

u(P, x, q, t) = maxδa,δb

Et[− exp(−γ(XT + qTST ))

]. (3.27)

This type of optimization problem was first studied in Ho and Stoll (1981). Theyapplied dynamic programming principle to show that the function u solves theHamilton–Jacobi–Bellman equation

ut +1

2σ2uss + max

δbλb(δb)[u(P, x− P + δb, q + 1, t)]− u(P, x, q, t)]

+ maxδa

λa(δa)[u(P, x− P + δa, q + 1, t)]− u(P, x, q, t)] = 0

u(P, x, q, T ) = − exp(−γ(x+ qP )).

(3.28)

The remaining piece of this problem is to model the intensity functions λ(δ). Theprice impact model used here is from Potters and Bouchaud (2003). Let δP bethe price change caused by a large market order Q, then

δP ∝ log(Q). (3.29)

And a power law is used for the distribution of the size of market orders,

fQ(x) ∝ x−1−α, (3.30)

where x is the size of a large order. α varies in different literature; see Gopikrishnanet al. (2000), Maslov and Mills (2001), and Gabaix et al. (2005). Then aggregatingthe above information, one could derive that

λ(δ) = A exp(−kδ), (3.31)

where A and k are parameters determined by the market. However, due to thecomputational difficulty in solving the HJB equation (3.28), an asymptotic expan-sion method is developed to approximate the optimal controls. In many otherexisting studies, numerical procedures to derive optimal strategies are also inves-tigated; see, for example, Bayraktar and Ludkovski (2014), Li and Horst (2013),Cartea et al. (2014), Cartea and Jaimungal (2013), Guilbaud and Pham (2013),and Gueant et al. (2012).1 Indeed, the market-making problem is the optimal

1There are also order scheduling problems especially when orders can be placed indifferent exchanges with different fee structures; see Laruelle et al. (2011) and Cont andKukanov (2013).

37

Page 45: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

placement problem with the possibility of intermediate buying. In this regard,the optimal placement problem may be viewed as a basic question in algorithmictrading.

Given the complexity of the market-making problem and the difficulty to obtainany analytical results (so far), the natural question is: do we have a better luckwith the simpler optimal placement problem? If so, can we obtain any usefulinsights from the results? This is the motivation for our work.

3.2 A price impact model with best bid or-

ders and market orders

3.2.1 Summary of contributions

Most of the existing literature on optimal execution focuses on how to optimallycontrol the trading speed with using only market orders. The primary purpose hereis to draw comparison between the optimal placement problem and the optimalexecution problem. We will add the limit order option into Bertsimas and Lo’smodel and analyze the structure of the optimal strategy. We will show that theoptimal trading strategy never mixes the limit and market orders; consequently,the optimal strategy can be computed recursively. In a special and degenerate caseof the model, our result reduces to the deterministic strategy of Bertsimas and Lo(1998) for the optimal execution problem. In a related work, Huitema (2014)studies the optimal execution problem with the price impact driven by imbalanceof the LOB in a Brownian motion framework. Our model setting here is differentand the main focus is to illustrate the connection between optimal execution andoptimal placement. In addition, A linear price impact will be used just as in Contet al. (2014).

3.2.2 Dynamics of the price model and analysis.

Let At be the best ask price at time t, and let εtt=1,2,··· ,T be a martingale withmean 0. Then the dynamics of At is modeled as:

At+1 = At + c1mt + c2Itlt + εt+1, (3.32)

with A0 = 0. Here,

It =

1 if the limit order placed at time t was executed by time t+ 1,

0 otherwise,

(3.33)

38

Page 46: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

c1 and c2 are the price impact factor for market orders and limit orders, and mt

and lt are the order sizes placed at time t for market orders and limit orders,respectively.

Now, let r be the rebate for an executed limit order and f be the transactionfee for a market order. At each time, a limit order will be executed with probabilityone at the price of 1 tick lower than At. Independent of whether the limit order isexecuted or not, the transaction price for a market order and limit order at time twill be At + c1mt + c2lt + f + εt and At + c1mt + c2lt + εt− 1− r, respectively. Forease of exposition and without much loss of generality, we assume that c1 = c2 = c.(In reality, it has been observed that c1 > c2 since the market order will affect thetrading directly and immediately while a large limit order may take longer time.But it will be evident that this differentiation of c1 and c2 will not change muchof the structural results.)

Clearly, because of the price impact, the reduction of a general N to N = 1 isno longer valid. Now (3.32) is rewritten as

At+1 = At + c(mt + Itlt) + εt+1. (3.34)

Moreover, we assume that the probability of the limit orders being executed is pl.Let Ct(nt,mt, lt, At) be the expected cost at time t with current price of At,

nt (0 ≤ nt ≤ N) shares left to purchase, placing lt limit orders and mt marketorders. Let Vt(nt, At) be the expected cost after optimization over mt and lt. Thenaccording to the dynamic programming principle, the optimal placement problemis to find

Vt(nt, At) = min0≤mt,ltmt+lt≤nt

Ct(nt,mt, lt, At), 1 ≤ t ≤ T − 1, (3.35)

VT (nT , AT ) =nT (f +AT + cnT ), (3.36)

with

Ct(nt,mt, lt, At) =Emt(f +At + c(mt + lt) + εt)

+ pllt(At − r − 1 + c(mt + lt) + εt)

+ plVt+1(nt −mt − lt, At + c(mt + lt) + εt)

+ (1− pl)Vt+1(nt −mt, At + cmt + εt). (3.37)

subject to (3.34).By mathematical induction, it is easy to check the following.

Lemma 3.1. For 0 ≤ t ≤ T − 1,

Ct(nt,mt, lt, x) = Ct(nt,mt, lt, 0) + xnt,

39

Page 47: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

and

Vt(nt, x) = Vt(nt, 0) + xnt.

This implies that the influence of the current price is a linear shift of the totalcost and will not affect the optimization over mt and lt. Thus

(Mt, Lt) = arg min0≤mt,ltmt+lt≤nt

Ct(mt, lt, nt, At),

is independent of At.

Properties of the optimal strategy for period t. The above analysissuggests that Mt and Lt are functions of T − t and nt. To make the notationsimpler, let a = r+f+1

c be the normalized difference between market order and limitorder and write Ct(nt,mt, lt) and Vt(nt) for Ct(nt,mt, lt, r + 1) and Vt(nt, r + 1),respectively. We see for 0 ≤ t ≤ T − 1,

Ct(nt,mt, lt) =mt(mt + lt + a) + (1− pl)[Vt+1(nt −mt) +mt(nt −mt)]

+ pllt(mt + lt) + pl[Vt+1(nt −mt − lt) + (mt + lt)(nt −mt − lt)]=amt + ntmt + plntlt + (1− pl)mtlt

+ plVt+1(nt −mt − lt) + (1− pl)Vt+1(nt −mt)

Theorem 3.1. For any t and nt,

Mt · Lt = 0,

i.e., the optimal strategy involves either market order or limit order at each stepbut never both. Moreover, Vt(nt) is a continuous, piece-wise quadratic function ofnt with the second order coefficients within (1/2, 1].

Connection to Bertsimas and Lo (1998). The study of the optimal exe-cution problem is pioneered in Bertsimas and Lo (1998), where the stock price ismodeled by a simple random walk with an additive impact of large sales. An in-triguing consequence of this modeling approach is that the optimal strategy turnsout to be more or less static or deterministic, i.e., evenly dividing the total numberof shares N over the T selling period is optimal.

Obviously, pl = 0 will reduce our model with price impact to the model ofBertsimas and Lo (1998), with the optimal strategy the same as theirs. Indeed inthe case of pl = 0 meaning the limit order will not be executed for sure, then the

40

Page 48: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

market order always dominates the limit order. In (3.38), substituting pl with 0,we get

VT−1(x,AT−1) = min0≤mT−1,lT−1mT−1+lT−1≤x

mT−1(AT−1 + c(mT−1 + lT−1) + f)

+ (x−mT−1)(cx+AT−1 + f).

Since (mT−1, lT−1) is always dominated by (mT−1, 0) if both of them are feasible,we have LT−1 = 0, and

VT−1(x,AT−1) = min0≤lT−1≤x

cm2T−1 − cxmT−1 + x(AT−1 + cx+ f),

whose minimum is 3cx2/4 + x(AT−1 + f) attained at mT−1 = x2 . Inductively,

suppose (Mt+1 = x/(T − t), Lt+1 = 0) is the optimal solution for the period t, 0 ≤t ≤ T − 1 and Vt+1(x,At+1) = cx2(1 + 1/(T − t))/2 +x(At+1 + f). Then at time t,

Ct(x,mt, lt, At) =mt(At + c(mt + lt) + f) + c(x−mt)2(1 + 1/(T − t))/2

+ (x−mt)(At + c(mt + lt) + f)

=T − t+ 1

2(T − t)c(mt + lt)

2 − 1

T − t(cx− r − f − 1)(mt + lt)

+T − t+ 1

2(T − t)cx2 + x(At − r − 1)− (r + f + 1)lt.

Obviously, Ct increases as lt increases, therefore Lt = 0. Then,

Ct(x,mt, 0, At) =mt(At + cmt + f) + c(x−mt)2(1 + 1/(T − t))/2

+ (x−mt)(At + cmt + f)

=T − t+ 1

2(T − t)cm2

t −1

T − tcxmt +

T − t+ 1

2(T − t)cx2 + x(At + f).

Now, simple calculations yield Mt = xT−t+1 , and Et(x,At) = cx2(1 + 1/(T − t +

1))/2+x(At+f). Thus by induction, the optimal strategy is to always use marketorder, and if there are T periods in total, then each time one places 1/T of thetotal volume.

Another extreme case of our model is when pl = 1, which means the limit orderwill be executed for sure. Intuitively, since there is no immediate price impact tothe execution price of the limit order and the limit order is getting executed withprobability 1, it is then desirable to place all the orders at the same time tominimize the price impact. We can see this is indeed the case. For t = T , one will

41

Page 49: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

choose to use the limit order for all the non-executed positions since it is cheaperand could be executed for sure. For t = T − 1,

VT−1(x,AT−1) = min0≤mT−1,lT−1mT−1+lT−1≤x

mT−1(AT−1 + c(mT−1 + lT−1) + f)

+(x−mT−1 − lT−1)(c(mT−1 + lT−1) +AT−1 − r − 1)

+lT−1(AT−1 − r − 1).

Since (mT−1, lT−1) is dominated by (0, lT−1 + mT−1) and since both are feasible,we have

VT−1(x,AT−1) = min0≤lT−1≤x

−cl2T−1 + cxlT−1 + (AT−1 − 1− r)x

Then VT−1(x,AT−1) = (AT−1 − 1− r)x with LT−1 = 0 or LT−1 = x. Recursively,it is easy to show that the optimal trading strategy for pl is to place the totalnumber of orders together at any of the period.

An explicit result for the second last step

Optimal placement problem with price impact is in general more complex despitethe analytical structure that limit order and market order are never mixed in anoptimal strategy. To get a sense of the complexity, we give some illustration fort = T − 1 with an explicit optimal strategy. Clearly,

V (x,AT−1) = min0≤mT−1,lT−1mT−1+lT−1≤x

mT−1(f + c(mT−1 + lT−1) +AT−1)

+ (1− pl)(x−mT−1)(f + cx+AT−1)

+ pl[lT−1(−1− r +AT−1)

+ (x−mT−1 − lT−1)(f + cx+AT−1)].

(3.38)

For any fixed x and AT−1, the RHS of (3.38) is a quadratic function of mt−1 andlt−1, whose Hessian is (

2c 1c1c 0

), (3.39)

whose determinant is −c2 < 0 for c > 0. Clearly this Hessian is neither positivedefinite nor negative definite for all mt−1 and lt−1. Thus the function will reachits minimum only on the boundary. Moreover,

• If pl <14 , then there are two scenarios:

42

Page 50: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

1. For 0 ≤ x ≤ 4pl(r+f+1)(1−4pl)c

, then MT−1 = 0, LT−1 = x;

2. For 4pl(r+f+1)(1−4pl)c

< x, then MT−1 = 12x, LT−1 = 0.

• If 14 ≤ pl ≤ 1, then MT−1 = 0, LT−1 = x.

43

Page 51: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Chapter 4

Dynamics of order positions inan LOB

4.1 Review of the heavy traffic limits and the

LOB modelling

4.1.1 Heavy traffic limits

Generally speaking, heavy traffic limits are developed for simpler description andapproximation of queueing systems. A simple M/M/1 queueing system could bedescribed as follows. Requests arrive according to a Poisson process with intensityλ, while the service time is an exponential random variable with rate µ. Let C(t)denote the number of customers waiting in the system at time t. Then C(t)t≥0

is a continuous time Markov chain with transition rate matrix

Q =

−λ λµ −(λ+ µ) λ

µ −(λ+ µ) λµ −(λ+ µ) λ

· · · · · · · · ·

(4.1)

Let ρ = λ/µ and the scaled queue Cρ be defined by Cρ(t) = (1− ρ)C(t/(1− ρ)2).Then for any T > 0, as ρ ↑ 1,

Cρ ⇒ BR, in (D[0, T ], J1) (4.2)

where BR is a regulated Brownian motion defined by

BR(t) = B(t)− inf0≤s≤t

B(s), (4.3)

44

Page 52: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

where B(t) is a Brownian motion with drift term −µ and variance parameter 2µ.This result could be found in many standard references, for example, Ward andGlynn (2003).

Harrison (1985) gives a detailed discussion on the regulated Brownian motionand a stochastic flow system based on Brownian motions. Specifically, let It denotethe cumulative input up to time t and Ot denote the cumulative potential outputup to time t with I0 = 0 and O0 = 0. That is, Ot is the output if the serveris busy all the time from 0 to t. In addition, the buffer capacity b is introducedas the upper bound of the number of customers waiting in the system. DefineXt := X0 + It −Ot as the net flow process and Ut, Lt, Zt as follows:

• Lt and Ut are increasing and continuous with L0 = U0 = 0,

• Zt := Xt + Lt − Ut ∈ [0, b] for all t ≥ 0,

• Lt and Ut increase only when Z = 0 and Z = b, respectively.

Here, Ot − Lt represents the actual output as Lt, the virtual outflow during theidle time, is subtracted from Ot. Similarly, It − Ut is the actual input as Ut, theinput occurred when the buffer was full, is subtracted from It. Zt describes thedynamics of the system. When considering the limiting system, Xt could be shownto be a Brownian motion with drift µ and instantaneous variance σ, and Zt is atwo-sided regulated Brownian motion. Taking b =∞ gives the one-sided regulatedBrownian motion as we introduced by (4.3). Furthermore, one can formulate astochastic control problem where Lt and Ut are used as the controllers and Zt isthe controlled process.

There are a lot of studies on heavy traffic limits for more general queueingsystems, with general arrival distributions, general service time distributions, andwith the possibility of multiple servers. In addition to the M/M/1 queue, thecustomers in the line are assumed to be impatient and reneging is considered inWard and Glynn (2003), Ward and Glynn (2005), Kang et al. (2010), among oth-ers. Each single individual leaves the queue according to an exponential randomvariable, that is, the reneging rate is proportional to the current queue length,denoted by γC(t). When µ = 0, it is easy to see that this system is equivalent tothe M/M/∞ queue with a service rate γ. Under different parameter settings, “re-flected” Ornstein–Uhlenbeck processes as the diffusion limit processes are derived.

4.1.2 Kruk’s model

Due to the complexity of the LOB, there are only few papers analyzing the dynam-ics of the LOB in a mathematically rigorous manner. Kruk (2003) is among thefirst to give a functional limit approximation of such a system with an appropriate

45

Page 53: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

time scaling. A multi-price-level auction model, instead of the order flows and theLOB, was presented in this paper. However, the nature of this model is actuallyvery similar to the LOB, except there is no cancellation being considered.

In the auction, suppose that there are N price levels from P1 to PN , and Bi(t)denotes the outstanding bid orders at price level Pi at time t, while Ai(t) denotesthe outstanding bid orders at price level Pi at time t. Obviously, Ai(t)Bi(t) = 0for any t as these bid and ask orders at the same price level are executed againsteach other. Moreover, to derive the functional limit, it is assumed that there is a

sequence of systems indexed by n, that is, we have (B(n)i (t), A

(n)i (t))1≤i≤Nn≥1.

The model can be described as follows. For each n,

• Buyers arrive according to a renewal process with inter-arrival times u(n)k k≥1

with mean 1/λ(n) and standard deviation α(n), and v(n)k k≥1. Sellers arrive

also according to a renewal process with inter-arrival times v(n)k k≥1 with

mean 1/µ(n) and standard deviation β(n). And the two arrival processes aremutually independent.

• The kth buyer (seller) is willing to buy (sell) l(n)k (m

(n)k ) shares, where

l(n)k k≥1 (m(n)

k k≥1) is a sequence of positive i.i.d. random variables withmean l(n) (m(n)) and standard deviation κ(n) (ν(n)).

• The kth buyer (seller) is willing to buy (sell) at the price b(n)k (a

(n)k ), where

b(n)k k≥1 (a(n)

k k≥1) is a sequence of i.i.d. random variables with

P(b(n)k = i) = P(a

(n)k = i) = pi, i = 1, 2, · · · , N, k ≥ 1. (4.4)

The following assumptions are made.

• There exists positive constants l, κ, ν, λ, α, β, γ1, γ2, γ3, γ4, such that

limn→∞

l(n) = limn→∞

m(n) = l, limn→∞

κ(n) = κ, limn→∞

ν(n) = ν,

limn→∞

λ(n) = limn→∞

µ(n) = l, limn→∞

α(n) = κ, limn→∞

β(n) = ν,

limn→∞

√n(λ− λ(n)) = γ1, lim

n→∞

√n(λ− µ(n)) = γ2,

limn→∞

√n(l − l(n)) = γ3, lim

n→∞

√n(l − m(n)) = γ4.

• The probability that there are customers of different types who come to thenth auction exactly at the same time converges to 0 as n→∞.

46

Page 54: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

With a proper scaling, main results derived in this paper include:

• When N = 2, that is, when there are only two price levels, then with the

scaling B(n)k (t) = 1√

nB

(n)k (nt) and A

(n)k (t) = 1√

nA

(n)k (nt), a diffusion limit is

derived as follows:

(A(n)1 , B

(n)1 , B

(n)2 , A

(n)2 )⇒ (0, 0, Z). (4.5)

where Z is a semimartingale reflected Brownian motion.

• When N ≥ 3, the following scaling is used. B(n)k (t) = 1

nB(n)k (nt) and

A(n)k (t) = 1

nA(n)k (nt). Then

(A(n), B(n))⇒ (ae, be), (4.6)

where a, b are two constants determined by the model parameters (λ, µ, l,m, (pi)1≤i≤N , etc.) and e denote the identical mapping from R to R.

4.1.3 Cont and de Larrard’s model

Limit order book model: level-1

Cont and De Larrard (2013) propose a queueing model for approximating the LOBwith the following assumptions:

• All orders are of sizes 1,

• Limit orders, market orders, and cancellations arrive as independent Poisonprocesses with intensities λ, µ, θ on both ask and bid queues,

• The best ask queue and the best bid queue are independent of each other,

• The bid-ask spread is always 1,

• When the best bid queue is depleted, both the best bid price and the bestask price will move down 1 tick. The new best bid queue and the new bestask queue will be sampled from a joint density f(x, y), which is independentof the queue history,

• When ask queue is depleted, the bid and ask prices will both move up 1 tick.The new bid and ask size is sampled from a joint density f(x, y) independentof the queue history.

47

Page 55: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

This model can be viewed as a simplified version of Cont et al. (2010) as takingthe spread S = 1 and a fixed total cancellation rate, instead of proportional to thequeue length. This simplification allows analytic results for some key quantities.Actually, let (qb(t), qa(t))t≥0 denote the number of shares on the best bid queueand best ask queue at time t, then when prior to hitting 0 on either axis, it is aplanar random walk in the first quadrant. Moreover, it is easy to see,

• (qb(t), qa(t))→ (qb(t) + 1, qa(t)) with rate λ2(λ+µ+θ) ,

• (qb(t), qa(t))→ (qb(t)− 1, qa(t)) with rate µ+θ2(λ+µ+θ) ,

• (qb(t), qa(t))→ (qb(t), qa(t) + 1) with rate λ2(λ+µ+θ) ,

• (qb(t), qa(t))→ (qb(t), qa(t)− 1) with rate µ+θ2(λ+µ+θ) .

Let (qb(0), qa(0)) = (n, p) ∈ N2 denote the number of orders on the bid side andask side, respectively. Based upon the above level-1 model,

• The conditional distribution of the duration between price moves, given thestate of the order book, is derived. (That is, the distribution for the timeneeded to deplete one of the queues.)

• If λ = µ + θ, then the probability φ(n, p) that the next price move is anincrease, conditioned on having the n orders on the bid side and p orders onthe ask side is

φ(n, p) =1

π

∫ π

0(2− cos(t)−

√(2− cos(t))2 − 1)p

sin(nt) cos( t2)

sin( t2)dt,

• The autocorrelation and distribution of price changes. This result explainsthe negative lag-1 autocorrelation but not the other insignificant higher orderautocorrelations.

• The volatility of the price.

Heavy traffic limits for LOB

Cont and De Larrard (2012) then relax the independence and the unit order sizeassumptions. Let (V a

i , Vbi ) be the change of level-1 ask and bid queue lengths after

the ith event (market order, cancellation or limit order) happened. Let (τai , τbi ) be

the inter-event time. In the previous model, they have

P(V ai = 1) =

λ

λ+ µ+ θ, P(V a

i = −1) =µ+ θ

λ+ µ+ θ,

48

Page 56: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

with similar equations for V bi . In that model, τai and τ bi are independent expo-

nential with rate λ + µ + θ. However, in Cont and De Larrard (2012), (V ai , V

bi )

and (τai , τbi ) are assumed to be weakly dependent and covariance stationary. Let

(qa(t), qb(t)) be the ask and bid size at time t. Under the assumption of a balancedlimit order book in the sense that

E(V ai ) = E(V b

i ) = 0,

the rescaled order book process converges weakly:

(qa(nt)√

n,qb(nt)√

n)t≥0

d=⇒ (Qt)t≥0,

where (Qt)t≥0 is a planer Brownian motion with drift 0 and covariance matrix(λav

2a ρvavb

√λaλb

ρvavb√λaλb λbv

2b

).

with re-initialization distribution F (resp., F ) when it hits the x-axis (resp., y-axis). Both F and F are rescaled versions of f and f that in the previous section.Moreover, 1/λa = limn≥∞(

∑ni=1 τ

ai /n) is the average duration between events at

the ask and 1/λb = limn≥∞(∑n

i=1 τbi /n) is the average duration between events at

the bid. v2a = E(V a

1 )2+ 2∑∞

i=2 Cov(V a1 , V

ai ) is the variance of the event size at

the ask, and v2b = E(V b

1 )2+ 2∑∞

i=2 Cov(V b1 , V

bi ) is the variance of the event size

at the bid. Also,

ρ =Cov(V a

1 , Vb

1 ) + 2∑∞

i=2[Cov(V a1 , V

bi ) + Cov(V b

1 , Vai )]

vavb.

According to Cont and De Larrard (2012), ρ < 0 for equity order books. They areable to compute the following quantities from the diffusion approximation:

• Duration until the next price change,

• Probability of an increase in the price,

• In particular, if λa = λb and va = vb, such probability depends only on thebid size (x) and the ask size (y) in the following manner:

pup(x, y) =1

2−

arctan(√

1+ρ1−ρ

y−xy+x)

2 arctan(√

1+ρ1−ρ)

.

49

Page 57: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

4.1.4 Horst and Paulsen’s model

Horst and Paulsen (2015) propose a fluid limit model to address the best ask/bidprices, as well as the volume density function of the LOB. In their model, the stateof the LOB is denoted by S = (B,A, vb(·), va(·)), where B(A) is the best bid/askprice, and vb(x)/va(x) denotes the volume density at price distance x below/abovethe best bid/ask price. Moreover, x can be negative, which represents a shadow

book. Assuming that there is a sequence of systems indexed by n, n ≥ 1, S(n)k

denotes the nth system’s state after k events occurred in that system. x(n)j = j·δx(n)

denotes the price level at which orders can be submitted, where j ∈ Z and δx(n)

is the tick size in the nth system. The volume density functions in the nth systemafter k events are step functions as follows:

v(n)b,k (x) =

∞∑j=0

v(n),jb,k I[x

j(n),x(n)j+1

](x), v(n)a,k (x) =

∞∑j=0

v(n),ja,k I[x

j(n),x(n)j+1

](x). (4.7)

There are eight types of events – four on the bid side and four on the ask side.

A = market sell order B = limit bid placed in the spreadC = cancellation on bid D = limit bid placed not in the spreadE = market buy order F = limit ask placed in the spreadG = cancellation on ask H = limit ask placed not in the spread

They can be classified into two categories according to different efforts caused inthe LOB. Events which lead to price changes are called active orders. On the bidside, A and B are active orders. If the kth order in the nth system is of type A,then

B(n)k+1 = B

(n)k − δx(n), A

(n)k+1 = A

(n)k ,

v(n)b,k+1(·) = v

(n)b,k (·+ δx(n)), v

(n)a,k+1(·) = v

(n)a,k (·).

If the kth order in the nth system is of type B, then

B(n)k+1 = B

(n)k + δx(n), A

(n)k+1 = A

(n)k ,

v(n)b,k+1(·) = v

(n)b,k (· − δx(n)), v

(n)a,k+1(·) = v

(n)a,k (·).

Both type C and type D orders are considered passive orders, which do not changethe price. Let δvn denote the scaling parameter describing the impact of a singlelimit order (cancellation) on the state of the LOB. When the kth order is of typeC, let ωCk be a random variable taking value in (0, 1), representing the proportion

50

Page 58: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

of cancellation caused by this order at the corresponding bid queue. When the kth

order is of type C, let ωDk be a random variable taking value in [0,M ] for M > 0,representing the volume of the order. Moreover, πCk , πDk are two random variablestaking values in [−M,M ] representing the price level of the order. Then with atype C order, the dynamics of the LOB follows:

v(n)b,k+1(·) = v

(n)b,k (·)− δv(n)

δx(n)M

(n),Ck v

(n)b,k (·),

where

M(n),Ck = ωCk

∞∑j=−∞

IπCk ∈[x

(n)j ,x

(n)j+1)

(x).

While with a type D order, the dynamics of the LOB follows:

v(n)b,k+1(·) = v

(n)b,k (·) +

δv(n)

δx(n)M

(n),Dk v

(n)b,k (·),

where

M(n),Dk = ωCk D

∞∑j=−∞

IπDk ∈[x

(n)j ,x

(n)j+1)

(x).

In either case, the best bid/ask price and the volume density on the ask side remainunchanged.

Now let δt(n) denote the time scaling factor and τ(n)k denote the time the kth

event occurs in the nth system. Then

τ(n)k+1 = τ

(n)k + ϕk(B

(n)k , A

(n)k )δt(n),

where ϕkk≥1 is a sequence of non-negative random variables. Furthermore,φkk≥1 is a sequence of random variables taking values in A, · · · , H, rep-resenting the type of the kth order. Let δp(n) denote the scaling factor and

p(n)k = p(n),I(B

(n)k , A

(n)k ) = P[φk = I|S(n)

k ]. Therefore, the dynamics of the pro-

cess S(n)k = (B

(n)k , A

(n)k , v

(n)b,k , v

(n)a,k )k≥1 for each n as a Markov process is defined.

Now define

S(n)(t) = S(n)k and τ(n)(t) = τ

(n)k for t ∈ [τ

(n)k , τ

(n)k+1]. (4.8)

The following assumptions are made in Horst and Paulsen (2015):

• The initial volume density functions vanish out-side a compact interval[−M,M ] for some M > 0 and satisfies:

|v(n)r,0 (±δx(n) − v(n)

r,0 (·)|∞ = O(δx(n)),

limn→∞

||v(n)r,0 − vr,0||L2 = 0, lim

n→∞(B

(n)0 , A

(n)0 ) = (B,A),

51

Page 59: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

where || · ||L2 denotes the L2-norm on R with respect to Lebesgue measureand vr,0 ∈ L2 (r ∈ b, a) is non-negative bounded and continuously differ-entiable.

• For I ∈ C,D,G,H, the sequences ωIkk≥1 and πIkk≥1 are independentsequences of i.i.d. random variables. Moreover, the random variables πIkhave C2-densities f I with compact support.

• There are bounded continuous functions with bounded gradients P I : R2 7→[0, 1] such that

p(n)(·, ·) = δp(n) · pI(·, ·), for I = A,B,E, F,

p(n)(·, ·) = (1− δp(n)) · pI(·, ·), for I = C,D,G,H,

pA + pB + pE + pF = 1,

pC + pD + pG + pH = 1.

• The scaling constants δp(n), δx(n), δv(n), and δt(n) are such that

limn→∞

δx(n)δp(n)

δv(n)= c0, lim

n→∞

δv(n)

δt(n)= c1, and

δp(n)(δt(n)

)α = O(1),

for some constant α ∈ (1/2, 1) and constants c0, c1 > 0.

The following is their main result (Theorem 1.13 in Horst and Paulsen (2015)).

Theorem 4.1. Let S(n)n≥1 be the sequence of continuous time processes definedin (4.8) and suppose the above assumptions hold. Then, for all T > 0 there existsa deterministic process s such that

limn→∞

supt∈[0,T ]

||S(n)(t)− s(t)|| = 0 in probability. (4.9)

The process s is of the form s(t) =(γ(t), v(·, t)

)T, where γ(t) = (b(t), a(t))T is the

vector of the best bid and ask price at time t ∈ [0, T ] and v(·, t) = (vb(·, t), va(·, t))Tdenotes the vector of buy and sell volume densities at t relative to the best bid andask price. Moreover, γ(t) and v(·, t) could be specified as follows. Define

A(·) =

(pA(·)− pB(·) 0

0 pE(·)− pF (·)

)B(·, x) =

(pC(·)f (x) 0

0 pG(·)fG(x)

)

52

Page 60: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

and c(·, x) = (pD(·)fD(x), pH(·)fH(x))T , the function m(·, ·) specifies the expectedwaiting time between two consecutive active order arrivals, the function γ is theunique solution to the 2-dimensional ODE system

dγ(t)

dt=A(γ(t))

m(γ(t))

(1

1

), t ∈ [0, T ]

γ(0) =

(B0

A0

) (4.10)

and (vb, va) is the unique non-negative bounded classical solution of the PDEvt(t, x) =

1

m(γ(t))

(A(γ(t))vx(t, x) +B(γ(t), x)v(t, x) + c(γ(t), x)

),

(t, x) ∈ [0, T ]× R

v(0, x) = v0(0, x), x ∈ R

.

(4.11)

Recently, Horst and Kreher (2015) derive some similar results for the one-sidedlimit order book with more general conditions.

4.2 Summary of contributions

Without loss of generality, let us focus on an order position in the best bid queue.Its dynamics will be affected by both the market orders and the cancellations,and its relative position in the queue will be affected by limit orders as well.Order positions in other queues will be simpler because of the absence of marketorders. First, the fluid limits for the order positions and related (best) bid andask queues are derived. This is in some way the first-order approximation for theprocesses. It is then showed that the rate of the order position approaching zerois proportional to the mean of order arrival intensities and the average size of themarket orders, with appropriate modification by the cancellation orders on thequeue; the (average) time it takes for the order position to be executed is alsoderived. The derivation is via two steps. The first fairly straightforward step isto establish the functional strong law of large numbers for the related bid/askqueues. The second step is trickier although intuitively clear. It requires moredelicate analysis involving passing the convergence relation of stochastic processesin their corresponding cadlag space with the Skorokhod topology to their integralequations.

Next, the second-order approximation is studied for order positions and re-lated queues. The first step is to establish appropriate forms of the diffusion limit

53

Page 61: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

for the bid and ask queues. This multi-variate functional central limit theorem(FCLT) is established borrowing ideas from those for random fields. Under appro-priate technical conditions, it is demonstrated that the queues are two-dimensionalBrownian motions with mean and covariance structure explicitly given in terms ofstatistics of order sizes and order arrival intensities. This FCLT leads to analyticalexpression for the first hitting time of the queue depleting and the probability ofprice changes. These are useful quantities for LOBs and generalize existing resultsof Cont and De Larrard (2012). The second step is to combine the FCLTs andfluid limit results to show that fluctuations of the order positions are Gaussianprocesses with “mean-reversion”. The mean reverting level is essentially the fluidlimit of order position relative to the queue length modified by the order booknet flow defined as the limit order minus the market order and the cancellation.The speed of the mean reverting is proportional to the order arrival intensity andthe rate of cancellations. As a corollary of the analysis, explicit expressions areobtained for the fluctuations of execution and hitting times. In addition, with thelarge deviation principle, the probability that the queues deviate from their fluidlimits is also derived.

The analysis builds on techniques and results from classical probability the-ory, including the functional central limit theorems by Jacod and Shiryaev (1987),Glynn and Whitt (1988), and Bulinski and Shashkin (2007), the convergence ofstochastic processes by Kurtz and Protter (1991), and the sample path large de-viation principle by Dembo and Zeitouni (1998).

Practically speaking, studying order positions give more direct estimates forthe “value” of order positions. This is useful for algorithmic trading. Indeed, basedon the fluid limit, an explicit analytical comparison between the average time anorder is executed and the average time of any related queues being depleted isderived. This is an important piece of information, especially when combined withthe explicit form obtained in this chapter on the probability of a price increase.This latter quantity is a core quantity for the LOB, and has been studied inAvellaneda and Stoikov (2008) and Cont and De Larrard (2013) in a special case.

4.3 Fluid limits of order positions and related

queues

First, let us introduce some notations for the analysis.

Notation. Without loss of generality, take the best bid and ask queues. Thenthere are six types of orders: best bid orders, market orders at the best bid, can-cellation at the best bid, best ask, market orders at the best ask, and cancellation

54

Page 62: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

at the best ask. Consider order arrivals of any of these six types as point processesin the following way. Denote the order arrival process by N = (N(t), t ≥ 0) withthe inter-arrival times Dii≥1. Here

N(t) = max

m :

m∑i=1

Di ≤ t

. (4.12)

Now, define a sequence of six-dimensional random vectors −→V i = (V j

i , 1 ≤ j ≤6)i≥1. For each i, the component V 1

i represents the size of i-th order from thelimit order at the best bid, V 2

i the market order at the best bid, V 3i the cancellation

at the best bid, V 4i the limit order at the best ask, V 5

i the market order at the bestask, and V 6

i the cancellation at the best ask. For ease of exposition, we assume

that no simultaneous arrivals of different orders, i.e., each−→V i always consists of

one positive component and five zero’s. For instance,−→V 5 = (0, 0, 0, 4, 0, 0) means

the fifth order is a best limit ask order of size 4. In this paper, we only considercadlag processes.

For ease of references in the main text, we also denote

• D[0, T ] the space of 1-dimensional cadlag functions on [0, T ], while DK [0, T ]the space of K-dimensional cadlag functions on [0, T ]. Consequently, theconvergence in this space is, unless otherwise specified, in the sense of theweak convergence in DK [0, T ] equipped with J1 topology;

• L∞[0, T ] is the space of functions f : [0, T ]→ Rd, equipped with the topologyof uniform convergence;

• AC0[0, T ] is the space of functions f : [0, T ]→ Rd, that is absolutely contin-uous and f(0) = 0;

• AC+0 [0, T ] is the space of non-decreasing functions f : [0, T ] → Rd that is

absolutely continuous and f(0) = 0.

Similarly, we define D[0,∞), DK [0,∞), L∞[0,∞), AC0[0,∞), AC+0 [0,∞) for T =

∞.

4.3.1 Fluid limits for order positions and related queuelengths

In order to study the fluid limit for order positions and the best ask/bid queues,we will need the following technical assumptions.

55

Page 63: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Assumption 4.1. Dii≥1 is a stationary array of positive random variables with

D1 +D2 + ...+Di

i→ 1

λ, in probability (4.13)

as i→∞, where λ is a positive constant.

Assumption 4.2. −→V ii≥1 is a stationary array of square-integrable random vec-

tors with

−→V 1 +

−→V 2 + ...+

−→V i

i→−→V , in probability (4.14)

as i→∞, where−→V = (V j > 0, 1 ≤ j ≤ 6) is a constant vector.

Assumption 4.3. Cancelations are uniformly distributed on every queue.

We will see in Section 4.3.2 that this assumption on cancellation is not critical,except for affecting the exact form of the fluid limit for the order position.

Now, we define the scaled net order flow process−→Cn as follows,

−→C n(t) =

1

n

N(nt)∑i=1

−→V i =

1

n

N(nt)∑i=1

V ji , 1 ≤ j ≤ 6

. (4.15)

Theorem 4.2. Given Assumptions 4.1 and 4.2, for any T > 0,

−→Cn ⇒ λ

−→V e, in (D6[0, T ], J1) as n→∞. (4.16)

Now define the scaled queue lengths with Qbn for the best bid queue and Qa

n

for the best ask queue, and the scaled order position Zn byQbn(t) = Qbn(0) + C1

n(t)− C2n(t)− C3

n(t),

Qan(t) = Qan(0) + C4n(t)− C5

n(t)− C6n(t),

dZn(t) = −dC2n(t)− Zn(t−)

Qbn(t−)dC3

n(t).

(4.17)

The above equations are straightforward: bid/ask queue lengths increase with limitorders and decrease with market orders and cancellations according to their cor-responding order flow processes; an order position will decrease and move towardszero with arrivals of cancellations and market orders; new limit orders arrivalswill not change this particular order position; however, arrival of limit orders maychange the speed of the order position approaching zero following Assumption 4.3,hence the factor of Zn(t−)

Qbn(t−).

56

Page 64: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Strictly speaking, (4.17) only describes the dynamics of the triple (Qbn,Q

an,Zn)

before any of them hits zero. Nevertheless, Zn hitting zero means that the orderplaced has been executed, while Qa

n hitting zero means that the best ask queuesis depleted. Since our primary interest is in the order position, without little riskwe may truncate the processes to avoid unnecessary technical difficulties on theboundary. That is, define

τn = minτ zn, τan , τ bn, (4.18)

with

τ bn = inft ≥ 0 : Qbn(t) ≤ 0, τan = inft ≥ 0 : Qan(t) ≤ 0,τ zn = inft ≥ 0 : Zn(t) ≤ 0.

(4.19)

Now, define the truncated processes

Qbn(t) = Qbn(t ∧ τn), Qan(t) = Qan(t ∧ τn), Zn(t) = Zn(t ∧ τn). (4.20)

Still, it is not immediately clear that these truncated processes would be welldefined either: we do not know a priori if the term −Zn(t−)

Qbn(t−)is bounded when Qb

n

hits zero. This turns out not to be an issue.

Lemma 4.1. Zn(t) ≤ Qbn(t) for any time t ≤ min(τ zn, τan). That is, τ zn ≤ τ bn. In

particular, (4.20) is well defined.

Proof. Note that−→Cn is a positive jumping process. Therefore, when δC1

n(t) > 0,δQbn(t) > 0 while δZn(t) = 0. And when δC2

n(t) > 0, δQbn(t) = δZn(t). When

δC3n(t) > 0, δQbn(t)

Qbn(t−)= δZn(t)

Zn(t−) . Hence, when 0 < Zn(t−) ≤ Qbn(t−), we have

Zn(t) ≤ Qbn(t).

This lemma, though simple, turns out to play an important role to ensure thatfluid limits of order positions and related queues are well defined after rescaling.That is, we can extend the definition of Qb

n, Qan, and Zn for any time t ≥ 0.

For simplicity, we will use for the rest of the paper with a bit of abuse ofnotations, Qb

n, Qan and Zn instead of Qb

n, Qan and Zn, defined on t ≥ 0. The

dynamics of the truncated processes could be described in the following matrixform.

d

Qbn(t)

Qan(t)

Zn(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 −Zn(t−)Qbn(t−)

0 0 0

IQan(t−),Qbn(t−),Zn(t−)>0 · d−→C n(t)

(4.21)

57

Page 65: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

The modified processes coincide with the original processes before hitting zero,which implies It≤τn = IQan(t−)>0,Qbn(t−)>0,Zn(t−)>0.

In order to establish the fluid limit for the joint process (Qbn, Qa

n and Zn), wesee that it is fairly standard to establish the the limit process for (Qb

n,Qan) from

the classical probability theory where various forms of functional strong law oflarge numbers exist. However, checking (4.21) for Zn(t), we see that in order topass from the fluid limit for Qbn(t) to that for Zn(t), we effectively need to passthe convergence relation between some cadlag processes (Xn, Yn) to (X,Y ) in theSkorohod topology to the convergence relation between

∫XndYn to

∫XdY . That

is, given a sequence of stochastic process Xnn≥1 defined by a sequence of SDEs

Xn(t) = Un(t) +

∫ t

0Fn(Xn, s−)dYn(s), (4.22)

where Unn≥1, Ynn≥1 are two sequences of stochastic processes and Fnn≥1 isa sequence of functionals, and assume that Un,Yn, Fn ⇒ U,Y, F as n→∞in some way, then would the sequence of the solutions to (4.22) converge to thesolution to

X(t) = U(t) +

∫ t

0F (X, s−)dY (s)?

It turns out that such a convergence relation is delicate and can easily fail, asshown by the following simple example.

Example 4.1. Let Xi≥1 be a sequence of identically distributed random vari-ables taking values in −1, 1 such that

P(X1 = 1) = P(X1 = −1) =1

2

P(Xi+1 = 1|Xi = 1) = P(Xi+1 = −1|Xi = −1) =1

4for i = 1 ≥ 1.

Define Sn(t) = 1√n

∑bntci=1 Xi. Then it is easy to see that Sn(t) converges to

√3B(t).

Now define a sequence of SDE’s dYn(t) = Yn(t)dSn(t) with Yn(0) = 1. Clearly

Yn(t) =∏bntci=1 (1 + Xi√

n) and Yn(t) converges to exp

√3B(t) − t

2, as n → ∞.

However, the solution to dY (t) = Y (t)d(√

3B(t)) with Y (0) = 1 is given by Y (t) =exp

√3B(t)− 3t

2 .

Nevertheless, under proper conditions as specified in Assumptions 4.1, 4.2, 4.3,one can establish the desired convergence relation. Such assumptions prove to besufficient, in light of Theorem A.3 in Appendix A by Kurtz and Protter (1991).

58

Page 66: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Theorem 4.3. Given Assumptions 4.1, 4.2, and 4.3. If there exist constants qb,qa, and z such that

(Qbn(0), Qan(0), Zn(0))⇒ (qb, qa, z), (4.23)

then for any T > 0,

(Qbn,Q

an,Zn)⇒ (Qb,Qa,Z) in (D3[0, T ], J1),

where (Qb,Qa,Z) is given by

Qb(t) = qb − λvb(t ∧ τ), (4.24)

Qa(t) = qa − λva(t ∧ τ), (4.25)

and for t < τ ,

dZ(t)

dt= −λ

(V 2 + V 3 Z(t−)

Qb(t−)

), Z(0) = z. (4.26)

Here τ = minτa, τ b, τ z with

τa =qa

λva, τ b =

qb

λvb, (4.27)

and

τ z =

((1 + c)z

a+ b

)c/(c+1)

b1/(c+1)c−1 − b/c c /∈ −1, 0,

b(1− e−zab ) c = −1,

b log( zab

+ 1)

c = 0.

(4.28)

Moreover, if vb > 0, va > 0, and qa/va > qb/vb. Then τ zn → τ z a.s. as n → ∞.Here

a = λV 2, b = qb/(λV 3), c = − vb

V 3, (4.29)

vb = −V 1 + V 2 + V 3, va = −V 4 + V 5 + V 6. (4.30)

The following figure is an illustration of the fluid limits of (Qb(t), Qa(t), Z(t)),with Qb(0) = Qa(0) = Z(0) = 100, λ = 1, V 1 = V 4 = 1, V 2 = 0.6, V 3 = 0.8, V 5 =0.7, V 6 = 0.8.

For the following graph, V 3 = 1.3 and V 2 varies from 1.3 to 3.3.For the following graph, V 2 = 1.3 and V 3 varies from 1.3 to 3.3.

59

Page 67: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

0 10 20 30 40 50 60 70 80 900

10

20

30

40

50

60

70

80

90

100

Time

Qu

eu

e le

ng

ths

Qa,Q

b,Z against time

Z

Qb

Qa

Figure 4.1: Illustration of the fluid limit (Qb(t), Qa(t), Z(t))

0 10 20 30 40 500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time

Z(t)/Q

b (t)

Z (t)/Q b(t) with different V 2

V 2 = 1.3V 2 = 1.8V 2 = 2.3V 2 = 2.8V 2 = 3.3

Figure 4.2: Illustration of the ratio Z(t)/Qb(t) with different V 2

60

Page 68: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

0 10 20 30 40 500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time

Z(t)/Q

b (t)

Z (t)/Q b(t) with different V 3

V 3 = 1.3V 3 = 1.8V 3 = 2.3V 3 = 2.8V 3 = 3.3

Figure 4.3: Illustration of the ratio Z(t)/Qb(t) with different V 3

4.3.2 Discussions

General assumptions for cancellation.

In the above section, we have derived the fluid limit for the order positions underthe simple assumption that cancellation is uniform on the queue. This assumptioncan be easily relaxed and the analysis and the form of fluid limit can be modifiedaccordingly. For instance, one may assume (more realistically) that the closer theorder to the queue head, the less likely they are being cancelled. As result, we

may replace the term Zn(t−)Qbn(t−)

in (4.17) with Υ(Zn(t−)Qbn(t−)

)where Υ is a Lipschitz

continuous increasing function from [0, 1] to [0, 1] with Υ(0) = 0 and Υ(1) = 1.That is, the dynamics of the scaled processes are described as

d

Qbn(t)

Qan(t)

Zn(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 −Υ(Zn(t−)Qbn(t−)

)0 0 0

· IQan(t−),Qbn(t−),Zn(t−)>0 · d

−→C n(t) (4.31)

61

Page 69: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Then the limit processes would follow

d

Qb(t)

Qa(t)

Z(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 −Υ(Z(t−)Qb(t−)

)0 0 0

· IQa(t−),Qb(t−),Z(t−)>0 · d

−→C (t) (4.32)

Theorem 4.4. Given Assumptions 4.1 and 4.2, and also the scaled processes(Qb

n,Qan,Zn) defined by (4.31). If there exist constants qb, qa, and z such that

(Qbn(0), Qan(0), Zn(0))⇒ (qb, qa, z), (4.33)

then for any T > 0,

(Qbn,Q

an,Zn)⇒ (Qb,Qa,Z) in (D3[0, T ], J1),

where (Qb,Qa,Z) is defined by (4.32) and

(Qb(0), Qa(0), Z(0)) = (qb, qa, z). (4.34)

Linear dependence between the order arrival and the trading vol-ume.

One may also replace Assumption 4.1 by the assumption that order arrival rateis linearly correlated with trading volumes. The fluid limit can be analyzed in asimilar way with few modifications.

Assumption 4.4. N(nt)t≥0 is a simple point process with an intensity nλ +αnQan (t−) + βnQbn (t−) at time t, where α, β are positive constants.

Assumption 4.5. For any 1 ≤ j ≤ 6, V ji i≥1 is a sequence of stationary, ergodic

and uniformly bounded sequence. Moreover, for any i ≥ 2,

E[−→V i|Gi−1] =

−→V . (4.35)

Theorem 4.5. Given Assumptions 4.2, 4.3, 4.4, and 4.5, then Theorem 4.3 holdsexcept that the limit process will be replaced by

Qb(t) = −αqavb − αqbva + λvb

vaα+ vbβ+vb(βqb + αqa + λ)

βvb + αvae−(vbβ+vaα)t∧τ , (4.36)

Qa(t) = −βqbva − βqavb + λva

vaα+ vbβ+va(βqb + αqa + λ)

βvb + αvae−(vbβ+vaα)t∧τ , (4.37)

62

Page 70: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

and

Z(t) = ze−

∫ t∧τ0 V3

Qb(s)+β+

αQa(s)

Qb(s)

]ds

(4.38)

−∫ t∧τ

0V2[λ+ βQb(s) + αQa(s)]e

−∫ t∧τs V3

Qb(u)+β+

αQa(u)

Qb(u)

]duds.

Corollary 4.1. Given Assumptions 4.2, 4.3, 4.4, and 4.5. Assume further thatvbβ + vaα > 0 and −λvb

α < qavb − qbva < λva

β . Then Qb(t) and Qa(t) will hit zero

at some finite times τ b and τa respectively. Moreover,

τ b = − 1

vbβ + vaαlog

(vbλ+ qavbα− qbvaαvbβqb + vbαqa + λvb

), (4.39)

τa = − 1

vbβ + vaαlog

(−qavbβ + qbvaβ + λva

βqbva + αqava + λva

), (4.40)

and τ z is determined via the equation

z =

∫ τz

0V2(λ+ βQb(s) + αQa(s))e

∫ s0 V3

Qb(u)+β+

αQa(u)

Qb(u)

]duds. (4.41)

4.4 Fluctuation analysis

The fluid limits in the previous section are essentially functional strong law oflarge numbers, and may well be regarded as the “first order” approximation fororder positions and related queues. In this section, we will proceed to obtain a“second order” approximation for these processes. We will first derive appropriateforms of diffusion limits for the queues, and then analyze how these processes“fluctuate” around their corresponding fluid limits. In addition, we will also applythe large deviation principles to compute the probability of the rare events thatthese processes deviate from their fluid limits.

4.4.1 Diffusion limits for the best bid and best askqueues

We will adopt the same notations for the order arrival processes as in the previoussection. However, we will need stronger assumptions for the diffusion limit analysis.

There is a rich literature on the multivariate Central Limit Theorems (CLTs)under some mixing conditions, e.g., Tone (2010). However, these are CLTs andnot Functional CLTs (FCLTs) with mixing conditions. In the literature of limittheorems for associated random fields, FCLTs are derived under some weak de-pendence conditions with explicit formulas for asymptotic covariance of the limit

63

Page 71: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

process. Here, to establish appropriate forms of FCLTs for −→V ii≥1, we used the

result in Burton et al. (1986). Readers can find more details in the framework ofBulinski and Shashkin (Bulinski and Shashkin (2007), Chapter 5, Theorem 1.5).

Assumption 4.6. N(t) is independent of −→V ii≥1 .

Assumption 4.7. N(i, i + 1]i∈Z is a stationary and ergodic sequence, withλ := E[N(0, 1]] <∞, and

∞∑n=1

‖E[N(0, 1]− λ|F−∞−n ]‖2 <∞, (4.42)

where ‖Y ‖2 = (E[Y 2])1/2 and F−∞−n := σ(N(i, i+ 1], i ≤ −n).

Assumption 4.8. Let n ∈ N and M(n) denote the class of real-valued boundedcoordinate-wise non-decreasing Borel functions on Rn. Let |I| denote the cardinal-

ity of I when I is a set, and || · || denote the L∞-norm. Let −→V ii≥1 be a stationary

sequence of R6 valued random vectors and for any finite set I ⊂ N, J ⊂ N, andany f, g ∈M(6|I|) , one has

Cov(f(−→V I), g(

−→V J)) ≥ 0.

Moreover, for 1 ≤ j ≤ 6,

v2j = Var(V j

1 ) + 2∞∑i=2

Cov(V j1 , V

ji ) <∞. (4.43)

Note that an i.i.d. sequence −→V ii≥1 clearly satisfies the above assumption

if−→V 1 is square-integrable. It is not difficult to see that Assumption 4.7 implies

Assumption 4.1, and Assumption 4.8 implies Assumption 4.2.With these assumptions, we can define the centered and scaled net order flow−→

Ψn = (−→Ψn(t), t ≥ 0) by

−→Ψn(t) =

1√n

N(nt)∑i=1

−→V i − λ

−→V nt

=1√n

N(nt)∑i=1

V ji − λV

jnt, 1 ≤ j ≤ 6

.

(4.44)

Here, −→V = (V j , 1 ≤ j ≤ 6) = (E[V j

i ], 1 ≤ j ≤ 6) (4.45)

is the mean vector of order sizes.

64

Page 72: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Next, define Rbn and Ra

n, the time rescaled queue length for the best bid andbest ask respectively, by

dRbn(t) = d(Ψ1n(t) + λV 1t)− d(Ψ2

n(t) + λV 2t)− d(Ψ3n(t) + λV 3t),

dRbn(t) = d(Ψ4n(t) + λV 4t)− d(Ψ5

n(t) + λV 5t)− d(Ψ6n(t) + λV 6t).

The definition of the above equations is intuitive just as their fluid limit coun-terparts. The only modification here is that the drift terms is added back to the

dynamics of the queue lengths because−→Ψ has been re-centered. The equations

can also be written in a more compact matrix form,

d

(Rbn(t)

Ran(t)

)= A · d

(−→Ψn(t) + λ

−→V t), (4.46)

with the linear transformation matrix

A =

(1 −1 −1 0 0 00 0 0 1 −1 −1

). (4.47)

However, (4.46) may not be well defined, unless Rbn(t) > 0 and Ran(t) > 0. As inthe fluid limit analysis, one may truncate the process at the time when one of thequeues vanishes. That is, define

ιan = inft : Ran(t) ≤ 0, ιbn = inft : Rbn(t) ≤ 0, ιn = infιan, ιbn, (4.48)

and define the truncated process (Rbn,R

an) by

d

(Rbn(t)

Ran(t)

)= AIt≤ιn · d

(−→Ψn(t) + λ

−→V t)

with

(Rbn(0)

Ran(0)

)=

(Rbn(0)

Ran(0)

).

(4.49)Now, we will show

Theorem 4.6. Given Assumptions 4.6, 4.7, and 4.8, for any T > 0,

•−→Ψn ⇒

−→Ψ

d.= Σ−→W λe−

−→V vdW1 λe in (D6[0, T ], J1). (4.50)

Here W1 is a standard scalar Brownian motion, vd is given by Eqn.(A.71),−→W is a standard six-dimensional Brownian motion independent of W1, denotes the composition of functions, and Σ is given by ΣΣT = (ajk) with

ajk =

v2j for j = k,

ρj,kvjvk for j 6= k,(4.51)

65

Page 73: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

and

v2j = Var(V j

1 ) + 2∞∑i=2

Cov(V j1 , V

ji ),

ρj,k =1

vjvk

(Cov(V j

1 , Vk

1 ) +

∞∑i=2

(Cov(V j

1 , Vki ) + Cov(V k

1 , Vji )))

.

(4.52)

That is,−→Ψ = (Ψj , 1 ≤ j ≤ 6) is a six-dimensional Brownian motion with

zero drift and variance-covariance matrix (λΣTΣ + λv2d

−→V ·−→V T ).

• If (Rbn(0), Ran(0))⇒ (qb, qa), then for any T > 0,(Rbn

Ran

)⇒

(Rb

Ra

)in (D2[0, T ], J1). (4.53)

Here, the diffusion limit process (Rb,Ra)T up to the first hitting time of theboundary is a two-dimensional Brownian motion with drift −→µ and the variance-covariance matrix as

−→µ := (µ1, µ2)T = λA ·−→V and σσT := A · (λΣTΣ + λv2

d

−→V ·−→V T ) ·AT .

(4.54)

4.4.2 Applications to LOB

Examples

Having established the fluid limit and the fluctuations of the queue lengths andorder positions, we will give some examples of the order arrival process N(t) thatsatisfy the assumptions in our analysis.

Example 4.2 (Poisson Process). Let N(t) be a Poisson process with intensity λ.Clearly assumptions 4.1 and 4.7 are satisfied.

Example 4.3 (Hawkes Process). Let N(t) as a Hawkes process Bremaud andMassoulie (1996), a simple point process with intensity

λ(t) := λ

(∫ t

−∞h(t− s)N(ds)

), (4.55)

at time t, where we assume that λ(·) : R≥0 → R+ is an increasing function, α-Lipschitz, where α‖h‖L1 < 1 and h(·) : R≥0 → R+ is a decreasing function and

66

Page 74: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

∫∞0 h(t)tdt < ∞. Under these assumptions, there exists a stationary and ergodic

Hawkes process satsifying the dynamics (4.55) (see e.g. Bremaud and Massoulie(1996)). By the Ergodic theorem,

N(t)

t→ λ := E[N(0, 1]], (4.56)

a.s. as t→∞. Therefore, the Assumption (4.1) is satisfied. It was proved in Zhu(2013), that N(i, i + 1]i∈Z satisfies the Assumption 4.7 and hence Nn·−λn·√

n⇒

vdW1(·), on (D[0, T ], J1) as n→∞.In the special case λ(z) = ν + z, (4.55) becomes

λ(t) = ν +

∫ t

−∞h(t− s)N(ds), (4.57)

which is the original self-exciting point process proposed by Hawkes (1971), whereν > 0 and ‖h‖L1 < 1. In this case,

λ =ν

1− ‖h‖L1

, v2d =

ν

(1− ‖h‖L1)3. (4.58)

Example 4.4 (Cox Process with Shot Noise Intensity). Let N(t) be a Cox processwith shot noise intensity (ee e.g. Asmussen and Albrecher (2010)). That is, N(t)is a simple point process with intensity at time t given by

λ(t) = ν +

∫ t

−∞g(t− s)N(ds), (4.59)

where N is a Poisson process with intensity ρ, g(t) : R≥0 → R+ is decreasing,‖g‖L1 <∞, and

∫∞0 tg(t)dt <∞. N(t) is stationary and ergodic and

N(t)

t→ λ := ν + ρ‖g‖L1 , (4.60)

a.s. as t → ∞. Therefore, Assumption 4.1 is satisfied. Moreover one can checkthat condition (4.42) in Assumption 4.7 is satisfied. Indeed, by stationarity,

‖E[N(0, 1]− λ|F−∞−n ]‖2 = ‖E[N(n− 1, n]− λ|F−∞0 ]‖2. (4.61)

We have

E[N(n− 1, n]− λ|F−∞0 ] = E

[∫ n

n−1λ(t)dt− λ

∣∣∣∣F−∞0

], (4.62)

where

λ(t) = ν +

∫ 0

−∞g(t− s)N(ds) +

∫ t

0g(t− s)N(ds), (4.63)

67

Page 75: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

therefore,

E[N(n− 1, n]− λ|F−∞0 ] =

∫ n

n−1

∫ 0

−∞g(t− s)N(ds)dt

+ ρ

∫ n

n−1

∫ t

0g(t− s)dsdt− ρ‖g‖L1 . (4.64)

By Minkowski’s inequality,

‖E[N(n− 1, n]− λ|F−∞0 ]‖2 ≤∥∥∥∥∫ n

n−1

∫ 0

−∞g(t− s)N(ds)dt

∥∥∥∥2

(4.65)

+

∥∥∥∥ρ∫ n

n−1

∫ t

0g(t− s)dsdt− ρ‖g‖L1

∥∥∥∥2

.

Note that∥∥∥∥ρ∫ n

n−1

∫ t

0g(t− s)dsdt− ρ‖g‖L1

∥∥∥∥2

= ρ

∫ n

n−1

∫ ∞t

g(s)dsdt, (4.66)

therefore,∞∑n=1

∥∥∥∥ρ ∫ n

n−1

∫ t

0g(t−s)dsdt−ρ‖g‖L1

∥∥∥∥2

=

∫ ∞0

∫ ∞t

g(s)dsdt =

∫ ∞0

tg(t)dt. (4.67)

Furthermore,∞∑n=1

∥∥∥∥∫ n

n−1

∫ 0

−∞g(t− s)N(ds)dt

∥∥∥∥2

≤∞∑n=1

∥∥∥∥∫ 0

−∞g(n− 1− s)N(ds)

∥∥∥∥2

(4.68)

=

∞∑n=1

√∫ 0

−∞g2(n− 1− s)ρds+ ρ2

(∫ 0

−∞g(n− 1− s)ds

)2

≤∞∑n=1

√∫ 0

−∞g2(n− 1− s)ρds+

∞∑n=1

ρ

∫ 0

−∞g(n− 1− s)ds

≤ √ρ∞∑n=1

√g(n− 1)

√∫ 0

−∞g(n− 1− s)ds+ ρ

∫ ∞0

tg(t)dt

≤√ρ

4

[ ∞∑n=1

g(n− 1) +∞∑n=1

∫ 0

−∞g(n− 1− s)ds

]+ ρ

∫ ∞0

tg(t)dt

≤√ρ

4

[g(0) + ‖g‖L1 +

∫ ∞0

tg(t)dt

]+ ρ

∫ ∞0

tg(t)dt <∞.

Hence Assumption 4.7 is satisfied. Nn·−λn·√n⇒ vdW1(·) on (D[0, T ], J1) as n→∞,

wherev2d = ν + ρ‖g‖L1 + ρ‖g2‖L1 . (4.69)

68

Page 76: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Probability of price increase and hitting times.

Given the diffusion limit to the queue lengths for the best bid and ask, we can alsocompute the distribution of the first hitting time ι and the probability of priceincrease/decrease. Our results generalize those in Cont and De Larrard (2013)which correspond to the special case of zero drift.

Given Theorem 4.6, let us first parameterize σ by

σ =

(σ1

√1− ρ2 σ1ρ0 σ2

).

Next, denote Iν the Bessel function of the first kind of order ν and νn := nπ/α,and define

α :=

π + tan−1

(−√

1−ρ2

ρ

)ρ > 0,

π2 ρ = 0,

tan−1

(−√

1−ρ2

ρ

)ρ < 0,

(4.70)

r0 :=

√(qb/σ1)2 + (qa/σ2)2 − 2ρ(qb/σ1)(qa/σ2)

1− ρ2, (4.71)

θ0 :=

π + tan−1

(qa/σ2

√1−ρ2

qb/σ1−ρqa/σ2

)qb/σ1 < ρqa/σ2,

π2 qb/σ1 = ρqa/σ2,

tan−1

(− qa/σ2

√1−ρ2

qb/σ1−ρqa/σ2

)qb/σ1 > ρqa/σ2.

(4.72)

Then according to Zhou (2001), we have

Corollary 4.2. Given Theorem 4.6 and the initial state (qb, qa), the distributionof the first hitting time ι

P−→µ (ι > t) =2

αtel1q

b+l2qa+l3t∞∑n=1

sin

(nπθ0

α

)e−

r202t

∫ α

0sin

(nπθ

α

)gn(θ)dθ, (4.73)

where

gn(θ) :=

∫ ∞0

re−r2

2t el4r sin(θ−α)−l5r cos(θ−α)Inπα

(rr0

t

)dr,

l1 :=−µ1σ2 + ρµ2σ1

(1− ρ2)σ21σ2

, l2 :=ρµ1σ2 − µ2σ1

(1− ρ2)σ22σ1

,

l3 :=l21σ

21

2+ ρl1l2σ1σ2 +

l22σ22

2+ l1µ1 + l2µ2,

l4 := l1σ1 + ρl2σ2, l5 := l2σ2

√1− ρ2.

69

Page 77: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Note that when −→µ > 0, it is possible to have P−→µ (ι =∞) > 0. This means themeasure P−→µ here might be a sub-probability measure, depending on the value of−→µ . In that case, P−→µ (ι > t) actually includes P−→µ (ι =∞).

Moreover, based on the results in Iyengar (1985) and Metzler (2010),

Corollary 4.3. Given Theorem 4.6 and the initial state (qb, qa), the probability ofprice decrease given

P−→µ (ιb < ιa)

=

∫ ∞0

∫ ∞0

exp(µ1(r cosα− qb/σ1) + µ2(r sinα− qa/σ2)− |−→µ |2t/2)g(t, r)drdt,

(4.74)where

g(t, r) =π

α2tre−(r2+r2

0)/2t∞∑n=1

n sin

(nπ(π − θ0)

α

)Inπ/α

(rr0

t

). (4.75)

Similarly, when −→µ > 0, with positive probability, we might have τ b = ∞ andτa = ∞. Therefore P−→µ (ιb < ιa) we compute here implicitly refer to P−→µ (ιb <

ιa and ιb <∞) in that case.Note that both expressions for ι and the probability of price decrease are semi-

analytic. However, in the special case of −→µ =−→0 , i.e., when V1 = V2 + V3 and

V4 = V5 + V6, they become analytic.

Corollary 4.4. Given Theorem 4.6 and the initial state (qb, qa). If −→µ =−→0 , then

P(ι > t) =2r0√2πt

e−r20/4t

∑n: odd

1

nsin

nπθ0

α[I(νn−1)/2(r2

0/4t) + I(νn+1)/2(r20/4t)].

(4.76)

Corollary 4.5. Given Theorem 4.6 and the initial state (qb, qa). If −→µ =−→0 , the

probability that the price decreases is θ0α .

Proof.

P(ιb < ιa) =

∫ ∞0

(r/r0)(π/α)−1 sin(πθ0/α)

sin2(πθ0/α) + [(r/r0)π/α + cos(πθ0/α)]2dr

αr0

=

∫ ∞0

sin(πθ0/α)

sin2(πθ0/α) + [(r/r0)π/α + cos(πθ0/α)]2d(r/r0)π/α

π

=

∫ ∞0

sin(πθ0/α)

sin2(πθ0/α) + [x+ cos(πθ0/α)]2dx

π=θ0

α.

70

Page 78: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

4.4.3 Remarks and discussions

Remark 4.1. Assumption 4.6 in Theorem 4.6 may be relaxed to allow dependence

between the arrival process N and the order size sequence −→V ii≥1 as long as

(ΦDn ,−→ΦVn ) is guaranteed to converge jointly.

Remark 4.2. Theorem 4.6 is different from diffusion limits in Cont and De Lar-rard (2012). The difference comes from Assumption 3.2 in Cont and De Larrard(2012), which assumes that the mean of the aggregated queue length is relativelysmall compared to its variance. This assumption does not in general hold in ourframework where individual order type is considered instead of aggregations ofmarket, limit and cancellation orders. Without this assumption, we need differentscaling method and proof. Nevertheless, if we have to impose Assumption 3.2 asin Cont and De Larrard (2012), then our result will be reduced to theirs becausethe second term in Equation (4.50) would then vanish.

From the above remarks, it is clear that there are more than one possiblealternative sets of assumptions under which appropriate forms of diffusion limitsmay be derived. For instance, one may impose a weaker condition than Assumption4.7 for Dii≥1.

Assumption 4.9. For any time t,

limn→∞

N(nt)

n= λt, a.s. (4.77)

Moreover, there exists K > 0, such that E[N(t)] ≤ Kt, for any t.

This assumption holds, for example, if the point process N(t) is stationary andergodic with finite mean. To compensate for the weakened assumption 4.9, one

may need a stronger condition on −→V ii≥1, for instance, Assumption 4.5.

Note that under this alternative set of assumptions, the resulting limit processwill in fact be simpler than Theorem 4.6. This is because Assumption 4.5 impliesthat V j

i is actually uncorrelated to V ji′ for any i 6= i′ and 1 ≤ j ≤ 6. Hence the

covariance of V j1 and V j

i , i ≥ 2 in the limit process may vanish. We illustrate thisin details as follows.

Take Assumptions 4.5 and 4.9, define a modified version of the scaled net order

flow process−→Ψ∗n by

−→Ψ∗n(t) =

1√n

N(nt)∑i=1

(−→V i −

−→V), (4.78)

while the scaled processes Rbn(t), Ran(t) still follows (4.46), the first hitting timethe same as in (4.48), and the corresponding limit processes in (A.76), and (A.75).Then we have

71

Page 79: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Theorem 4.7. Given Assumptions 4.5, 4.6, and 4.9, then for any T > 0,

•−→Ψ∗n ⇒

−→Ψ∗ where

−→Ψ∗ = (σjWj , 1 ≤ j ≤ 6), where (Wj , 1 ≤ j ≤ 6) is a

standard six-dimensional Brownian motion and σ2j = λVar(V j

1 ).

• (Rbn,R

an)⇒ (Rb,Ra) in (D2[0, T ], J1).

4.4.4 Fluctuation analysis

Based on the diffusion and fluid limit analysis for the order position and relatedqueues, it is possible to consider fluctuations of queues, order positions and exe-cution times around their corresponding fluid limits.

Fluctuations of queues and order positions.

First, we consider fluctuation of (Qbn,Q

an,Zn) around its fluid limit (Qb,Qa,Z).

Theorem 4.8. Given Assumptions 4.3, 4.6, 4.7, and 4.8.

√n

Qbn −Qb

Qan −Qa

Zn − Z

⇒ Ψ1 −Ψ2 −Ψ3

Ψ4 −Ψ5 −Ψ6

Y

, in (D3[0, τ), J1) (4.79)

as n→∞. Here (Qbn,Q

an,Zn), (Qb,Qa,Z) are given in (4.17) and Theorem 4.3,

(Ψj , 1 ≤ j ≤ 6) is given in (4.50), and Y satisfies

dY (t) =(Z(t)(Ψ1(t)−Ψ2(t)−Ψ3(t))

Qb(t)− Y (t)

) λV 3

Qb(t)dt− dΨ2(t)− Z(t)

Qb(t)dΨ3(t),

(4.80)with Y (0) = 0.

Fluctuations of execution and hitting times.

In addition, we can study the fluctuations of the execution time τ zn.

Proposition 4.1. Given Assumptions 4.3, 4.6, 4.7, and 4.8, for any x (say,x < 0),

limn→∞

P(√n(τ zn − τ z) ≥ x) = P(Y (τ z) > ax). (4.81)

72

Page 80: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Proof. For any x < 0,

P(√n(τ zn − τ z) ≥ x) (4.82)

= P

(Zn

(τ z +

x√n

)> 0

)= P

(√n

(Zn

(τ z +

x√n

)− Z

(τ z +

x√n

))> −√nZ

(τ z +

x√n

)).

Note that

limn→∞

√nZ

(τ z +

x√n

)= xZ ′(τ z), (4.83)

and for any t > 0, c 6= −1, equations (A.58) and (4.28) lead to

Z ′(τ z) = − ac

1 + c−(z +

ab

1 + c

)b

1c

([(1 + c)z

a+ b

] cc+1

b1c+1

)− 1+cc

= −a. (4.84)

Similarly, when c = −1, we have Z(t) = [a log(b−t)+ zb−a log b](b−t). Thus Z ′(t) =

−a−[a log(b− t) + z

b − a log b], and Z ′(τ z) = −a−

[a log(be−

zab ) + z

b − a log b]

=

−a. Finally, recall that√n(Zn(t) − Z(t)) → Y (t) on (D[0, τ z), J1) as n → ∞,

hencethe desired result.

In fact, the above results can be more explicit because Y (t) is a Gaussianprocess with zero mean and variance σ2

Y , the latter of which can be computedexplicitly, albeit in a messy form as follows.

Proposition 4.2. Y (t) defined in Eqn (4.80) is a Gaussian process for t < τ z,

73

Page 81: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

with mean 0 and variance σ2Y (t). In particular, when c < 0 and c 6= −1,

σ2Y (t) :=

(b+ ct)2c+1 − b

2c+1

(2 + c)(b+ ct)2c

6∑j=1

(Σ2j −

Σ3ja

(1 + c)λV 3

)2

+λ3v2

d

6

(c

1 + cV 2

)2]

+b

1c

λV 3

(b+ ct)1c − b

1c

(b+ ct)2c

(z +

ab

1 + c

)

·6∑j=1

2

(Σ2j −

Σ3ja

(1 + c)λV 3

)Σ3j +

λ3v2d

6

c

1 + cV 2V 3

]

+t

(b+ ct)2c+1

b2c−1

λ2(V 3)2

6∑j=1

[λ(Σ3j)

2 +λ3v2

d

6(V 3)2

](z +

ab

1 + c

)2

− 2a

(b+ ct)2c (1 + c)λV 3

·[α

(b+ ct)2c+1 − b

2c+1

2 + c

+ [β − γc][(b+ ct)1c − b

1c ] + γ

[(b+ ct)

1c log(b+ ct)− b

1c log(b)

]+δ

2[(b+ ct)

2c − b

2c ] +

η

1− c[(b+ ct)

1c−1 − b

1c−1]

]+

2

(b+ ct)2c

(z +

ab

1 + c

)b

1c

λV 3·[α[(b+ ct)

1c − b

1c ] + [β + γ]

t

b(b+ ct)

c

[log b

b− log(b+ ct)

b+ ct

]+

δ

1− c[(b+ ct)

1c−1 − b

1c−1] +

η

2c[b−2 − (b+ ct)−2]

].

Here

α =α

c+ 1, β = − b

1c+1

1 + c− γb

1c +

δ

bc− β log b

c, γ =

β

c, δ = γ, η = −δ

c,

(4.85)with

α := −(ψ12 − ψ22 − ψ32) + (ψ13 − ψ23 − ψ33)a

(1 + c)λV 3− aϕ

c(1 + c)λV 3,

β := −(ψ13 − ψ23 − ψ33)

(z +

ab

1 + c

)b

1c

λV 3+

(z +

ab

1 + c

)ϕb

1c

cλV 3,

γ :=abϕ

c(1 + c)λV 3, δ := −ϕ

(z +

ab

1 + c

)b

1c+1

cλV 3,

ϕ := ψ11 + ψ22 + ψ33 − ψ12 − ψ13 − ψ21 − ψ31 + ψ23 + ψ32. (4.86)

74

Page 82: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Remark 4.3. Proposition 4.2 only gives the formula for the variance of Y (t) forthe case c 6= −1, c < 0. The variance σ2

Y (t) for the case c = −1 can be taken as acontinuum limit as c→ −1.

Corollary 4.6. Given Assumptions 4.3, 4.6, 4.7, and 4.8, then for any x (sayx > 0),

limn→∞

P(√n(τ zn − τ z) ≥ x) = 1− Φ

(ax

σY (τ z)

), (4.87)

where Φ(x) :=∫ x−∞

e−y2/2

√2π

dy is the cumulative probability distribution function of

a standard Gaussian random variable.

Proposition 4.3. Given Assumptions 4.6, 4.7, and 4.8, with vb, va > 0. Thenfor any x (say x < 0),

limn→∞

P(√n(τ bn − τ b) ≥ x) = 1− Φ

√ qbλvb

ψ11 + ψ22 + ψ33 − 2ψ12 − 2ψ13 + 2ψ23x

,

(4.88)where Φ(x) := 1√

∫ x−∞ e

−y2/2dy is the cumulative probability distribution function

of normal random variable with mean zero and variance one, and

ψij :=6∑

k=1

ΣikΣjkλ+ V iV jv2dλ

3, 1 ≤ i, j ≤ 6. (4.89)

Moreover,

limn→∞

P(√n(τan − τa) ≥ x) = 1− Φ

(√qaλva

ψ44 + ψ55 + ψ66 − 2ψ45 − 2ψ46 + 2ψ56x

).

(4.90)

Proof. Similar to the proof of the fluctuation of the execution time τ zn, we canshow that, for any x < 0,

limn→∞

P(√n(τ zn − τ z) ≥ x) = P((Ψ1 −Ψ2 −Ψ3)(τ b) > −(Qb)′(τ b)x), (4.91)

From the expression of Qb, τ b in Eqns. (4.24), (4.27), and (4.50), it is clear that(Qb)′(τ b) = −qb and the mean of (Ψ1 −Ψ2 −Ψ3)(t) is zero and the variance is

(ψ11 + ψ22 + ψ33 − 2ψ12 − 2ψ13 + 2ψ23)t. (4.92)

75

Page 83: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Therefore,

limn→∞

P(√n(τ bn − τ b) ≥ x) = 1− Φ

√ qbλvb

ψ11 + ψ22 + ψ33 − 2ψ12 − 2ψ13 + 2ψ23x

.

(4.93)Similarly, we can show that (4.90) holds.

Large deviations

In addition to the fluctuation analysis in the previous section, one can furtherstudy the probability of the rare events that the scaled process (Qbn(t), Qan(t))deviates away from its fluid limit. Informally, we are interested in the probabilityP((Qbn(t), Qan(t)) ' (f b(t), fa(t)), 0 ≤ t ≤ T ) as n → ∞, where (f b(t), fa(t)) is agiven pair of functions that can be different from the fluid limit (Qb(t), Qa(t)).

Recall that a sequence (Pn)n∈N of probability measures on a topological spaceX satisfies the large deviation principle with rate function I : X → R if I isnon-negative, lower semicontinuous and for any measurable set A, we have

− infx∈Ao

I(x) ≤ lim infn→∞

1

nlogPn(A) ≤ lim sup

n→∞

1

nlogPn(A) ≤ − inf

x∈AI(x).

The rate function is said to be good if the level set x : I(x) ≤ α is compactfor any α ≥ 0. Here, Ao is the interior of A and A is its closure. Finally, thecontraction principle in large deviation says that if Pn satisfies a large deviationprinciple on X with rate function I(x) and F : X → Y is a continuous map,then the probability measures Qn := PnF

−1 satisfies a large deviation principleon Y with rate function I(y) = infx:F (x)=y I(x). Interested readers are referred tothe standard references by Dembo and Zajic (1995) and Varadhan (1984) for thegeneral theory of large deviations and its applications.

Assumption 4.10. Let (Xi)i∈N be a sequence of stationary Rd-valued randomvectors with the σ-algebra F `m defined as σ(Xi,m ≤ i ≤ `). For every C < ∞,

there is a non-decreasing sequence `(n) ∈ N with∑∞

n=1`(n)

n(n+1) <∞ such that

sup

P(A)P(B)− e`(n)P(A ∩B) : A ∈ Fk10 , B ∈ Fk1+k2+`(n)

k1+`(n) , k1, k2 ∈ N≤ e−Cn,

sup

P(A ∩B)− e`(n)P(A)P(B) : A ∈ Fk10 , B ∈ Fk1+k2+`(n)

k1+`(n) , k1, k2 ∈ N≤ e−Cn.

Assumption 4.10 holds under the hypermixing condition of Section 6.4. inDembo and Zajic (1995), under the ψ-mixing condition (1.10) and (1.12) of Bryc(1992), and under the hyperexponential α-mixing rate for stationary processes ofProposition 2 in Bryc and Dembo (1996). It is clear that Assumption 4.10 holdsif Xi are m-dependent.

76

Page 84: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Assumption 4.11. For all 0 ≤ γ,R <∞,

gR(γ) := supk,m∈N,k∈[0,Rm]

1

mlog E

[eγ‖

∑k+mi=k+1Xi‖

]<∞,

and A := supγ lim supR→∞R−1gR(γ) <∞.

Assumption 4.11 is trivially satisfied if Xi are bounded. If Xi are i.i.d. randomvariables, which is a standard assumption for Mogulskii’s theorem that will beused in this section, then Assumption 4.11 reduces to the assumption that thelogarithmic moment generating function of Xi is finite.

Under Assumption 4.10 and Assumption 4.11, Dembo and Zajic Dembo and

Zajic (1995) proved a sample path large deviation principle for P( 1n

∑b·nci=1 Xi ∈ ·)

(see Theorem A.5 in Appendix B). From this, we can show the following,

Lemma 4.2. Assume that both (−→V i)i∈N and (Ni − Ni−1)i∈N satisfy Assumption

4.10 and Assumption 4.11. Then, for any T > 0, P(Cn(t) ∈ ·) satisfies a largedeviation principle on L∞[0, T ] with the good rate function

I(f) = infh∈AC+

0 [0,T ],g∈AC0[0,∞)g(h(t))=f(t),0≤t≤T

[IV (g) + IN (h)], (4.94)

with the convention that inf∅ =∞ and

IV (g) =

∫ ∞0

ΛV (g′(x))dx, (4.95)

if g ∈ AC+0 [0,∞) and IV (g) =∞ otherwise, where

ΛV (x) := supθ∈R6

θ · x− ΓV (θ) , ΓV (θ) := limn→∞

1

nlog E

[e∑ni=1 θ·

−→V i

], (4.96)

and

IN (h) =

∫ T

0ΛN (h′(x))dx, (4.97)

if h ∈ AC+0 [0, T ] and IN (h) =∞ otherwise, where

ΛN (x) := supθ∈R6

θ · x− ΓN (θ) , ΓN (θ) := limn→∞

1

nlog E

[eθNn

]. (4.98)

Moreover, by the contraction principle,

77

Page 85: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Theorem 4.9. Under the same assumptions as in Lemma 4.2, P((Qbn(t), Qan(t)) ∈·) satisfies a large deviation principle on L∞[0,∞) with the rate function

I(f b, fa) = infφ∈Gf

I(φ), (4.99)

where I(·) is defined in Lemma 4.2, Gf is the set consists of absolutely continuousfunctions φ(t) starting at 0 that satisfy

d(f b(t), fa(t))T =

(1 −1 −1 0 0 00 0 0 1 −1 −1

)dφ(t), (4.100)

with the initial condition (f b(0), fa(0)) = (qb, qa). Otherwise I(f) =∞.

Let us now consider a special case:

Corollary 4.7. Assume that N(t) is a standard Poisson process with intensity λ

independent of the i.i.d. random vectors−→V i in R6 such that E[eθ·

−→V 1 ] <∞ for any

θ ∈ R6. Then, the rate function I(f) in (4.94) in Lemma 4.2 has an alternativeexpression

I(f) =

∫ ∞0

Λ(f ′(t))dt, (4.101)

for any f ∈ AC0[0,∞), the space of absolutely continuous functions starting at 0and I(φ) = +∞ otherwise, where

Λ(x) := supθ∈R6

θ · x− λ(E[eθ·

−→V 1 ]− 1)

. (4.102)

Tails of the hitting time. Since

Qb(t) = qb − λvbt ∧ τ,Qa(t) = qa − λvat ∧ τ,

and the first hitting time τn = τ bn ∧ τan of (Qbn(t), Qan(t)) coincides with the firsthitting time of (Qbn(t), Qbn(t)), from the fluid limit, we have

τ bn → τ b :=qb

λvb,

τan → τa :=qa

λva,

and τn → τ := τ b ∧ τa. Here va, vb are from (4.30).

78

Page 86: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Using the large deviations result, we can study the tail probabilities of thehitting time τn as n goes to ∞. Note that for any t > τ ,

P(τn ≥ t) = P(Qbn(s) > 0, Qan(s) > 0, 0 ≤ s < t

)= P

(Qbn(s) > 0, Qan(s) > 0, 0 ≤ s < t

).

And for any t < τ ,

P(τn ≤ t) = P(Qbn(s) ≤ 0 or Qan(s) ≤ 0, for some 0 ≤ s ≤ t

)= P

(Qbn(s) ≤ 0 or Qan(s) ≤ 0, for some 0 ≤ s ≤ t

)From the large deviation principle for P(Qbn(·) ∈ ·, Qan(·) ∈ ·), i.e. Theorem

4.9, we have, for any t > τ ,

limn→∞

1

nlog P(τn ≥ t) = − inf

fb(s)≥0,fa(s)≥0,

for any 0≤s≤t

I(f b, fa) = − inffb(s)≥0,fa(s)≥0,

for any 0≤s≤t

infφ∈Gf

I(φ).

Similarly, for any t < τ ,

limn→∞

1

nlog P(τn ≤ t) = − inf

fb(s)≤0 for some 0 ≤ s ≤ tor fa(s)≤0 for some 0 ≤ s ≤ t

I(f b, fa)

= − inffb(s)≤0 for some 0 ≤ s ≤ t

or fa(s)≤0 for some 0 ≤ s ≤ t

infφ∈Gf

I(φ).

Recall that Gf consists of the functions φ = (φj(t), 1 ≤ j ≤ 6) ∈ AC0[0,∞) and

f b(t) = qb + φ1(t)− φ2(t)− φ3(t),

fa(t) = qa + φ4(t)− φ5(t)− φ6(t).

Therefore, we have the following,

Corollary 4.8. For any t > τ ,

limn→∞

1

nlog P(τn ≥ t) = − inf

qb+φ1(s)−φ2(s)−φ3(s)≥0,qa+φ4(s)−φ5(s)−φ6(s)≥0,

for any 0≤s≤tφ∈AC0[0,∞)

I(φ). (4.103)

Similarly, for any t < τ ,

limn→∞

1

nlog P(τn ≤ t) = − inf

qb+φ1(s)−φ2(s)−φ3(s)≤0 for some 0 ≤ s ≤ tor qa+φ4(s)−φ5(s)−φ6(s)≤0 for some 0 ≤ s ≤ t

φ∈AC0[0,∞)

I(φ). (4.104)

79

Page 87: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Bibliography

A. Alfonsi and P. Blanc. Dynamic optimal execution in a mixed-market-impacthawkes price model. arXiv preprint arXiv:1404.0648, 2014.

A. Alfonsi and A. Schied. Optimal trade execution and absence of price manipu-lations in limit order book models. SIAM Journal on Financial Mathematics, 1(1):490–522, 2010.

A. Alfonsi, A. Fruth, and A. Schied. Constrained portfolio liquidation in a limitorder book model. Banach Center Publ, 83:9–25, 2008.

A. Alfonsi, A. Fruth, and A. Schied. Optimal execution strategies in limit orderbooks with general shape functions. Quantitative Finance, 10(2):143–157, 2010.

R. Almgren and N. Chriss. Optimal execution of portfolio transactions. Journalof Risk, 3:5–40, 2001.

R. Almgren and J. Lorenz. Adaptive arrival price. Trading, 2007(1):59–66, 2007.

E. Arjas and T. Speed. Topics in markov-additive processes. Math. Scandinav, 33:171–192, 1973.

S. Asmussen and H. Albrecher. Ruin Probabilities. World Scientific, Singapore,2010.

M. Avellaneda and S. Stoikov. High-frequency trading in a limit order book.Quantitative Finance, 8(3):217–224, 2008.

E. Bayraktar and M. Ludkovski. Liquidation in limit order books with controlledintensity. Mathematical Finance, 24(4):627–650, 2014.

E. Bayraktar and S. Nadtochiy. Weak reflection principle for levy processes. Avail-able at SSRN 2467257, 2013.

80

Page 88: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

D. Bertsimas and A. Lo. Optimal control of execution costs. Journal of FinancialMarkets, 1(1):1–50, 1998.

P. Billingsley. Convergence of Probability Measures. John Wiley, New York, 1968.

A. A. Borovkov. Stochastic processes in queueing theory. Springer, 1976.

R. C. Bradley. Basic properties of strong mixing conditions. Technical report,DTIC Document, 1985.

L. Breiman. Probability. Classics in Applied Mathematics. Society for Industrialand Applied Mathematics, 1968. ISBN 9780898712964. URL http://books.

google.com/books?id=ylyyoUQXkeAC.

P. Bremaud and L. Massoulie. Stability of nonlinear Hawkes processes. The Annalsof Probability, 24(3):1563–1588, 1996.

M. K. Brunnermeier and L. H. Pedersen. Predatory trading. The Journal ofFinance, 60(4):1825–1863, 2005.

W. Bryc. On large deviations for uniformly strong mixing sequences. StochasticProcesses and their Applications, 41(2):191–202, 1992.

W. Bryc and A. Dembo. Large deviations and strong mixing. Annales de l’IHPProbabilites et statistiques, 32(4):549–569, 1996.

A. Bulinski and A. Shashkin. Limit theorems for associated random fields andrelated systems. World Scientific, Singapore, 2007.

R. M. Burton, A. Dabrowski, and H. Dehling. An invariance principle for weaklyassociated random vectors. Stochastic Processes and their Applications, 23(2):301–306, 1986.

B. I. Carlin, M. S. Lobo, and S. Viswanathan. Episodic liquidity crises: Coopera-tive and predatory trading. The Journal of Finance, 62(5):2235–2274, 2007.

A. Cartea and S. Jaimungal. Modelling asset prices for algorithmic and high-frequency trading. Applied Mathematical Finance, 20(6):512–547, 2013.

A. Cartea and S. Jaimungal. Optimal execution with limit and market orders.Forthcoming: Quantitative Finance, 2014.

A. Cartea, S. Jaimungal, and J. Ricci. Buy low, sell high: A high frequency tradingperspective. SIAM Journal on Financial Mathematics, 5(1):415–444, 2014.

81

Page 89: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

F. Chen, P. Hall, et al. Inference for a nonstationary self-exciting point processwith an application in ultra-high frequency financial data modeling. Journal ofApplied Probability, 50(4):1006–1024, 2013.

R. Cont and A. De Larrard. Order book dynamics in liquid markets: limit theoremsand diffusion approximations. Available at SSRN 1757861, 2012.

R. Cont and A. De Larrard. Price dynamics in a Markovian limit order market.SIAM Journal on Financial Mathematics, 4(1):1–25, 2013.

R. Cont and A. Kukanov. Optimal order placement in limit order markets. Avail-able at SSRN 2155218, 2013.

R. Cont, S. Stoikov, and R. Talreja. A stochastic model for order book dynamics.Operations research, 58(3):549–563, 2010.

R. Cont, A. Kukanov, and S. Stoikov. The price impact of order book events.Journal of financial econometrics, 12(1):47–88, 2014.

A. Dembo and T. Zajic. Large deviations: from empirical mean and measure topartial sums process. Stochastic Processes and their Applications, 57(2):191–224,1995.

A. Dembo and O. Zeitouni. Large Deviations Techniques and Applications.Springer, New York, 1998.

C. Frei and N. Westray. Optimal execution of a VWAP order: a stochastic controlapproach. Mathematical Finance, 2013.

X. Gabaix, P. Gopikrishnan, V. Plerou, and H. E. Stanley. Institutional investorsand stock market volatility. Technical report, National Bureau of EconomicResearch, 2005.

J. Gatheral and A. Schied. Dynamical models of market impact and algorithmsfor order execution. HANDBOOK ON SYSTEMIC RISK, Jean-Pierre Fouque,Joseph A. Langsam, eds, pages 579–599, 2013.

J. Gillis. Correlated random walk. 51(04):639–651, 1955.

P. W. Glynn and W. Whitt. Ordinary CLT and WLLN versions of L=λW. Math-ematics of operations research, 13(4):674–692, 1988.

S. Goldstein. On diffusion by discontinuous movements, and on the telegraphequation. The Quarterly Journal of Mechanics and Applied Mathematics, 4(2):129–156, 1951.

82

Page 90: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

P. Gopikrishnan, V. Plerou, X. Gabaix, and H. E. Stanley. Statistical propertiesof share volume traded in financial markets. Physical Review E, 62(4):R4493,2000.

O. Gueant and G. Royer. VWAP execution and guaranteed VWAP. SIAM Journalon Financial Mathematics, 5(1):445–471, 2014.

O. Gueant, C.-A. Lehalle, and J. Fernandez-Tapia. Optimal portfolio liquidationwith limit orders. SIAM Journal on Financial Mathematics, 3(1):740–764, 2012.

F. Guilbaud and H. Pham. Optimal high-frequency trading with limit and marketorders. Quantitative Finance, 13(1):79–94, 2013.

J. M. Harrison. Brownian Motion and Stochastic Flow Systems. Wiley New York,1985.

A. G. Hawkes. Spectra of some self-exciting and mutually exciting point processes.Biometrika, 58(1):83–90, 1971.

T. Ho and H. R. Stoll. Optimal dealer pricing under transactions and returnuncertainty. Journal of Financial economics, 9(1):47–73, 1981.

U. Horst and D. Kreher. A weak law of large numbers for a limit order book modelwith fully state dependent order dynamics. arXiv preprint arXiv:1502.04359,2015.

U. Horst and M. Paulsen. A law of large numbers for limit order books. arXivpreprint arXiv:1501.00843, 2015.

R. Huitema. Optimal portfolio execution using market and limit orders. Availableat SSRN 1977553, 2014.

H. Hult and J. Kiessling. Algorithmic trading with Markov chains. PhD thesis,Doctoral Thesis, Stockholm University, Sweden, 2010.

R. Iati. The real story of trading software espionage. Advanced Trading, 2009.

D. L. Iglehart. Weak convergence in queueing theory. Advances in Applied Prob-ability, pages 570–594, 1973a.

D. L. Iglehart. Weak convergence of compound stochastic process, i. StochasticProcesses and their Applications, 1(1):11–31, 1973b.

83

Page 91: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

S. Iyengar. Hitting lines with two-dimensional brownian motion. SIAM Journalon Applied Mathematics, 45(6):983–989, 1985.

J. Jacod and A. N. Shiryaev. Limit Theorems for Stochastic Processes. SpringerBerlin, 1987.

C. M. Jones. What do we know about high-frequency trading? Columbia BusinessSchool Research Paper, (13-11), 2013.

W. Kang, K. Ramanan, et al. Fluid limits of many-server queues with reneging.The Annals of Applied Probability, 20(6):2204–2260, 2010.

T. Kato. VWAP execution as an optimal strategy. Available at SSRN 2487241,2014.

H. Konishi. Optimal slice of a VWAP trade. Journal of Financial Markets, 5(2):197–221, 2002.

L. Kruk. Functional limit theorems for a simple auction. Mathematics of Opera-tions Research, 28(4):716–751, 2003.

T. Kurtz and P. Protter. Weak limit theorems for stochastic integrals and stochas-tic differential equations. The Annals of Probability, 19(3):1035–1070, 1991.

S. Laruelle, C.-A. Lehalle, and G. Pages. Optimal split of orders across liquiditypools: a stochastic algorithm approach. SIAM Journal on Financial Mathemat-ics, 2(1):1042–1076, 2011.

C.-A. L. Q. Li and U. Horst. Optimal trading in a two-sided limit order book.2013.

T. Lin. The new financial industry. Available athttp://ssrn.com/abstract=2417988, 2014.

T. F. Loeb. Trading cost: the critical link between investment information andresults. Financial Analysts Journal, 39(3):39–44, 1983.

A. N. Madhavan. VWAP strategies. Trading, 2002(1):32–39, 2002.

S. Maslov and M. Mills. Price fluctuations from the order book perspectiveempir-ical facts and a simple model. Physica A: Statistical Mechanics and its Appli-cations, 299(1):234–246, 2001.

84

Page 92: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A. Metzler. On the first passage problem for correlated brownian motion. Statistics& probability letters, 80(5):277–284, 2010.

H. Miller. A matrix factorization problem in the theory of random variables de-fined on a finite markov chain. In Mathematical Proceedings of the CambridgePhilosophical Society, volume 58, pages 268–285. Cambridge Univ Press, 1962.

C. Mohan. The gambler’s ruin problem with correlation. Biometrika, pages 486–493, 1955.

A. A. Obizhaeva and J. Wang. Optimal trading strategy and supply/demanddynamics. Journal of Financial Markets, 16(1):1–32, 2013.

M. Potters and J.-P. Bouchaud. More statistical properties of order books andprice impact. Physica A: Statistical Mechanics and its Applications, 324(1):133–140, 2003.

S. Predoiu, G. Shaikhet, and S. Shreve. Optimal execution in a general one-sidedlimit-order book. SIAM Journal on Financial Mathematics, 2(1):183–212, 2011.

S. Redner. A guide to first-passage processes. Cambridge University Press, 2001.

E. Renshaw and R. Henderson. The correlated random walk. Journal of AppliedProbability, pages 403–414, 1981.

C. Tone. A central limit theorem for multivariate strongly mixing random fields.Probab. Math. Statist, 30(2):215–222, 2010.

S. R. S. Varadhan. Large Deviations and Applications. SIAM, Philadelphia, 1984.

W. H. Wagner. Defining and measuring trading costs. In AIMR ConferenceProceedings, volume 1993, pages 15–23. CFA Institute, 1993.

A. R. Ward and P. W. Glynn. A diffusion approximation for a Markovian queuewith reneging. Queueing Systems, 43(1-2):103–128, 2003.

A. R. Ward and P. W. Glynn. A diffusion approximation for a GI/GI/1 queuewith balking or reneging. Queueing Systems, 50(4):371–400, 2005.

W. Whitt. Stochastic-Process Limits: An Introduction to Stochastic-Process Limitsand their Application to Queues. Springer, New York, 2002.

C. Zhou. An analysis of default correlations and multiple defaults. Review ofFinancial Studies, 14(2):555–576, 2001.

85

Page 93: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

L. Zhu. Central limit theorem for nonlinear Hawkes processes. Journal of AppliedProbability, 50(3):760–771, 2013.

86

Page 94: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Appendix A

Appendix

A.1 Technical Reviews

A.1.1 Markov chain and Markov decision process

review of continuous time Markov chain (CTMC)

A stochastic process (Xt)t≥0 is called a continuous time Markov chain if it takesvalues in a countable set and the time spent in each state has an exponentialdistribution. Denote the set of states by S = 1, · · · , i, · · · . That is,

P(X(t+ h) = j|X(t) = i) = δij + qijh+ o(h)

with qii = −∑j 6=i

qij < 0

qij ≥ 0

(A.1)

Q = (qij)i,j is called the generator matrix of CTMC. E.g., A CTMC on S = 1, 2,the generator matrix for such a process could be written as

Q =

(−α αβ −β

). (A.2)

For i = 1, 2,

P(X(t+ h) 6= i|x(t) = i) = αh+ o(h) (A.3)

P(X(t+ h) = i|x(t) = i) = 1− αh+ o(h) ∼ exp(−αh), (A.4)

where exp(−αh) represents the exponential distribution with parameter αh. Definepij(t) = P(Xt = j|X0 = i), then P (t) = (pij(t)) solves P ′(t) = P (t)Q, which givesP (t) = exp(tQ).

87

Page 95: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Proposition A.1. For any t, s > 0,

P (t+ s) = e(t+s)Q = etQesQ = P (s)P (t) (A.5)

This corresponds to the Kolmogorov-Chapman equation in the discrete timeMarkov chain. For the example above,

P (t) = etQ =

α+β + αα+β e

−(α+β)t αα+β −

αα−β e

−(α+β)t

βα+β −

βα+β e

−(α+β)t αα+β + β

α+β e−(α+β)t

)(A.6)

Let t→∞, we have

P (t) = etQ =

α+βα

α+ββ

α+βα

α+β

)(A.7)

A review of Markov decision process

Suppose X = (Xn)n≥1 is a MC on a countable state space S with transition matrixP . Consider a subset D ∈ S, we define

∂D = S \D

as the boundary of D. Let τ = infn,Xn 6∈ D = infn,Xn ∈ ∂D. Supposea running cost function Vc = (Vc(s))s∈D ≥ 0 and VT = (VT (s))s∈∂D ≥ 0. Theexpected cost starting from state s and ending up at ∂D is given by

Φ(s) = E[ τ−1∑n=1

Vc(Xn) + VT (Xτ )Iτ<∞|X0 = s]

(A.8)

Then Φ satisfies a linear system of equationsΦ =PΦ + Vc in D

Φ =VT in ∂D(A.9)

A = C∪T is a finite set of actions, where C is the set of continuous actions and Tis the set of terminal actions. Define A : S 7→ 2A as the function associating a non-empty set of actions A(s) to each state s ∈ S. Here 2A is the power set consistingof all subsets of A. Naturally, we have C(s) = A(s) ∩ C and T (s) = A(s) ∩ T.For every s ∈ S, and a ∈ C(s), the transition probability from s to s′ whenselecting action a is denoted as Pss′(a).

• Vc(s, a) is the cost of continuation when at s, with action a ∈ C(s).

• VT (s, a) is the cost of termination when at s, with action a ∈ T (s).

88

Page 96: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

• Vc(s, a), VT (s, a) ≥ 0 and bounded.

• α = (α0, α1, · · · ) is a sequence of actions, where αn : Sn+1 → A such thatαn(s0, · · · , sn) ∈ A(sn) for each n ≥ 0 and (s0, · · · , sn) ∈ Sn+1.

• V (s, α) is the expected cost starting at X0 = s, following a policy α untiltermination.

A policy α∗ is called optimal if for any policy α,

V (s, α∗) ≤ V (s, α). (A.10)

The optimal expected cost V ∗(s) is defined by

V ∗(s) = infαV (s, α). (A.11)

The Bellman equation The value function of an optimization problem is asso-ciated with the Bellman equation of the following form

W (s) = min( minα∈C(s)

Vc(s, α) +∑s′∈S

Pss′(α)W (s′), minα∈T (s)

VT (s, α)) (A.12)

which comes from

V0(s) = minα∈T (s)

VT (s, α) (A.13)

Vn+1(s) = min( minα∈C(s)

Vc(s, α) +∑s′∈S

Pss′(α)Vn(s′), minα∈T (s)

VT (s, α)) (A.14)

A.1.2 Some basic reviews on stochastic process limits

Let X be a mapping from a probability space (Ω,F ,P) to a measurable space(E, E). We call X a random element if X is (F , E)− measurable, i.e., ∀B ∈ E , itfollows X−1B ∈ F . Moreover, P = PX−1 is the probability measure on (E, E)introduced by X. Let Xnn≥1 be a sequence of random elements with values inE. We say Xnn≥1 convergences to X in distribution (Xn ⇒ X) if Pn ⇒ P ,where Pn ⇒ P if and only if

Pnf → Pf

for any bounded, continuous real function f on E.We call a function on [0, 1] is cadlag if it is right-continuous and has left-handlimits. Let D[0, 1] denote the set of all cadlag functions from [0, 1] to R. Let Λ be

89

Page 97: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

the class of strictly increasing, continuous mappings of [0, 1] onto itself. For λ ∈ Λone defines

||λ|| = sups 6=t

∣∣∣ logλ(t)− λ(s)

t− s

∣∣∣. (A.15)

Then the standard J1 metric on D[0, 1] is

dJ1(x1, x2) ≡ infλ∈Λ||x1 λ− x2|| ∨ ||λ− e||,

where a ∨ b = maxa, b and denotes the composition of functions. Let B bethe Borel set on D[0, 1] with J1, then a stochastic process Xt, 0 ≤ t ≤ 1 withcadlag sample paths is a D[0, 1] valued random element. Therefore we can definethe weak convergence for a sequence of cadlag stochastic processes on [0, 1] in thespace D[0, 1] with metrics J1.

Further more, the space D([0, 1],R) could be generalized in two ways. First therange of the functions could be generalized from R to Rk and second the domain ofthe functions could be generalized from [0, 1] to [0,∞). More detailed discussioncould be found in Whitt (2002).

Donskers Theorem

This is a basic theorem in stochastic process limits, and could be treated as ageneralization of classical central limit theorem.

Theorem A.1. Let Xnn≥1 be a sequence of i.i.d. random variables with E[X1] =m and Var(X1) = σ2, define the nth normalized partial-sum process Sn as

Sn(t) ≡ n−1/2(

bntc∑i=1

Xi −mnt) (A.16)

Then, as n→∞,

S⇒ σB in (D[0,∞), J1), (A.17)

where B is a standard Brownian motion.

It is easy to extend Donsker’s Theorem to the multidimensional case viaCramer-Wold device. For applications, one might need to relax the i.i.d. con-ditions as well. One widely used relaxation technique is so called uniform mixingcondition. We give some basic concepts here and refer to Bradley (1985), Billings-ley (1968), Jacod and Shiryaev (1987), and Whitt (2002) for more details.

90

Page 98: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Let Xn−∞<n<∞ be a two-sided stationary sequence with

E[Xn] = m <∞, E[X2n] <∞. (A.18)

Moreover, let Fn = σ(Xk, k ≤ n) denote the σ-field generated by Xk, k ≤ n,Gn = σ(Xk, k ≥ n) denote the σ-field generated by Xk, k ≥ n. Define

ρn ≡ sup|E[XY ]| : X ∈ Fk,EX = 0,EX2 ≤ 1, Y ∈ Gn+k,EY = 0,EY 2 ≤ 1.(A.19)

We say that Xn−∞<n<∞ satisfies the uniform mixing condition if

∞∑n=1

ρn <∞. (A.20)

Note that it is always possible to extend the one-sided stationary sequence to atwo-sided stationary sequence, for example, see Breiman (1968).

Theorem A.2. If Xn−∞<n<∞ is a two-sided stationary sequence satisfying theuniform mixing condition and

E[Xn] = m <∞, E[X2n] <∞. (A.21)

Then σ2 = VarXn + 2∑∞

k=1 Cov(X1, X1+k) <∞ and (A.17) holds.

A.1.3 Convergence of stochastic processes by Kurtzand Protter

Kurtz and Protter (1991) provides a powerful tool to show convergence of stochas-tic processes defined by SDE’s with certain conditions. Define hδ(r) : [0,∞) →[0,∞) by hδ(r) = (1− δ/r)+. Define Jδ : DRm [0,∞)→ DRm [0,∞) by

Jδ(x)(t) =∑s≤t

hδ(|x(s)− x(s−)|)(x(s)− x(s−))

Let Yn be a sequence of stochastic processes adapted to Ft. Define Y δn = Yn −

Jδ(Yn). Let Y δn = M δ

n + Aδn be a decomposition of Y δn into an Ft-local martingale

and a process with finite variation.

Condition A.1. For each α > 0, there exist stopping times ταn such that Pταn ≤1 ≤ 1/α and supn E[[M δ

n]t≤ταn + T (Aδn)t≤ταn ] < ∞, where [M δn]t≤ταn denotes the

total quadratic variation of M δn up to time ταn , and T (Aδn)t≤ταn denotes the total

variation of Aδn up to time ταn .

91

Page 99: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Let T1[0,∞) denote the collection of non-decreasing mappings λ of [0,∞) to[0,∞) [in particular, λ(0) = 0] such that λ(h + t) − λ(t) ≤ h for all t, h ≥ 0.Let Mkm be the space of real-valued k × m matrices, and DMkm [0,∞) be thespace of cadlag functions from [0,∞) to Mkm. Assume that there exist mappingsGn, G : Dk[0,∞) × T1[0,∞) → DMkm [0,∞) such that Fn λ = Gn(x λ, λ) andF (x) λ = G(x λ, λ) for (x, λ) ∈ Dk[0,∞)× T1[0,∞).

Condition A.2. i. For each compact subset H ⊂ Dk[0,∞) and t > 0, itfollows that sup(x,λ)∈H sups≤t |Gn(x, λ, s)−G(x, λ, s)| → 0.

ii. For (xn, λn) ∈ Dk[0,∞) × T1[0,∞), if sups≤t |xn(s) − x(s)| → 0 andsups≤t |λn(s)− λ(s)| → 0 for each t > 0, then it asserts that

sups≤t|G(xn, λ

n, s)−G(x, λ, s)| → 0.

Theorem A.3. Suppose that (Un,Xn,Yn) satisfies

Xn(t) = Un(t) +

∫ t

0Fn(Xn, s−)dYn(s)

(Un,Yn) ⇒ (U,Y) in the Skorokhod topology and that Yn satisfies ConditionA.1 for some 0 < δ ≤ ∞. Assume that Fn and F have representations in termsof Gn and G satisfying Condition A.2. If there exists a global solution X of

dX(t) = U(t) +

∫ t

0F (X, s−)dY (s),

and the local uniqueness holds, then

(Un,Xn,Yn)⇒ (U,X,Y).

A.1.4 Some large deviations results

According to Theorem 5.1.2. in Dembo and Zeitouni (1998), we have

Theorem A.4 (Mogulskii’s Theorem). Assume (Xi)i≥1 are i.i.d. random vectorsin Rd. If Γ(θ) := log E[eθ·X1 ] <∞ for any θ ∈ Rd and let

Λ(x) := supθ∈Rdθ · x− Γ(θ) , (A.22)

then P( 1n

∑bntci=1 Xi ∈ ·) follows a large deviation principle on L∞[0,∞) with the

rate function

I(φ) =

∫ T

0Λ(φ′(t))dt, (A.23)

92

Page 100: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

for any φ ∈ AC0[0,∞), the space of absolutely continuous functions starting at 0and I(φ) = +∞ otherwise.

According to Theorem 2 in Dembo and Zajic (1995), we have

Theorem A.5. Let (Xi)i∈N be a sequence of stationary Rd-valued random vec-tors satisfying Assumption 4.10 and Assumption 4.11. Then, the empirical mean

process Sn(t) := 1n

∑bntci=1 Xi, 0 ≤ t ≤ T , satisfies a large deviations principle on

D[0, T ] equipped with the topology of uniform convergence with the convex goodrate function

I(φ) :=

∫ T

0Λ(φ′(t))dt, (A.24)

for any φ ∈ AC0[0,∞), the space of absolutely continuous functions starting at 0and I(φ) = +∞ otherwise, where

Λ(x) := supθ∈Rdθ · x− Γ(θ), (A.25)

with Γ(θ) := limn→∞1n log E[e

∑ni=1 θ·Xi ].

Remark A.1. Note that the original Theorem 2 in Dembo and Zajic (1995)applies to Banach space valued (Xi)i∈N. For the purpose in our paper, we onlyneed to consider Rd valued (Xi)i∈N.

A.2 Technical proofs

A.2.1 Proof of Theorem 2.1

Proof. Clearly

P(YT ≤ −k) = P(YT ≤ −k,AT ≤ −k) + P(YT ≤ −k,AT > −k)

= P(AT ≤ −k) + P(YT ≤ −k,AT > −k),

and

P(YT = −k) = P(YT ≤ −k)− P(YT ≤ −k − 1)

= P(AT = −k) + P(YT ≤ −k,AT ≥ −k + 1)

− P(YT ≤ −k − 1, AT ≥ −k).

Since T−k2 ∈ N, AT ≥ −k + 1 = AT ≥ −k + 2, it suffices to show that

P(YT ≤ −k,AT ≥ −k + 2) = P(YT ≤ −k − 1, AT ≥ −k).

93

Page 101: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Consider ∀ω ∈ YT ≤ −k,AT ≥ −k + 2 and let τ(ω) = supt : At(ω) = YT (ω).We have τ(ω) ≤ T − 2 from AT (ω) ≥ −k + 2 and YT (ω) ≤ −k. Now, define amapping h : YT ≤ −k,AT ≥ −k + 2 → YT ≤ −k − 1, AT ≥ −k as follows

Xt(h(ω)) =

Xt(ω), t 6= τ(ω) + 1,

− 1, t = τ(ω) + 1.

We will show that h is well-defined and is in fact a bijection.

2 4 6 8 10 12 14

−10

−5

05

10

An Example of the Mapping h

time

Best A

sk P

rice

ωh(ω)

edge to be changed

Figure A.1: Illustration of the mapping h

First, we show that h is well-defined, i.e., h(ω) ∈ YT ≤ −k−1, AT ≥ −k. Bythe definition of τ(ω), together with AT (ω)−YT (ω) ≥ 2, we see that Xτ(ω)(ω) = −1and Xτ(ω)+1(ω) = Xτ(ω)+2(ω) = 1. Since h(ω) only changes the movement at thestep τ(ω) + 1 from 1 to −1, with Aτ(ω)+1(h(ω)) = −YT (ω) − 1 and AT (h(ω)) =AT (ω) − 2 ≥ −k, we have h(ω) ∈ YT ≤ −k − 1, AT ≥ −k. Moreover, it is easyto see that h does not alter the number of direction changes from ω to h(ω). Alsonote that τ(ω) ≥ 1 for all k > 0, that means the first price movement will not bechanged by h. Then we have X1(ω) = X1(h(ω)) and

P(ω) = P(h(ω)). (A.26)

Second, we show that h is an injection. Suppose ω1, ω2 ∈ YT ≤ −k,AT ≥−k + 2 with h(ω1) = h(ω2). If τ(ω1) = τ(ω2), then obviously ω1 = ω2. Ifτ(ω1) 6= τ(ω2), wlog., we assume that τ(ω1) < τ(ω2). Then for any t ≤ τ(ω1) and

94

Page 102: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

t > τ(ω2), we haveXt(ω1) = Xt(ω2). For τ(ω1)+1, we haveXτ(ω1)+1(ω1) = −1 andXτ(ω1)+1(ω2) = 1. Thus Aτ(ω1)+1(ω2) = Aτ(ω1)(ω1)− 1 = YT (ω1)− 1. Therefore,

YT (ω2) ≤ Aτ(ω1)+1(ω2) ≤ YT (ω1)− 1.

Note that Aτ(ω2)+1(ω1) = Aτ(ω2)+1(ω2) = YT (ω2) + 1, we have Aτ(ω2)+1(ω1) ≤YT (ω1), contradictory to the definition of τ(ω1). Thus τ(ω1) = τ(ω2) and ω1 = ω2,i.e., h is an injection.

Next, we show that h is a surjection, i.e., for any ω ∈ YT ≤ −k−1, AT ≥ −k,there exists ω ∈ YT ≤ −k,AT ≥ −k + 2 such that h(ω) = ω. Let τ(ω) = inft :At(ω) = YT (ω), and define ω by

Xt(ω) =

Xt(ω), t 6= τ(ω),

1, t = τ(ω).

By the definition of τ(ω), At(ω) ≥ YT (ω) + 1 for any t < τ(ω), and At(ω) ≥At(ω) + 2 ≥ YT (ω) + 2 for any t ≥ τ(ω), Thus τ(ω)− 1 is the last time that At(ω)reaches its lowest position. Then by the definition of h, h(ω) = ω. Hence h is asurjection.

Note that since h is a bijection from YT ≤ −k,AT ≥ −k + 2 to YT ≤−k − 1, AT ≥ −k, using (A.26), we obtain

P(YT ≤ −k,AT ≥ −k + 2) = P(YT ≤ −k − 1, AT ≥ −k).

A.2.2 Proof of Proposition 2.2

Proof. For ∀ω ∈ YT = −k − 1, let τ(ω) = inft : At(ω) = YT (ω). Define amapping g on YT = −k − 1 as follows

Xt(g(ω)) =

Xt(ω), t 6= τ(ω),

1, t = τ(ω).

In other words, g changes Xτ(ω)(ω) from a “downward” edge to an “upward”edge. By the definition of τ(ω), it is clear that YT (g(ω)) = −k. Thus g(ω) ∈ YT =−k. Now we show that g in an injection, i.e., ∀ω1 and ω2 ∈ YT = −k − 1, ifg(ω1) = g(ω2), then ω1 = ω2. If τ(ω1) = τ(ω2), then it is easy to see thatXt(ω1) = Xt(ω2) for 1 ≤ t ≤ T , which is equivalent to ω1 = ω2. If τ(ω1) 6= τ(ω2),wlog., we assume that τ(ω1) < τ(ω2). Then for any t < τ(ω1), Xt(ω1) = Xt(ω2);At(ω1) = At(ω2)− 2 for τ(ω1) ≤ t < τ(ω2); and Xt(ω2) = −1 and Xt(ω1) = 1 for

95

Page 103: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

2 4 6 8 10 12 14

−10

−5

05

10

An Example of the Mapping g

time

Best A

sk P

rice

ωg(ω)

edge to be changed

Figure A.2: Illustration of the mapping g

t = τ(ω2). Thus Aτ(ω2)(ω2) = Aτ(ω1)(ω2) ≥ YT (ω1) + 1 = −k, contradictory to thedefinition of ω2. Hence τ(ω1) = τ(ω2) and ω1 = ω2. Thus g is an injection. Notethat since the mapping g does not reduce the number of direction changes, we alsohave P(g(ω)) ≥ P(ω). Thus PYT = −k − 1 ≤ PYT = −k.

96

Page 104: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.3 Proof of Lemma 2.1

C(k, q, T, p) =∑

ω∈YT=−k+1

P(ω)[qk(ω)(−k − r) + (1− qk(ω))(AT (ω) + f)

]+P(YT ≤ −k)(−k − r) + P(YT > −k + 1)(E[AT | YT > −k + 1] + f)

=∑

ω∈YT=−k+1

P(ω)qk(ω)(−k − r −AT (ω)− f)

+∑

ω∈YT=−k+1

P(ω)(AT (ω) + f)

+P(YT ≤ −k)(−k − r) + P(YT > −k + 1)(E[AT | YT > −k + 1] + f)

=∑

ω∈YT=−k+1

P(ω)qk(ω)(−k − r −AT (ω)− f)

+P(YT ≤ −k)(−k − r) + P(YT ≥ −k + 1)(E[AT | YT ≥ −k + 1] + f)

=∑

ω∈YT=−k+1

P(ω)qk(ω)(−k − r −AT (ω)− f) + C(k, 0, T, p).

A.2.4 Proof of Lemma 2.3

Define the same mapping g from YT = −k − 1 to YT = −k as in the proofof Proposition 2.2. Note that g is an injection and P(ω) ≤ P(g(ω)) for any ω ∈YT = −k − 1, because g(ω) has at leat as many direction changes as ω has.Moreover, because g changes one “downward” edge to one “upward” edge, wehave AT (g(ω)) = AT (ω) + 2. Thus

P(YT = −k − 1)(k + 2 + E[AT | YT = −k − 1])

=∑

ω∈YT=−k−1

P(ω)(k + 2 +AT (ω))

≤∑

g(ω)∈g(YT=−k−1)

P(g(ω))(k +AT (g(ω)))

≤∑

g(ω)∈YT=−k

P(g(ω))(k +AT (g(ω))).

The second to the last inequality holds because g is an injection and k+2+AT (ω) ≥0, and the last inequality follows from AT (g(ω)) + k ≥ 0 for ∀g(ω) ∈ YT = −k.

97

Page 105: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.5 Proof of Proposition 2.3

Proof. We first show the last inequality in the sequence, i.e., C(T, 0, T, p) ≤ C(T +1, 0, T, p). Indeed,

C(T + 1, 0, T, p)− C(T, 0, T, p)

=E[AT ] + f + P(YT = −T )(T + r)− P(YT ≥ −T + 1)(E[AT | YT ≥ −T + 1] + f)

=P(YT = −T )(r + f + T + E[AT | YT = −T ])

=P(YT = −T )(r + f + T − T )

=(f + r)P(YT = −T ) ≥ 0.

Now let bk = C(k + 1, 0, T, p)− C(k, 0, T, p) for k = 1, 2, ..., T − 1, then

bk =P(YT ≤ −k − 1)(−k − 1− r) + P(YT ≥ −k)(E[AT | YT ≥ −k] + f)

+ P(YT ≤ −k)(−k − r) + P(YT ≥ −k + 1)(E[AT | YT ≥ −k + 1] + f)

=− P(YT ≤ −k − 1) + P(YT = −k)(r + f + k + E[AT | YT = −k]).

Since r, f ≥ 0, it suffices to check this for the extreme case of r = f = 0, i.e., toshow

bk = −P(YT ≤ −k − 1) + kP(YT = −k) + P(YT = −k)E[AT | YT = −k] > 0.

First, by Proposition 2.2, we have

bT−1 = −P(YT = −T ) + (T − 1)P(YT = −T + 1)

+ P(YT = −T + 1)E[AT | YT = −T + 1]

= −P(YT = −T ) + P(YT = −T + 1) > 0;

and for k = 1, 2, ..., T − 2, by Lemma 2.3 we have

bk − bk+1 =− P(YT = −k − 1) + kP(YT = −k) + E[ATYT = −k]P(YT = −k)

− (k + 1)P(YT = −k − 1)− E[ATYT = −k − 1]P(YT = −k − 1)

=P(YT = −k)(k + E[ATYT = −k])

− P(YT = −k − 1)(k + 2 + E[ATYT = −k − 1])

≥0.

Thus recursively bk > 0 for k = 1, 2, ..., T − 1.

98

Page 106: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.6 Proof of Proposition 2.4

Proof. For ease of exposition, define the first term on the right hand side of (2.27)as

Dqk =

∑ω∈YT=−k+1

P(ω)qk(ω)(−k − r −AT (ω)− f).

Since C(k, 0, T, p) is increasing in k for 1 ≤ k ≤ T + 1, it suffices to show thatDqk is also increasing in k for 2 ≤ k ≤ T + 1. The key idea here is to define a

mapping F : YT = −k → YT = −k + 1 such that F is an injection and keepsthe number of direction changes and the number of hitting the lowest level. Thenwe can argue that Dq

k < Dqk+1.

To construct F , we first define N(ω) =∑T

t=1 IAt(ω)=YT (ω), and τn(ω) = infi :∑it=1 IAt(ω)=YT (ω) = n for n ≤ N(ω). Then F will be defined in two steps. First,

construct F1 : YT = −k → YT−1 = −k + 1 so that

Xt(F1(ω)) =

Xt(ω), t < τ1(ω),

Xt+1(ω), τ1(ω) ≤ t < T,

0, t = T.

Second, construct F2 : YT−1 = −k + 1 × N→ YT = −k + 1 so that

Xt(F2(ω, n)) =

Xt(ω), t ≤ τn(ω),

1, t = τn(ω) + 1,

Xt−1(ω), t ≥ τn(ω) + 2.

Now F is defined as

F (ω) = F2(F1(ω), N(ω)).

In other words, F first deletes the “downward” edge when ω first hits YT (ω) andthen adds an “upward” edge after the modified ω hits YT (ω) + 1 for N(ω) times.It is easy to see that YT (F (ω)) = YT (ω) + 1. And for each t where At(ω) = YT (ω),we have At−1(F1(ω)) = YT (ω) + 1. Thus N(F1(ω)) ≥ N(ω) and F2 is well-definedon (F1(ω), N(ω)), and

qk+1(ω) = qk(F (ω)).

Moreover, when we remove the “downward” edge in mapping F1, since k ≥ 2(hence τ1(ω) ≥ 2), we change neither the first step nor the number of directionchanges. When adding the “upward” edge in mapping F2, the number of direction

99

Page 107: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

2 4 6 8 10 12 14

−10

−5

05

10

An Example of the Mapping F

time

Best A

sk P

rice

edge to be deleted

ωF1(ω)F(ω)

edge to be added

Figure A.3: Illustration of the mapping F

changes of F2(F1(ω)) is the same as the number of direction changes of ω andhence

P(ω) = P(F (ω)).

Furthermore, since F replaces a “downward” edge by an “upward” edge for ω,AT (f(ω)) = AT (ω) + 2.Next, we show that F is an injection. Let ω1, ω2 ∈ YT = −k and F (ω1) =F (ω2). First, since N(ω) = N(F (ω)), we have N(ω1) = N(ω2). Note that afteroperating F2 at τN(ω), At(F (ω)) > YT (f(ω)) for all t > τN(ω). In order to haveF (ω1) = F (ω2), we must have τN(ω1)(ω1) = τN(ω2)(ω2). Therefore by the definitionof F2, F (ω1) = F (ω2) implies F1(ω1) = F1(ω2). Now if τ1(ω1) = τ1(ω2), then bythe definition of F1, we have Xt(ω1) = Xt(ω2) for all t 6= τ1(ω1). Since ω1 andω2 first hit the lowest level −k at τ1(ω1), we have Xτ1(ω1)(ω1) = Xτ1(ω1)(ω2) =−1, implying ω1 = ω2. If τ1(ω1) 6= τ1(ω2), wlog., we assume that τ1(ω1) <τ1(ω2). Then Xt(ω1) = Xt(ω2) for all t < τ1(ω1) and t > τ1(ω2), and At(ω1) =At(ω2) for t ≥ τ1(ω2) and At(ω1) = At(ω2) − 1 for all τ1(ω1) ≤ t < τ1(ω2). NowAτ1(ω1)(ω1) = YT (ω1) suggests that N(ω1) ≥ N(ω2) + 1, which is a contradictionto the assumption F (ω1) = F (ω2). Therefore, F is an injection.

100

Page 108: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Finally, calculating the difference of the sequence Dqk

Dqk −D

qk+1 =

∑ω∈YT=−k

P(ω)qk+1(ω)(k + 1 + r +AT (ω) + f)

−∑

ω∈YT=−k+1

P(ω)qk(ω)(k + r +AT (ω) + f)

≤∑

ω∈YT=−k

P(ω)qk+1(ω)(k + 1 + r +AT (ω) + f)

−∑

ω∈YT=−k

P(F (ω))qk(F (ω))(k + r +AT (F (ω)) + f)

=∑

ω∈YT=−k

(P(ω)qk+1(ω)(k + 1 + r +AT (ω) + f)

− P(ω)qk+1(ω)(k + r +AT (F (ω)) + f))

=∑

ω∈YT=−k

P(ω)qk+1(ω)(

(k + 1 + r +AT (ω) + f)

− (k + r +AT (ω) + 2 + f))

=−∑

ω∈YT=−k

P(ω)qk+1(ω) ≤ 0.

Thus Dqk is increasing as k increases for k ≥ 2.

A.2.7 Proof of Proposition 2.5

Proof. Notice that C(2, q, T −1, p) ≥ −2− r, and C(1, q, T, p) = (1− p+ pq)(−1−r) + p(1 − q)(1 + C(2, q, T − 1, p)) = p(2 + r + C(2, q, T − 1, p))(1 − q) − 1 − r,where C(2, q, T − 1, p) is independent of p and 1 + C(2, q,−1, p) ≥ −1 − r. ThusC(1, q, T, p) is an increasing linear function of p. Similarly, C(2, q, T, p) = (1 −p)(−1 +C(1, q, T − 1, 1− p)) + p(1 +C(3, q, T − 1, p)) = p(2 +C(3, q, T − 1, p)−C(1, q, T − 1, 1 − p)) − 1 + C(1, q, T − 1, 1 − p). Thus C(2, q, T, p) is a linearfunction of p. Moreover, C(3, q, T − 1, p)−C(1, q, T − 1, 1− p) > −2 since for eachsample path, the difference between the limit orders placed at −3 and −1 will notbe more than 2. Therefore C(2, q, T, p) is also increasing in p.

A.2.8 Proof of Proposition 2.6

Proof. Note that the proof of the monotonicity of Dqk with respect to k ≥ 2 in

Proposition 2.4 does not work for k = 1. This is because the first step of ω

101

Page 109: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

may be an “upward” edge and may be changed into a “downward” edge by themapping F . That will decrease the probability of this sample path. However, inthe case of p ≥ 1 − p, even if the first step of ω is changed from “downward” to“upward”, the probability of the sample path will not decrease and the inequalityP(f(ω)) = P(ω) pp

(1−p)(1−p) ≥ P(ω) as well as the other properties of F still hold.That is, the same method will show that

C(1, q, T, p) < C(2, q, T, p),

for p ≥ 1− p.

A.2.9 Proof of Lemma 2.4

Proof. We will show by mathematical induction.First, for t = T − 1, simple algebra shows that all VT−1(1, BB), VT−1(1,MO)(=f), VT−1(1, NO) > −2− r + p

(1−p)(p+q−pq) , clearly so is

V ∗T−1(1) = minVT−1(1, BB), VT−1(1,MO), VT−1(1, NO).

Moreover,

VT−1(1, BB) =(pq + 1− p)(−1− r) + p(1− q)(1 + f)

= −1−2pq + 2p− (pq + 1− p)r + p(1− q)f < f = VT−1(1,MO),

VT−1(−1, NO) =p(−1 + f) + (1− p)(1 + f)

> (p+q − pq)(−1− r) + (1− p− q + pq)(1 + f) = VT−1(−1, BB).

Hence the desired result holds for t = T − 1.Now suppose this lemma holds for some t, 2 ≤ t ≤ T − 1. Then it is easy to verifyVt−1(1, Act) > −2− r + p

(1−p)(p+q−pq) for Act = MO,BB. Meanwhile,

Vt−1(1, NO) = (1− p)(−1 + minVt(−1, BB), Vt(−1, NO), Vt(−1,MO))+ p(1 + V ∗t (1))

= (1− p)(−1 + minVt(−1, BB), Vt(−1,MO)) + p(1 + V ∗t (1))

> −2− r +p

(1− p)(p+ q − pq).

because Vt(−1, NO) > Vt(−1, BB), and (1−p)(−1+Vt(−1, Act))+p(1+V ∗t (1)) >−2− r + p

(1−p)(p+q−pq) for Act = BB,MO.

Therefore, V ∗t−1(1) > −2 − r + p(1−p)(p+q−pq) , with V ∗t−1(1) ≤ f from the fact

Vt−1(1,MO) = f .

102

Page 110: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Finally,

Vt−1(−1, NO) = p(−1 + V ∗t (−1)) + (1− p)(1 + V ∗t (1))

= Vt−1(−1, BB) + p(r + V ∗t (−1)) + (1− p)q(2 + r + V ∗t (1))

= Vt−1(−1, BB) + p(r + (p+ (1− p)q)(−1− r)+ (1− p)(1− q)(1 + V ∗t+1(1))) + (1− p)q(2 + r + V ∗t (1))

> Vt−1(−1, BB) + p(−1 + (1− p)(1− q) p

(1− p)(p+ q − pq))

+ (1− p)q p

(1− p)(p+ q − pq)= Vt−1(−1, BB).

Hence the lemma holds for t− 1, and for any 1 ≥ t ≥ T − 1 by induction.

A.2.10 Proof of Theorem 2.2

Proof. By Lemma 2.7 and Lemma 2.4, to show the existence of t∗1, it suffices toconsider

Vt(1, BB)− Vt(1, NO) = (pq + 1− p)(−1− r) + p(1− q)(1 + V ∗t+1(1))

− (1− p)(−1 + V ∗t+1(−1)) + p(1 + V ∗t+1(1))

= −pq(2 + r + V ∗t+1(1))− (1− p)(r + V ∗t+1(−1)).

This is a non-increasing function with respect to t. Therefore if Vt(1, BB) ≤Vt(1, NO) for some t∗1, then the inequality holds for all t > t∗1. VT−1(1, BB) −VT−1(1, NO) = −pq(2 + r+ f)− (1− p)(r+ f) < 0 implies t∗1 ≤ T − 1 if t∗1 exists.Similarly, Vt(−1,MO)−Vt(−1, BB) is also a non-increasing function with respectto t. Therefore if Vt(−1,MO) ≤ Vt(−1, BB) for some t∗2, then the inequality holdsfor all t > t∗2. Notice that when Vt+1(−1,MO) ≤ Vt+1(−1, BB), it follows thatVt(1, BB)−Vt(1, NO) ≤ 0 as V ∗t+1(−1) = f ≥ 0. Therefore t∗1 < t∗2 if both of themexist. And the existence will be clear when the expressions of t∗1 and t∗2 are given.

In fact, t∗1 and t∗2 can be computed explicitly as follows. For t ≥ t∗1 the sequenceV ∗t (1) can be computed recursively from the following equation

V ∗t (1) = p(1− q)(V ∗t+1(1) + 1) + (1− p+ pq)(−1− r) for t∗1 ≤ t ≤ T − 1

103

Page 111: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

with the boundary condition V ∗T (1) = f , yielding

V ∗t (1) = (p− pq)(T−t)(f +

2p− 2pq − 1− r(1− p+ pq)

p− 1− pq

)+

2p− 2pq − 1− r(1− p+ pq)

1− p+ pq

= (p− pq)(T−t)(f + 2 + r − 1

1− p+ pq

)− 2− r +

1

1− p+ pq,

for t∗1 ≤ t ≤ T .Moreover, the fact that Vt∗1(−1, BB) ≤ Vt∗1(−1,MO) from the showed claim thatVt+1(−1,MO) ≤ Vt+1(−1, BB) implies Vt(1, BB) − Vt(1, NO) ≤ 0. ThereforeV ∗t∗1

(−1) = Vt∗1(−1, BB) and

Vt∗1−1(1, BB)− Vt∗1−1(1, NO)

=− pq(2 + r + V ∗t∗1(1))− (1− p)(r + V ∗t∗1(−1))

=− pq(

2 + r + (p− pq)T−t∗1(f + 2 + r − 1

1− p+ pq

)− 2− r +

1

1− p+ pq

)− (1− p)(r + (p+ (1− p)q)(−1− r) + (1− p)(1− q)(1 + V ∗t∗1+1(1)))

=q(1− 2p)

1− p+ pq− (f + 2 + r − 1

1− p+ pq)(p− pq)T−t∗1−1(1− q)(p2q + 1 + p2 − 2p)

≥0.

Note that from the expression of the second last line, it is clear that Vt∗1−1(1, BB)−Vt∗1−1(1, NO) is positive when t∗1 is negative infinity, and negative when t∗1 = T −1.Thus the existence of t∗1 is guaranteed. Moreover, we derive the formula for t∗1 asshown in (2.32). Simple calculation from the above expression confirms t∗1 ≤ T −1.

Now, for t ≤ t∗1 we have

V ∗t−1(1) =(1− p)(−1 + V ∗t (−1)) + p(1 + V ∗t (1))

=pV ∗t (1) + 2p− 1

+ (1− p)[(1− p− q + pq)(1 + V ∗t+1(1)) + (−1− r)(p+ q − pq)]=a1V

∗t (1) + a2V

∗t+1(1) + a3

where a1 = p, a2 = (1 − p)(1 − p − q + pq), a3 = 2p − 1 − (1 + r)(1 − p)(p + q −pq) + (1− p)(1− p− q + pq). And the boundary condition for the iteration is

V ∗t∗1(1) = (p− pq)T−t∗1(f + 2 + r − 1

1− p+ pq

)− 2− r +

1

1− p+ pq,

V ∗t∗1+1(1) = (p− pq)T−t∗1−1

(f + 2 + r − 1

1− p+ pq

)− 2− r +

1

1− p+ pq.

104

Page 112: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Rewriting the above relation as

V ∗t−1(1)− a4 = a1(V ∗t (1)− a4) + a2(V ∗t+1(1)− a4),

with a4 = a31−a1−a2

leads to the solution for V ∗t (1) and t∗2 (as well as the existenceof t∗2). One can verify from the expression of t∗2 that it is less than or equal toT . Moreover, we can verify that t∗1 < t∗2 from their expression, which is consistentwith our previous claim.

Finally, from the iterative expression of V ∗t (−1), we can compute it by (2.36).

A.2.11 Proof of Proposition 4.2

Proof. By multiplying Eqn.(4.80) by the integrating factor e∫ t0λV 3

Qb(s)ds

and integrat-ing from 0 to t, and finally dividing the integrating factor, we get

Y (t) = −∫ t

0e−

∫ ts

λV 3

Qb(u)dudΨ2(s)−

∫ t

0e−

∫ ts

λV 3

Qb(u)du Z(s)

Qb(s)dΨ3(s) (A.27)

+

∫ t

0e−

∫ ts

λV 3

Qb(u)duZ(s)(Ψ1(s)−Ψ2(s)−Ψ3(s))

(Qb(s))2λV 3ds,

which implies that Y (t) is a Gaussian process since−→Ψ is a Gaussian process. Since

−→Ψ is centered, i.e., with mean zero, it is easy to see that Y (t) is also centered.Next, let us determine the variance of Y (t). By Ito’s formula, we have

d(Y (t)2) = 2Y (t)dY (t) + d〈Y 〉t (A.28)

= d〈Y 〉t − 2Y (t)Y (t)

Qb(t)λV 3dt− 2Y (t)dΨ2(t)− 2Y (t)

Z(t)

Qb(t)dΨ3(t)

+ 2Y (t)Z(t)(Ψ1(t)−Ψ2(t)−Ψ3(t))

(Qb(t))2λV 3dt.

From Eqn. (4.80),

d〈Y 〉t = d〈Ψ2〉t +Z(t)2

Qb(t)2d〈Ψ3〉t +

2Z(t)

Qb(t)d〈Ψ2,Ψ3〉t. (A.29)

105

Page 113: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Plugging (A.29) into (A.28), and taking expectations on the both hand sides ofthe equation, we get

dE[Y (t)2] = d〈Ψ2〉t +Z(t)2

Qb(t)2d〈Ψ3〉t +

2Z(t)

Qb(t)d〈Ψ2,Ψ3〉t (A.30)

− 2E[Y (t)2]1

Qb(t)λV 3dt

+ 2Z(t)(E[Y (t)Ψ1(t)]− E[Y (t)Ψ2(t)]− E[Y (t)Ψ3(t)])

(Qb(t))2λV 3dt

By using the integrating factor e∫ t0

2λV 3

Qb(s)ds

, we conclude that

E[Y (t)2] (A.31)

=

∫ t

0e−

∫ ts

2λV 3

Qb(u)du

2Z(s)

(Qb(s))2λV 3(E[Y (s)Ψ1(s)]− E[Y (s)Ψ2(s)]− E[Y (s)Ψ3(s)])ds

+

∫ t

0e−

∫ ts

2λV 3

Qb(u)dud〈Ψ2〉s +

∫ t

0e−

∫ ts

2λV 3

Qb(u)du Z(s)2

Qb(s)2d〈Ψ3〉s (A.32)

+

∫ t

0e−

∫ ts

2λV 3

Qb(u)du 2Z(s)

Qb(s)d〈Ψ2,Ψ3〉s

Let us recall that−→Ψ = Σ

−→W λe−

−→V vdλW1 λe. (A.33)

We also recall that (ψij)1≤i,j≤6 is a symmetric matrix defined as

ψij :=

6∑k=1

ΣikΣjkλ+ V iV jv2dλ

3, 1 ≤ i, j ≤ 6. (A.34)

Therefore, we have

〈Ψ2〉t = ψ22t, 〈Ψ3〉t = ψ33t, 〈Ψ2,Ψ3〉t = ψ23t. (A.35)

For any i, j and t > s,

E[Ψi(t)Ψj(s)] =6∑

k=1

ΣikΣjkλs+ V iV jv2dλ

3s = ψijs. (A.36)

For any i = 1, 2, 3, from (A.27), we can compute E[Y (t)Ψi(t)] as

E[Y (t)Ψi(t)] (A.37)

= −∫ t

0e−

∫ ts

λV 3

Qb(u)dudE[Ψi(t)Ψ2(s)]−

∫ t

0e−

∫ ts

λV 3

Qb(u)du Z(s)

Qb(s)dE[Ψi(t)Ψ3(s)]

+

∫ t

0e−

∫ ts

λV 3

Qb(u)duZ(s)(E[Ψi(t)Ψ1(s)]− E[Ψi(t)Ψ2(s)]− E[Ψi(t)Ψ3(s)])

(Qb(s))2λV 3ds.

106

Page 114: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Next, combining equations (A.35), (A.36), (A.37), (A.58), and (4.28), aftersome computation, we see∫ t

0e−

∫ ts

2λV 3

Qb(u)dud〈Ψ2〉s +

∫ t

0e−

∫ ts

2λV 3

Qb(u)du Z(s)2

Qb(s)2d〈Ψ3〉s

+

∫ t

0e−

∫ ts

2λV 3

Qb(u)du 2Z(s)

Qb(s)d〈Ψ2,Ψ3〉s

= λ

6∑j=1

∫ t

0e−

∫ ts

2λV 3

Qb(u)du(

Σ2j +Z(s)

Qb(s)Σ3j

)2

ds

+ λ3v2d

∫ t

0e−

∫ ts

2λV 3

Qb(u)du(V 2 +

Z(s)

Qb(s)V 3

)2

ds

=(b+ ct)

2c+1 − b

2c+1

(2 + c)(b+ ct)2c

6∑j=1

(Σ2j −

Σ3ja

(1 + c)λV 3

)2

+λ3v2

d

6

(c

1 + cV 2

)2]

+b

1c

λV 3

(b+ ct)1c − b

1c

(b+ ct)2c

(z +

ab

1 + c

)

·6∑j=1

2

(Σ2j −

Σ3ja

(1 + c)λV 3

)Σ3j +

λ3v2d

6

c

1 + cV 2V 3

]

+t

(b+ ct)2c+1

b2c−1

λ2(V 3)2

6∑j=1

[λ(Σ3j)

2 +λ3v2

d

6(V 3)2

](z +

ab

1 + c

)2

, (A.38)

and

E[Y (t)(Ψ1(t)−Ψ2(t)−Ψ3(t))]

= −(ψ12 − ψ22 − ψ32)

∫ t

0e−

∫ ts

λV 3

Qb(u)duds

− (ψ13 − ψ23 − ψ33)

∫ t

0e−

∫ ts

λV 3

Qb(u)du Z(s)

Qb(s)ds

+ (ψ11 + ψ22 + ψ33 − ψ12 − ψ13 − ψ21 − ψ31 + ψ23 + ψ32)

·∫ t

0e−

∫ ts

λV 3

Qb(u)du Z(s)s

(Qb(s))2λV 3ds

= α(b+ ct) + β(b+ ct)−1c + γ

log(b+ ct)

(b+ ct)1c

+ δ + η(b+ ct)−1c−1, (A.39)

where α, β, γ, δ are defined in (4.86) and α, β, γ, δ, η are defined in (4.85). There-

107

Page 115: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

fore,∫ t

0e−

∫ ts

2λV 3

Qb(u)du 2Z(s)

(Qb(s))2λV 3E[Y (s)(Ψ1(s)−Ψ2(s)−Ψ3(s))]ds

=2

(b+ ct)2c

∫ t

0(b+ cs)

2c−1

[− a

(1 + c)λV 3+

(z +

ab

1 + c

)b

1c

λV 3(b+ cs)−

1c−1

]

·

[α(b+ cs) + β(b+ cs)−

1c + γ

log(b+ cs)

(b+ cs)1c

+ δ + η(b+ cs)−1c−1

]ds

(A.40)

Hence, we get the desired result by substituting (A.38) and (A.40) into (A.31).

A.2.12 Proof of Lemma 3.1

Proof. First, this lemma is valid for t = T − 1 since

CT−1(nT−1,mT−1, lT−1, AT−1)

=EmT−1(f +AT−1 + c(mT−1 + lT−1) + εT−1)

+ pllT−1(AT−1 − r − 1 + c(mT−1 + lT−1) + εT−1)

+ pl(nT−1 −mT−1 − lT−1)

·[AT−1 + c(mT−1 + lT−1) + c(nT−1 −mT−1 − lT−1) + εT−1 + εT

]+ (1− pl)(nt −mt)(At + cmt + c(nT−1 −mT−1) + εT−1 + εT )

=mT−1(f +AT−1 + c(mT−1 + lT−1))

+ pllT−1(AT−1 − r − 1 + c(mT−1 + lT−1))

+ pl(nT−1 −mT−1 − lT−1)

·[AT−1 + c(mT−1 + lT−1) + c(nT−1 −mT−1 − lT−1) + εT−1 + εT

]=nT−1AT−1 +mT−1(f + c(mT−1 + lT−1)) + pllT−1(−r − 1 + c(mT−1 + lT−1))

+ pl(nT−1 −mT−1 − lT−1)(cnT−1) + (1− pl)(nT−1 −mT−1)(cnT−1)

=nT−1AT−1 + CT−1(nT−1,mT−1, lT−1, 0).

And since the coefficient of AT−1 is nT−1, we have

VT−1(nT−1, AT−1) = min0≤mT−1,lT−1mT−1+lT−1≤nT−1

CT−1(nT−1,mT−1, lT−1, AT−1)

= nT−1AT−1 + min0≤mT−1,lT−1mT−1+lT−1≤nT−1

CT−1(nT−1,mT−1, lT−1, 0)

= nT−1AT−1 + VT−1(nT−1, 0).

108

Page 116: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Thus the hypothesis holds for t = T −1. Assume it is true for some t+1 < T witht ≥ 0. Then, for t,

Ct(nt,mt, lt, At)

=Emt(f +At + c(mt + lt) + εt) + pllt(At − r − 1 + c(mt + lt) + εt)

+ plVt+1(nt −mt − lt, At + c(mt + lt) + εt)

+ (1− pl)Vt+1(nt −mt, At + cmt + εt)=mt(f +At + c(mt + lt)) + pllt(At − r − 1 + c(mt + lt))

+ Epl[Vt+1(nt −mt − lt, 0) + (nt −mt − lt)(At + c(mt + lt) + εt)]+ E(1− pl)[Vt+1(nt −mt, 0) + (nt −mt)(At + cmt + εt)

=ntAt + Ct(nt,mt, lt, 0).

And

Vt(nt, At) = min0≤mt,ltmt+lt≤nt

Ct(nt,mt, lt, At)

= ntAt + min0≤mt,ltmt+lt≤nt

Ct(nt,mt, lt, 0).

= ntAt + Vt(nt, 0).

Thus the hypothesis holds for k = t if it holds for k = t + 1. By induction, theproof is complete.

A.2.13 Proof of Theorem 3.1

Proof. The proof is by induction. First, for t = T , MT = nT and LT = 0. ThusVT (nT ) = n2

T + anT .Second, suppose the theorem holds for t+ 1. Let 0 = A1 < A2 < ... < Ak = 1,

for i = 1, 2, ..., k − 1,

Vt+1(x) = zi,1x2 + zi,2x+ zi,3 when x ∈ [Ai, Ai+1).

Suppose nt −mt − lt ∈ [Ai, Ai+1) and nt −mt ∈ [Aj , Aj+1) Hessian of Ct is

H(Ct) =

(2plzi,1 + 2(1− pl)zj,1 1− pl + 2zi,1pl

1− pl + 2zi,1pl 2plzi,1

).

And the determinant of this matrix is

4p2l z

2i,1 + 4pl(1− pl)zi,1zj,1 − 1− p2

l − 4z2i,1p

2l + 2pl + 4p2

l zi,1 − 4plzi,1

=− (1− pl)2 − 4pl(1− pl)zi,1(1− zj,1) < 0.

109

Page 117: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Therefore the Hessian of Ct is neither semi-positive nor semi-negative. Thus thepossible minimum value will only be reached on the boundary. Note that Vt+1 is apiece-wise quadratic function, we also need to consider the pairs of (mt, lt) makingnt − mt − lt = Ai or Ai+1, or nt − mt = Aj or Aj+1. When nt − mt − lt = Ai,then C ′′t (lt) = −2(1 − pl) + 2(1 − pl)zj,1 ≤ 0, implying that Lt = 0,Mt = nt − Aior Lt = nt − Ai,Mt = 0. Similarly, we can show that in the case of Lt = A orMt = A, Ct will be a quadratic function with a negative second order coefficient.Thus Mt · Lt = 0 for t.

Next, we will calculate Vt. In the case of lt = 0, Ct = amt+ntmt+Vt+1(nt−mt),which is a piece-wise quadratic function of mt. On each piece, if not on theboundary of that piece, the optimal solution Mt is a linear function of nt withcoefficient a1 = 1 − 1/(2z1), which is in the range of (0, 1/2]. Then the secondorder coefficient of Vt is z1(1 − a1)2 + a2

1 < 1. And if Mt is on the boundary ofthat piece, then Mt is still a linear function of nt with the first order coefficient of1. Then the second order coefficient of Vt is z1(1− a1)2 + a2

1 = 1. Similarly for thecase of mt = 0, Ct = plntlt + plVt+1(nt − lt) + (1 − pl)Vt+1(nt). Therefore Lt is alinear function of nt with the first order coefficient no greater than 1, denoted byb1. Then the second order coefficient of Vt is plz1(1− b1)2 + plb

21 + (1− pl)z1 ≤ 1.

By induction, the statement holds for all t ≤ T .

A.2.14 Proof of Theorem 4.2

Proof. First, we define the scaled processes SDn and−→S Vn by

SDn (t) =1

n

bntc∑i=1

Di, (A.41)

−→S Vn (t) =

1

n

bntc∑i=1

−→V i =

1

n

bntc∑i=1

V ji , 1 ≤ j ≤ 6

. (A.42)

Then by Assumption 4.1 and according to Glynn and Whitt (Glynn and Whitt(1988), Theorem 5), the strong Law of Large Numbers (SLLN) also follows. Thatis,

limi→∞

D1 +D2 + ...+Di

i=

1

λ, a.s.. (A.43)

Then by the equivalence of SLLN and FSLLN (Glynn and Whitt (1988), Theorem4), it is clear that for any T > 0,

SDn =1

n

bn·c∑i=1

Di ⇒e

λ, a.s. in (D[0, T ], J1) as n→∞. (A.44)

110

Page 118: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Moreover, since−→V 1 is square-integrable, it follows that E[V j

1 ] <∞ for 1 ≤ j ≤ 6.

Note that V ji i≥1 is stationary, applying Birkhoff’s Ergodic Theorem (Breiman

(1968), Theorem 6.28) leads to

1

n

n∑i=1

V ji → E[V j

1 |Ij ], a.s. as n→∞, (A.45)

where Ij is the invariant σ-algebra of V ji i≥1. Given the WLLN for V j

i i≥1, itfollows that

E[V j1 |I

j ] = V j , (A.46)

and1

n

n∑i=1

V ji → V j , a.s. as n→∞. (A.47)

Therefore, again by Theorem 4 in Glynn and Whitt (1988),

−→S V,jn =

1

n

bn·c∑i=1

V ji ⇒ V je, a.s. in (D[0, T ], J1) as n→∞ (A.48)

Since the limit processes for SDn n≥1 and SV,jn n≥1, 1 ≤ j ≤ 6, are deterministic,according to Theorem 11.4.5 in Whitt (2002),

(−→S Vn ,S

Dn )⇒

(−→V e,

e

λ

), a.s. in (D7[0, T ], J1) as n→∞. (A.49)

Finally, from Theorem 9.3.4 in Whitt (2002),

−→Cn ⇒ λ

−→V e, in (D6[0, T ], J1) as n→∞. (A.50)

A.2.15 Proof of Theorem 4.3

Proof. First, note that (4.24), (4.25), (4.26) are the solutions to the followingSDE’s

d

Qb(t)

Qa(t)

Z(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 − Z(t−)Qb(t−)

0 0 0

IQa(t−),Qb(t−),Z(t−)>0λ−→V dt

(A.51)

(Qb(0), Qa(0), Z(0)) = (qb, qa, z).

111

Page 119: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Hence it suffices to show the convergence to (A.51). Now, set Yn =−→Cn, Xn =

(Qbn,Q

an,Zn), and

Fn(x, s−) = F (x, s−) =

1 − 1 −1 0 0 0

0 0 0 1 −1 − 1

0 − 1 −x3(s−)

x1(s−)0 0 0

Ix(s−)>0.

To decompose Yn, define the filtrations Fnt := σ(N(s)0≤s≤nt, −→V i1≤i≤N(nt))

and Gi := σ(−→V k1≤k≤i), take δ =∞,

Mn(t) =1

n

N(nt)∑i=1

−→V i − E[

−→V i|Gi−1], (A.52)

and

An(t) = Yn(t)−Mn(t). (A.53)

We will show that Mn is a martingale with respect to Fnt and Ynn≥1 satisfiesCondition A.1 in Theorem A.3.

For ∀s, 0 ≤ s < t, it is easy to see that Fns ∩ (N(ns) < i) ⊆ Fn1n

∑ik=1 Dk−

(N(ns) < i). Assumption 4.6 implies that E[−→V i|Fn1

n

∑ik=1Dk−

] = E[−→V i|Gi−1]. Thus

E[E[−→V i|Gi−1

] ∣∣Fns ∩ (N(ns) < i)]

=E[E[−→V i|Fn1

n

∑ik=1Dk−

] ∣∣∣Fns ∩ (N(ns) < i)]

=E[−→V i

∣∣Fns ∩ (N(ns) < i)]. (A.54)

Meanwhile, Fn1n

∑ik=1Dk−

∩ (N(ns) ≥ i) ⊆ Fns ∩ (N(ns) ≥ i). Thus

E[E[−→V i|Gi−1

] ∣∣∣Fns ∩ (N(ns) ≥ i)]

(A.55)

= E[E[−→V i|Fn1

n

∑ik=1Dk−

] ∣∣∣Fns ∩ (N(ns) ≥ i)]

= E[−→V i

∣∣Fn1n

∑ik=1Dk−

∩ (N(ns) ≥ i)]

= E[−→V i|Gi−1 ∩ (N(ns) ≥ i)

].

112

Page 120: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Moreover, E[−→V i

∣∣Fns ∩ (N(ns) < i)]

=−→V i since

−→V i is measurable with respect to

Fns ∩ (N(ns) < i). Therefore,

E[Mn(t)

∣∣Fns ] = E

N(nt)∑i=1

−→V i − E[

−→V i|Gi−1]

n

∣∣∣∣Fns

=1

n

N(ns)∑i=1

(E[−→V i

∣∣Fns ∩ (N(ns) ≥ i)]− E

[E[−→V i|Gi−1 ∩ (N(ns) ≥ i)]

∣∣∣Fns ])

+1

nE

N(nt)∑i=N(ns)+1

−→V i − E[

−→V i|Gi−1]

∣∣∣∣Fns ∩ (N(ns) < i)

=

1

n

N(ns)∑i=1

(−→V i − E[

−→V i|Gi−1 ∩ (N(ns) ≥ i)]

)+

1

nλn(t− s)

(E[−→V i

∣∣Fns ∩ (N(ns) < i)]− E[E[−→V i|Gi−1]

∣∣∣Fns ∩ (N(ns) < i)] )

=1

n

N(ns)∑i=1

(−→V i − E[

−→V i|Gi−1 ∩ (N(ns) ≥ i)]

)= Mt(s).

And E|Mn(t)| < ∞ follows directly from Assumption 4.2. Hence it follows thatMn(t) is a martingale. The quadratic variance of Mn(t) is as follows:

E[[Mn]t

]=nt

n2

6∑j=1

E

[λ(V ji − E

[V ji

∣∣Gi−1

])2]

=t

n

6∑j=1

λE

[(V ji

)2− 2V j

i E[V ji

∣∣Gi−1

]+(

E[V ji

∣∣Gi−1

])2]

=t

n

6∑j=1

λ

(E(V ji

)2− E

(E[V ji

∣∣Gi−1

])2)≤ t

n

6∑j=1

λE(V ji

)2,

because

E[V ji E[V ji

∣∣Gi−1

]]= E

[E[V ji E[V ji

∣∣Gi−1

]] ∣∣∣Gi−1

]= E

(E[V ji

∣∣Gi−1

])2.

Thus E [[Mn]t] is bounded uniformly in n since−→V i is square-integrable. Let

[T (An)]t denote the total variation of An up to time t. Then E [[T (An)]t] is also

113

Page 121: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

uniformly bounded in n, as

E [[T (An)]t] = t6∑j=1

λE∣∣∣E [V j

i

∣∣Gi−1

]∣∣∣ ≤ t 6∑j=1

λE[E[|V ji |∣∣Gi−1

]](A.56)

= t

6∑j=1

λE|V j1 | <∞. (A.57)

where the inequality in (A.56) uses the Jensen’s inequality for conditional expec-tations and (A.57) follows from the square-integrability assumption. Thus, Ynsatisfies Condition A.1 with ταn = α+ 1.

Now taking Gn(x e, e) = Fn(x) = F (x), it is easy to see that Condition A.2is satisfied according to Kurtz and Protter (1991).

It remains to check the existence of a global solution and the strong localuniqueness for the limit equations (A.51), which can be in fact be solved explicitlyhence these conditions naturally satisfied. Clearly, (4.24), (4.25) are solutions toQb(t), Qa(t) before hitting 0. Moreover, Z(t) satisfies (4.26).

Now Qa(t) = 0 when t = τa as given in (4.27). τa > 0 if V 4 − V 5 − V 6 < 0;otherwise Qa(t) never hits zero in which case define τa = ∞. The case for τ b issimilar.

The equation for Z(t) when Z(t−) > 0 is a first order linear ODE with thesolution

Z(t) =

− a

1 + c(b+ c(t ∧ τ)) +

(z +

ab

1 + c

)[b

b+ c(t ∧ τ)

]1/c

c /∈ −1, 0,

[a log(b− (t ∧ τ)) + z/b− a log b](b− (t ∧ τ)) c = −1,

(z + ab)e−t/b − ab c = 0.

(A.58)

From the solution, we can solve τ z explicitly as given in (4.28). Note that theexpression of Z(t) may not be monotonic and there might be multiple roots whenc 6= 0. Nevertheless, it is easy to check that the solution given in (4.28) is thesmallest positive root. For instance, when c /∈ −1, 0, there are two roots −b/c

and(

(1+c)za + b

)c/(c+1)b1/(c+1)c−1 − b/c and when c = −1, there are two roots b

and b(1−e−zab ). More computations confirm that indeed the smallest positive roots

are τ z =(

(1+c)za + b

)c/(c+1)b1/(c+1)c−1 − b/c for c /∈ −1, 0 and τ z = b(1− e−

zab )

for c = −1. Moreover, τ z < τ b from the calculation. Therefore τ = minτa, τ z iswell defined and finite.

114

Page 122: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.16 Proof of Theorem 4.4

Proof. First, let us extend the definition of Υ from [0, 1] to R by

Υ(x) = xI0≤x≤1 + I1<x. (A.59)

Then Υ is (still) Lipschitz continuous and increasing on R. That is, there existsK > 0, such that for any z1, z2 ∈ R, |Υ(z1)−Υ(z2)| ≤ K|z1 − z2|. Next, defineτ = minτ b, τa, τ z with τ b = inft : Qb(t) ≤ 0, τa = inft : Qa(t) ≤ 0, andτ z = inft : Z(t) ≤ 0. Similar to the argument for Lemma 4.1, Υ ∈ [0, 1] andz, qb > 0 imply that Zn(t) ≤ Qbn(t) and Z(t) ≤ Qb(t) for any time before hittingzero. Thus τ z ≤ τ b. Now the remaining part of the proof is similar to that ofTheorem 4.3 except for the global existence and local uniqueness of the solution to(4.32) and (4.34). It is easy to see that while Qb(t) and Qa(t) remain unchangedcompared to those in Theorem 4.3,

dZ(t)

dt= −λ

(V 2 + V 3Υ

(Z(t−)

Qb(t−)

))It≤τ . (A.60)

Let the right hand side of (A.60) be denoted by ϑ(Z, t), and define ϑ(Z, qb/(λvb)) =1. Let Tii≥1 be an increasing positive sequence with limi→∞ Ti = τ . Then forany z1, z2 ≥ 0 and 0 ≤ t ≤ Ti,

|ϑ(z1, t)− ϑ(z2, t)| = λV 3

∣∣∣∣Υ( z1

qb − λvbt

)−Υ

(z2

qb − λvbt

)∣∣∣∣≤ λV 3K

∣∣∣∣ z1

qb − λvbt− z2

qb − λvbt

∣∣∣∣≤ λV 3K

qb − λvbTi|z1 − z2|.

Therefore ϑ(Z, t) is Lipschitz continuous in Z and continuous in t for any t < Tiand Z > 0. By the Picard’s existence theorem, there exists a unique solution to(A.60) with the initial condition Z(0) = z on [0, Ti]. Now letting i → ∞, theunique solution exists on [0, τ). Moreover, by the boundedness of ϑ(Z, τ) andthe continuity of Z(t) at τ , the unique solution also exists at t = τ . For t > τ ,ϑ(Z, 0) = 0 and Z(t) = Z(τ). Hence there exists a unique solution Z(t) for t ≥ 0.Note that τa = ∞ (resp. τ b = ∞) when va < 0 (resp. vb < 0). However, sincethe right hand side of (A.60) is less than or equal to −λV 2, it follows that Z(t) isdecreasing in t and hits 0 within finite time. Therefore τ is well defined.

115

Page 123: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.17 Proof of Theorem 4.5

Proof. Let us recall that before t ≤ τ , with Assumption 4.4,

d

Qbn(t)

Qan(t)

Zn(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 −Zn(t−)Qbn(t−)

0 0 0

IQan(t−)>0,Zn(t−)>0 · d−→C n(t),

(A.61)

where

−→C n(t) =

1

n

N(nt)∑i=1

−→V i = Mn(t) +

∫ t

0(λ+ βQbn(s−) + αQan(s−))ds

−→V . (A.62)

Here

−→Mn(t) =

1

n

N(nt)∑i=1

[−→V i −

−→V ] +

1

n

−→V

[N(nt)− n

∫ t

0(λ+ βQbn(s−) + αQan(s−))ds

](A.63)

is a martingale. Similar to the arguments before, we can show that (Qbn,Q

an,Zn)⇒

(Qb,Qa,Z), where (Qb,Qa,Z) satisfies the ODE:

d

Qb(t)

Qa(t)

Z(t)

=

1 −1 −1 0 0 00 0 0 1 −1 −1

0 −1 −Zn(t−)Qbn(t−)

0 0 0

· IQa(t−)>0,Z(t−)>0 · (λ+ βQb(t−) + αQa(t−))

−→V dt,

with the initial condition (Qb(0), Qa(0), Z(0)) = (qb, qa, z). The equations for Qb(t)and Qa(t) can be written down more explicitly as

dQb(t) = (λ+ βQb(t−) + αQa(t−))(V1 − V2 − V3)dt, (A.64)

dQa(t) = (λ+ βQb(t−) + αQa(t−))(V4 − V5 − V6)dt, (A.65)

which can be further simplified as

d

(Qb(t)Qa(t)

)=

(−vbβ −vbα−vaβ −vaα

)(Qb(t)Qa(t)

)−(λvb

λva

). (A.66)

Hence, for t ≤ τ , we get(Qb(t)Qa(t)

)= c1

(α−β

)+ c2e

−(vbβ+vaα)t

(vb

va

)−( λ

β

0

), (A.67)

116

Page 124: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

where c1, c2 are constants that can be determined from the initial condition,

c1 = −qavb − λva

β − qbva

vaα+ vbβ, c2 =

βqb + αqa + λ

βvb + αva. (A.68)

Hence Eqns (4.36) and (4.37).Finally, Z(t) satisfies the first order ODE

dZ(t) + Z(t)V3

Qb(t)+ β +

αQa(t)

Qb(t)

]dt = −V2[λ+ βQb(t) + αQa(t)]dt (A.69)

with the solution given by (4.38).

A.2.18 Proof of Theorem 4.6

Proof. First, define Nn by

Nn(t) =N(nt)− nλt√

n.

Now recall the FCLT from Page 197 Billingsley (1968). For a stationary, ergodicand mean zero sequence (Xn)n∈Z, that satisfies

∑n≥1 ‖E[X0|F−∞−n ]‖2 < ∞, then

1√n

∑bn·ci=1 Xi ⇒ W1(·) on (D[0, T ], J1) with v2

d = E[X20 ] + 2

∑∞n=1 E[X0Xn] < ∞,

where W1 is a standard one-dimensional Brownian motion. Since the sequenceN(i, i+ 1]i∈Z satisfies Assumption 4.7,

Nbn·c − λbn·c√n

⇒ vdW1(·), (A.70)

on (D[0, T ], J1) as n→∞, where

v2d = E[(N(0, 1]− λ)2] + 2

∞∑j=1

E[(N(0, 1]− λ)(N(j, j + 1]− λ)] <∞. (A.71)

Next, for any ε > 0 and n sufficiently large,

P

(sup

0≤s≤T

∣∣∣∣Nbnsc − λbnsc√n

− Nns − λns√n

∣∣∣∣ > ε

)(A.72)

≤ P

(max

0≤k≤bnT c,k∈ZN [k, k + 1] > ε

√n− λ

)≤ (bnT c+ 1)P(N [0, 1] > ε

√n− λ)

≤ bnT c+ 1

(ε√n− λ)2

∫N [0,1]>ε

√n−λ

N [0, 1]2dP→ 0,

117

Page 125: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

as n→∞. Hence, Nn ⇒ vdW1 on (D[0, T ], J1) as n→∞.Moreover, thanks to Burton et al. (1986), Assumption 4.8 implies

−→ΦVn ⇒ Σ

−→W in (D6[0, T ], J1), (A.73)

where−→W is a standard six-dimensional Brownian motion and Σ is a 6× 6 matrix

representing the covariance scale of the limit process. Furthermore, the expressionof Σ by (4.51) and (4.52) can be explicitly computed following Burton et al. (1986).

Now, by Assumption 4.6, the joint convergence is guaranteed by Theorem11.4.4. in Whitt (2002), i.e.,

(Nn,−→ΦVn )⇒ (vdW1,Σ

−→W) in (D7[0, T ], J1). (A.74)

Moreover, by Corollary 13.3.2. in Whitt (2002), we see

−→Ψn ⇒

−→Ψ

d.= Σ−→W λe−

−→V vdW1 λe in (D6[0, T ], J1).

To establish the second part of the theorem, it is clear that the limiting processwould satisfy

d

(Rb(t)

Ra(t)

)= AIt≤ι · d

(−→Ψ(t) + λ

−→V t),

(Rb(0),Ra(0)) = (qb, qa),

(A.75)

with

ιa = inft : Ra(t) ≤ 0, ιb = inft : Rb(t) ≤ 0, ι = minιa, ιb. (A.76)

We now show that

(Rbn,R

an)⇒ (Rb,Ra) in (D2[0, T ], J1). (A.77)

According to the Cramer-Wold device, it is equivalent to showing that for any(α, β) ∈ R2,

αRbn + βRa

n ⇒ αRb + βRa in (D2[0, T ], J1). (A.78)

Since−→Ψn ⇒

−→Ψ in (D2[0, T ], J1), by the Cramer-Wold device again,

(α, β) ·A ·−→Ψn ⇒ (α, β) ·A ·

−→Ψ in (D2[0, T ], J1). (A.79)

By definition, it is easy to see that

αRbn(t) + βRan(t) = (α, β) ·A ·(−→

Ψn(t ∧ ιn) +−→V (t ∧ ιn)

)+ αqb + βqa. (A.80)

118

Page 126: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

Since the truncation function is continuous, by continuous-mapping theorem, itasserts that (A.78) holds and the desired convergence follows.

Moreover, because−→V e is deterministic and αqb+βqa is a constant, we have the

convergence in (A.78), as well as the convergence in (A.77). Note that ιn, n ≥ 1and ι are first passage times, by Theorem 13.6.5 in Whitt (2002),

(ιn, Rbn(ιn−), Ran(ιn−))⇒ (ι, Rb(ι−), Ra(ι−)). (A.81)

A.2.19 Proof of Theorem 4.7

Proof. Under Assumption 4.5, it is clear that

−→Ψ∗n(t) =

1√n

N(nt)∑i=1

(−→V i − E[

−→V i|Gi−1]

)(A.82)

is a martingale. Now define for j = 1, 2, . . . , 6,

M jnt :=

N(nt)∑i=1

(V ji − E[V j

i |Gi−1])

=

N(nt)∑i=1

(V ji − V

j). (A.83)

First, the jump size of M jnt is uniformly bounded since N(nt) is a simple point

process and by Assumption 4.5, V ji ’s are uniformly bounded. Next, the quadratic

variation of M jnt is given by

[M j ]nt =

Nj(nt)∑i=1

(V ji − V

j)2. (A.84)

By Assumptions 4.5 and 4.9 and the ergodic theorem, as t→∞,

[M j ]tt→ λVar[V j ], a.s.. (A.85)

Moreover, since M j and Mk have no common jumps for j 6= k,

[M j ,Mk]t ≡ 0. (A.86)

Therefore, applying the FCLT for martingales of Theorem VIII-3.11 of Jacod andShiryaev (1987), for any T > 0, we have

−→Ψ∗n ⇒

−→Ψ∗, in (D6[0, T ], J1), (A.87)

119

Page 127: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

To see the second part of the claim, first note that by Assumption 4.9,

1

n

N(nt)∑i=1

−→V → λ ·

−→V t, in (D[0, T ], J1) (A.88)

a.s. as n→∞. The remaining of the proof is to check the conditions for TheoremA.3 as in the proof of Theorem 4.3. The quadratic variance of Mnt := (M j

nt)1≤j≤6

is given by

E

[[1√nM

]nt

]=

1

n

∑1≤j≤6

E[N(nt)]E

[(V ji − E

[V ji |FT ji −

])2]

≤ Kt∑

1≤j≤6

E

[(V j

1

)2], (A.89)

which is uniformly bounded in n. The total variation of An := 1n

∑N(nt)i=1

−→V satisfies

E[[T (An)]t] ≤∑

1≤j≤6

E

1

n

N(nt)∑i=1

|V j |

≤ ∑1≤j≤6

KtE[|V j |], (A.90)

which is uniformly bounded in n. Hence the desired result.

A.2.20 Proof of Theorem 4.8

Proof. Given Assumptions 4.3, 4.6, 4.7, and 4.8, we have from Theorem 4.6,

−→Ψn = 1/

√n

N(n·)∑i=1

−→V i − λn

−→V e

⇒ −→Ψ, in (D6[0, τ), J1) (A.91)

Hence, we have the following convergence in (D[0, τ), J1),√n(Qb

n −Qb)⇒ Ψ1 −Ψ2 −Ψ3,√n(Qa

n −Qa)⇒ Ψ4 −Ψ5 −Ψ6.(A.92)

Recall the dynamics of Zn(t) in (4.21) and Z(t) in Theorem 4.3, we see

d(Zn(t)− Z(t)) = −d(C2n(t)− C2(t))− Zn(t−)

Qbn(t−)dC3

n(t) +Z(t−)

Qb(t−)dC3(t)

= −d(C2n(t)− C2(t))− Zn(t−)

Qbn(t−)d(C3

n(t)− C3(t))

+

[Z(t−)

Qb(t−)− Zn(t−)

Qbn(t−)

]dC3(t).

(A.93)

120

Page 128: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

We can rewrite it as

d(Zn(t)− Z(t)) +

(Zn(t−)− Z(t−)

Qb(t−)

)dC3(t) = dXn(t),

Xn(t) = −(C2n(t)− C2(t))−

∫ t

0

Zn(s−)

Qbn(s−)d(C3

n(s)− C3(s))

+

∫ t

0

Zn(s−)(Qbn(s−)−Qb(s−))

Qb(s−)Qbn(s−)dC3(s).

Now,

√nXn ⇒−Ψ2 −

∫ ·0

Z(s−)

Qb(s−)dΨ3(s)

+

∫ ·0

Z(s−)(Ψ1(s−)−Ψ2(s−)−Ψ3(s−))

(Qb(s−))2λV 3ds (A.94)

As the limit processes−→Ψ and Qb, Qa are continuous, this could be changed into

√nXn ⇒ −Ψ2 −

∫ ·0

Z(s)

Qb(s)dΨ3(s) +

∫ ·0

Z(s)(Ψ1(s)−Ψ2(s)−Ψ3(s))

(Qb(s))2λV 3ds

(A.95)Hence, √

n(Zn − Z)⇒ Y, (A.96)

where Y satisfies (4.80).

A.2.21 Proof of Lemma 4.2

Proof. Under Assumption 4.10 and Assumption 4.11, by Theorem A.5 in Appendix

B, P( 1n

∑b·nci=1

−→V i ∈ ·) satisfies a large deviation principle on L∞[0,M ] with the good

rate function

IV (f) =

∫ M

0ΛV (f ′(x))dx,

if f ∈ AC+0 [0,M ] and IV (f) =∞ otherwise, where

ΛV (x) := supθ∈R6

θ · x− ΓV (θ) , ΓV (θ) := limn→∞

1

nlog E

[e∑ni=1 θ·

−→V i

],

and P( 1nNn· ∈ ·) satisfies a large deviation principle on L∞[0, T ] with the good

rate function

IN (f) =

∫ T

0ΛN (f ′(x))dx,

121

Page 129: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

if f ∈ AC+0 [0, T ] and IN (f) =∞ otherwise, where

ΛN (x) := supθ∈RO

θ · x− ΓN (θ) , ΓN (θ) := limn→∞

1

nlog E

[eθNn

].

Since (−→V i)i∈N and Nt are independent, P( 1

n

∑b·nci=1

−→V i ∈ ·, 1

nNn· ∈ ·) satisfies a largedeviation principle on L∞[0,M ] × L∞[0, T ] with the good rate function IV (·) +IN (·).

We claim that the following superexponential estimate holds,

lim supM→∞

lim supn→∞

1

nlog P (Nn ≥ nM) = −∞. (A.97)

Indeed, for any γ > 0, by Chebychev’s inequality,

P (Nn ≥ nM) ≤ e−γnE[eγNn

].

Therefore,

lim supn→∞

1

nlog P (Nn ≥ nM) ≤ −γ + lim sup

n→∞

1

nlog E

[eγNn

]. (A.98)

From Assumption 4.11, supγ>0 lim supn→∞1n log E

[eγNn

]<∞. Hence, by letting

γ →∞ in (A.98), we have (A.97).For any closed set C ∈ L∞[0, T ],

lim supn→∞

1

nlog P

(1

n

Nn·∑i=1

−→V i ∈ C

)(A.99)

= lim supM→∞

lim supn→∞

1

nlog P

(1

n

Nn·∑i=1

−→V i ∈ C,

1

nNnT ≤M

)(A.100)

= − infM∈N

inff∈C

h∈AC+0 [0,T ],g∈AC0[0,M ]

g(h(t))=f(t),0≤t≤Th(T )≤M

[IV (g) + IN (h)] (A.101)

= − inff∈C

infh∈AC+

0 [0,T ],g∈AC0[0,∞)g(h(t))=f(t),0≤t≤T

[IV (g) + IN (h)], (A.102)

where (A.100) follows from (A.97) and (A.101) follows from the contraction prin-ciple. The contraction principle applies here since for h(t) = 1

nNnt and g(t) =1n

∑bntci=1

−→V i we have 1

n

∑Nnti=1

−→V i = g(h(t)) and moreover, the map (g, h) 7→ g h is

continuous since for any two functions Fn, Gn → F,G in uniform topology and are

122

Page 130: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

absolutely continuous, supt |Fn(Gn(t))−F (G(t))| ≤ supt |Fn(Gn(t))−F (Gn(t))|+supt |F (Gn(t))− F (G(t))| → 0 as n→∞.

For any open set G ∈ L∞[0, T ],

lim infn→∞

1

nlog P

(1

n

Nn·∑i=1

−→V ji ∈ G

)

≥ lim infn→∞

1

nlog P

(1

n

Nn·∑i=1

−→V i ∈ G,

1

nNnT ≤M

)= − inf

f∈Gh∈AC+

0 [0,T ],g∈AC0[0,M ]g(h(t))=f(t),0≤t≤T

h(T )≤M

[IV (g) + IN (h)].

Since it holds for any M ∈ N, the lower bound is proved.

A.2.22 Proof of Theorem 4.9

Proof. Since P(−→Cn(t) ∈ ·) satisfies a large deviation principle on L∞[0,∞) with

the rate function I(φ), P((Qbn(t), Qan(t)) ∈ ·) satisfies a large deviation principleon L∞[0,∞) with the rate function

I(f) := I(f b, fa) = infφ∈Gf

I(φ), (A.103)

where Gf is the set consists of absolutely continuous functions φ(t) = (φj(t), 1 ≤j ≤ 6) starting at 0 that satisfy

d

(f b(t)

fa(t)

)=

(1 −1 −1 0 0 00 0 0 1 −1 −1

)dφ(t), (A.104)

with the initial condition (f b(0), fa(0)) = (qb, qa). It is clear that

f b(t) = qb + φ1(t)− φ2(t)− φ3(t),

fa(t) = qa + φ4(t)− φ5(t)− φ6(t),

and the mapping φ 7→ (f b, fa) is continuous, since it is easy to check that if

φn(t) := (φ1n(t), . . . , φ6

n(t))→ φ(t) = (φ1(t), . . . , φ6(t))

in the L∞ norm, then (f bn(t), fan(t)) → (f b(t), fa(t)) in the L∞ norm. Since themapping φ 7→ (f b, fa) is continuous, the large deviation principle follows from thecontraction principle.

123

Page 131: Abstract - University of California, Berkeley · Abstract Optimal Placement and Dynamics of Order Positions with Related Queues in the Limit Order Book by ... in a limit order book

A.2.23 Proof of Corollary 4.7

Proof. By Lemma 4.2,

IV (g) + IN (h) =

∫ T

0ΛV (g′(t))dt+

∫ ∞0

ΛN (h′(t))dt,

whereΛV (x) = sup

θ∈R6

θ · x− log E

[eθ·−→V 1

],

andΛN (x) = x log

(xλ

)− x+ λ.

Since f(t) = g(h(t)), we have f ′(t) = g′(h(t))h′(t) and∫ ∞0

ΛV (g′(t))dt =

∫ T

0ΛV (g′(h(t))h′(t)dt =

∫ T

0ΛV

(f ′(t)

h′(t)

)h′(t)dt.

Therefore,

infh∈AC+

0 [0,T ],g∈AC0[0,∞)g(h(t))=f(t),0≤t≤T

[IV (g) + IN (h)]

= infh∈AC+

0 [0,T ]

∫ T

0

[ΛV

(f ′(t)

h′(t)

)h′(t) + h′(t) log

(h′(t)

λ

)− h′(t) + λ

]dt.

Now,

infy

ΛV

(x

y

)y + y log

(yλ

)− y + λ

= inf

ysupθ

θ · x− y log E[eθ·

−→V 1 ] + y log

(yλ

)− y + λ

= sup

θinfy

θ · x− y log E[eθ·

−→V 1 ] + y log

(yλ

)− y + λ

= sup

θ

θ · x− λ(E[eθ·

−→V 1 ]− 1)

.

Therefore, (4.94) reduces to (4.101).

124