Professional Documents
Culture Documents
Algorithmic and High-Frequency Trading
Algorithmic and High-Frequency Trading
r
le
pe
irc
vi
rc
le
pe
ne
ALGORITHMIC AND HIGH-FREQUENCY TRADING
irc
vi
in
rc
i
r
le
pe
ne
irc
The design of trading algorithms requires sophisticated mathematical models, a solid anal-
vi
in
of financial data, and a deep understanding of how markets and exchanges function.
rc
le
In this textbook the authors develop models for algorithmic trading in contexts such as:
pe
ne
irc
executing large orders, market making, targeting VWAP and other schedules, trading pairs
vi
in
rc
or collection of assets, and executing in dark pools. These models are grounded on how
i
r
le
the exchanges work, whether the algorithm is trading with better informed traders (adverse
pe
ne
irc
selection), and the type of information available to market participants at both ultra-high
vi
in
rc
le
pe
Algorithmic and High-Frequency Trading is the first book that combines sophisticated
ne
irc
mathematical modelling, empirical facts and financial economics, taking the reader from
vi
in
rc
basic ideas to the cutting edge of research and practice.
i
r
le
pe
If you need to understand how modern electronic markets operate, what information
ne
irc
provides a trading edge. and how other market participants may affect the profitability of
vi
in
rc
le
pe
ne
irc
AL VAR o c ARTE A is a Reader in Financial Mathematics at University College London.
vi
in
rc
Before joining UCL he was Associate Professor of Finance at Universidad Carlos III,
i
r
le
pe
Madrid-Spain (2009-2012) and from 2002 until 2009 he was a Lecturer (with tenure) in the
ne
irc
le
pe
ne
of Oxford.
irc
vi
in
i
r
le
the PhD and Masters of Mathematical Finance programs. He consults for major banks and
vi
in
rc
hedge funds focusing on implementing advance derivative valuation engines and algorith
r
le
pe
mic trading strategics. He is also an associate editor for the SIAM Journal on Financial
ne
irc
Mathematics, the International Journal of Theoretical and Applied Finance, the journal
vi
in
rc
Risks and the Argo newsletter. Jaimungal is the Vice Chair for the Financial Engineering &
i
r
le
pe
Mathematics activity group of SIAM and his research is widely published in academic
ne
irc
and practitioner journals. His recent interests include High-Frequency and Algorithmic
vi
in
rc
trading, applied stochastic control, mean-field games, real options, and commodity models
r
le
pe
irc
vi
in
.r o sf: PEN AL vA is an Associate Professor at the Universidad Carlos Ill in Madrid where
rc
i
r
le
he teaches in the PhD and Master in Finance programmes, as well as at the undergraduate
pe
ne
irc
level. He is currently working on information models and market microstructure and his
vi
in
research has been published in Econometrica and other top academic journals.
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
in in in in in inin in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe pe
r r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
r ci rc rc rc rc rc c r rc
rc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
in in in in in in in in
n ne ne ne ne ne ne ne
r er r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
University of Toronto
University College London
JOSE PENALVA
ne ne ne ne ne ne ne ne
ALVARO CARTEA
UNIVERSITY PRESS
CAMBRIDGE
Universidad Carlos III de Madrid
rc rc rc rc rc rc rc rc
SEBASTIAN JAIMUNGAL
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
HIGH-FREQUENCY TRADING
in in in in in in in in
p
vi
r
le
pe
CAMBRIDGE
irc
vi
rc UNIVERSITY PRESS
le
pe
University Printing Honse, Cambridge CB2 8BS, United Kingdom
ne
irc
vi
in
rc
i
r
le
It forthers the University's mission by disseminating knowledge in the pnrsnit of
pe
ne
irc
vi
in
rc
r www.cambridge.org
le
pe
Information on this title: www.cambridge.org/978 l l 07091146
ne
irc
© Alvaro Cartea, Sebastian Jaimungal and Jose Penalva 2015
vi
in
rc
i
This publication is in copyright. Subject to statutory exception
r
le
pe
and to the provisions of relevant collective licensing agreements,
ne
irc
vi
in
permission of Cambridge University Press.
rc
le
pe
irc
Printed in the United Kingdom by Bell and Bain Ltd
vi
in
rc
i
A catalogue record for this publication is available from the British Library
r
le
pe
ne
irc
vi
in
rc
Algorithmic and high-frequency trading I Alvaro Cartea, Sebastian Jaimungal, Jose Penalva.
r
pages cm
le
pe
ne
irc
Includes bibliographical references and index.
vi
rc
i
r
le
HG4515.95.C387 2015
vi
in
332.64-dc23 2015018946
rc
le
irc
rc
i
r
le
and does not guarantee that any content on snch websites is, or will remain,
vi
accurate or appropriate.
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
V
pe
irc
vi
rc
le
pe
ne
To my girls, in order of appearance, Victoria, Amaya, Carlota, and Penelope.
irc
-A.c.
vi
in
rc
i
r
le
pe
ne
irc
vi
To my parents, Korisha and Paul, and my siblings Shelly, Cristina and
in
rc
le
pe
ne
irc
vi
in
c
-S.J.
i
r
le
pe
ne
irc
vi
To Nuria, Daniel, Jose Maria and Adelina.
in
c
For their patience and encouragement every step of the way, and for never
le
r
pe
ne
irc
losing faith.
vi
in
rc
-J.P.
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
c
le
er
pe
irc
n
vi
in
rc
i
r
le
pe
ne
irc
vi
in
c
le
r
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
in in in in in in in in
ne ne ne ne ne ne
ne ne
rc c r rc c r rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe pe
r r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
r ci rc rc rc rc rc c r rc
rc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
in in in in in in in in
n er ne ne ne ne ne ne ne
rc ci rc r ci rc rc rc rc rc
irc rc irc rc irc irc irc irc irc
le le le le le le le le le
p
vi
r
le
pe
irc
vi
rc
le
Contents
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
Preface page xiii
in
rc
le
XVl
pe
ne
irc
vi
rc
i
r
Introduction to Part I
le
pe
ne
irc
vi
in
1.1
le
Electronic markets and how they function 4
pe
ne
irc
1.2 Classifying Market Participants 6
vi
in
i
r
le
1.3.3 Colocation 11
r
le
pe
irc
rc
i
r
le
pe
vi
in
2
rc
le
pe
irc
rc
pe
le
pe
ne
rc
37
r
le
pe
ne
vi
in
rc
3
r
3.1 Introduction 39
irc
vi
rc
41
ne
irc
in
rc
p
vi
r
le
v111 Contents
pe
irc
vi
rc
le
pe
ne
3.1.3 Daily Trading Activity 42
irc
42
vi
3.1.4 Daily Price Predictability
in
rc
i
3.2 Asset Prices and Returns Intraday 46
r
le
pe
ne
3.3 Interarrival Times 48
irc
vi
3.4 Latency and Tick Size 49
in
rc
le
pe
ne
irc
vi
rc
i
r
Bibliography and Selected Readings 60
le
3.8
pe
ne
irc
vi
4 Empirical and Statistical Evidence: Activity and Market Quality 61
in
rc
le
4.1 Daily Volume and Volatility 61
pe
ne
irc
4.2 Intraday Activity 63
vi
in
rc
i
r
le
pe
ne
irc
vi
in
4.3.l Spreads
le .71
pe
ne
irc
4.3.2 Volatility 76
vi
in
i
r
le
le
irc
rc
i
r
le
97
ne
irc
Introduction to Part II 99
vi
in
rc
le
100
ne
irc
rc
pe
le
pe
ne
rc
pe
ne
vi
le
pe
ne
rc
ne
irc
in
rc
p
vi
r
le
Contents 1x
pe
irc
vi
rc
le
pe
ne
5.4.3 Combined Diffusion and Jumps 120
irc
vi
5.5 Optimal Stopping 122
in
rc
i
5.5.1 The Dynamic Programming Principle 124
r
le
pe
ne
5.5.2 Dynamic Programming Equation 124
irc
vi
5.6 Combined Stopping and Control 128
in
rc
5.7
r
Bibliography and Selected Readings 130
le
pe
ne
irc
Algorithmic and High-Frequency Trading
vi
rc
i
r
le
pe
ne
irc
vi
in
Optimal Execution with Continuous Trading I 134
rc
le
6.1 Introduction 134
pe
ne
irc
6.2 The Model 135
vi
in
rc
i
r
le
6.4 Optimal Acquisition with Terminal Penalty and Temporary Impact 141
pe
ne
irc
vi
in
irc
6.8 Bibliography and Selected Readings 154
vi
in
rc
i
r
le
pe
ne
irc
le
pe
irc
rc
i
r
le
pe
le
pe
irc
vi
in
rc
pe
ne
le
pe
ne
8.5 Liquidation with Limit and Market Orders Targeting Schedules 206
in
rc
pe
ne
vi
in
rc
le
pe
ne
Introduction 212
irc
9.1
vi
rc
i
le
in
rc
p
vi
x Contents
r
le
pe
irc
vi
rc
le
220
pe
9.2.2 Stochastic Mean-Reverting Trading Rate
ne
irc
9.2.3 Probabilistic Representation 222
vi
in
in
rc
9.2.4 Simulations 225
r
le
pe
9.3 227
ne
Percentage of Cumulative Volume
irc
vi
in
rc
le
pe
9.3.3 Probabilistic Representation 233
ne
irc
9.4 235
vi
in
rc
9.4.1 Probabilistic Representation 237
r
le
pe
9.4.2 Example: Stochastic Mean-Reverting Volume 238
ne
irc
9.5 239
vi
Utility Maximiser
in
rc
le
pe
243
ne
9.6
irc
Bibliography and Selected Readings
243
vi
9.7 Exercises
in
in
rc
r
le
pe
ne
10 Market Making 246
irc
vi
10.1 Introduction 246
in
rc
le
pe
ne
in
rc
r
10.2.3 Market Making Optimising Volume 257
le
pe
ne
vi
10.4 Market Making with Adverse Selection 261
in
rc
le
irc
in
rc
r
le
vi
in
le
irc
in
11.3 Optimal Band Selection 277
rc
r
le
le
irc
in
rc
288
ne
irc
le
pe
ne
irc
in
rc
ne
irc
in
rc
p
vi
Contents xi
r
le
pe
irc
vi
rc
le
pe
12.2 Intraday Features
ne
295
irc
12.2.1 A Markov Chain Model 297
vi
in
rc
12.2.2 Jointly Modelling Market Orders 300
i
r
le
pe
ne
12.2.3 Modelling Price Jumps 303
irc
vi
12.3 Daily Features 305
in
rc
le
pe
ne
irc
vi
rc
i
12.6 Exercises 313
r
le
pe
ne
irc
vi
Appendix A Stochastic Calculus for Finance 315
in
rc
le
315
pe
ne
irc
A.1.1 Brownian Motion 316
vi
316
rc
i
r
le
pe
ne
irc
vi
in
irc
vi
Bibliography
in
327
rc
i
r
Glossary
le
pe 337
ne
irc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
in in in in in in in in
ne ne ne ne ne ne ne ne
rc r
c rc rc rc rc c r rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
r ci rc rc rc rc rc c r rc
rc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
i i i i i i i i
p
vi
r
le
pe
irc
vi
rc
le
Preface
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
We have written this book because we feel that existing ones do not provide a
in
rc
le
sufficiently broad view to address the rich variety of issues that arise when trying
pe
ne
irc
to understand and design a successful trading algorithm. This book puts together
vi
the diverse perspectives, and backgrounds, of the three authors in a manner that
in
rc
i
r
le
pe
ne
irc
data, and the mathematical tools and models to create a balanced perspective
vi
in
This book has grown out of the authors' interest in the field of algorith
le
pe
ne
irc
mic and high-frequency finance and from graduate courses taught at Univer
vi
in
i
r
le
IMPA, and University of Oxford. Readers are expected to have basic knowl pe
ne
irc
le
include an appendix with the main stochastic calculus tools and results that are
pe
ne
irc
needed. The treatment of the material should appeal to a wide audience and
vi
in
rc
i
r
le
pe
level. It is also ideal for those already working in the finance sector who wish
ne
irc
le
pe
algo.trading.book©gmail.com.
ne
irc
vi
in
rc
i
Brief guide to the contents
r
le
pe
ne
irc
This book is organised into three parts that take the reader from the work
vi
in
rc
ings of electronic exchanges to the economics behind them, then to the relevant
r
le
pe
irc
rc
and the main ways in which people participate in the market: as active traders
i
r
le
pe
ne
advantageous prices.
r
le
pe
ne
of strategies was not motivated by the information that market participants see
in
rc
ne
irc
in
rc
p
vi
xiv Preface
r
le
pe
irc
vi
rc
le
pe
data and empirical implications. The data allow us to present the context which
ne
irc
determines the ultimate fate of an algorithm. By looking at prices, volumes, and
vi
in
in
rc
the details of the limit order book, the reader will get a basic overview of some of
r
le
pe
the key issues that any algorithm needs to account for, such as the information
ne
irc
vi
in
rc
le
pe
ne
Part II develops the mathematical tools for the analysis of trading algorithms.
irc
The chapter on stochastic optimal control and stopping provides a pragmatic
vi
in
in
rc
approach to material which is less standard in financial mathematics textbooks.
r
le
pe
ne
It is also written so that readers without previous exposure to these techniques
irc
vi
equip themselves with the necessary tools to understand the mathematical mod
in
rc
le
pe
ne
Part III of the book delves into the modelling of algorithmic trading strategies.
irc
vi
The first two chapters are concerned with optimal execution strategies where the
in
in
rc
agent must liquidate or acquire a large position over a pre-specified window and
r
le
pe
ne
trades continuously using only market orders. Chapter 6 covers the classical
irc
vi
execution problem when the investor's trades impact the price of the asset and
in
rc
also adjusts the level of urgency with which she desires to execute the programme.
le
pe
ne
out the execution programme as long as the price of the asset does not breach
in
in
rc
r
a critical boundary, ii) incorporates order flow in her strategy to take advantage
le
pe
ne
irc
of trends in the midprice which are caused by one-sided pressure in the buy or
vi
in
sell side of the market, and iii) trades in both a lit venue and a dark pool.
rc
le
irc
position over a trading window, but employs only limit orders, or uses both limit
vi
in
in
and market orders. Moreover, we show execution strategies where the investor
rc
r
le
schedules. We develop strategies for investors who wish to track the overall vol
rc
le
irc
Cumulative Volume, and Volume Weighted Average Price, also known as VWAP.
vi
in
in
rc
The final three chapters cover various topics in algorithmic trading. Chapter
r
le
10 shows how market makers choose where to post limit orders in the book. The
pe
ne
irc
models that are developed look at how the strategies depend on different factors
vi
in
rc
including the market maker's aversion to inventory risk, adverse selection, and
r
le
pe
irc
in
rc
Chapter 12 shows how information on the volume supplied in the limit order
r
le
pe
vi
in
rc
le
pe
ne
irc
In choosing the content and presentation of the book we have tried to provide
vi
in
in
rc
ne
irc
in
rc
p
vi
Preface xv
r
le
pe
irc
vi
rc
le
pe
microstructure, and of some of the empirical themes of electronic trading, us
ne
irc
ing the US equities market as the one most familiar to readers. These provide
vi
in
rc
the basis for a thorough mathematical analysis of models of trade execution,
i
r
le
pe
volume-based algorithms, market making, statistical arbitrage, pairs trading,
ne
irc
and strategies based on order flow information. Most chapters in Part III end
vi
in
rc
with exercises of varying levels of difficulty. Some exercises closely follow the
r
le
pe
material covered in the chapter and require the reader to: solve some of the
ne
irc
problems by looking at them from a different perspective; fill in the gaps of some
vi
in
rc
of the derivations; see it as an invitation to experiment further. We have set
i
r
le
pe
up a website, http://www. algorithmic-trading. org, from which readers can
ne
irc
vi
in
rc
This book does not cover any of the information technology aspects of algo
r
le
pe
ne
rithmic trading. Nor does it cover in detail certain aspects of market quality or
irc
vi
rc
i
r
le
pe
ne
irc
Acknowledgements
vi
in
rc
We are thankful to those who took the time to read parts of the manuscript and
r
le
pe
ne
gave us very useful feedback: Ali Al-Aradi, Gene Amromin, Robert Almgren,
irc
vi
Ryan Francis Donnelly, Luhui Gan, John Goodacre, Hui Gong, Tianyi Jia, Hai
in
rc
i
r
le
Kong, Tim Leung, Siyuan Li, Eddie Ng, Zhen Qin, Jason Ricci, Anton Rubisov,
pe
ne
irc
Mark Stevenson, Mikel Tapia and Jamie Walton. We also thank the students
vi
who have taken our courses at University College London, University of Toronto,
in
rc
le
irc
Alvaro is grateful for the hospitality and generosity of the Finance Group at
vi
in
rc
Sai:d Business School, University of Oxford, with special thanks to Tim Jenkin
i
r
le
pe
ne
son and Colin Mayer, and the Department of Statistical Sciences, University of
irc
vi
le
pe
irc
rc
pe
ne
irc
versity College London and the Department of Finance at Cass Business School
rc
le
where parts of this book were written, as well as his home institution, the Busi
pe
ne
irc
ness Department of the Universidad Carlos III for allowing him to make these
vi
in
visits. He also wishes to thank Artem Novikov of TradingPhysics for his availabil
rc
i
r
le
ity and help in accessing the data and clarifying specific issues faced by traders
pe
ne
irc
le
pe
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
How to Read this Book
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
This book is aimed at those who want to learn how to develop the mathematical
vi
in
rc
le
pe
ne
Trading at a Master's or PhD level, and is also ideal for those already working in
irc
the finance sector who wish to combine their industry knowledge and expertise
vi
in
in
rc
with robust mathematical models for algorithmic trading.
r
le
pe
ne
Much of this book can be covered in an intensive one semester/term course
irc
vi
in
rc
tional Finance, and Applied Mathematics. A typical student at this stage .will
r
le
pe
ne
be learning stochastic calculus as part of other courses, but will not be taught
irc
vi
in
rc
operate. Thus, they are strongly encouraged to read Part I of the book to: gain
r
le
pe
ne
vi
cepts of microstructure theory that underpin how the market reaches equilibrium
in
rc
prices in the presence of different types of risks; and, study stylised statistical
le
pe
ne
irc
issues of the dynamics of the prices of stocks in modern electronic markets. And
vi
to read Part II to learn the stochastic optimal control tools which are essential
in
in
rc
r
le
le
may skip Part II of the book and cover in detail Part III. However, we still
pe
ne
irc
in
features of the market, and to develop a better intuition of why algorithmic
rc
r
le
For a shorter and more compact course on algorithmic trading, students should
vi
in
focus on learning about the limit order book, Chapter 1, then optimal control
rc
le
in Part II, and then concentrate on selected Chapters in Part III, for instance
pe
ne
irc
in
rc
Readers in the financial industry who have some knowledge of how electronic
r
le
markets are organised may want to skip Chapter 1 but are encouraged to read the
pe
ne
irc
other chapters which cover microstructure theory and the empirical and statis
vi
in
rc
tical evidence of stock prices before delving into the details of the mathematical
r
le
pe
irc
vi
in
in
rc
le
ne
irc
in
rc
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le Part I le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
Facts
r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
Microstructure and Empirical
in in in in in in in in
in in in in in in in in
ne n ne ne ne ne ne ne
rc r
c
er
c rc rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe pe
r r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc cr rc
irc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
in in in in in in in in
ne ner ne ne ne ne ne ne
rc rc ci rc rc rc rc rc rc
irc irc rc irc irc irc irc irc irc
p
vi
r
le
pe
irc
vi
rc
le
Introduction to Part I
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
In the first part of the book we give an overview of the way basic electronic
in
rc
le
markets operate. Chapter 1 looks at the main practical issues when trading:
pe
ne
irc
what are the main assets traded and the main types of participants, what drives
vi
in
in
them to trade, and how do they interact. It also looks at the basic functioning of
rc
r
le
an electronic exchange: limit orders, market orders, and other types of orders, as
pe
ne
irc
well as the limit order book, and basic fee structures. It concludes by looking at
vi
in
the way the limit order book is organised and the basic experience of executing
rc
a trade.
le
pe
ne
irc
Chapter 2 provides an overview of the theoretical economics of trading: what
vi
in
in
are the economic forces driving the competitive advantage of market makers
rc
r
le
and other traders and how do they interact. It covers the basic market making
pe
ne
irc
models that describe how liquidity is affected by inventory risk or the presence
vi
in
rc
of better informed traders. It also looks at the market maker's trade-off between
r
le
execution frequency and expected profit per trade, and how informed traders
pe
ne
irc
in
rc
pe
the time series properties of prices and returns, at daily and intraday frequency.
r
le
pe
It considers such issues as latency and the effects of limitations on price move
ne
irc
in
rc
in US markets, and the comovement of asset prices that drives trading in pairs
r
le
pe
of assets. Chapter 4 focuses on volume and market quality. It looks at the re
ne
irc
le
pe
market quality: spreads, volatility, depth and trade size, and price impact. The
ne
irc
in
rc
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
pe
1 Electronic Markets and the Limit
ne
irc
vi
in
in
rc
Order Book
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
To understand how electronic markets work we must first understand the con
vi
in
rc
text in which trading in financial markets occurs. In this chapter, Section 1.1, we
r
le
pe
irc
sions on stocks, preferred stocks, mutual funds and hedge funds. We also discuss
vi
in
in
rc
types of market participants (noise traders, informed traders/arbitrageurs, mar
r
le
pe
ne
ket makers) and in Section 1.2 how they interact. Next, in Section 1.3 we describe
irc
how electronic exchanges are structured, what limit and market orders are (as
vi
in
rc
well as other order types), how exchanges collect orders in the limit order book
r
le
pe
ne
(LOB), and the fees charged to market participants. Finally, Section 1.4 provides
irc
vi
details of how the LOB is constructed and how market orders interact with it.
in
in
rc
r
le
pe
ne
irc
vi
1.1 Electrnnic markets and how they function
in
rc
le
pe
ne
irc
Many types of financial contracts are traded in electronic markets today, so let us
vi
in
in
rc
briefly and very superficially consider the main ones. The most familiar of these
r
le
pe
These claims are used by corporations to raise money. In the US, for these
vi
in
rc
le
pe
exchange, and this implies fulfilling certain requirements in terms of the number
ne
irc
of shareholders, price, etc. The listing process is usually tied to the first issuance
vi
in
in
rc
of the public shares (initial public offering, or IPO). The fundamental value
r
le
pe
of these shares is derived from the nature of the contract it represents. In its
ne
irc
simplest form, it is a claim of ownership on the company that gives the owner
vi
in
rc
the right to receive an equal share of the corporation's profits (hence the name,
r
le
pe
ne
'share') and to intervene in the corporate decision process via the right to vote
irc
in
rc
called ordinary shares (or common stock) and are the most common type
r
le
pe
ne
of shares.
irc
vi
bonds. Bonds are contracts by which the corporation commits to paying the
r
le
pe
ne
holder a regular income (interest) but gives them no decision rights. The differ
irc
vi
ences between stocks and bonds are quite clear: shareholders have no guarantees
in
in
rc
on the magnitude and frequency of dividends but have voting rights, bondhold-
le
ne
irc
in
rc
p
vi
1.1 Electronic markets and how they function 5
r
le
pe
irc
vi
rc
le
pe
ne
ers have guarantees of regular, pre-determined payments and no voting rights.
irc
There are other instruments with characteristics from both these contracts, the
vi
in
in
rc
most familiar of which is preferred stock. Preferred stock represents a hybrid
r
le
pe
ne
of stocks and bonds: they are like bonds in that holders have no voting rights
irc
vi
and receive a pre-arranged income, but the income they receive has fewer guar
in
rc
antees: its legal treatment is that of equity, rather than debt. This difference is
r
le
pe
ne
irc
vi
to all equity, so that in case of liquidation, debt holders' claims have priority over
in
in
rc
r
the corporation's assets -they get paid first. Equity holders, if they get paid, arc
le
pe
ne
irc
vi
The universe of financial contracts is separated into different asset classes or
in
rc
le
categories according to the characteristics of the underlying assets. Shares and
pe
ne
irc
preferred stock belong to Equities. Bonds belong to their own asset class and
vi
in
rc
r
le
investment horizons and usually with very heavy guarantees and low returns,
pe
ne
irc
such as money market accounts, savings deposits, Treasury bills, etc). There are
vi
in
also more exotic asset classes such as Foreign Exchange (FX), Commodities,
rc
le
Real Estate or Property. An investor will find these different types of assets in
pe
ne
irc
electronic exchanges, usually in the form of specialised securities such as mutual
vi
in
in
funds and exchange-traded funds (ETFs), which allow investors to invest in
rc
r
le
these asset classes in a familiar, equity-like market which simplifies the process
pe
ne
irc
le
manager. That is, when an investor buys a mutual fund, the investor gives her
pe
ne
irc
cash to a financial management company that will use the cash to build a portfo
vi
in
in
rc
lio of assets according to the fund's investment objective. This objective includes
r
le
pe
the fund's assets and investment strategy, and, of course, its management fees.
ne
irc
The fund's assets can belong to a large number of possible asset classes, including
vi
in
rc
all those described above: equities, bonds, cash, FX, real estate, etc. The fund's
r
le
pe
investment strategy refers to the style of investment, primarily whether the fund
ne
irc
in
rc
pe
redeem her investment, i.e. to convert her investment into cash, the investor's
vi
in
rc
options depend on the type of fund she purchased. There are two main types
r
le
pe
of mutual funds: open-end and closed-end funds. Closed-end funds are mutual
ne
irc
funds that are not redeemable: the fund issues a fixed number of shares usually
vi
in
in
rc
only once, at inception, and investors cannot sell the shares back to the fund.
r
le
pe
ne
The fund sells the shares initially through an IPO and these shares are listed on
irc
vi
an exchange where investors buy and sell these shares to each other.
in
rc
Open-end funds are funds with a varying number of shares. Shares can be
r
le
pe
ne
created to meet the demand of new investors, or destroyed (bought back by the
irc
vi
fund) as investors seek to redeem theirs. This process takes place once a day, as
in
in
rc
the value of the fund's (net) assets (its Net Asset Value, NAV) is determined
le
ne
irc
in
rc
p
vi
6 Electronic Markets and the Limit Order Book
r
le
pe
irc
vi
rc
le
pe
after the market close. Thus, closed-end funds, that do not have to adjust their
ne
irc
holdings in response to investor demand, have different liquidity requirements
vi
in
rc
than open-end funds and thus may trade at prices different from their NAV.
i
r
le
pe
ne
A very popular type of fund that, like closed-end funds, are traded in electronic
irc
exchanges, are ETFs. Like mutual funds, ETFs act as delegated investment man
vi
in
rc
agers, but they differ in two key respects. First, ETFs tend to have very specific
r
le
pe
ne
irc
vi
particular market index (e.g., the S&P500). Second, they are not obligated to
in
rc
i
purchase investors' shares back. Rather, if an investor wants to return their share
r
le
pe
ne
to the fund, the fund can transfer to the investor a basket of securities that mir
irc
vi
rors that of the ETF. This is possible because the ETF sells shares in very large
in
rc
units (Creation Units) which are then broken up and resold as individual shares
r
le
pe
ne
irc
in the exchange. A Creation Unit can be as large as 50,000 shares. Overall, the
vi
general perception one gets is that investors who are looking to reduce their
in
rc
i
r
le
trading costs and find diversified investments prefer ETFs, while investors who
pe
ne
irc
are looking for managers with stock-picking or similar unusual skills and who
vi
in
Some investment firms feel that the regulation that is imposed on mutual
le
pe
ne
irc
fund managers to ensure they fulfill their fiduciary duties to investors are too
vi
in
i
r
le
pursue more aggressive trading strategies and have fewer regulatory and trans pe
ne
irc
le
to be better informed and able to deal with the fund's managers. Although these
pe
ne
irc
funds are not traded on exchanges, their managers are active participants in
vi
in
those markets.
rc
i
r
le
tures, swaps and options, and these contracts are written on a wide variety of
r
le
assets (bonds, FX, commodities, equities, indices). The concepts and techniques
pe
ne
irc
we develop in this book apply to the trading of any of these assets, although
vi
in
rc
pe
designing algorithms and strategies one must always take into account the spe
ne
irc
cific issues associated with the types of assets one is trading in, as well as the
vi
in
rc
le
pe
irc
vi
in
rc
i
r
le
vi
in
rc
le
pe
ne
the different types of trading behaviour one will probably encounter in these
irc
exchanges. For instance, one must consider who trades in these exchanges and
vi
in
rc
why. Everyone's motivation is clear, they want to make money, but it is essential
le
ne
irc
in
rc
p
vi
1.2 Classifying Market Participants 7
r
le
pe
irc
vi
rc
le
pe
ne
to consider what drives them to trade -- how it is that they may be looking to
irc
make money - because in many cases this will interact with our algorithm de
vi
in
in
rc
sign choices and affect whether and how different algorithms achieve the desired
r
le
pe
ne
trading objective.
irc
vi
Let us start from the creation of the objects of trade we have just discussed.
in
rc
The most familiar of these are shares. We have seen that corporations, or rather,
r
le
pe
ne
their managers, issue stocks or equity in order to raise capital. These stocks
irc
vi
are one of the primary objects of trade which are created when a company goes
in
in
rc
public and goes through the process of having them listed on an exchange, usually
r
le
pe
ne
irc
via an IPO. A corporation issues shares to raise capital for diverse economic
vi
in
activities, ranging from manufacturing electronic music players to mining ores
rc
le
in remote places. It is important to remember that these shares are claims on
pe
ne
irc
a corporation and as such are subject to the decisions of the company. Hence,
vi
in
in
one type of participant is corporate managers who create some of the assets
rc
r
le
that are traded in the exchanges, and who will, at times, actively participate in
pe
ne
irc
vi
in
e.g., through secondary share offerings (SSOs), share buybacks, stock dividends,
rc
irc
We have also seen that there are other objects traded in exchanges. In equity
vi
in
in
markets we find funds (mutual funds, ETFs) created by financial management
rc
r
le
financial contracts, are very active participants in electronic exchanges, and orig
vi
in
rc
le
side' traders Can have long-term investment goals (e.g., funds which focus on
pe
ne
irc
in
rc
cus on very immediate strategies (e.g., ETFs that replicate the returns of the
r
le
S&P500). There are also proprietary traders who trade on a (sometimes real,
pe
ne
irc
sometimes illusory) trading advantage, which range from the large hedge funds
vi
in
rc
we saw earlier, to small individual 'day-traders' moving in and out of asset po
r
le
pe
irc
in
rc
pe
able to time price movements based on news (be it the announcement of gov
vi
in
rc
le
pe
ne
in
rc
and 'fundamental traders'. These are investors who have a direct use for
r
le
pe
ne
the assets being traded. They may be individuals who buy stocks in the hope
irc
of being able to share in their growth as the corporation increases its economic
vi
in
rc
value-creation and its shares appreciate in value. Or, they may want to rebalance
r
le
pe
ne
need for cash, a change in their taste for risk or their outlook for the future). They
in
in
rc
may be corporations that use financial contracts to hedge risks such as changes in
le
ne
irc
in
rc
p
vi
Electronic Markets and the limit Order Book
r
8
le
pe
irc
vi
rc
le
pe
ne
the prices of inputs and outputs from their production activity. Traders in Brent,
irc
vi
copper, or electricity futures worry about non-financial issues such as the nurnber
in
in
rc
of refineries going offiine for repairs, the discovery of new methods for safely
r
le
pe
ne
transmitting electricity, or whether that tropical storm off the coast of Florida
irc
vi
is going to turn into a hurricane and make landfall near Miami or Dade. And,
in
rc
r
one cannot ignore that governments also have a stake in market outcomes. They
le
pe
ne
irc
may want to manage their currency, issue debt to finance public expenditures,
vi
in
in
or repurchase assets to increase liquidity or maintain market stability.
rc
r
le
The effects of the interaction amongst all these traders is one of the key issues
pe
ne
irc
vi
in
with in Chapter 2, and which helps us structure the concepts and issues behind
rc
le
our approach to trading. We differentiate three primary classes of traders (or
pe
ne
irc
trading strategies) below.
vi
in
in
rc
1. Fundamental (or noise or liquidity ) traders: those who are driven by eco
r
le
pe
ne
nomic fundamentals outside the exchange.
irc
2. Informed traders: traders who profit from leveraging information not re
vi
in
rc
le
pe
ne
or depreciation.
irc
vi
in
rc
pe
ne
irc
Usually, one may consider arbitrageurs as a fourth type of trader, though, for
vi
in
rc
le
pe
ipation of price changes. Also, although it is not unusual to bundle noise and
ne
irc
in
rc
traders. The term 'Noise traders' is frequently employed to describe trading that
r
le
pe
is orthogonal to any events driving market prices, and 'Liquidity traders' is used
ne
irc
for traders driven by the need to liquidate or accumulate a position for liquidity
vi
in
rc
le
pe
'Fundamental traders', on the other hand, is a term usually reserved for traders
ne
irc
that have medium- and long-term investment strategies based on detailed anal
vi
in
in
rc
ysis of the actual business activity that underlies the asset being traded. This
r
le
pe
ne
their trading strategy arises from portfolio management and risk-return trade
vi
in
rc
offs that have very little short-term price information beyond that contained in
r
le
pe
ne
the sheer size of their positions. Thus, from the point of view of a high-frequency
irc
vi
in
rc
the specific market events within the algorithm's horizon. Having said this, as
r
le
pe
ne
le
pe
ne
trading that profits from detailed knowledge of the trading process and adapts
in
in
rc
to 'the market' as circumstances change, while the first two types represent
le
ne
irc
in
rc
p
vi
r
le
1.3 Trading in Electronic Markets 9
pe
irc
vi
rc
le
pe
ne
more 'active' or 'aggressive' trading that only takes place to exploit specific
irc
vi
informational advantages gained outside of the trading environment noise and
in
rc
i
fundamental traders having only a fleeting effect on short-run movements, while
r
le
pe
ne
irc
informed traders anticipate short-run price movements. This distinction is useful
vi
when setting up a trading strategy, although the boundary between the two is not
in
rc
le
always clear. Professional traders often leverage informational advantages gained
pe
ne
irc
from trading practice into the trading strategies they use for market making.
vi
A common error is to equate market making with liquidity provision and in
in
rc
i
r
le
formed trading with the taking of liquidity. Market making activity generally
pe
ne
irc
favours the provision of liquidity but a particular market making strategy may
vi
in
at times provide liquidity while at others demand it. Similarly, informed trading
rc
le
does not always occur via aggressive orders, and may at times be better imple
pe
ne
irc
mented via passive orders that add liquidity. In Chapter 10 we develop algorithms
vi
in
for market makers who always provide liquidity to the market. These algorithms
rc
i
r
le
can be extended to show how market making changes when the market maker
pe
ne
irc
may take liquidity from the market. Moreover, in Chapter 8 we develop models
vi
in
of optimal execution where the agent's strategies both take and provide liquidity.
rc
le
pe
ne
irc
vi
in
i
r
le
pe
ne
irc
After the who and what of electronic markets, let us look at the how. There
vi
in
rc
are many ways to implement an electronic market, though essentially they all
r
le
pe
amount to hav'ing a way for people to signal their willingness to trade, and a
ne
irc
matching engine to match those wanting to buy with those wanting to sell.
vi
in
rc
i
r
le
pe
ne
vi
in
rc
In the basic setup, an electronic market has two types of orders: Market Orders
r
le
pe
(MOs), and Limit Orders (LOs). MOs are usually considered aggressive orders
ne
irc
rc
that she wants to buy or sell a certain quantity of shares at the best available
i
r
le
pe
price, and this will (usually ) result in an immediate trade (execution). On the
ne
irc
le
pe
ne
quantity of shares. As the price offered in the LO is usually worse than the
irc
vi
current market price (higher than the best buy price for sell LOs, and lower
in
rc
than the best sell price for buy LOs), it will not result in an immediate trade,
r
le
pe
ne
and will thus have to wait until either it is matched with a new order that wants
irc
vi
Orders are managed by a matching engine and a limit order book (LOB). The
r
le
pe
ne
irc
LOB keeps track of incoming and outgoing orders. The matching engine uses a
vi
well-defined algorithm that establishes when a possible trade can occur, and if so,
in
rc
i
le
which criterion is going to be used to select the orders that will be executed. Most
ne
irc
in
rc
p
vi
Electronic Markets and the Limit Order Book
r
le
10
pe
irc
vi
rc
le
pe
HPQ on Oct 1, 2013 FARO on Oct 1, 2013
ne
irc
at 09:42:09.644 at 12:03:55.921
vi
41.5
in
rc
i
r
le
pe
ne
irc
<J.)21.2
vi
-�
in
rc
le
0.. 21.1
pe
ne
irc
vi
in
21
rc
i
r
le
pe
0
ne
irc
Volume Volume
vi
in
rc
Figure 1.1 Snapshots of the NASDAQ LOB after the 10,000th event of the day. Blue
r
le
pe
ne
bars represent the available sell LOs, red bars represent the available buy LOs.
irc
vi
in
rc
i
r
le
markets prioritise MOs over LOs and then use a price-time priority whereby, if an
pe
ne
irc
MO to buy comes in, the buy order will be matched with the standing LOs to sell
vi
in
in the following way: first, the incoming order will be matched with the LOs that
rc
offer the best price (for buy orders, the sell LOs with the lowest price), then, if the
le
pe
ne
irc
quantity demanded is less than what is on offer at the best price, the matching
vi
in
algorithm selects the oldest LOs, the ones that were posted earliest, and executes
rc
i
r
le
demands more quantity than that offered at the best price, after executing all
vi
in
rc
standing LOs at the best price, the matching algorithm will proceed by executing
r
le
against the LOs at the second-best price, then the third-best and so on until the
pe
ne
irc
whole order is executed. LOs that have increasingly worse prices are referred to
vi
in
rc
as LOs that are deeper in the LOB, and the process whereby an entering market
i
r
le
order executes against standing LOs deeper in the LOB is called 'walking the
pe
ne
irc
book'. Section 1.4 provides a more detailed view on how the LOB is built, and
vi
in
rc
le
pe
Figure 1.1 shows a snapshot of the limit order book (LOB) on NASDAQ after
ne
irc
the 10,000th event of the day for two stocks, FARO and HPQ, on Oct 1, 2013
vi
in
rc
(see subsection 3.1.1 for a description of how this is constructed from the raw
i
r
le
pe
event data). The two are quite different. The one in the left panel corresponds
ne
irc
to HPQ, a frequently traded and liquid asset. HPQ's LOB has LOs posted at
vi
in
rc
every tick out to (at least) 20 ticks away from the midprice. In the right panel,
r
le
pe
ne
we have FARO's LOB. FARO is a seldom traded, illiquid asset. This asset has
irc
thinly posted bids and offers and irregular gaps in the LOB. We discuss further
vi
in
rc
pe
ne
irc
vi
in
rc
le
pe
ne
The above approach is not the only possible way to organise an exchange. For
irc
vi
example, one could use an alternative matching algorithm, such as the prorata
in
rc
rules used in some money markets. With a prorata rule, MOs are matched
le
ne
irc
in
rc
p
vi
1.3 Trading in Electronic Markets 11
r
le
pe
irc
vi
rc
le
pe
against the posted LOs available at the best price, in proportion to the quantities
ne
irc
posted - there is no time-priority rule. There are also markets, e.g. in futures,
vi
in
rc
that mix the two, pro-rata and time-priority.
i
r
le
pe
In addition to this basic setup there are a number of variations in the way
ne
irc
exchanges organise offers and trades. For example, some markets introduce an
vi
in
rc
additional priority to orders coming from a certain type of trader (either a des
r
le
pe
ne
irc
vi
Many exchanges also use auctions at particular points in time. It is quite typical
in
rc
i
to have an initial and/or a closing auction, that is an auction at the start of the
r
le
pe
ne
trading day and/or an auction to close the market. In addition, an exchange will
irc
vi
use an auction after a market trading halt (e.g., after a volatility limit has been
in
rc
le
pe
ne
irc
vi
gree (and cost) of transparency. In the US there is clear (legal) distinction be
in
rc
i
r
le
tween regulated exchanges (such as NASDAQ and NYSE) which have specific
pe
ne
irc
obligations to publish information regarding the status of their LOBs, and other
vi
electronic markets (electronic crossing networks (ECNs), dark pools, and broker
in
rc
le
dealer internalisation). Beyond the legal definitions, we generically distinguish
pe
ne
irc
lit (open order book) from dark markets based on whether limit book informa
vi
in
tion is publicly available or not. Within lit markets there are many differences
rc
i
r
le
on how and at what price information is available. For example, NASDAQ has
pe
ne
irc
message, and each LO is assigned an order identification number which can then
rc
le
be used to match the order with subsequent events, such as cancellations or ex
pe
ne
irc
ecutions. Other markets (NYSE and NYSE MKT/AMEX in particular) use the
vi
in
level-book method, whereby the market receives a message every time there is an
rc
i
r
le
event that impacts the order book, but does not keep tabs on posted orders so
pe
ne
irc
out this book, most of the algorithms that we develop assume that the agent is
r
le
pe
trading in a lit market where she can observe the LOB. However, in Chapter 7
ne
irc
we discuss dark pools and develop algorithms for optimal execution when the
vi
in
rc
pe
ne
irc
vi
in
1.3.3 Colocation
rc
le
pe
Exchanges also control the amount and degree of granularity of the information
ne
irc
you receive (e.g., you can use the consolidated/public feed at a low cost or pay
vi
in
rc
a relatively much larger cost for direct/proprietary feeds from the exchanges).
i
r
le
pe
They also monetise the need for speed by renting out computer/server space
ne
irc
le
pe
ne
rates. Having the traders' trading engines at a common location owned by the
irc
rc
control the hardware connecting each client to the trading engine, the cable (so
le
ne
irc
in
rc
p
vi
r
le
12 Electronic Markets and the Limit Order Book
pe
irc
vi
rc
le
pe
ne
all have the same cable of the same length), and the network. This ensures that
irc
all traders in colocation have the same fast access, and are not disadvantaged (at
vi
in
rc
i
least in terms of exchange-provided hardware). Naturally, this imposes a clear
r
le
pe
ne
distinction between traders who are colocated and those who are not. Those not
irc
vi
colocated will always have a speed disadvantage. It then becomes an issue for reg
in
rc
ulators who have to ensure that exchanges keep access to colocation sufficiently
r
le
pe
ne
irc
competitive.
vi
The issue of distance from the trading engine brings us to another key dimen
in
rc
i
r
le
pe
ne
irc
vi
in
has to be aware that there are up to 13 lit electronic exchanges and more than 40
rc
le
dark ones. Together with this wide range of trading options, there is also specific
pe
ne
irc
regulation (the so-called 'trade-through' rules) which affects what happens to
vi
in
market orders sent to one exchange if there are better execution prices at other
rc
i
r
le
exchanges. The interaction of multiple trading venues, latency when moving be
pe
ne
irc
vi
in
le
pe
ne
irc
vi
rc
i
r
le
The role of time is fundamental in the usual price-time priority electronic ex
pe
ne
irc
change, and in a fragmented market, the issue becomes even more important.
vi
in
rc
le
pe
irc
but at other markets as well. The race to be the first in or out of a certain
vi
in
rc
position is one of the focal points of the debate on the benefits and costs of
i
r
le
pe
ne
'high-frequency trading'.
irc
le
pe
ne
the matching engine, and the way orders are routed within an exchange and
in
rc
i
between exchanges. Exchanges, being aware of the importance of speed, have
r
le
pe
ne
adapted and, amongst other things, moved well beyond the basic two types of
irc
vi
orders (MOs and LOs). Any trader should be very well-informed regarding all
in
rc
the different order types available at the exchanges, what they are and how they
r
le
pe
ne
irc
may be used. Some examples of the types of orders that you may find are:
vi
in
rc
- Day Orders: orders for trading during regular trading with options to extend
i
r
le
pe
ne
the default re-routing to other exchanges, such as 'book only', 'post only',
r
le
pe
ne
- Pegged, Hide-not-Slide: orders that move with the midpoint or the national
in
rc
best price;
le
ne
irc
in
rc
p
vi
1.3 Trading in Electronic Markets 13
r
le
pe
irc
vi
rc
le
pe
- Hidden: orders that do not display their quantity;
ne
irc
vi
- Iceberg: orders that partially display their quantity (some have options so
in
rc
i
r
le
that the visible portion will automatically be replenished when it is depleted
pe
ne
irc
vi
in
- Immediate-or-Cancel: orders that execute as much as possible at the best
rc
le
price and the rest are cancelled (such orders are not re-routed to another
pe
ne
irc
exchange nor do they walk the book);
vi
in
rc
- Fill-or-Kill: orders sent to be executed at the best price in their entirety or
i
r
le
pe
not at all;
ne
irc
- Good-Till-Time: orders with a fixed lifetime built into them so that they
vi
in
rc
le
pe
ne
irc
- Discretionary: orders display one price (the limit price) but may be executed
vi
in
rc
i
r
le
pe
ne
irc
and there are a myriad other variations on the classic JVIOs and LOs.
vi
in
When coding an algorithm one should be very aware of all the possible types of
rc
le
orders allowed, not just in one exchange, but in all competing exchanges where
pe
ne
irc
one's asset of interest is traded. Being uninformed about the variety of order
vi
in
types can lead to significant losses. Since some of these order types allow changes
rc
i
r
le
and adjustments at the trading engine level, they cannot be beaten in terms of
pe
ne
irc
latency by the trader's engine, regardless of how efficiently your algorithms are
vi
coded and hardwired. 1 Later, when developing the mathematical algorithms in
in
rc
le
Part III of the book, we assume that the agents employ MOs and LOs and that
pe
ne
irc
rc
i
r
le
pe
ne
irc
le
irc
but the cost is not the same for all traders. For example, many exchanges run
vi
in
i
r
le
MO (and hence taking liquidity away from the market) pays a trading fee, while
pe
ne
irc
a trader whose posted LO is filled by the MO (that is, the LO with which the
vi
in
rc
MO is matched) will a pay much lower trading fee, or even receive a payment
r
le
pe
(a rebate) from the exchange for providing liquidity (making the market). On
ne
irc
the other hand, there are markets with an inverted fee schedule, a taker-maker
vi
in
rc
system where the fee structure is the reverse: those providing liquidity pay a
i
r
le
pe
higher fee than those taking liquidity (who may even get a rebate). The issue of
ne
irc
exchange fees is quite important as fees distort observed market prices (when you
vi
in
rc
make a transaction the relevant price for you is the net price you pay /receive,
r
le
pe
ne
irc
1 The importance of order types, their use, and the transparency with which they are
vi
in
documented is a key issue. The trader Haim Bodek has made a number of public
rc
i
le
in
rc
p
vi
r
14 Electronic Markets and the Limit Order Book
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
Figure 1.2 LOB illustration of a buy
r
le
pe
ne
LO added to the queue at the best
irc
bid.
vi
in
rc
le
pe
ne
irc
Bid Side
vi
in
rc
100 200 300 400 500
i
r
le
Available Depth
pe
ne
irc
vi
in
$23.14 $23.14
rc
le
pe
ne
$23.12 $23.12
irc
if) if)
Q) Q)
u u
vi
in
rc
d:;$2310 ===} d:;$2310
i
r
le
pe
ne
irc
$23. 08 $23.08
Biel Side Biel Side
vi
in
rc
100 200 300 400 500 100 200 300 400 500
Available Depth le Available Depth
pe
ne
irc
vi
in
rc
i
r
le
which is the published price net of fees), and their effect in a fragmented market
pe
ne
is strongly debated. 2
irc
vi
in
rc
le
pe
ne
irc
rc
i
r
le
Having seen how complex things can get, let us start from the most basic de
pe
ne
irc
scription of the LOB and illustrate it first using an artificial LOB, and later
vi
in
rc
(Figure 1.4) with some actual examples, using detailed message data from two
r
le
pe
irc
rc
pe
how price-time priority works: an incoming LO joins the LOB at the order's
ne
irc
price and is placed last in the execution queue at that price. This is illustrated
vi
in
rc
in an artificial LOB, in Figure 1.2. In this figure, LOs are displayed as blocks of
r
le
pe
length equal to their quantities. LOs are ordered in terms of time priority from
ne
irc
right to left, so that when a new buy LO comes in at $23.09 (the purple block
vi
in
rc
in the bottom panel of Figure 1.2) it will be added to the line of blocks already
i
r
le
pe
ne
resting at that price. This new LO joins the queue at the point closest to the
irc
le
pe
ne
with the LOB depicted at the top of Figure 1.2. Assume that this venue's best
irc
vi
in
2 Colliard & Foucault (2012) provide a very clear theoretical overview of the role of trading
rc
i
le
fees and their effects on the relationship between quoted and underlying prices.
ne
irc
in
rc
p
vi
r
1.4 The Limit Order Book
le
15
pe
irc
vi
rc
le
pe
ne
irc
vi
$23.14
in
rc
Ask Side Ask Side
i
r
le
pe
$23.12
ne
irc
[/J
Q)
;f $23 10
vi
=?
in
rc
r I
le
pe
$23.08 $23.08
ne
irc
Bid Side
vi
in
$23.06
rc
100 200 300 400 500 0 100 200 300 400 500
i
r
le
pe
ne
irc
vi
in
$23.14 $23.14
rc
le
pe
ne
$23.12 $23.12
irc
[/J [/J
Q) Q)
vi
;f $23 10 ;f $23 10
in
=?
rc
i
r
le
pe
ne
irc
$23.08 $23.08
Bid Side
vi
in
rc
$23.06
r
le
100 200 300 400 500 0 100 200 300 400 500
pe
irc
vi
Figure 1.3 LOB illustration of a sell MO walking the LOB with and without
in
rc
i
r
le
re-routing. pe
ne
irc
vi
in
rc
bid is the best buy quote that the market, across all venues, currently displays.
r
le
pe
A new MO (to·sell) 250 shares enters this market as depicted by the sum of the
ne
irc
green blocks in the top 'panel of Figure 1.3. The matching engine goes through
vi
in
rc
the LOB, matching existing (posted) LOs (to buy on the bid side) with the
i
r
le
pe
entering MO following the rules in the matching algorithm. In the LOB there
ne
irc
are two LOs at the best bid $23.09, represented by the two red blocks, both for
vi
in
rc
100 units, totalling 200 units. These 200 units are executed at the best bid.
r
le
pe
What happens to the final 50 units depends on the order type and the market
ne
irc
rc
pe
ne
will 'walk the book'). This is captured by the top panels in Figure 1.3: the left
irc
vi
panel shows that the MO coming in is split into three blocks, the first two are
in
rc
matched with LOs at $23.09 and the last with the LOs at $23.08. After the MO
r
le
pe
ne
is fully executed the remaining LOB is shown in the top right panel of Figure
irc
vi
1.3.
in
rc
i
r
pe
ne
irc
rules to ensure MOs get the best possible execution, and which (depending on
vi
the order type) may require the exchange to re-route the remaining 50 units to
in
rc
le
another exchange that is also displaying a best bid price of $23.09. In this case,
pe
ne
irc
as shown in the bottom left panel of Figure 1.3, part of the remaining 50 units
vi
(the light blue block) is re-routed to another venue(s) with liquidity posted at
in
rc
i
le
$23.09. Only once all liquidity at $23.09 in all exchanges is exhausted, can the
ne
irc
in
rc
p
vi
16 Electronic Markets and the Limit Order Book
r
le
pe
irc
vi
rc
le
pe
remaining shares of the MO return and be executed in this venue against any LO
ne
irc
resting at (the worse price of) $23.08. In this example, 25 units were re-routed to
vi
in
in
rc
alternate exchanges, and 25 units returned to this venue and walked the book.
r
le
pe
The MO could in principle be an Immediate-or-Cancel (IOC) order, which
ne
irc
specifies that the remaining 50 shares that cannot be executed at the best bid
vi
in
rc
le
pe
ne
irc
vi
rule in European markets), you will very seldom observe in the US an MO walking
in
in
rc
the book straight away. Rather, you may see a large MO being chopped up and
r
le
pe
ne
executed sequentially in several markets in a very short span of time. This also
irc
vi
implies that as depth disappears (as during the Flash Crash of May 6th, 2010) an
in
rc
MO at the end of a sequence of other orders may be executed against very poor
r
le
pe
ne
prices, and, in the worst circumstances it may be matched with stub quotes
irc
vi
- LOs at prices so ridiculous that clearly indicate they are not expected to be
in
in
rc
r
executed (such trades were observed during the Flash Crash in the following
le
pe
ne
irc
assets: JKE, RSP, Excelon, Accenture, amongst others). Thus, the LOB serves
vi
in
to keep track of LOs and apply the algorithm that matches incoming orders to
rc
existing LOs. le
pe
ne
irc
The LOB is defined on a fixed discrete grid of prices (the price levels). The
vi
in
in
size of the step (the difference between one price level and the next) is called
rc
r
le
the tick, and in the US the minimum tick size is 1 cent for all stocks with a
pe
ne
irc
price above one dollar. In other markets several different tick sizes coexist. For
vi
in
example, in the Paris Bourse or the Bolsa de Madrid, tick sizes can range from
rc
le
0.001 to 0.05 euros depending on the price the stock is trading at.
pe
ne
irc
Figure 1.1 shows a sample plot of the limit order book (LOB) on NASDAQ
vi
in
in
after the 10,000th event of the day for two stocks, FARO and HP Q, on Oct 1,
rc
r
le
2013. In blue you find the sell LOs -traders willing to wait to be able to sell
pe
ne
irc
at a high price. The best sell price, the ask, is $21.16, while the best buy price,
vi
in
rc
the bid, is $21.15. The difference between the ask and the bid price, the quoted
r
le
sp read is
pe
ne
irc
Quoted Spreadt = P? - Pt ,
vi
in
in
rc
r
le
(where P/ and Pt are the best bid and ask prices), which in this case, is one
pe
ne
irc
cent - the minimum quoted spread. However, some times the bid is equal to
vi
in
rc
the ask and the spread is zero. In that case, the market becomes locked, but
r
le
pe
if this happens, it tends not to last long - although for some very liquid assets
ne
irc
in
rc
used when describing the LOB is the midp rice. The midprice is the arithmetic
r
le
pe
vi
le
pe
ne
It is often used to proxy for the true underlying price of the asset - the price for
irc
the asset if there were no explicit or implicit trading costs (and hence no spread).
vi
in
in
rc
As pointed out earlier, the two LOBs shown in Figure 1.1 are quite different.
le
ne
irc
in
rc
p
vi
1.4 The Limit Order Book 17
r
le
pe
irc
vi
rc
le
pe
HPQ Oct 1, 2013
ne
irc
10:40:00.000 to 10:45:00.000
vi
in
rc
i
r
le
Figure 1.4 Time series of the changes in
pe
ne
irc
vi
·.:: NTAP, and ORCL.
in
rc
0... 21.22 r
le
pe
ne
21.2
irc
vi
21.18
in
�-�---�--��
rc
i
r
0 2 3 4 5
le
pe
Time
ne
irc
vi
in
rc
le
33.44
pe
ne
43.1
irc
33.42
vi
43.08
in
rc
IJ.)
.§
i
r
le
.S43.06 33.4
pe
ne
irc
0...43.04 33.38
vi
in
rc
43.02
r
le
pe
ne
43
irc
0 2 3 4 5 2 3 4 5
vi
Time Time
in
rc
i
r
le
pe
ne
irc
vi
in
The one in the left panel corresponds to HPQ, a frequently traded and liquid
rc
le
asset. HPQ's LOB has LOs posted at every tick out to (at least) 20 ticks away
pe
ne
irc
from the midprice and the spread is the minimum spread of 1 tick. In the right
vi
in
panel, we have FARO's LOB. FARO is a seldom traded, illiquid asset. This asset
rc
i
r
le
has thinly posted bids and offers and irregular gaps in the LOB. The spread is 20
pe
ne
irc
ticks (20 cents) on a (approximately) $41 priced asset. The difference in liquidity
vi
in
rc
between these assets is also noticeable from the time at which the 10,000th event
r
le
pe
of the day takes place for these assets. For HPQ, the 10,000th event corresponds
ne
irc
to a timestamp of about 9:42 a.m. (less than 15 minutes after the market opened),
vi
in
rc
while for FARO the 10,000th event did not occur until about 12:04 p.m. (more
i
r
le
pe
than two and a half hours after market open). Also note that there are less than
ne
irc
100 units posted if we sum together the depth at the best two price levels on the
vi
in
rc
bid and ask for FARO, while for HPQ there are more than 1,000 shares offered
r
le
pe
in those first two levels of the LOB - HPQ thus has much greater depth. If one
ne
irc
takes into account that FARO trades at a price which is twice as high as that of
vi
in
rc
HPQ, the depth in terms of dollar value of shares posted at those prices is also
i
r
le
pe
The snapshot shown in Figure 1.1 only illustrates a static version of the LOB;
vi
in
rc
however, its dynamics are quite interesting and informative. In Figure 1.4, we
r
le
pe
ne
show how the LOB evolves through time (over 5 minutes) for three different
irc
vi
stocks, HPQ, NTAP and ORCL. On the x-axis is time in minutes, and on the
in
rc
y-axis are prices in dollars. The static picture we saw in Figure 1.1 is captured by
le
ne
irc
in
rc
p
vi
18 Electronic Markets and the Limit Order Book
r
le
pe
irc
vi
rc
le
pe
the shaded blue and red regions - the blue regions on top represent the ask side of
ne
irc
the LOB, the posted sell volume, while the bid side is below in red, showing the
vi
in
in
rc
posted buy volume. The best prices, the bid and ask are identified by the edges
r
le
pe
ne
of the intermediate light shaded beige region, which identifies the bid-ask spread.
irc
Volume at each price level, which was captured in Figure 1.1 by horizontal bars,
vi
in
rc
is now illustrated by the size of the shaded region just above/below each price
r
le
pe
ne
level, although the height of these regions is no longer linear, but a monotonic
irc
vi
in
rc
In addition, Figure 1.4 identifies when incoming orders were executed. The
r
le
pe
ne
red/blue circles indicate the time, price and size (indicated by the size of the
irc
vi
circle) of an aggressive MO which is executed against the LOs sitting in the LOB.
in
rc
When a sell MO executes against a buy LO, it is said to hit the bid; analogously,
r
le
pe
ne
when a buy MO executes against a sell LO, it is said the lift the offer. The
irc
vi
brown solid line depicts a variation of the asset known as the microprice defined
in
in
rc
r
le
as
pe
v/
ne
½a
irc
11 ,r· · pa + pb
1vncropnce = v_;b + v_;a t ,
vi
t ½b + ½a t
in
rc
le
where 17tb and ½a are the volumes posted at the best bid and ask, and P/ and
pe
ne
irc
Pt are the bid and ask prices. The microprice is used as a more subtle proxy for
vi
in
in
rc
the asset's transaction cost-free price, as it measures the tendency that the price
r
le
pe
has to move either towards the bid or ask side as captured by number of shares
ne
irc
posted, and hence indicates the buy (sell) pressure in the market. If there are
vi
in
rc
a lot of buyers (sellers), then the microprice is pushed toward the best ask/bid
r
le
pe
ne
price to reflect the likelihood that prices are going to increase (decrease). We
irc
explore the microprice and the effect of the relative volumes on the bid and ask
vi
in
in
rc
side in more depth in Chapter 12 when developing algorithms that take into
r
le
pe
ne
vi
in
rc
le
pe
irc
vi
in
in
rc
O'Hara (1995), de Jong & Rindi (2009), Lehalle (2009), Colliard & Foucault
r
le
pe
ne
irc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
2 A Primer on the Microstructure of
pe
ne
irc
vi
in
Financial Markets
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
To understand the issues and problems faced in the design and implementation
vi
in
rc
of trading strategies, we must consider the economics that drive these trading
r
le
strategies. To do this we look to the market microstructure literature. Section 2.1
pe
ne
irc
considers the basic market making model that focuses on inventory and inventory
vi
in
rc
risk, as well as the trade-off between execution frequency and profit per trade.
i
r
le
pe
It also looks at the conceptual basis for the basic measures of liquidity. The last
ne
irc
two sections look at trading when there are informational differences between
vi
in
rc
traders. Section 2.2 from the point of view of the better informed trader, and
r
le
pe
irc
For the ecomomics of trading we look to market microstructure, as it is the
vi
in
rc
subfield of finance which focuses on how trading takes place in very specific
i
r
le
pe
ne
settings: it "is the study of the process and outcomes of exchanging assets un
irc
der explicit trading rules" (O'Hara (1995)). Thus, it encompasses the subject of
vi
in
rc
le
pe
ne
ture literature that we find studies of the process of exchanging assets: trading
irc
strategies, and their outcomes: asset prices, volume, risk transfers, etc.
vi
in
rc
i
A key dimension ofthe trading and price setting process is that ofinformation.
r
le
pe
ne
vVho has what information, how does that information affect trading strategies,
irc
vi
and how do those trading strategies affect trading outcomes in general, and
in
rc
asset prices in particular. Forty years ago finance theory introduced the tools to
r
le
pe
ne
explicitly incorporate and evaluate the notion of price efficiency, the idea that
irc
vi
rc
i
r
le
This dimension naturally appears in microstructure studies which look into the
vi
in
details ofhow different trading rules and trading conditions incorporate or hinder
rc
le
irc
asset pricing ones is that they focus on two aspects that are key to trading:
vi
in
liquidity and price discovery, and these are the two primary aspects that drive
rc
i
r
le
the questions and issues behind the design of effective algorithmic and high
pe
ne
frequency trading. 1
irc
vi
in
Trading can take place in a number ofpossible ways: via personal deals settled
rc
le
over a handshake in a club, via decentralised chat rooms where traders engage
pe
ne
irc
vi
1 Abergel, Bouchaud, Foucault, Lehalle & Rosenbaum (2012) provides a general overview of
in
rc
the determinants and effects of liquidity in security markets and related policy issues.
le
ne
irc
in
rc
p
vi
20 A Primer on the Microstrnctme of Financial Markets
r
le
pe
irc
vi
rc
le
pe
each other in bilateral personal transactions, via broker-intermediated over-the
ne
irc
counter (OTC) deals, via specialised broker-dealer networks, on open electronic
vi
in
rc
markets, etc. Our focus is on trading and trading algorithms that take place in
i
r
le
pe
ne
large electronic markets, whether they be open exchanges, such as the NASDAQ
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
2.1 Market Making
pe
ne
irc
vi
in
rc
As we saw in Chapter 1, an important type of market participant is the 'passive'
i
r
le
pe
ne
market maker (MM), who facilitates trade and profits from making the spread
irc
and from her execution skills, and must be quick to adapt to changing market
vi
in
rc
conditions. Another type is the 'active' trader, who exploits her ability to an
r
le
pe
ne
ticipate price movements and must identify the optimal timing for her market
irc
vi
rc
i
r
Because we are focusing on trading in active exchanges, it is natural to assume
le
pe
ne
irc
that there are many market makers (MMs) in competition. Naturally, trading in
vi
a market dominated by a few MMs would need to additionally incorporate how
in
rc
le
the MMs exercise their market power and how it affects the market as a whole.
pe
ne
irc
MMs play a crucial role in markets where they are responsible for providing
vi
in
liquidity to market participants by quoting prices to buy and sell the assets being
rc
i
r
le
ability of investors to buy (or sell) an asset at a particular point in time without
rc
le
irc
buy). By quoting buy and sell prices (or posting limit orders (LOs) on both
vi
in
rc
sides of the book), the MM is willing to provide liquidity to the market, but
i
r
le
in order to make this a sustainable business the MM quotes a buy price lower
pe
ne
irc
than her quoted sell price. For example an MM is willing to purchase shares
vi
in
rc
of company XYZ at $99 and willing to sell at $101 per share. Note that by
r
le
pe
posting LOs, the MM is providing liquidity to other traders who may be looking
ne
irc
rc
have the usual dichotomy that separates MMs as liquidity providers from other
i
r
le
pe
If our MM is the one offering the best prices, so that the ask is $101 and
vi
in
rc
the bid $99, then the quoted spread is $2. There are a number of theories that
r
le
pe
ne
explain what determines the spread in a competitive market. Before delving into
irc
vi
some of these theories, we consider the issues faced by someone willing to provide
in
rc
liquidity.
le
ne
irc
in
rc
p
vi
2.1 Market Making 21
r
le
pe
irc
vi
rc
le
pe
2.1.1 Grossman-Miller Market Making Model
ne
irc
vi
in
The first issue faced by an MM when providing liquidity is that by accepting one
rc
i
r
le
side of a trade (say buying from someone who wants to sell), the MM will hold
pe
ne
irc
an asset for an uncertain period of time, the time it takes for another person
vi
in
to come to the market with a matching demand for liquidity (wanting to buy
rc
le
the asset the MM bought in the previous trade). During that time, the MM is
pe
ne
irc
exposed to the risk that the price moves against her (in our example, as she
vi
in
c
bought the asset, she is exposed to a price decline and hence having to sell the
i
r
le
r
asset at a loss in the next trade).
pe
ne
irc
Recall that the MM has no intrinsic need or desire to hold any inventory, so
vi
in
c
she will only buy (sell) in anticipation of a subsequent sale (purchase). Grossman
r
le
r
pe
& Miller (1988) provide a model that captures this problem and describes how
ne
irc
MMs obtain a liquidity premium from liquidity traders that exactly compensates
vi
in
rc
MMs for the price risk of holding an inventory of the asset until they can unload
i
r
le
pe
it later to another liquidity trader.
ne
irc
vi
in
rc
identical MMs for some given asset and three dates t E {1, 2, 3}. To simplify the
r
le
pe
ne
rc
i
the asset, there will be (for sure) another liquidity trader (LT2) who will arrive
r
le
pe
ne
at the market to purchase i units (or more generally, to trade -i units, so that
irc
vi
LTl's trade (of i units) could be negative or positive (LTl could be buying or
in
rc
selling). However, LT2 does not arrive to the market until t = 2. Let all agents
r
le
pe
ne
start with an initial cash amount equal to W0 , MMs hold no assets, LTl holds i
irc
vi
rc
i
r
le
There are no trading costs or direct costs for holding inventory. The focus is on
pe
ne
price changes: the asset will have a cash value at t = 3 of S3 = µ + E2 + E3, where
irc
vi
in
le
with mean zero and variance o- 2 . These will be publicly announced between dates
pe
ne
between t = l and t = 2. Hence, the realised cash value of the asset can increase
in
rc
i
r
le
or decrease (ignore the fact that there are realisations of E2 and E3 that could
pe
ne
irc
make the asset value negative - the model serves to illustrate a point). Because
vi
in
c
the shocks to the value of the asset are on average zero a risk-neutral trader
r
le
er
has no cost at all from holding the asset. The model becomes interesting if we
pe
irc
n
assume that all traders, MMs and liquidity traders, are risk-averse. To be more
vi
in
rc
specific, suppose they have the following expected utility for the future random
i
r
le
cash value of the asset (X3): lE [U (X3)] where U (X) = -exp (-,X), and where
pe
ne
irc
1 > 0 is a parameter capturing the utility penalty for taking risks (the risk
vi
in
c
aversion parameter).
r
le
r
pe
irc
rc
the n MMs and LTl come into the period with asset holdings qfIM and qfTl
i
le
ne
irc
in
rc
p
vi
22 A Primer on the Microstrncture of Financial Markets
r
le
pe
irc
vi
rc
le
respectively. LT2 comes in with -i and they all exit with asset holdings q�, where
pe
ne
irc
j E {MM,LT1,LT2}. Note that if, for example, qi= 2 this denotes that agent
vi
in
rc
j is holding 2 units when exiting date t, so that the agent will be long (that is,
i
r
le
has an inventory of) two units. Given the problem as described so far, at t = 2
pe
ne
irc
vi
in
rc
le
xO
pe
ne
irc
mtx!E [ U ( I E2]
vi
in
rc
q2
i
r
le
subject to
pe
ne
irc
vi
in
rc
le
These two constraints capture:
pe
ne
irc
(i) the fact that the cash value of the agent's assets at t = 3, X3 , is equal to the
vi
in
agent's cash holdings at t = 3, which is equal to X2 plus the cash value of the
rc
i
r
le
pe
ne
agent's asset inventory q�, and
irc
(ii) the fact that the cash value of the agent's assets when exiting date t = 2 (X2 ,
vi
in
rc
and the inventory q�) was equal to the cash value of the agent's assets when
r
le
pe
ne
rc
Given the normality assumption and the properties of the expected utility
i
r
le
pe
function it is straightforward to show that
ne
irc
\-2
vi
u (xO
in
IE [ I E2] ( q�) }
r
le
pe
ne
irc
rc
i
J,* _ IE[S3 I E2] - S2
r
le
qz
10" 2
pe
-
ne
'
irc
vi
in
le
As at date t = 2 demand and supply for the asset have to be equal to each
pe
ne
irc
rc
i
(2.1)
r
le
pe
ne
irc
where we use the convention that qfTZ, the assets LT2 came into period 2 with,
vi
in
rc
is equal to his desired trade, -i. As we have established above, all q� are equal,
r
le
pe
irc
vi
IE[S3 I E21- S2
in
(2.2)
i
r
le
10"
pe
ne
irc
We also know that at date 1 the total quantity of the asset available was equal
vi
in
to the quantity of assets LTl brought to the market, so that the LHS of (2.1) is
rc
le
pe
irc
vi
in
rc
Hence, substituting into (2.2) and solving, we obtain that in equilibrium, at date
i
le
ne
irc
in
rc
p
vi
2.1 Market Making 23
r
le
pe
irc
vi
rc
le
pe
[nx] MM LTl LT2
ne
irc
vi
in
rc
/
0
i
r
le
pe
�
ne
irc
Trade S1
/
vi
in
rc
r �
le
pe
'l i
ne
t=2 q{ [nx]
irc
n+l n+l -i
vi
in
rc
i
�
r
le
pe
S2
ne
I
Trade
/
irc
vi
in
rc
le
0 0 0
pe
ne
irc
vi
in
rc
i
Figure 2.1 Trading and price setting in the Grossman�Miller model.
r
le
pe
ne
irc
vi
t = 2, S2 = JE[S3] = µ + E2 + lE[e3] = µ + E2, and therefore, q; = 0. This makes
in
rc
sense, as at t = 2 there are no asset imbalances, the price of the asset reflects
le
pe
ne
irc
its 'fundamental value' (efficient price) and no one will want to hold a non-zero
vi
in
rc
amount of the risky asset. This analysis is captured in the bottom half of Figure
i
r
le
pe
2.1, where we see the asset holdings of the three types of participants as they
ne
irc
le
irc
and LTl � recall that LT2 will not appear until t = 2) anticipate that whatever
vi
in
rc
they do, the future market price will be efficient and they will end up exiting
i
r
le
is given by
vi
in
rc
le
pe
ne
irc
vi
in
rc
subject to
i
r
le
pe
ne
irc
vi
in
= =
rc
le
pe
solution is
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
for all agents, j, that are present: the n MMs, and LTl. Also, at date t l
vi
in
rc
demand and supply for the asset have to be equal to each other, so that
r
le
pe
ne
irc
vi
in
rc
where qf;Tl = i (recall that if i > 0, LTl is holding i shares he wants to sell),
i
le
ne
irc
in
rc
p
vi
24 A Primer on the Microstrncture of Financial Markets
r
le
pe
irc
vi
rc
le
and qf/1vI = 0. This gives us the following equation:
pe
ne
irc
µ- S1 i
vi S1=µ- 1 CJ2 --.
in
in
't=(n+l)--
rc
n+1
{==?
r
2
le
rCJ
pe
ne
The top half of Figure 2.1 reflects how the MMs and LTl enter the market with
irc
vi
asset holdings qb and after trading at S1 they exit date one and enter date t= 2
in
rc
with qi.
r
le
pe
ne
irc
vVith this expression we can interpret how the market reaches a solution for
vi
LTl's liquidity needs: LTl, a trader who wants to sell a total of i > 0 units at
in
in
rc
r
le
t= 1,finds that there is no one currently in the market with a balancing liquidity
pe
ne
irc
need. There are traders in the market, but they will not accept trading at the
vi
in
efficient price of µ because if they do, they will be taking on risky shares ( they
rc
le
are exposed to the price risk from the realisation of E2) without compensation.
pe
ne
irc
But, if they receive adequate compensation (which we call a liquidity discount,
vi
in
in
as for i > 0,S1 < IE[S2 ] =µ),the n MMs will accept the LTl's shares. However,
rc
r
le
pe
ne
irc
sell all the 't shares at once. In equilibrium, both the n MMs and LTl end up
vi
in
holding q{'* = n�l units of the asset each,that is LTl sells n�l i units and holds
rc
irc
price,S1 = µ,-1 CJ 2 n�l. The difference between the trading price and the efficient
vi
in
in
rc
price,namely IS1-µI= 11CJ 2 n�l I,represents the (liquidity) discount the MMs
r
le
pe
ne
receive in order to hold LTl's shares. This size of the discount is influenced by
irc
vi
the variables in the model: the size of the liquidity demand (Iii), the amount
in
rc
of competition amongst MMs (captured by n), the market's risk aversion b),
r
le
pe
ne
and the risk/volatility of the underlying asset (CJ 2 ). These variables all affect
irc
vi
the discount in an intuitive way: the size of the liquidity shock, risk aversion,
in
in
rc
and volatility all increase the discount,while competition reduces it. This occurs
r
le
pe
ne
when LTl wants to sell,i.e. i > 0. If LTl wanted to buy,i < 0,then the solution
irc
vi
would be the same except that instead of a discount, the MMs would receive a
in
rc
irc
From this analysis we can also see that as competition (n) increases,the liq
vi
uidity premium goes to zero, the price converges to the efficient level, S1 = µ,
in
in
rc
and LTl's optimal initial net trade,qf Tl,*-qf;Tl,converges to his liquidity need
le
pe
ne
irc
( i).
vi
in
rc
le
pe
ne
in
We have seen how the Grossman & Miller (1988) framework helps to understand
rc
r
le
how the cost of holding assets (in this case, via the uncertainty it generates
pe
ne
irc
to the risk-averse MMs) affects liquidity via the cost of trading (IS1 -µI) and
vi
in
the demand for immediacy (as at t= 1 LTl only executes n�l i rather than her
rc
le
irc
costs. But what drives n? A natural answer is that n is driven by the trading
vi
in
in
rc
costs borne by the MMs. In this case,we must distinguish between participation
le
ne
irc
in
rc
p
vi
2.1 Market Making 25
r
le
pe
irc
vi
rc
le
costs, which are needed to be present in the market and do not depend on trading
pe
ne
irc
activity, and trading costs that do depend on trading activity, such as trading
vi
in
in
rc
fees (which we ignored in the previous analysis).
r
le
pe
Grossman & Miller (1988) link competition, n, with participation costs. They
ne
irc
vi
in
rc
decide whether they want to actively participate in the market and provide liq
r
le
pe
uidity or prefer to do something else. The decision is determined as a function
ne
irc
of a participation cost parameter c which proxies for the time and investments
vi
in
in
rc
needed to keep a constant, active and competitive presence in the market, as
r
le
pe
well as the opportunity cost the MM gives up by being in the market and not
ne
irc
doing something else. The conclusion, which can be obtained without going into
vi
in
rc
the details of the analysis, is that the level of competition decreases monoton
r
le
pe
ne
irc
the cost parameter c, increase the size of the liquidity premium (via its effect on
vi
in
in
rc
competition, n).
r
le
pe
ne
The parameter c captures the fixed costs of participating in the market, but
irc
vi
we could also consider introducing into the model a cost of trading that depends
in
rc
le
pe
ne
that depend on the quantity traded, like actual exchange trading fees. Exchange
irc
vi
trading fees are usually proportional to dollar-volume but here, for simplicity,
in
in
rc
pe
ne
irc
that fees are known, these fees act like a participation cost for liquidity traders.
vi
The first effect of having rJ > 0 is that liquidity traders with a desired trade
in
rc
le
(Iii) that is small relative to trading fees, will find trading too expensive and
pe
ne
irc
refrain from trading (we invite the interested reader to compute the minimum
vi
in
in
desired trade size i as a function of rJ). For sufficiently large desired trades (so
rc
r
le
that trading is preferred to not trading by all participants) the model gives us the
pe
ne
irc
following solution. Suppose every trader pays rJ per share regardless of whether
vi
in
they are buying or selling the asset. To simplify, assume that any remaining
rc
le
irc
Iii units (i > 0), and LT2 wants to buy the same amount (the reverse case looks
vi
in
in
the same but the trading fees enter the problem with the opposite sign).
rc
At t = 2, since the MMs and LTl enter the period with a positive inventory
le
pe
ne
irc
(and will be wanting to sell now or at t = 3) their optimal final period holdings
vi
in
rc
are
r
le
pe
ne
irc
vi
in
in
rc
pe
ne
irc
' 'W 2
in
rc
le
pe
irc
the trading fees do not affect the price at t = 2, and we obtain S2 = E[S3 E2] =
vi
in
in
ne
irc
in
rc
p
vi
26 A Primer on the Microstrnctme of Financial Markets
r
le
pe
irc
vi
rc
le
pe
At t = 1, LTl has a similar position to that at t = 2, as any quantities he
ne
irc
doesn't sell now he will have to sell later, so that 7/ disappears from the solution
vi
in
rc
and his supply will be given by:
i
r
le
pe
ne
irc
LTl ] (S1-7/)
JE[S2-TJ-
ql = .
vi
2
in
10"
rc
le
On the other hand, MMs anticipate that whatever they buy, they will have to
pe
ne
irc
sell later, which changes their asset demand functions to
vi
in
rc
MM = JE[S2-7/]-(S1 + 7/) .
i
r
le
ql
pe
ne
2
10"
irc
vi
in
The resulting market equilibrium condition is now
rc
le
27)
pe
- µ-S1
L Tl - . - n MM + n µ-S1-
ne
irc
ql --- i - ql +
10" 10"
vi
in
rc
This gives us the following equation:
i
r
le
pe
ne
irc
. µ-S1 2 nT} i n
i=(n+l)----- � S1 =µ-1 ---2 ( -- ) 7/ ,
vi
n+l n+l
in
rc
le
pe
irc
Thus, we conclude that the presence of trading fees introduces an extra liq
vi
in
rc
uidity discount to the initial price S1. W hat the model tells us is that almost
i
r
le
all the trading fees are paid by the liquidity trader initiating the transaction: he
pe
ne
irc
pays his own trading fee, 7/ per share, plus a substantial fraction (n/ (n + l)) of
vi
in
rc
the two transaction fees paid by the MMs (27/) though indirectly, via a lower sale
r
le
pe
price, a lower S1 It also affects the immediacy he obtains from the market, as
ne
irc
(-n+-)
in
rc
i
r
le
LTl ,* ...!}_
= _ _· -
i
+2
pe
ne
q1 n+l
irc
n l ·
vi
in
rc
If we look at competition, we can see that participation costs and fees have
r
le
pe
very different effects. Participation costs enter directly through c while trading
ne
irc
fees enter through expected future profits, which will be lower as MMs must bear
vi
in
rc
a fraction of the trading fees. In particular, for each trade, the MM pays 27), but
i
r
le
trading fees has a smaller effect on liquidity via competition but a greater direct
vi
in
rc
le
pe
ne
irc
vi
2.1.3
in
Measuring Liquidity
rc
i
r
le
pe
We have seen how in the Grossman & Miller (1988) model, trading costs, whether
ne
irc
setup costs or trading fees, are mostly paid by liquidity traders, whether explicitly
vi
in
rc
(as their own trading fees) or implicitly in the price (greater liquidity discount
r
le
pe
ne
when selling and larger premium when buying). We now consider how these
irc
rc
The Grossman & Miller (1988) model avoids looking into the details of the
le
ne
irc
in
rc
p
vi
2.1 Market Making 27
r
le
pe
irc
vi
rc
le
pe
trading mechanism by solving for equilibrium prices and demands in a 'Walrasian
ne
irc
auctioneer'-type context where all trading takes place at once, and at a single
vi
in
in
rc
price. 2 In electronic asset markets, decisions are not taken all at the same point
r
le
pe
in time, but the equilibrium analysis can be easily reinterpreted in the context
ne
irc
of an electronic market. For example, suppose liquidity traders are very eager to
vi
in
rc
trade and do so by sending MOs into the exchange. When the liquidity trader's
r
le
pe
ne
orders hit the market, they meet the LOs that were posted by the patient MMs
irc
vi
in
rc
Then, the Grossman-Miller model would correspond to the following sequence
r
le
pe
ne
of events: as LTl's MOs enter the market, they execute against LOs in the LOB
irc
vi
which adjusts to the incoming MO. As the execution price changes, so does LTl's
in
rc
strategy and eventually, after selling i n�l shares, the price has moved too far
r
le
pe
ne
and LTl stops trading. Overall, LTl's market order executes at the average price
irc
vi
of S1 , either because it was sent as a large order that walked the LOB (or LOBs,
in
in
rc
r
le
if the order is routed to multiple markets), or because it was split up into several
pe
ne
irc
small orders that triggered a gradual move of the bid side in the LOB away from
vi
in
the initial starting point. Then, the discount received by LTl is the difference
rc
le
between the average price received, S1 , and the initial midprice when the first
pe
ne
irc
MO hit the market (which is the usual proxy for the efficient price, JE[S2]).
vi
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
= i-n-.
irc
1
A= --"(CY 2 and q LT l
vi
n ' n+l
in
in
rc
r
le
pe
The>,. parameter captures the market's price reaction to LTl's total order, its
ne
irc
price impact. The notion of price impact is very important both for trading and
vi
in
rc
for theoretical work, and the use of a linear structure such as the one described by
r
le
pe
irc
of the market for this asset - a more liquid market will have a lower >,., either
vi
in
in
rc
because of greater competition (n), lower risk tolerance ("/), or lower volatility
r
le
pe
(a- 2 ), and this results in a lower liquidity discount/premium for liquidity traders.
ne
irc
and it is quite easy to see how this model works. The measure is based on the
r
le
pe
irc
in
rc
rather than returns. To see how this measure is constructed, let us introduce an
r
le
public news event, E1, that affects the asset's final liquidation price, S3 = µ +
vi
in
rc
le
2 The notion of a Walrasian auctioneer comes from the work of Leon Walras who describes
pe
ne
irc
the prices that arise under perfect competition as the result of a simultaneous auction in
vi
in
in
which supply is equated to demand. The Walrasian auctioneer is the abstract manager of
rc
this auction.
le
ne
irc
in
rc
p
vi
28 A. Primer on the Microstrncture of Financial Markets
r
le
pe
irc
vi
rc
le
E1 + E + E3. The public news is announced between t = 0 and t =
pe
ne
l. Define the
irc
2
following constants:
vi
in
rc
i
r
le
pe
ne
irc
and let Et, t = 1, 2, 3 be normal, i.i.d. random variables with mean zero and
vi
in
rc
le
pe
ne
irc
According to the model above, at t = 0 there are no liquidity traders and no
vi
in
rc
trade so that So = IE[S3] = µ 0 will be the equilibrium price. The model shows
i
r
le
pe
ne
irc
vi
in
rc
and
r
le
pe
To construct the autocovariance of price changes, let 6.1 = S 1 -So and 6.2 = S2 -
ne
irc
vi
rc
i
r
le
pe
Cov [6. 1 6.2]
ne
'
irc
= Cov [Er+ >.. qLTl , E - >.. qLTl J = ->.. Var [qLTl ] 2 < 0.
vi
in
2
rc
In this simple (essentially static) model, where all the action takes place at le
pe
ne
price impact does. An interesting effect that we see here is that as liquidity
rc
i
r
le
increases and >.. goes to zero, so the autocovariance of price changes, and the
pe
ne
irc
µt.
r
le
The two measures, price impact and the autocovariance of price changes (or
pe
ne
irc
returns), become distinct in richer dynamic settings, and capture different dimen
vi
in
rc
sions of the market's reaction to incoming MOs. For example, in the continuous
i
r
le
time models of later chapters, the average growth of the efficient price is affected
pe
ne
irc
by the rate at which MOs arrive to the market and this effect decays at an ex
vi
in
rc
ponential rate. This permanent effect of the efficient price of the asset affects all
r
le
pe
market participants and is different from the temporary effect that each trader
ne
irc
sees in their execution prices, which is captured by the parameter (>..) and does
vi
in
rc
pe
ne
irc
vi
2.1.4
in
le
pe
irc
rc
through the posting of LOs. We now consider why an MM would behave in this
i
r
le
pe
ne
The usual first reference for this is the model of Ho & Stoll (1981), but work
vi
in
rc
ing with the original model requires familiarity with the techniques for solving
r
le
pe
ne
set up a static version of the model that captures some of the basic elements
vi
in
rc
of the MM's problem. As in the Grossman & Miller (1988) model, the MM is
le
ne
irc
in
rc
p
vi
2.1 Market Making 29
r
le
pe
irc
vi
rc
le
pe
a professional trader who profits from intermediating between different liquidity
ne
irc
traders. In this case, we consider a small risk-neutral trader with costless inven
vi
in
in
rc
tory management and infinite patience. She does not require compensation for
r
le
pe
her services, but makes a profit from optimally choosing how to provide liquidity
ne
irc
vi
in
rc
MM's decisions. r
le
pe
ne
Uncertainty in this context comes from the timing and size of large incoming
irc
MOs, and there are no information problems: all information is public so that
vi
in
in
c
everyone agrees what the current value of the asset is, which we denote by St
r
le
pe
ne
and refer to as the midprice. Our trader is one of many MMs. vVe take other
irc
vi
MMs' behaviour as given, and this behaviour is represented by a fixed LOB,
in
c
unaffected by our MM's decisions. Our MM makes money by adding her LOs to
r
le
r
pe
ne
the book and clearing the resulting inventory at later dates. Because our MM has
irc
vi
in
rc
we can assume that she liquidates her inventory at the midprice at no cost.
r
le
pe
ne
irc
Then, the MM's problem is to choose where on the LOB to place her LOs so
vi
as to maximise her profit per trade, optimally balancing the increase in the price
in
rc
per trade received as she increases the distance of the LO from the midprice,
le
pe
ne
irc
with the frequency with which she will trade, which decreases with that distance
vi
in
in
from the midprice. Formally, the MM's problem is to choose the distance from
rc
the midprice, the depths 5 ± . Then, she will post her sell LO at St + 5 + and her
r
le
pe
ne
irc
buy LO at St �6-. The uncertainty from MOs comes from the probability that an
vi
in
MO arrives (P±) and the probability that once it arrives it walks the book up to
rc
le
where the MM's LOs are resting (5 ± away from the midprice), which is described
pe
ne
irc
by the cdf P±. Thus, the probability that the buy LO will be filled is p_P (5-).
_
vi
in
in
If we assume that the distribution of other LOs in the LOB is described by an
rc
pe
ne
irc
+ +
Similarly, the probability that the sell LO is filled is P+e_" o . Clearly, as the
vi
in
rc
MM posts her LOs deeper in the LOB, the probability that her order (once an
r
le
irc
The left panel of Figure 2.2 illustrates a hypothetical LOB around a midprice
vi
of St and two possible limit orders: a sell LO on the ask side at St + 5 + , and a
in
in
rc
r
le
pe
buy LO on the bid side at St � 5-. The right panel describes the corresponding
ne
irc
5 + (5-) from the midprice, conditional on the arrival of a buy (sell) MO.
r
le
pe
Using II to denote the MM's profit per trade, the MM's optimisation problem
ne
irc
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
depths:
rc
vi
ci
in
in
u,±,*= _!__
K, ± '
le
r
ne
irc
in
rc
p
vi
30 A Primer on the Microstructure of Financial Markets
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
Biel Side
in
rc
p-
i
r
le
pe
Cumulative Depth Fill Prob.
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
Given our parametric choice of P± , the optimal depth is equal to the mean depth
rc
i
r
le
in the LOB.
pe
ne
irc
This model captures in a simple way the trade-off between the probability of
vi
in
rc
execution and margin per trade. But, it is very unrealistic in several dimensions:
r
le
the functional form of all the stochastic components of the model (P±, and p ± ) is
pe
ne
irc
very special, constant and exogenous, the MM's decision and that of other traders
vi
in
(as captured by P(o)) are independent, the MM's objective function is static and
rc
i
r
le
pe
very simple. However to address these other issues we need more sophisticated
ne
irc
methods and models, so after developing those methods in the following chapters
vi
in
rc
we will revisit some of them. For instance, in Chapter 10 we see how MMs decide
r
le
pe
how to post limit orders in a fully-fledged dynamic inventory model and how she
ne
irc
adjusts her posts if trading with better informed counterparties � a topic that
vi
in
rc
we discuss next.
i
r
le
pe
ne
irc
vi
in
le
pe
ne
irc
rc
differences. Many trades originate not because someone needs cash and sells an
i
r
le
pe
asset, or has extra cash and wants to invest, but because one party has (or
ne
irc
believes she has) better information about what the price is going to do than is
vi
in
rc
reflected in current prices. So, having seen the basic market making models in
r
le
pe
ne
the context of public information we turn to the next fundamental issue: how to
irc
exploit an informational advantage while taking into account one's price impact.
vi
in
rc
pe
ne
Kyle (1985) looks at the decision problem of a trader who has a strong infor
irc
vi
Kyle (1989)) in a context where the price is 'efficient'. The model in Kyle (1985)
r
le
pe
ne
tells us how the informed trader optimally adjusts his trading strategy to take
irc
vi
into account the market reaction, and in particular, the price impact that his
in
rc
ne
irc
in
rc
p
vi
2.2 Trading on an Informational Advantage 31
r
le
pe
irc
vi
rc
le
pe
To get into the details of the model we first need to define what we mean
ne
irc
by 'a strong informational advantage' and price efficiency in this context. To
vi
in
in
rc
keep things simple we only consider the investor's static decision problem. The
r
le
pe
same basic idea extends to a dynamic setting. The formal static model is as
ne
irc
follows: there is a market for an asset that opens at one point in time. The asset
vi
in
rc
is traded at price S, and after trading, the asset has a cash value equal to v.
r
le
pe
ne
irc
to be normally distributed with mean µ and variance cr 2 . In the market, there
vi
in
in
rc
are three types of traders: an informed trader, an anonymous mass of price
r
le
pe
ne
insensitive liquidity traders (traders who need to execute trades whatever the
irc
cost), and a large number of MMs that observe and compete for the order flow
vi
in
rc
- that is, the MMs observe and compete for the flow of incoming buy and sell
r
le
pe
ne
irc
vi
In contrast to the Grossman & Miller (1988) setting, MMs are risk-neutral,
in
in
rc
so they do not need a liquidity premium to compensate for the price risk from
r
le
pe
ne
holding inventory. Therefore, any liquidity premium that arises will come from
irc
vi
the need to compensate MMs for their informational disadvantage - and which
in
rc
irc
will have, in aggregate, a net demand represented by the random quantity u,
vi
in
in
such that if u > 0, on aggregate liquidity traders want to buy u units, while if
rc
r
le
u < 0, these traders want to sell lul units of the asset. Assume that u is normally pe
ne
irc
le
could charge very large liquidity premia, but competition for order flow between
pe
ne
irc
MMs drives the liquidity premium to zero, so that (when there are only MMs
vi
in
rc
r
le
Now consider the possibility that a new trader enters the market, and that
pe
ne
irc
this trader (the "insider") knows the exact value of v. The insider is the only
vi
in
one who knows v and chooses how much to trade. Let x(v) denote the number
rc
le
of shares traded by the insider. MMs, on the other hand, know that there is an
pe
ne
irc
informed trader in the market, but do not know who this trader is.
vi
in
in
rc
To make the analysis formal, the model is structured as follows: (i) the insider
r
le
observes v, (ii) on observing v the insider chooses x(v), (iii) u is realised, (iv)
pe
ne
irc
the MMs observe the net order flow, x(v) + u, (v) based on the net order flow
vi
in
le
pe
To solve the model we use the solution concept of (Bayesian) Nash equilibrium;
ne
irc
without going into all the details, this means that all agents optimise given
vi
in
in
rc
the decisions of all other players, according to their beliefs (which are updated
r
le
pe
the insider chooses x( v) to maximise his expected profit, taking into account
vi
in
rc
the dynamics of the game (i.e. that his order will be mixed in with those of
r
le
pe
the liquidity traders), and anticipating that MMs will set their prices on the
ne
irc
basis of what they learn from observing the order flow and what they know
vi
in
in
rc
about the informed trader's decision problem. Also, we require that MMs choose
le
ne
irc
in
rc
p
vi
32 A Primer on the Microstrncture of Financial Markets
r
le
pe
irc
vi
rc
le
pe
ne
their prices taking into account the strategy of the insider (in particular, they
irc
anticipate the functional form of x(v)) and the properties of the uninformed
vi
in
in
rc
order flow that comes from liquidity traders. In particular, MMs set the market
r
le
price as a function of net order flow, S(x + u). This is important, as the model
pe
ne
irc
vi
naturally tells us that prices are affected by the order flow, so that trading
in
rc
automatically generates a price impact - the average price per unit traded, S,
r
le
pe
moves with the net order flow, x + v.. We need to look at the equilibrium of
ne
irc
vi
the model to see what that price impact function looks like. Nevertheless, in
in
in
c
equilibrium, the insider will anticipate the functional form of S(x + u), that is,
r
le
pe
ne
she will incorporate price impact when choosing x(v). 3 The equilibrium is a fixed
irc
vi
point in the optimisation of x given the functional form of S, and of S given the
in
c
le
functional form of x.
r
pe
ne
irc
Consider what the insider should do. The most natural response is: sell if
v < lE[v] = µ and buy if v > µ, and whether selling or buying, do so as much
vi
in
in
rc
r
le
pe
ne
irc
must take into account that MMs will adjust their prices to the order flow they
observe. Hence, even if v < µ, the insider cannot expect S = JL. In the extreme
vi
in
rc
case where there are no liquidity traders everyone knows that any trade comes le
pe
ne
irc
from the insider and so the MMs, anticipating the demand as a function of the
vi
in
in
realisation of v, behave optimally and set prices that incorporate all information
rc
r
le
on v in x(v). Fortunately for the insider, there are liquidity traders that add noise
pe
ne
irc
into order flow and allow the insider to camouflage his trade to gain positive
vi
in
rc
expected profits.
r
le
So, how do MJVIs set their prices? The first thing to note is that as MMs
pe
ne
irc
compete for order flow, any profits they could extract are competed away. Thus,
vi
in
in
rc
whatever the price strategy, it will lead to zero expected profits for our (risk
r
le
pe
neutral) MMs - though never negative profits as they can always choose not to
ne
irc
trade. The zero (expected) profit condition forces prices to have a very specific
vi
in
le
pe
irc
available information (which in our case is order flow which is all the information
vi
in
in
rc
MMs have).4 This is why we can readily identify a fundamental property of the
r
le
pe
le
pe
ne
To solve the model we need to find an :r(v) that is optimal, i.e. it maximises
irc
the insider's expected trading profits, conditional on this pricing rule. Because
vi
in
in
rc
pe
ne
vi
in
S(x+u) =µ+A(x+u),
c
le
r
pe
3 Formally, liquidity traders are substituted by a "nature" player that executes the random
ne
rc
demand u.
vi
ci
in
in
4 The notion of price efficiency was introduced by the recent Nobel Laureate, Eugene Fama,
le
in
rc
p
vi
2,2 Trading on an informational Advantage 33
r
le
pe
irc
vi
rc
le
pe
ne
where>. is an unknown parameter representing the linear sensitivity of the market
irc
vi
price to order flow.
in
rc
i
Taking this particular functional form as given, consider the insider's problem:
r
le
pe
ne
irc
vi
in
rc
le
Substituting for S(x + u) = µ +>. (x + u) and taking expectations with respect to
pe
ne
irc
u, we obtain that the objective function is concave and the first-order condition
vi
in
c
yields
i
r
le
pe
ne
= /3 (v - µ),
irc
x*(v)
vi
in
c
where /3 = (2>.)- 1.
r
le
r
pe
ne
irc
must now confirm that the functional form is consistent with the optimal x(v)
vi
in
rc
and at the same time we can characterise >.. We know that S = lE [v Ix+ u].
i
r
le
pe
ne
From the optimal x, we know that
irc
vi
in
rc
le
pe
ne
irc
As v and u are independent and normal, x + ·u is normal with mean µ(l + /3) and
vi
in
variance (3 2u2 + u;. We can now compute the joint distribution of v and x + ·u,
rc
i
r
le
and from it we can derive S = lE [v Ix+ u], which (using the projection theorem
pe
ne
irc
le
pe
ne
irc
vi
so that the linear sensitivity parameter is >. = 2uu /u. This confirms that the
in
rc
i
r
le
pe
(1985)).
vi
in
rc
Even within the simple, static version of the Kyle model we can clearly see the
r
le
pe
issues that arise when facing informed trading (also referred to as "toxic order
ne
irc
flow"). While in the previous models MMs just needed a liquidity premium
vi
in
rc
(discount) to cover the expected cost from future price uncertainty, the presence
i
r
le
pe
of informed traders implies that MMs will be adversely selected, buying when
ne
irc
informed traders know it would be better to sell and selling when it would be
vi
in
rc
better to buy. This adverse selection requires a higher premium borne by other
r
le
pe
ne
(more impatient liquidity) traders. In this model, the additional premium takes
irc
the form of price adjustment to order flow (price impact) as described by Kyle's
vi
in
rc
lambda (the >. parameter we have just derived). This premium accounts not for
r
le
pe
ne
the risk that future price movements will be random, as described in Section
irc
vi
2 .1.1, but for the adverse selection faced by MMs, as prices will on average move
in
c
against the MMs' position because they trade with better informed traders in
r
le
r
pe
ne
the market. The sign of>. will be the same as in Grossman & Miller (1988): prices
rc
vi
move with the order flow, increasing as buy MOs hit the market and falling as
ci
in
r
ne
irc
in
rc
p
vi
34 A Primer on the Micrnstructure of Financial Markets
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
Uninformed Uninformed
1/� 1/�
Informed Informed
r
le
pe
ne
irc
vi
in
in
Buy (a) Buy (a) Sell (b) Sell (b) Sell (b) Buy (a)
rc
r
le
pe
ne
irc
Market Maker
vi
in
rc
le
pe
ne
irc
µ
/�
vi
in
in
rc
r
le
Bid: Ask:
pe
= µ. + 6.a
ne
= µ - ,0,,.b
irc
b a
vi
in
rc
le
pe
Figure
ne
in
rc
pe
ne
irc
vi
in
The Kyle model focuses on the informed trader's problem, while using com
rc
le
irc
MM's problem, we now turn to Glosten & Milgrom (1985) for a model that puts
vi
in
in
rc
the MM at the centre of the problem of trading with counterparties who have
r
le
pe
superior information.
ne
irc
Again, we look at a simplified and (essentially) static version of the model that
vi
in
rc
allows us to capture the nature of the MM's decision problem. The situation is as
r
le
pe
before: there are liquidity traders, informed traders, and a competitive group of
ne
irc
MMs. The MM is risk-neutral and has no explicit costs from carrying inventory.
vi
in
in
rc
Our simple model ( described in Figure 2.3) has a future cash value of the asset
r
le
pe
equal to v which we limit to two possible values: VH > VL , that is a High, and
ne
irc
unit, MMs post an LO to sell one unit at price a, and a buy LO for one unit
r
le
pe
at price b. We start by assuming that liquidity traders are price insensitive and
ne
irc
want to buy with probability 1/2 and want to sell with probability 1/2. There
vi
in
in
rc
are many informed traders, all of whom know v but are limited to trade a single
r
le
unit, which simplifies their decision: when v = VH they buy one unit if a < VH,
pe
ne
irc
and do nothing otherwise, while when v = VL they sell one unit if b > VL and
vi
in
rc
le
pe
ne
in
rc
Figure 2.3 captures the probabilistic structure of the model: Nature randomly
le
ne
irc
in
rc
p
vi
2.3 Market Making with an Informational Disadvantage 35
r
le
pe
irc
vi
rc
le
pe
determines whether the underlying state is VH or VL. Independently of the state,
ne
irc
a trader is picked at random from the population, so that with probability a she
vi
in
rc
is informed, and with probability 1 - a she is uninformed. An informed trader
i
r
le
pe
will always buy at the ask price (a) when the asset's value is VH and sell at the
ne
irc
bid (b) when the asset's value is VL, while an uninformed trader will buy or sell
vi
in
rc
with equal probability, independent of the true (unknown) value of the asset.
r
le
pe
ne
The MM's problem is to choose a and bin this setting. Because liquidity traders
irc
are price-insensitive, the optimal solution is trivial: set a= VH and b = VL, but
vi
in
i
since MMs compete for business, prices will be set to their (semi-strong) efficient
r
le
pe
ne
levels - again, this happens because MMs use only public information, which
irc
vi
includes order flow. Were the MMs to have private information in addition to
in
c
the order flow, in this setting competition for order flow would incorporate some
r
le
r
pe
ne
irc
vi
Competition between MMs drives their expected profits to zero. Hence, a and b
in
rc
i
r
are determined by the no-profit condition. Rather than solve for a and b directly,
le
pe
ne
irc
define the ask- and bid-halfspreads, 6. a and 6. b respectively. The sum of the
vi
two, 6. a + 6. b , represents the (quoted) spread. Let the expected value of the
in
rc
asset µ = JE[v IF] where F represents all public information prior to trading.
le
pe
ne
i
r
le
expected profit and loss, consider what happens when a buy order comes in:
pe
ne
irc
of a- µ = 6. a ,
r
le
pe
irc
vi
6. a - (VH - µ).
in
rc
i
r
le
pe
From the point of view of the MM, the probability that a liquidity trader wants
ne
irc
to buy is 1/2, while the probability that an informed trader wants to buy is p (as
vi
in
rc
all informed traders will buy if the state is v = VH which occurs with probability
r
le
pe
p). As there are 1- a liquidity traders and a informed ones, the expected profit
ne
irc
rc
i
(1- a)/2
r
pa
le
+
pe
6. a - (VH - µ))
ne
vi
in
rc
le
pe
ne
ap l
irc
l
in
rc
u p
i
r
le
pe
vi
in
c
le
r
pe
ne
rc
ci
in
r
ne
irc
in
rc
p
vi
36 A Primer on the Microstructure of Financial Markets
r
le
pe
irc
vi
rc
le
pe
and VH - µ as the magnitude of buy-toxicity and 1 - p andµ - VL that of sell
ne
irc
toxicity. Then, the equations above describe how MMs adjust the ask-half-spread
vi
in
in
rc
and the bid-half-spread, and increase it with the prevalence and magnitude of
r
le
pe
buy- and sell-toxicity.
ne
irc
In later chapters we show how trading algorithms are built to either take
vi
in
rc
le
pe
ne
posted so as to recover losses from trading agents to more informed traders. For
irc
example, in Section 7.3 we develop trading algorithms that use the information
vi
in
in
rc
provided in the order flow to adjust acquisition or liquidation rates when the
r
le
pe
ne
agent seeks to enter or exit a large position. We also show how the strategy
irc
vi
of the MM depends on whether she knows detailed high-frequency information
in
rc
about short-term deviations in the drift of the asset she is trading, see for example
r
le
pe
ne
Section 10.4.2.
irc
vi
in
in
rc
r
le
pe
ne
irc
2.3.1
vi
Price Dynamics
in
rc
le
This simple model can be extended in two different and complementary ways: by
pe
ne
irc
incorporating a time dimension and by making liquidity traders price-sensitive.
vi
in
in
rc
The former is straightforward. In order to avoid having to keep track of the inter
r
le
est rate, set it equal to zero. Then index all variables by time t and set the time
pe
ne
irc
of the determination of the cash value of the asset to T. Moreover, ensure that
vi
in
rc
le
pe
irc
different sequences of buy and sell orders they adjust (using Bayes' rule) the es
vi
in
in
timation of the distribution of v, and in particular they set P t = IP' (v = VH I Ft ),
rc
r
le
andµt = E[v I Ft]- Then, bid and ask prices will adjust in response to the history
pe
ne
irc
of trading, so that
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
and
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
The resulting bid-ask prices display dynamic changes that reflect the public
r
le
pe
information embedded in the order flow. Note also that at every execution, the
ne
irc
execution price (a t if it is the execution of a market buy order, and bt for a sell)
vi
in
rc
le
pe
order flow, Ft , and also on the information in the execution (that is a buy or a
ne
irc
sell). Hence, it can be seen that the realised price process (the price process at
vi
in
in
rc
ne
irc
in
rc
p
vi
2.4 Bibliography and Selected Readings 37
r
le
pe
irc
vi
rc
le
pe
Price Sensitive Liquidity Traders
ne
2.3.2
irc
vi
in
rc
i
r
le
include the dynamics we have just seen) is to allow liquidity traders to avoid
pe
ne
irc
trading if the half-spread, b., is too high. A direct way to do this is to assume
vi
in
that liquidity traders get an additional (exogenous) value from executing their
rc
le
desired trade, so that trader i gets a cash equivalent utility gain of Ci if he
pe
ne
irc
manages to execute his desired trade. Thus, if the transaction cost imposed by
vi
in
rc
the half-spread is too high, higher than Ci, trader i will prefer not to execute
i
r
le
his trade. Assume that the distribution of the parameter Ci in the population
pe
ne
irc
vi
in
that F(c) is the proportion of liquidity traders that have Ci ::; c. We refer to Ci
rc
le
pe
irc
Then, we can recompute the expected profit of the MM from setting an ask
vi
in
i
r
le
pe
ne
(1 -F(b.a ))(l - a)/2 pa
irc
vi
in
rc
In this expression we have incorporated the fact that whenever a liquidity trader le
pe
ne
irc
wants to buy (1-a) /2, only 1-F(b.a ) will have sufficient urgency to execute the
vi
in
rc
i
r
le
the half-spreads, which are now implicitly defined by the following expressions:
pe
ne
irc
1
vi
in
1-a (l-F(�a))/2
1+ a
r
le
p
pe
ne
irc
rc
i
r
(µ -Vi)
le
b.b = --�-��
pe
1-a (l-F(�a))/2
ne
1+ a
irc
1-p
vi
in
rc
A key issue now is that as the MM increases the halfspread, she faces a smaller
r
le
irc
relatively small, the MM may find that the above expressions have only the
vi
in
extreme solutions b.a = VH - µ and b.b = µ -VL.5 These extreme solutions cor
rc
i
r
le
pe
respond to the solutions without liquidity traders and represent market collapse.
ne
irc
W ith those spreads no one gains anything from trade, and any trade that may
vi
in
rc
occur will come from the informed agents who are indifferent to either trading
r
le
pe
or not trading - though any trade will immediately reveal the underlying value
ne
irc
rc
i
r
le
pe
ne
irc
le
pe
Grossman (1976), Grossman (1977), Grossman (1978), Ho & Stoll (1981), Gross-
ne
irc
vi
5
in
B y small urgenc y parameters we mean that no one has an urgenc y parameter higher than
rc
the expected value of the asset, that is, there exists E > 0, such that F(µ - c) = l.
le
ne
irc
in
rc
p
vi
r
le
38 A Primer on the Micrnstrncture of Financial Markets
pe
irc
vi
rc
le
pe
ne
man & Miller (1988), Glosten & Milgrom (1985), Kyle (1985), Kyle (1989),
irc
vi
de Jong & Rindi (2009), O'Hara (1995), Abergel et al. (2012), Easley, Lopez de
in
rc
i
Prado & O'Hara (2012), Vayanos & Wang (2009), SEC (2013b), SEC (2013a),
r
le
pe
ne
O'Hara, Yao & Ye (2014), Foucault, Kadan & Kandel (Winter 2005), Rosu
irc
vi
(2009), Easley, Engle, O'Hara & Wu (2008), Easley & O'Hara (1992), Biais,
in
rc
r
Glosten & Spatt (2005), Cartea & Penalva (2012), Boehmer, Fong & Wu (2014),
le
pe
ne
irc
Pascual & Veredas (2009), Martinez & Rosu (2013), Martinez & Rosu (2014),
vi
in
Hoffmann (2014), Cvitanic & Kirilenko (2010), Vives (1996), Colliard & Fou
rc
i
r
le
cault (2012), Foucault & Menkveld (2008), Gerig (2008), Farmer, Gerig, Lillo &
pe
ne
irc
Waelbroeck (2013), Gerig & Michayluk (2010), Cohen & Szpruch (2012), Jarrow
vi
in
& Li (2013), Moallemi & Saglam (2013).
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
3
pe
Em pi rica I and Statistica I Evidence:
ne
irc
vi
in
in
rc
Prices and Returns
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
c
r
le
pe
ne
irc
3.1 Introduction
vi
in
c
le
r
pe
The next two chapters contain empirical analysis of different aspects of trading:
ne
irc
prices, returns, spreads, volume, etc., using primarily millisecond stamped data,
vi
in
in
rc
though we start with daily data that will give us a general overview of the main
r
le
pe
ne
issues. Chapter 3 focuses on prices and returns, while Chapter 4 is dedicated to
irc
vi
in
rc
This chapter, first looks at millisecond data. We then turn to look at the
r
le
pe
ne
properties of returns both at the daily and at much shorter (one second) time
irc
vi
intervals, as well as looking at the interarrival times of price changes. Section 3.4
in
in
rc
looks at how market conditions may change when facing latency, as well as the
r
le
pe
ne
issue of tick size. This is followed by a discussion on price dynamics. Section 3.6
irc
vi
provides a glimpse of the issue of market fragmentation in the US, while the last
in
rc
le
irc
and speculation as to what could be behind some of the results of that analy
in
in
rc
r
le
sis. These speculations are included to make the chapter more engaging and to
pe
ne
irc
encourage the reader to think about the results. However, they should not be
vi
in
le
separate from the descriptive analysis of the empirical facts that is limited in
pe
ne
irc
in
rc
r
le
pe
vi
in
We use data from several sources. For daily and monthly data we use publicly
rc
le
available aggregated data from Yahoo! Finance, and data from the Center for
pe
ne
irc
in
data (publicly available industry standard data, similar to the direct data feed,
rc
r
le
into table format for easier processing and is in binary for speed and storage
vi
in
c
le
r
The data are made up of the following fields (we drop two fields that are irrelevant
pe
ne
rc
here):
vi
ci
in
in
le
in
rc
p
vi
r
40
le
Empirical and Statistical Evidence: Prices and Retums
pe
irc
vi
rc
le
pe
ne
Order ID: Unique order ID
irc
@
vi
® Message Type:
in
in
rc
"B" - Add buy order
r
le
pe
ne
"S" - Add sell order
irc
vi
"E" - Execute outstanding order in part
in
rc
le
pe
ne
irc
"F" - Execute outstanding order in full
vi
in
rc
r
le
pe
ne
irc
vi
in
e Shares: order quantity (Zero for "F" and "D" messages)
rc
le
e Price: zero for cancellations and executions
pe
ne
irc
e Ticker : the ticker associated with the asset in question
vi
in
rc
@
r
le
pe
ne
irc
vi
These messages record events that affect the limit order book (LOB), so essen
in
rc
tially, they capture what happens to limit orders (LOs). LOs are posted (B,S) and
r
le
pe
ne
later on they are cancelled (C,D) or executed (E,F). So, market orders (MOs)
irc
vi
are not recorded but must be deduced from observing how they are executed
in
in
rc
pe
ne
Consider the following example (the row numbers have been added to facilitate
irc
vi
the discussion and we have dropped the MPID column):
in
rc
le
irc
in
3: 33219784 4879129 1
rc
D 0 0 QQQQ
r
le
s
rc
le
7: 33219785 4882599
pe
D 0 0 QQQQ 1
ne
irc
in
rc
r
le
These messages are sent to the market between 33219784 and 33219785 ms
pe
ne
irc
from midnight (July 13th, 2010), that is between 09:13:39.784 and 09:13:39.785.
vi
in
We see several messages for the ETF QQQQ, and one each for the ETF TZA,
rc
le
and the stocks FJ\/IS and STD (STD has since changed its ticker to SAN).
pe
ne
irc
The first line is for the TZA ETF and should be read as follows: message
vi
in
in
rc
4889087, the LO is a posted LO to buy (B) for 1, 900 shares at a price of $34.58
pe
ne
irc
(all prices are in dollars x 10, 000). The number 1 in the final column represents
vi
in
rc
le
pe
For QQQQ we observe an LO being cancelled (row 3), followed by the post
ne
irc
ing of a sell LO (4), another LO cancellation (5), a second sell LO posted (6)
vi
in
in
rc
ne
irc
in
rc
p
vi
3.1 Introduction 41
r
le
pe
irc
vi
rc
le
pe
and a third LO being cancelled (7). The posted sell orders include the quantity
ne
irc
and price for the orders (2,000 at $45.48 and 500 also at $45.48), while can
vi
in
rc
celled orders must be matched with their original posted orders (ID 4879130 and
i
r
le
pe
4882599) in order to identify the corresponding prices and quantities. vVe see the
ne
irc
same pattern for the full execution of order ID 4888889 for STD (8) - i.e. no
vi
in
rc
price or quantity - while for FMS (2) we see a partial cancellation of 200 units
r
le
pe
ne
from order ID 4887036 (the price needs to be read off the original posted order).
irc
From this data, one can reconstruct the complete order book at any point in
vi
in
rc
time, and study how the market changes over time using different variables and
i
r
le
pe
ne
methods. We now proceed to give a brief overview of some of the features we
irc
vi
observe.
in
rc
le
pe
ne
irc
3.1.2 Daily Asset Prices and Returns
vi
in
rc
i
When trading, the first variable of interest is the price level. If we have to ac
r
le
pe
ne
quire/liquidate a position we want to know what price we can get if we aggres
irc
vi
sively execute it, and if we are providing liquidity we want to know at what
in
rc
irc
As we discussed in Section 1.2, each investor is in the market to meet some ob
vi
jective, and will participate for as long as she feels that she is not losing too much
in
rc
i
r
le
money in pursuit of her objective (e.g., if the transaction costs do not consume
pe
ne
irc
the expected price gains, or if the market will adjust prices in reaction to her
vi
in
order, eliminating the original mispricing she wanted to profit from - we discuss
rc
le
these below). The observed price process is the outcome of the interaction be
pe
ne
irc
i
r
le
market conditions and information flows. Market efficiency theories tell us that
pe
ne
irc
the resulting price process is not predictable and any positive expected return
vi
in
you can predict, is there as compensation for bearing risk. Thus, long-term in
rc
le
vestors receive a compensation for risk, be this market risk, risk from monetary
pe
ne
irc
policy changes, or just compensation for future price fluctuations and dividend
vi
in
rc
pe
sation for leaving offers at the bid and ask, and will continue to post orders while
ne
irc
their trades are sufficiently profitable. Other traders pursue strategies aimed at
vi
in
rc
le
pe
irc
Whether one believes in market efficiency or not, the properties of the price
vi
in
rc
process are amenable to analysis and in this chapter we look at some of the
i
r
le
pe
methods and results obtained from detailed message data for specific assets.
ne
irc
We analyse the properties of the price process for a selection of assets from
vi
in
rc
equity markets. Our primary focus is on 2013 prices for AAPL (Apple Inc.), as
r
le
pe
irc
across assets, we look at three other assets with tickers ISNS, FARO and MENT:
vi
in
rc
ISNS is the company Image Sensing Systems, Inc. Industry (Application Soft-
i
le
ne
irc
in
rc
p
vi
42 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
ware); FARO is FARO Technologies Inc. (Scientific & Technical Instruments);
ne
irc
and MENT is Mentor Graphics Corp. Industry (Technical & System Software).
vi
in
rc
These assets are all in the technology sector and represent different levels of
i
r
le
pe
trading activity (although depending on your definition, you can argue about
ne
irc
vi
in
rc
le
pe
ne
irc
3.1.3 Daily Trading Activity
vi
in
rc
i
r
le
In Table 3.1 we can see different measures of trading activity for these assets:
pe
ne
irc
average number of transactions per day on NASDAQ (N), average total daily
vi
in
dollar value of shares traded on NASDAQ (V($), in OOOs), average number of
rc
le
shares traded daily on NASDAQ (V(Q), in OOOs), total average number of shares
pe
ne
irc
traded in all markets (Total V(Q), in OOOs), and share turnover (Turnover).
vi
in
Share turnover represents the total number of shares traded during 2013 divided
rc
i
r
le
pe
ne
irc
millions, as of Dec 30th, 2012). From the column with the number of transactions
vi
(N) and using the fact that the regular market is open for 6.5 hours (from 9:30
in
rc
to 16:00) we can conclude that ISNS is a very rarely traded asset (traded about
le
pe
ne
irc
once every half hour in 2013), while FARO and MENT are regular small assets
vi
in
(with on average 1 to 3 trades per minute in 2013), and AAPL is one of the most
rc
i
r
le
highly traded equity stocks (around 1 trade per second - note that we are using
pe
ne
irc
2013 data, and these numbers are not rescaled to account for the AAPL June 2,
vi
in
rc
le
pe
ne
irc
vi
rc
i
( X 10 3 ) ( X 10 3 ) ( X 10 3 ) ( X 10 6 )
r
le
pe
ne
irc
ISNS 14 18 3 12 5 0.62
vi
in
3,964
le
rc
i
Table 3.1 Daily Average Volume in 2013 for selected assets.
r
le
pe
ne
irc
vi
in
le
you look at, and whether measured only for the NASDAQ market or for all
pe
ne
irc
markets together.
vi
in
rc
i
r
le
pe
ne
vi
in
rc
We first look at the properties of the price process by considering returns con
r
le
pe
structed from changes in prices from market open to market close for each day in
ne
irc
2013. According to the efficient market hypothesis, daily asset returns should
vi
in
rc
ne
irc
in
rc
p
vi
3.1 Introduction 43
r
le
pe
irc
vi
rc
le
pe
this we run ordinary least squares (OLS) regressions for intra-day (market open
ne
irc
to market close) returns for our four assets. We include a number of variables
vi
in
rc
related to market efficiency and market forces as follows.
i
r
le
pe
ne
irc
vi
The first of these variables is the return on the SPY: the SPY is an exchange
in
rc
le
traded fund (ETF) that tracks the S&P500 index. In subsection 1.1 we dis
pe
ne
irc
cussed ETFs in the context of the different types of asset classes in the market,
vi
and saw that the SPY is an asset traded on the exchanges, just like ISNS, FARO,
in
rc
i
r
le
MENT and A APL. When we buy the SPY we buy a fund (similar to a mutual
pe
ne
irc
fund or a pension fund) whose objective is to track the S&P500 at the lowest
vi
in
possible cost. Thus, many investors who just want the value of their investments
rc
le
to move with "the market" (as represented by the S&P500) prefer to buy the
pe
ne
irc
SPY rather than invest in an equity-based mutual fund. Moreover, traders would
vi
in
rather purchase the SPY than acquiring all the 500 assets in the index, since it
rc
i
r
le
is (much) cheaper to do so, and removes the costs associated with constantly
pe
ne
irc
rebalancing one's portfolio to match changes in the weights the different assets
vi
in
represent in the S&P500. The cost of doing so, but doing so efficiently, is already
rc
irc
vi
in
rc
Another variable is the volatility index VIX: the VIX is an index continu
i
r
le
pe
ously published by the Chicago Board of Options Exchange which is designed to
ne
irc
le
pe
ne
tions on the S&P500 index. It is used as a proxy for market uncertainty, investor
irc
sentiment, the market taste for risk (market risk aversion) and other related
vi
in
rc
i
concepts. There are ETFs that try to track VIX, there are futures backed by it,
r
le
pe
ne
vi
in
rc
le
irc
difference between the number of shares aggressively bought and shares aggres
vi
in
sively sold. Naturally, in a market, for every transaction there is a buyer and a
rc
i
r
le
seller. But, in electronic markets we can differentiate between posted limit orders
pe
ne
irc
(LOs) and executed market orders (MOs). Thus, if a transaction is the result of
vi
in
a passive limit sell (buy) order being lifted (hit) by an aggressive market buy
rc
le
irc
(sell) order is driven by some trader's desire for a rapid buy (sell) and indicates
vi
in
rc
her demand for (supply of) shares of this asset to the overall demand/supply
i
r
le
pe
in the market. Thus, the order flow is a proxy for the net demand for the asset
ne
irc
le
pe
ne
irc
vi
In Table 3.2 we show the regression coefficients from the OLS regressions for
in
rc
ne
irc
in
rc
p
vi
44 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
= a+ /31,J ri-1,j + /32,J SPYt + /33,j VIXi + /34,j log(l + Qt) + /3s,J OFt + Et,i
in
r t ,j
rc
i
r
le
pe
ne
(3,1)
irc
vi
r t ,j =a+ /31,J ri-1,j + /32,j SPYt + /33,j VIXt + /34,j log(l+Qt)+ /35,j OFt
in
rc
le
+ /36,J SPYt lsPY,<O + /37,j VIXt lvrx,<o + E t ,J,
pe
ne
irc
(3,2)
vi
in
rc
i
r
le
The first model (3,1) (Ml in Table 3,2) is an OLS regression for the intraday
pe
ne
irc
return for each of our four stocks, where r t ,j, ,j E { ISNS, FARO, MENT, AAPL },
vi
in
The return is computed as the price of the stock at the close of the market minus
rc
le
the price of the stock at the opening of the market, divided by the price of the
pe
ne
irc
stock at the opening of the market: r = Pc1opopen
vi
in
rc
i
r
le
pe
ne
(i) a: a constant which captures the mean-daily return and should be close to
irc
vi
zero,
in
rc
(ii) Tt-l,( the previous day's intra-day return (should be insignificant as returns
le
pe
ne
irc
should not be predictable),
vi
in
(iii) SPYt: the contemporaneous intraday return on the SPY - computed like the
rc
i
r
le
(iv) VIXt: the contemporaneous intraday 'return' on the VIX - computed like the
vi
in
le
(v) log(l + Qt): the log of one plus the number of shares of the stock traded in all
pe
ne
irc
markets that day (we add one so that when no shares are traded we do not
vi
in
rc
i
r
le
pe
(vi) OFt: order flow for the stock on NASDAQ that d ay,
ne
irc
vi
in
In addition, the second model (3.2) (M2 in Table 3,2) includes the variables in
rc
le
the first model (Ml), plus the returns on the SPY and the VIX multiplied by
pe
ne
irc
indicators which equal 1 on days in which the VIX or the NASDAQ moved down,
vi
in
i
r
le
reaction of the asset's return to any 'good' or 'bad' news on the market (or its
pe
ne
irc
volatility).
vi
in
rc
The fitted models in Table 3.2 represent robust OLS estimates. Robust OLS
r
le
estimation is very similar to the standard OLS minimisation of the sum squared
pe
ne
irc
residuals, that is, the minimisation of the sum of the squared distance between
vi
in
rc
the observations and the fitted values, The main difference between standard and
i
r
le
robust OLS is that with robust OLS the errors in the estimation are weighted so
pe
ne
irc
estimates in Table 3,2, the weighting is done iteratively and using the Huber's
r
le
pe
loss function which penalises large errors linearly rather than quadratically -
ne
irc
more details on OLS and robust OLS can be found in any standard econometrics
vi
in
rc
ne
irc
in
rc
p
vi
3.1 Introduction 45
r
le
pe
irc
vi
rc
le
pe
ne
irc
ISNS FARO MENT AAPL
vi
Variables Ml M2 Ml M2 Ml M2 Ml M2
in
rc
i
r
le
constant 0.25 0.27 -2.83 -2.92 -2.97 -3.07 1.09 1.18
pe
ne
irc
vi
SPY(%) -0.60 1.03 0.28 0.06
in
-1.36 1.04 1.04 1.07
rc
VIX (%)
r -0.08 -0.01 -0.03 -0.05 0.00 0.01 -0.03 -0.02
le
pe
ne
irc
Order Flow 0.03 0.02 0.05 0.05 0.03 0.03 0.06 0.05
vi
in
rc
Negv SPY 1.43 0.11 -0.08 0.52
i
r
le
-0.19
pe
Negv VIX 0.06 -0.01 -0.01
ne
irc
vi
in
rc
le
pe
irc
significance)
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
As Table 3.2 shows, the OLS results for the thinly traded ISNS reflect a lot
pe
ne
irc
of noise (in the sense that the R-squared ( "adj R") is very close to zero) and
vi
in
the significance of the coefficients is not very reliable. For the other assets we
rc
le
find that the OLS regression does pick up some information, and there is one
pe
ne
irc
variable that is consistently significant for the other three assets, namely order
vi
in
rc
flow. The coefficient is significant and positive for all three assets indicating that
i
r
le
pe
NASDAQ order flow and the asset's return move together, which is consistent
ne
irc
with the interpretation of order flow as the market's net demand for the asset,
vi
in
rc
and the models of liquidity of Glosten and Milgrom, and Kyle. We expected
r
le
pe
the constant and the previous day's return to be insignificant, and we find the
ne
irc
first to be the case, and the latter to be true for FARO and MENT. AAPL
vi
in
rc
pe
le
pe
irc
- that is, that trades do not take place at the 'market price' but rather an
vi
in
rc
aggressive buy has to cross a non-zero spread to match with the bid and executes
i
r
le
pe
ne
against the LO standing there, at the bid. F inally, we find that during 2013 our
irc
(as measured through the VIX). FARO and MENT have significant exposure
r
le
pe
ne
also find no significant evidence that there is an asymmetry between 'good' and
in
rc
ne
irc
in
rc
p
vi
46 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
AAPL
le
AAPL
pe
ne
15
irc
20
vi
in
rc
,....... ..c,
i
10 +
B 2
r
le
Cl)
pe
10
ne
irc
r:::
0
vi
S-<
in
3
.µ
;::l
rc
.µ
Cl)
5
r
le
S-<
pe
u -10
ne
.. ...
C) ++
irc
Cl)
vi
in
,...;
rc
0 -20
i
-10 0 5 10 -5 0 5
r
le
.5
pe
1 sec return On bos)
ne
Standard Normal Quantiles
irc
vi
in
rc
Figure 3.1 Sample distribution and QQ-plot of the I-second returns of AAPL on July
r
le
30, 2013.
pe
ne
irc
vi
in
rc
3.2 Asset Prices and Returns lntraday
i
r
le
pe
ne
irc
Daily market information is of primary interest only for investors with medium
vi
in
rc
le
pe
ne
ecuted over very short horizons so we must look at what goes on in much finer
irc
detail. To do so, we use millisecond-stamped message-level ITCH data for the
vi
in
rc
i
NASDAQ market to study prices over several sampling periods.
r
le
pe
ne
Focusing on AAPL and on a single day, July 30th 2013, we construct asset
irc
vi
returns over one-second intervals. The choice of dates is arbitrary. It was a day
in
rc
with a small positive price gain and positive net order flow: there were 1.45
r
le
pe
ne
million shares bought vs 1.24 million shares sold on NASDAQ, and the price
irc
vi
increased from market open ($449.96) to market close ($453.32) by $3.36 (+74
in
rc
i
bps).
r
le
pe
ne
irc
The asset's return is computed using the microprice. The microprice (S;),
vi
in
also called the weighted-midprice, is the weighted average of the best bid (Pl)
rc
le
and the best ask (Pta), weighted by the relative quantities posted at the bid CV/)
pe
ne
irc
rc
i
r
le
(3.3)
pe
ne
irc
vi
in
rc
le
order imbalance: e.g., a relatively larger quantity of offers on the bid than on
pe
ne
irc
the ask indicates greater buying pressure, and the 'true' price is closer to the
vi
in
rc
ask than to the bid (the microprice was discussed at the end of Chapter 1 - also
i
r
le
the LOB as a key variable in trading decisions, the same volume imbalance that
vi
in
rc
le
irc
effect on the properties of the empirical distribution of the asset's return. If the
vi
in
rc
sampling frequency is very short then many of the observations will be equal to
i
le
ne
irc
in
rc
p
vi
3.2 Asset Prices and Returns lntraday 47
r
le
pe
irc
vi
rc
le
AAPL(left tail) AAPL(right tail)
pe
ne
100 100
irc
vi
in
in
rc
r
/\I 10-1 N10-1
le
pe
ne
/\I
irc
vi
in
�
0:
rc
0..
I 10-2 \o 10-2
r
le
pe
ne
irc
,..; 0
vi
10-3 10-3
in
in
rc
10-4 10-3 10-2 10-4 10-3
r
le
-Return Return
pe
ne
irc
vi
in
rc
Figure 3.2 Plot of the tails (log scales) for AAPL on July 30, 2013.
r
le
pe
ne
irc
vi
zero. In our example, we sample at the one second frequency, and find that for
in
in
rc
AAPL on July 30, 2013, 33% of the returns are equal to zero.
r
le
pe
ne
We carry out our analysis using returns, and we use basis points (bps) as
irc
vi
our unit of analysis (that is, a value of 1 in Figure 3.1 represents a change in
in
rc
irc
microprice is $454.30, so that a positive return of 1 bps represents an increase
vi
in the microprice of 4.5 cents, and 0.22 bps is equivalent to 1 tick, i.e. one cent.
in
in
rc
r
le
Looking at the histogram of the 1-second returns in the left panel of Figure 3.1,
pe
ne
irc
we find that the distribution is single-peaked and seems to have fat tails. This is
vi
in
le
The fat tails· exhibited by the asset returns occur often when sampling at
pe
ne
irc
short intervals, but may persist at longer frequencies. Figure 3.2 zooms into the
vi
in
in
right and left tails. Specifically, we use returns above the 95th percentile (1.94
rc
r
le
bps) and below the 5th percentile (-1.94 bps) to define these tails. Taking these
pe
ne
irc
cutoff values as given, we assume the tails follow a power-law with a probability
vi
in
le
pe
)-°',
ne
irc
f(r) = � (-,,.
vi
in
in
rc
rmin rmin
r
le
pe
and estimate the parameter a using maximum likelihood estimation (MLE). The
ne
irc
MLE for a can be shown to be (see, e.g., Clauset, Shalizi & Newman (2009))
vi
in
rc
le
1
pe
1 +T [tlog (�)]-
ne
a=
irc
vi
in
in
'rmrn
rc
t=l
r
le
Using the given cutoffs, these estimators give us &r ight = 3.35 and &1 e ft = 3.38.
pe
ne
irc
The model fit of the tails corresponds to the black dashed lines in Figure 3.2,
vi
in
and indicate that the 1-second returns have very heavy tails.
rc
le
To gain a sense of whether the market behaves in accordance with the efficient
pe
ne
irc
in
return data. Recall that the ACF f(n) is given by the correlation of 'rt-n with 'rt
rc
le
ne
irc
in
rc
p
vi
48 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
AAPL
ne
irc
0.1
vi
in
in
.
rc
;::I
0
r
.
le
pe
� 0
ne
irc
Q)
H l l
vi
H
Figure 3.3 Sample ACF of 1-second
in
0
rc
le
0-0.1
pe
ne
irc
vi
in
in
rc
r
20
le
5 10 15
pe
ne
Lags
irc
vi
in
rc
le
pe
and can be estimated from the sample correlation. The sample ACF for APPL on
ne
irc
July 30, 2013 is shown in the right panel of Figure 3.3. This gives a negative and
vi
in
in
rc
significant autocorrelation for the first lag, which indicates a significant mean
r
le
pe
reversion component in the microprice. We also find that the 12th lag is (weakly)
ne
irc
significant and positive, while the 14th is negative and significant. There are no
vi
in
rc
le
pe
ne
in
rc
r
le
pe
ne
irc
vi
3.3 lnterarrival Times
in
rc
le
pe
ne
irc
We have seen that even at one second intervals, 33% of the time there are no price
vi
in
in
rc
pe
le
pe
Let Ti denote the times at which there is change either in the bid or in the
ne
irc
ask, and we look at the frequency of interarrival times, Xi = Ti+i -Ti . The mean
vi
in
in
rc
is 10.4 ms and the median 3 ms. Figure 3.4 provides additional insight: the top
r
le
pe
panels describe the histogram of Xi in absolute and log scales, while the bottom
ne
irc
panel contains the QQ-plot relative to the exponential (with the same mean).
vi
in
rc
These graphs indicate that the interarrival times have a power-law distribution
r
le
pe
with very heavy tails. We estimate the parameter for the right tail (as we did for
ne
irc
the 1-second returns above), and we obtain an MLE of a = 3.13 for the power
vi
in
in
rc
pe
ne
We also briefly look at the dy namics of the interarrival process. Figure 3.5
irc
vi
describes the ACF. As shown, changes to the bid and ask are not independent,
in
rc
le
pe
ne
empirical fact about such changes, namely, that they cluster. Rapid changes in
irc
vi
the bid/ ask are followed by further rapid changes, while a relatively long calm
in
in
rc
ne
irc
in
rc
p
vi
r
3.4 Latency and Tick Size 49
le
pe
irc
vi
rc
le
pe
ne
AAPL AAPL
irc
10 � -�-�--�-�-�
2
vi
in
rc
i
r
le
3
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
10 �-�-�--�-�-�
°
i
r
le
20 40 60 80 100 0 20 40 60 80 100
pe
ne
irc
vi
AAPL AAPL
in
rc
80 4
r
le
pe
35
Cl}
ne
irc
s
vi
·..:: 3
in
rc
"@
i
r
le
.:'::2.5
pe
....
e....
ne
irc
vi
in
Q)
rc
,E1.5
r
le
pe
ne
irc
1
50 100 o 50 100
vi
Exponential arrivals
rc
i
r
le
pe
ne
irc
Figure 3.4 Plot of the frequency of interarrival times (X) in absolute and log scales for
vi
AAPL on July 30, 2013. The bottom panel describes the QQ-plot relative to the
in
rc
le
pe
ne
irc
vi
AAPL
in
rc
0.1
i
r
le
pe
�
ne
irc
0
j 0.05
vi
in
1I jI
Figure 3.5 Plot of the autocorrelation
rc
.
Q)
r
le
0
ne
irc
rc
i
r
le
pe
ne
irc
5 10 15 20
vi
Lags
in
rc
le
pe
ne
irc
rc
i
r
le
pe
ne
irc
Suppose we wish to execute a trade, e.g., buy 1,000 shares of AAPL. The first
vi
le
about immediacy, the fastest way to execute a trade is to cross the spread and
pe
ne
irc
aggressively execute as much as possible using a market order (MO). But, any
vi
agent for whom immediacy is very important needs to account for a new issue:
in
rc
message latency. Latency refers to the delay between sending a message to the
le
ne
irc
in
rc
p
vi
r
le
50 Empirical and Statistical Evidence: Prices and Returns
pe
irc
vi
rc
le
pe
ne
market and it being received and processed by the exchange. Sometimes the
irc
vi
time it takes for the exchange to acknowledge receipt of the message is also
in
rc
i
added in. Latency is random and depends on many factors such as distance
r
le
pe
ne
between sender and exchange, the structure and type of network, the amount
irc
vi
of orders in the network (which can generate congestion), etc. In addition, the
in
rc
le
word latency is more generally used to express the time it takes for a message
pe
ne
irc
to travel from one point to another, such as the latency of a news feed. A classic
vi
in
example of latency is the time it takes for a message to go from the Chicago
rc
i
r
le
options exchange (or rather, the CME colocation centre) to New York (or rather,
pe
ne
irc
NASDAQ's processing centre in New Jersey). The latency between these two
vi
in
centres is estimated to be between 7.5 and 6.7 ms when travelling by fibre optic
rc
le
cable, or between 4.2 and 5.2 ms when travelling by microwave (on a clear day).
pe
ne
irc
If an agent is trading from home, through a broker, she must be aware of the
vi
in
substantial delay between the moment she asks her broker to execute her order
rc
i
r
le
and the time it reaches the market. During that time, market conditions may have
pe
ne
irc
changed a great deal. If, however, the agent is trading directly through a broker's
vi
in
rc
feed or she has her own feed into the market, the latency will be much shorter,
r
though still significant relative to centres which are colocated. Being colocated, le
pe
ne
irc
also known as colocation, means that an agent's trading system is physically
vi
in
rc
housed at the electronic exchange's data centre and has a direct connection to
i
r
le
the exchange's matching engine. In principle, those who are colocated face similar
pe
ne
irc
latency amongst themselves - though there will still be some latency dependent
vi
in
rc
le
pe
Chapter 1).
ne
irc
Latency is an issue for agents for several reasons. An agent who is trading
vi
in
rc
frequently and on narrow margins needs to be aware of the state of the market
i
r
le
pe
and be able to adapt her orders, whether to post a new or cancel an existing
ne
irc
to be aware of the relationship between her choice of routing strategy and how
r
le
pe
ne
other traders may react to the information that may be extracted from observing
irc
the strategy's outcomes. A large, poorly routed MO will telegraph its progress
vi
in
rc
through the several exchanges leading to poor execution quality and high exe
i
r
le
pe
ne
cution costs, as other traders reposition themselves to absorb the order at more
irc
For certain assets, circumstances change very fast while for others the market
r
le
pe
ne
is quite stable. We see this in the movements of prices and spreads in Tables
irc
vi
3.3 and 3.4. The former captures the slow changes in seldom traded assets, such
in
rc
as ISNS, FARO or MENT. The latter looks at more frequently traded stocks,
r
le
pe
ne
vi
the end of one minute to the next for three assets: ISNS, FARO and MENT. A
r
le
pe
ne
irc
one minute delay is a very long time for a trader, and one would not expect such
vi
a delay unless one is trading through a very slow connection to the exchange (or
in
rc
the order does not go directly to the exchange). We see this in the first column of
le
ne
irc
in
rc
p
vi
r
le
3,4 latency and Tick Size 51
pe
irc
vi
rc
le
pe
ne
irc
L'l.X#O Stats (for L'l.X# 0)
vi
in
rc
(%)
i
r
le
pe
ISNS Bid 4.2 -43.0 -4.0 1.0 5.0 40.0
ne
irc
vi
in
Midprice 6.7 -25.8 -2.0 0.5 2.0 26.8
rc
le
Quoted Spread 6.7 -45.0 -5.0 -1.0 4.0 46.0
pe
ne
irc
FARO Bid 48.6 -21.0 -2.0 1.0 3.0 19.0
vi
in
rc
Ask 49.0 -19.0 -3.0 -1.0 3.0 22.0
i
r
le
pe
ne
irc
vi
in
rc
le
Ask 44.1 -5.0 -1.0
pe
irc
Midprice 52.8 -4.5 -1.0 0.5 1.0 5.0
vi
in
rc
i
r
le
pe
ne
Table 3,3 One minute changes in bid, ask, midprice, and quoted spread.
irc
vi
in
rc
le
pe
ne
irc
Table 3.3 (labelled 6.X cf. 0) where we find the percentage of minutes for which
vi
in
rc
i
r
le
pe
we observe that for only 4.2 percent of the time are there changes in the bid
ne
irc
from one minute to the next. In the adjacent columns we can see the statistics
vi
in
rc
for those minutes in which the variable of interest changed. From these, we can
r
le
pe
conclude that for half of the time ISNS's bid price changed, it moved between an
ne
irc
increase of 5 cents (Q3) and a drop of 4 cents (Ql). If we look at the midprice
vi
in
rc
for ISNS, we see that it changed only 6.7 percent of the time, and when it did,
i
r
le
pe
half of those changes were between an increase of 2 cents and a drop of 2 cents.
ne
irc
On the other hand, if one considers assets such as FARO or MENT, a one
vi
in
rc
minute delay will face changes in the bid (similarly in the ask) around half of
r
le
pe
the time, as well as (naturally) in the midprice and quoted spread. Note that
ne
irc
this is an unconditional analysis for all minutes of 2013, and does not take into
vi
in
rc
account that market participants react to order flow. For example, if one sends
i
r
le
pe
ne
a market buy order, then other agents may quickly adjust their quotes upwards
irc
vi
in response to this new information. Hence, it is natural that an asset with very
in
rc
little public information (in the form of trades/MOs) like ISNS will see fewer
r
le
pe
ne
price movements than more frequently traded ones, like FARO or MENT.
irc
vi
This is not the same picture that we find when looking at the most popular
in
rc
i
r
stocks (in terms of activity). Assets such as AAPL and ORCL will almost cer
le
pe
ne
irc
tainly experience changes in prices within one minute, but for these assets a one
vi
minute delay is unreasonably long by any standard. Table 3.4 reflects the same
in
rc
le
information as Table 3.3 but after a 100 ms delay rather than one minute (and
pe
ne
irc
for the last three months in 2013 rather than the whole year). Also, rather than
vi
in
report the statistics for the whole sample, we report the median values for the
rc
i
le
statistics computed at the daily level. That is, after computing the daily percent-
ne
irc
in
rc
p
vi
r
le
52 Empirical and Statistical Evidence: Prices and Returns
pe
irc
vi
rc
le
pe
ne
irc
b.X/0 Stats (for b.X # 0)
vi
in
rc
(%)
i
r
le
pe
AAPL Bid 3.84 -17.0 -3.0 -1.0 3.0 18.0
ne
irc
vi
in
Midprice 6.75 -11.5 -1.5 0.5 1.5 11.0
rc
le
Quoted Spread 6.69 -16.0 -3.0 -1.0 3.0 18.0
pe
ne
irc
ORCL Bid 0.41 -2.0 -1.0 -0.5 1.0 2.0
vi
in
rc
Ask 0.40 -2.0 -1.0 1.0 1.0 2.0
i
r
le
pe
ne
irc
vi
in
rc
Table 3.4 One hundred ms changes in bid, ask, midprice, and quoted spread.
r
le
pe
ne
irc
vi
in
rc
i
age of 100 ms intervals with non-zero bid price changes for AAPL for each day
r
le
pe
ne
from October to December 2013, we report that the median of these is 3.84%.
irc
vi
Similarly, after computing the first quartile of the non-zero bid price changes for
in
rc
each day, we report the median of these, which is -3 cents, while the median of
r
le
pe
ne
rc
i
r
price changes for AAPL and ORCL. AAPL sees more frequent changes and of
le
pe
ne
greater magnitude than ORCL. There are two factors that are important here:
irc
vi
in
(i) the volume traded (in dollars) for AAPL is one order of magnitude greater
rc
le
than for ORCL, but also, (ii) the price of AAPL in the last quarter of 2013 was
pe
ne
irc
between $490 and $560, while that of ORCL was between $32 and $38. As both
vi
in
assets have the same minimum tick size (of one cent), this means that AAPL
rc
i
can experience much smaller percentage changes in its price (1 cent = 0.2 bps
r
le
pe
ne
of $500) than ORCL (1 cent = 2.5 bps of $40). T hus, one would expect more
irc
vi
in
frequent price movements for AAPL than for ORCL (even after AAPL's share
rc
le
split of one old share into seven new ones, as after the split and AAPL prices
pe
ne
irc
around $100, a one cent change is equivalent to a 1 bps change, much greater
vi
in
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
In this section, we investigate how successive price changes are interrelated. For
in
rc
this, we first look at whether the sign of the current price change can predict
r
le
pe
ne
the sign of the next (non-zero) price change. We continue using AAPL on July
irc
vi
30, 2013 for the analysis, and record price changes every time they occur. In
in
rc
Table 3.5 we see how an increase in the price (bid or ask) is more often than not
le
pe
ne
In Table 3.5 we see that an increase in the ask price (an uptick) is followed by
rc
i
le
a down tick 57% of the time, while a drop in the ask is followed by an increase
ne
irc
in
rc
p
vi
r
le
3.5 Non-Markovian Nature of Price Changes 53
pe
irc
vi
rc
le
pe
ne
irc
Ask Bid
vi
in
rc
Uptick Downtick Uptick Downtick
i
r
le
t/t +1 (11') (�) ( 11')
pe
(�)
ne
irc
vi
in
rc
le
pe
ne
irc
Table 3.5 Empirical Transition Rates: Single Price Change.
vi
in
rc
i
r
le
pe
ne
irc
61.8% of the time. For the bid price the numbers are 63.5% and 55.3% of the
vi
time. Earlier, in Table 3.4, we saw that a 100 ms latency resulted in no changes
in
rc
le
in the bid more than 96 percent of the time (in at least half the observation
pe
ne
irc
period). But, in Section 3.3 we saw that the median interarrival time of a change
vi
in
in either the bid or the ask is 3 ms (that for the bid is 8 ms). The numbers in
rc
i
r
le
Table 3.5 help us reconcile these two seemingly contradictory statements: even
pe
ne
though after a 100 ms delay one may not observe a net change in the bid, this
irc
vi
in
zero net change is a result of both no changes during the 100 ms period and also
rc
of several changes that cancel each other out. So, for latencies greater than 8 ms,
le
pe
ne
irc
if you submit an MO, by the time it hits the market, the price may have moved
vi
in
away but it may also have returned to the price that was there when the MO
rc
i
r
le
was submitted. Latency, therefore, introduces execution risk specially for traders
pe
ne
irc
Table 3.5 also illustrates an asymmetry that appears on this day in the relative
r
le
irc
quoted spread (a fall in the ask or an increase in the bid) was more likely to be
vi
in
rc
reversed than an increase in the quoted spread (an increase in the ask or a fall
i
r
le
pe
in the bid).
ne
irc
So we present Table 3.6 to investigate whether the sign of the current price
vi
in
rc
change can predict the sign of the price changes in the next two periods. This
r
le
pe
table describes the relative frequency of price reversals ('Reversal', 1r� or �1r) rel
ne
irc
rc
pe
consecutive changes in the bid and in the ask are in opposite directions. Table 3.6
ne
irc
shows not only the conditional probability of the future two price moves, but also
vi
in
rc
the unconditional one. Comparing those transitions we are led to the conclusion
r
le
pe
ne
that there seems to be little if any difference between the conditional and the
irc
rc
pe
ne
vi
the signs of the two past price changes can predict the next one. To accomplish
r
le
pe
ne
this we define four states, one for each possible pair of signs of price changes
irc
rc
ne
irc
in
rc
p
vi
54 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
ne
irc
Ask
in
Up(t+l,t+2)
rc
r
le
(1r1r) (11'-!J,, -(!,11') (-(!,-(!,)
pe
ne
irc
vi
in
Downtick(t) (-(!,)
rc
le
pe
ne
irc
vi
in
in
rc
r
le
Bid
pe
ne
Up(t+1,t+2) Reversal(t+1,t+2) Down(t+1,t+2)
irc
vi
in
(1r1r) (11'-!J,, -(!,11') (-(!,-(!,)
rc
le
pe
irc
Downtick( t) (-(!,) 23.7 58.1 18.2
vi
in
in
rc
Unconditional 23.9 59.1 17.0
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
in
rc
pe
ne
irc
Note that there are several transitions that cannot occur. For example, B cannot
vi
in
be followed by A, since if the price change was B(11JJ,), then either (i) the next
rc
le
change is 11, in which case we transition to the state C(JJ,11), or (ii) the next
pe
ne
irc
in
rc
The estimated transition frequencies for this Markov chain are provided in
r
le
Table 3.7. The transition AA should be interpreted as the sequence of ticks 111111,
pe
ne
irc
BC as 11JJ,11, and so on. In the table we can see confirmation of price reversals:
vi
in
le
pe
successive price movements (both for the bid and the ask) tend to go in opposite
ne
irc
directions.
vi
in
in
rc
r
le
pe
ne
irc
le
pe
irc
tation. vVe only address this issue superficially here but it is a serious concern
vi
in
in
rc
pe
ne
trading venues, most of which were dark pools - dark pools are trading venues
r
le
pe
ne
that do not publicly display price quotes and in 2014 NASDAQ represented
irc
vi
in
rc
algorithms were the agent has access to a standard lit market and also to a dark
le
ne
irc
in
rc
p
vi
3.6 Market Fragmentation 55
r
le
pe
irc
vi
rc
le
pe
ne
irc
Ask
vi
in
in
(t + 1) A (1r1r)
rc
B (11'-li-) C (-li-11') D (-U,-U,)
r
le
pe
ne
A(t) (1r1r) 54.4 45.6
irc
vi
in
rc
le
D(t) 48.6 51.4
pe
(-U,-U,)
ne
irc
vi
in
in
rc
Bid
r
le
pe
(t + 1)
ne
A (1r1r) B (11-li-) C (-li-11') D (.!J,.!J,)
irc
vi
in
A(t)
rc
le
B(t) (11.!J,) 62.2 37.8
pe
ne
irc
C(t) (.!J,11') 32.8 67.2
vi
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
pool). So, we cannot truly talk about 'the market' as a single exchange, but as
vi
in
in
the aggregation of activity across a large number of venues. To get an idea of
rc
r
le
the degree of market fragmentation, that is, the extent to which the market for
pe
ne
irc
one asset is distributed across different venues, we look at trading during market
vi
in
hours (9:30-16:00) for one asset, AAPL, on July 30, 2013 across all venues using
rc
le
Consolidated Tape data. These data provide information on all transactions and
pe
ne
irc
in
rc
Here we have reconstructed the bid and ask for the venues for which we have
r
le
pe
AAPL activity reported during that day. With the reconstructed bid and ask, we
ne
irc
compute the percentage of time each exchange's best price (the bid or the ask)
vi
in
rc
coincides with the best price across all venues. Table 3.8 captures this informa
r
le
pe
tion. We can see that NASDAQ-0:MX's bid coincides with the best bid across
ne
irc
all venues during 67 percent of regular trading hours, while the same figure is
vi
in
in
rc
19 percent for BATS, 43 percent for the NYSE-ARCA, 35 percent for EDGE-X
r
le
pe
Thus, optimally executing a trade is not just about timing and prices dis
vi
in
rc
played in one exchange, but also about: how to organise the way an order (or
r
le
pe
ne
orders) reaches a particular trading venue, what the different laws governing how
irc
exchanges should handle orders are and the rules exchanges use to implement
vi
in
in
rc
them, how to programme the routing of the order, and which order types are
r
le
pe
ne
vi
In the US the specific regulation, Reg NMS (National Market System), has
in
rc
le
pe
ne
in
rc
price is available, especially when that price comes from a 'proper' (protected)
le
ne
irc
in
rc
p
vi
56 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
ne
irc
Percentage Time at NEBO
vi
in
rc
Exchange Bid Ask
i
r
le
pe
ne
67.8 61.3
irc
NASDAQ
18.8 15.7
vi
BATS
in
rc
le
pe
NSE 0.0 0.0
ne
irc
FINRA 0.0 0.0
vi
in
0.0 0.0
rc
CSE
i
r
le
pe
ne
0.0 0.0
irc
EDGA
vi
EDGX 34.5 41.0
in
rc
le
pe
0.0 0.0
ne
NASDAQ-PSX
irc
BATS-Y 4.5 0.0
vi
in
rc
i
r
le
pe
ne
Table 3.8 Percentage of Time that Exchange's Best prices are at the NBBO.
irc
vi
in
rc
le
pe
quote in another trading venue). Tables 3.9 and 3.10 look at trade executions
ne
irc
in the different venues and compare the price at which the trade was executed
vi
in
rc
relative to the best bid/ ask price in the exchange in which the trade is reported
i
r
le
pe
ne
(Local) and relative to the best available price across all venues we have recon
irc
vi
structed from the data (NBBO).
in
rc
le
pe
ne
irc
Local NEBO
vi
in
rc
i
r
le
pe
NASDAQ
irc
le
irc
0 0 0 0 0 0
in
CSE
rc
i
0 0 0 5,005 1,550 6,555
r
CBOE
le
pe
EDGA
irc
le
NASDAQ-PSX
ne
irc
rc
i
r
le
pe
Table 3.9 Number of Shares Executed at Best Prices (Local refers to best price at local
ne
irc
le
pe
ne
Table 3.9 compares for each venue, the executions that occurred at the best
irc
vi
price across all venues (NBBO) versus the ones at the best price in that venue
in
rc
(Local), when that venue's best price was not the best across all venues. We can
le
ne
irc
in
rc
p
vi
3. 7 Empirics of Pairs Trading 57
r
le
pe
irc
vi
rc
le
pe
ne
irc
Exchange NBBO Local Best Inside Best Outside Best Shares (total)
vi
in
rc
NASDAQ 39.8 1.5 57.5 1.3 2,073,946
i
r
le
BATS 34.8 0.6 64.2 0.4 648,137
pe
ne
irc
vi
in
NSE 33.1 1.5 64.3 1.1 73,486
rc
FINRA
r 22.2 0.0 71.5 6.4
le
4,238,247
pe
ne
irc
CBOE 63.3 0.0 36.7 0.0 10,350
vi
in
rc
EDGA 27.8 0.1 71.6 0.5 192,202
i
r
le
pe
EDGX 30.6 0.8 67.4 1.1 1,425,145
ne
irc
vi
in
NASDAQ-PSX 52.1 2.5 40.5 4.9 4,075
rc
le
BATS-Y 26.0 0.9 73.2 0.0 125,220
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
see that when trading against a best price, it occurs against the NEBO most of
rc
le
the time. In Table 3.10, we allow for further types of executions, not just against
pe
ne
irc
a best price, but also inside the (Local) spread (between the local best bid and
vi
in
ask, while not at the NEBO) and outside the spread (for FINRA and CSE we
rc
i
r
le
use the NEBO as reference because no Local bid/ask quotes are reported). The
pe
ne
irc
numbers clearly show that almost all trades occur at the computed NEBO or
vi
in
inside the (local) spread: 40 and 58 percent for NASDAQ respectively, 43 and
rc
le
54 for NYSE-ARCA, 35 and 64 for BATS, and 30 and 67 percent for EDGE
pe
ne
irc
X. The same percentages for trades reported to FINRA are 22 and 72 percent
vi
in
rc
respectively using the NEBO as reference. These numbers suggest quite high
i
r
le
pe
execution quality, although the proportion of trades inside the spread seems
ne
irc
unusually large if one takes into account that a regular market order should be
vi
in
rc
le
pe
are being executed against hidden orders posted inside the spread and/or via
ne
irc
rc
i
r
le
pe
ne
irc
le
pe
ne
Most traders do not look at one asset at a time, but consider the interactions
irc
between different assets. This makes sense when you can extract information
vi
in
rc
from the interaction between different assets. This works best with groups of
i
r
le
pe
ne
assets that share common shocks and occurs naturally for assets in the same
irc
vi
industry.
in
rc
le
pe
ne
(Intel, INTC) and a technology ETF (Merrill Lynch Semiconductor ETF, SMH)
irc
vi
on November 1, 2013. These two assets move together for two main reasons. The
in
rc
first is mechanical: around 20% of the ETF holdings are shares of INTC. The
le
ne
irc
in
rc
p
vi
58 Empirical and Statistical Evidence: Prices and Returns
r
le
pe
irc
vi
rc
le
pe
second is economic: the ETF is designed to represent the semiconductor industry,
ne
irc
and hence its price will move in response to news that affects that industry, and
vi
in
in
rc
the same news will have a similar effect on the price of INTC. In Chapter 11,
r
le
pe
devoted to pairs trading and statistical arbitrage, we build on some of the ideas
ne
irc
vi
in
rc
le
pe
ne
irc
collection of assets that builds on the following empirical analysis.
vi
in
in
rc
Our analysis is based on the following theoretical model: we assume that both
r
le
pe
ne
INTC and SMH are stocks whose dynamics have a transitory (mean-reverting)
irc
vi
component and a permanent (Brownian) component. We express the dynamics
in
rc
le
pe
ne
irc
dSt = (0 - St) dt + adWt, (3.4)
vi
K,
in
in
rc
r
le
pe
ne
irc
vi
in
introduces the opportunity for generating positive expected returns from trad
rc
ing by exploiting that component's predictability. In this case, we use the joint le
pe
ne
irc
information from the two processes to create a stronger trading signal by con
vi
in
in
rc
structing a linear combination of the two assets, which is most strongly driven
r
le
by the mean-reverting component (and which is the basis for the some of the
pe
ne
irc
This is done by transforming the system in Equation (3.4), which has a generic
r
le
pe
irc
vi
in
in
(3.5)
rc
r
le
pe
ne
irc
where ;:;, is a diagonal matrix; that is, we look for the constants {an, 0'.12, a21, a22}
vi
in
such that
rc
le
pe
irc
vi
in
in
St,2 = 0'.21St,l + 0'.2,2St,2 ,
rc
r
le
pe
ne
and
irc
_o ] .
vi
in
K:1
K,=
rc
[
r
le
0 K,2
pe
ne
irc
The resulting r;, matrix has {K-1, K:2} equal to the eigenvalues of K,, and the process
vi
in
in
rc
St,j corresponding to the largest of these (in absolute terms), max{IK-1I, IK-2 I}, will
r
le
pe
have the strongest exposure to the mean-reverting process, and hence should
ne
irc
contain the most trading-relevant information - i.e. it will generate the best
vi
in
rc
le
pe
ne
and SMH during November 1, 2013. We sample using the midprice and estimate
vi
in
in
rc
the process at regular intervals (every 5 seconds). We fit the discrete version of
le
ne
irc
in
rc
p
vi
3.7 Empirics of Pairs Trading 59
r
le
pe
irc
vi
rc
le
pe
ne
irc
A
vi
6.St-1,INTC 6.St-1,SMH
in
in
rc
r
le
6.St,INTC 0.011 0.997 *** 0.002
pe
ne
***
irc
vi
in
rc
le
pe
ne
irc
vi
the model in (3.4) and use it to compute the values of the transformed model in
in
in
rc
(3.5) in order to build the trading signal.
r
le
pe
ne
To estimate the discrete version of model (3.4) we estimate the vector autore
irc
vi
gressive process (VAR)
in
rc
le
pe
ne
irc
=
vi
in
in
where S t [St ,JNTC St,SMH]' are the asset prices, and !:::,,St ,j denotes the
rc
r
le
pe
ne
irc
vector of white noise. The resulting estimates are described in Table 3.11. From
vi
in
le
pe
ne
!:::,,t [ -0.003
in
in
rc
r
le
pe
and diagonalise ,.,, to obtain i., and S:
ne
irc
vi
in
0
rc
u- 1,
]
r
le
,,,, � U · A·
0.0007
pe
ne
irc
vi
in
in
-
rc
-1 S [ 0.682 0.547
r
le
St
pe
U
-0.731 0.837
ne
= =
irc
t
vi
in
rc
le
pe
1 015
ne
irc
-2.7�----------
.
1 01�-------i---H�I
vi
in
in
rc
.
� -2.75
r
le
pe
Ii..
g31.005
ne
irc
§ -2.8
-�
vi
in
rc
to-2.85
r
le
pe
<J.)
ne
0.995
irc
·- -2 9
6
vi
in
in
95
rc
Time
pe
Time
ne
irc
vi
in
rc
Figure 3.6 INTC and SMH on November 1, 2013: (left) midprice relative to mean
le
pe
ne
midprice; (right) co-integration factor. The x-axis is time in terms of fractions of the
irc
vi
trading day. The dashed line indicates the mean-reverting level; the dash-dotted lines
in
in
rc
ne
irc
in
rc
p
vi
r
le
60 Empirical and Statistical Evidence: Prices and Retums
pe
irc
vi
rc
le
pe
ne
irc
Constant Tt-1 Tt-2
vi
in
rc
i
r
-0.000 -0.011 0.025
le
Tt,JNTC
***
pe
ne
Tt,SMH -0.000 -0.057 0.014
irc
vi
***
in
rc
le
pe
ne
irc
Table 3.12 Estimated parameters of individual AR(n), *** significant at 1% level.
vi
in
rc
i
r
le
pe
ne
irc
In Figure 3.6 we display the price process for the two assets in the left panel,
vi
in
rc
and in the right panel the price process for S 1 , which is called the co-integration
r
le
pe
factor. Visual inspection (not included here) suggests a much stronger mean
ne
irc
reverting (auto-regressive component) for S1 than for S2. We verify this by run
vi
in
rc
ning autoregressions on the returns for all four price processes: TrNTC, rsMH, r 51,
i
r
le
pe
and r 52. We can see the results in Table 3.12. For the assets, INTC and SMH,
ne
irc
the coefficient on lagged returns is only significant for the ETF, SMH. After es
vi
in
rc
timating the model and applying the diagonalisation on K,, the return on one of
r
le
pe
ne
rc
i
additional significant coefficient on the returns two periods prior).
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
Hasbrouck (1991), Ait-Sahalia, Mykland & Zhang (2005), Bandi & Russell (2008),
in
rc
i
r
Barndorff-Nielsen & Shephard (2004), Engle (2000), Hansen & Lunde (2006),
le
pe
ne
irc
Mykland & Zhang (2012), Cartea & Karyampas (2012), Corsi & Reno (2012),
vi
le
& Shephard (2006b), Barndorff-Nielsen & Shephard (2004), Corsi (2009), Corsi,
pe
ne
irc
Pirino & Reno (2010), Ait-Sahalia et al. (2005), Cartea & Karyampas (2014),
vi
in
Hasbrouck (1995), Hasbrouck (1993), Bauwens & Hautsch (2006), Bauwens &
rc
i
r
le
Hautsch (2009), Cameron & Trivedi (2005), Ding, Hanna & Hendershott (2014).
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
pe
4 Em pirica I and Statistica I Evidence:
ne
irc
vi
in
rc
Acti ity and Market Quality
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
'seasonal' patterns observed in the data, both in volume as well as in prices. Sec
in
rc
tion 4.3 turns to market quality. These are variables that affect trade execution,
i
r
le
pe
ne
such as spreads, volatility, depth, and price impact. Section 4.4 looks at message
irc
vi
activity and the relationship between cancellations, executions and distance from
in
rc
irc
vi
in
rc
i
r
le
vi
in
rc
So far we have seen that the price level (and the asset's returns) over the course
r
le
pe
of a whole day are difficult to predict and move with market forces. Over short
ne
irc
horizons, these prices have fat tails, are subject to rapid changes (where the
vi
in
rc
speed of change in price levels depends on the frequency with which the asset is
i
r
le
pe
traded), these changes tend to cluster in time, and are more likely than not to
ne
irc
le
pe
ne
shares or the value of shares traded) has a different dynamic structure that
irc
vi
has important ramifications for the way we look at market data. Andersen &
in
rc
pe
ne
irc
Since volume and volatility are highly correlated and displ ay strong time series persis
vi
in
rc
tence, any variable correlated with volatility will, inevitably, possess non-trivial fore
r
le
cast power for future volatility. This is true for bid-ask spreads, the quote intensity, the
pe
ne
irc
rc
i
r
This and subsequent sections will consider the empirical aspects of some of
le
pe
ne
irc
As a first step, we look at the relationship between volume and volatility using
in
rc
le
a robust regression for our four main assets (ISNS, FARO, MENT and AAPL)
pe
ne
irc
two models using robust OLS. The left-hand side variable is the log of the number
in
rc
of shares traded on each trading day of 2013, log(l + Qt) (remember that we
i
le
ne
irc
in
rc
p
vi
r
62 Empirical and Statistical Evidence: Activity and Market Quality
le
pe
irc
vi
rc
le
pe
ne
must add 1 to Qt as for some assets, ISNS in particular, there are trading days
irc
vi
with no trading and zero volume).
in
rc
i
The variables on the right-hand side are the variables we used in the model
r
le
pe
ne
for intraday returns. In particular, the first model (Ml) includes a constant, the
irc
vi
lagged values of the left-hand side variable (lagged volume), intraday returns on
in
rc
r
the VIX and the SPY, the contemporaneous intraday return of the asset, and
le
pe
ne
irc
OF which is the day's net order flow, on NASDAQ, defined as the volume of buy
vi
rc
i
r
le
pe
ne
irc
log(l + Qt,j) =a+ /31,j log(l + Qt-1,j) + /32,j SPYt + /33,j VIXt
vi
in
rc
le
pe
ne
irc
while Model 2 (M2) is
vi
in
rc
log(l + Qt,j)
i
r
le
pe
ne
irc
=a+ /31,1 log(l + Qt-1,1) + /3 2 ,1 SPYt + /33,j VIXt + /34,j rt,1 + /35,j OFt
vi
in
le
pe
ne
irc
In addition to the variables appearing in Ml, M2 also includes
vi
in
rc
• (SPYt)2: the squared value of the intraday return on the SPY ETF, as a proxy
i
r
le
• (VIXt)2 : the squared value of the intraday 'return' on the VIX, as a proxy for
vi
in
rc
le
pe
ne
sentiment,
irc
• HLt (HL-volat): the asset's price range (max Pt - min Pt ) during the day, as
vi
in
rc
i
a measure of the day's price volatility, and
r
le
•
pe
ne
vi
intraday volatility)
in
rc
le
pe
ne
irc
vi
rc
i
Variables Ml M2 Ml M2 Ml M2 Ml M2
r
le
pe
ne
irc
-0.21
r
Tt
in
rc
Order Flow 0.02 0.04 0.00 -0.00 -0.01 -0.00 -0.00 0.00
i
r
le
pe
r;
le
rc
ne
irc
in
rc
p
vi
r
le
4.2 lntraday Activity 63
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
Figure 4.1 Intraday volume for AAPL on
vi
July 30, 2013 at three different scales.
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
12:00 14:00
ne
irc
Time of Day
1ro
vi
in
rc
le
ro
pe
ne
irc
f,'.:1 4000 f,'.:1 400
vi
Cl) Cl)
in
rc
Ill Ill
� 3000 � 300
i
r
le
..c:1 ..c:1
pe
'c:
er:,
ne
er:,
irc
vi
in
rc
Ill
] 1000 100
r
le
pe
o��������"-'-'<o-u-��
ne
z z
irc
;:J ;:J
13:10 13:20 13:30 :00 :15 :30 :45 :00
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
The results in Table 4.1 display no evidence of significant effects from market
r
le
variables (VIX e>r SPY) nor from order flow on volume. We also find no effect of
pe
ne
irc
the day's intraday return - FARO has a positive and significant effect in Ml, but
vi
in
rc
i
r
le
pe
and significant coefficient on last period's volume (Ml and M2 for all assets), and
r
le
pe
irc
(in M2, all assets). Volatility, as measured by the square of the intraday return,
vi
in
rc
pe
ne
irc
vi
in
rc
le
pe
irc
vi
in
rc
i
r
le
There are other well-known empirical patterns of intraday volume. F igure 4.1
pe
ne
irc
shows the volume (number of shares traded in NASDAQ) at three different time
vi
in
scales over the course of a single trading day for AAPL. The top panel shows
rc
le
the results over the whole day when volume is aggregated in one-minute buckets
pe
ne
irc
(although the volumes for the first and last couple of minutes are off the scale).
vi
in
A striking characteristic for this day are the peaks at the beginning of the day
rc
i
le
and at the end of the day. There is a third peak around noon but (as we see
ne
irc
in
rc
p
vi
64 Empirical and Statistical Evidence: Activity and Market Quality
r
le
pe
irc
vi
rc
le
pe
ne
later) it represents a pattern that is specific to this trading day and is not a
irc
vi
generic feature observed when trading in this asset.
in
in
rc
r
le
A second striking feature is the large variability in volume. Computing the
pe
ne
irc
vi
in
ation of 7,014, and quantiles Ql: 3,299, median: 5,349 and Q3: 8,039. The third
rc
le
and fourth moments give us a measure of skewness of 6.14 and kurtosis 60.83.
pe
ne
irc
All these confirm the impression that intraday volume has very large peaks of
vi
in
in
rc
trading.
r
le
pe
The peaks in volume observable at certain minutes, form a pattern that is
ne
irc
repeated as one zooms into smaller time intervals. The bottom two pictures in
vi
in
rc
Figure 4.1 look at the pattern of volume during a 30-minute and a one-minute
r
le
pe
ne
window in the middle of the day. The left panel compares volume aggregated in
irc
ten-second buckets with their one-minute average (the thick line). We see sub
vi
in
in
rc
stantial variation with large peaks of trading mixed in with periods of relative
r
le
pe
ne
calm. Zooming in further, the pattern in the right panel is even more striking.
irc
vi
For a single minute of the day, the grey columns identify volume aggregated to
in
rc
one second, while the large dots represent volume aggregated at 20 ms (which
r
le
pe
ne
domly distributed over the minute, and it is not obvious whether the clustering
in
in
rc
r
of changes in prices we saw earlier (in subsection 3.3) is also taking place at this
le
pe
ne
irc
le
The market designers and regulators differentiate between 'odd', 'even', 'mixed'
pe
ne
irc
and 'round' lots. A round lot is a message or transaction involving units of even
vi
in
in
rc
lots (an even lot is 100 shares). Odd lots are trades smaller than an even lot, and
r
le
can be more expensive to trade (in terms of fees/commissions), while mixed lots
pe
ne
irc
are transactions which include both round and odd lots. Odd lots are sometimes
vi
in
rc
aggregated and even not displayed on the consolidated tape (the public ticker
r
le
pe
that includes 'all' transactions from all exchanges). Also, trading in odd lots is
ne
irc
subject to special rules which are in the process of being changed and reviewed
vi
in
in
rc
(see for example SEC Release No. 34-71057 SEC (2013b), on the reporting of
r
le
pe
vi
There are many algorithms which are based on or linked to volume. For ex
in
rc
ample, some execution algorithms (see Chapters 6, 7 and 8) may require that
r
le
pe
ne
MOs sent to the exchange do not exceed a percentage of what other market
irc
vi
participants are trading at that point in time. In the same vein, some algorithms
in
in
rc
are designed to trade in a given direction, buy or sell the asset, whilst targeting
le
pe
ne
irc
le
execution cost benchmarks. One of the most important of these is VWAP, which
pe
ne
irc
in
that target POV and VWAP where we also expand on the discussion of intraday
rc
le
in
rc
p
vi
r
le
4.2 lntraday Activity 65
pe
irc
vi
rc
le
pe
ne
irc
AAPL AAPL
13---------� 0.12
vi
in
in
rc
�12 0.1
r
le
pe
ne
S;j 11
irc
vi
in
] 10
rc
+
r
le
.::::::'., 9 ..__.,g
pe
ne
irc
b.() b.()
in
rc
7 7
r
le
pe
ne
irc
Time Time
vi
in
MENT MENT
rc
12------------, 0.07 12
r
le
pe
0.06
ne
irc
0.05 a>
s 10
vi
in
in
rc
;j
r
le
pe
+
ne
irc
..__.,
rl
vi
in
rc
b.()
0.01 ..9
r
le
pe
ne
4
irc
10:00 12:00 14:00 16:00 12:00 14:00 16:00
vi
in
in
Time Time
rc
r
le
pe
ne
irc
le
pe
ne
in
rc
To gain insight into the intraday volume patterns, in Figure 4.2 we show heat
r
le
pe
ne
maps (left panels) of daily volume for the year 2013 for AAPL and MENT.
irc
The heat-maps are generated by first bucketing traded volume into five-minute
vi
in
rc
windows throughout the day, for every day of the year. Then, for each five-minute
r
le
pe
ne
of the collection of these distributions for each five-minute bucket all at once. In
in
in
rc
the figures we use coloured lines to represent the first and third quartiles, as well
r
le
pe
ne
as the median.
irc
vi
We see that volume for AAPL is very large at the beginning of the day, and
in
rc
le
it gradually slows down until around 14:00, at which time there is a small surge
pe
ne
irc
in activity. The 14:00 surge slowly builds up and accelerates during the last half
vi
in
in
r
le
A reasonable hypothesis for the 14:00 surge is that at that time there are more
pe
ne
irc
le
that time of the day. Earlier we saw this figure for the day of July 30th. There
pe
ne
irc
we saw the usual peaks at the beginning and end of the day as well as a peak
vi
in
in
of trading volume around noon, which we can now show that is atypical for this
rc
le
asset.
ne
irc
in
rc
p
vi
r
le
66 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
To explain the peaks at the beginning and the end of the day, we need to
vi
hypothesise about the factors that drive volume. A common hypothesis in the
in
rc
i
r
le
literature, which is also made here, is that new information generates greater
pe
ne
irc
volume. In addition to the 14:00 surge, this would also explain why there is such
vi
in
a large volume at and just after the opening, as overnight news is gradually
rc
le
incorporated into prices during that time. But, this hypothesis does not explain
pe
ne
irc
the magnitude of the increase in volume at the end of the day, as there is not
vi
in
rc
i
r
le
7 we will see another possible explanation for this peak in trading at the end of
pe
ne
irc
the day: traders who have not been able to meet their liquidation targets will
vi
in
accelerate trade execution as the market approaches its time to close. A second,
rc
le
not unrelated, possible explanation is that traders may prefer to postpone non
pe
ne
irc
urgent executions towards the end of the day when execution costs are lower (See
vi
in
rc
for instance Section 4.3.5 where we discuss price impact, in particular Figure 4.11
i
r
le
where we show that the impact of orders (walking the LOB) is lower at the end of
pe
ne
irc
the trading day for INTC, and in Chapter 6 we show similar behaviour for SMH,
vi
in
rc
see Figure 6.1). Finally, strategies that target volume (such as the ones developed
r
le
pe
irc
this period.
vi
in
rc
i
r
le
The right panels of Figure 4.2 expand our analysis a bit further. They show a
pe
ne
irc
functional data analysis (FDA) approach to viewing the data. In these graphs for
vi
in
every trading day we regress the realised five-minute volume against Legendre
rc
le
polynomials and plot the resulting curve as a thin line in the figure. This gen
pe
ne
irc
erates a smooth volume curve for each day of the year. We then plot the mean
vi
in
of these curves (the solid blue line) which represents the expected (or average)
rc
i
r
le
trading volume throughout the day for the corresponding ticker. The conclusions
pe
ne
irc
that we drew about the behaviour of volume but we obtain additional insights.
vi
in
rc
In the right panels we observe four large outliers for AAPL - four curves that
r
le
pe
ne
disappear off the bottom of the scale. These represent four special days for 2013.
irc
vi
Three of these four were predictable while the other was not. The predictable
in
rc
i
three correspond to July 3 (Independence day), November 29 (Thanksgiving),
r
le
pe
ne
and December 24 (Christmas) when NASDAQ closed early (13:00) for the hol
irc
vi
idays. These days are excluded from the calculations for MENT. The fourth
in
rc
outlier corresponds to August 22, 2013. On this day NASDAQ suffered major
le
pe
ne
irc
problems that led to a market shutdown for about three hours. So, in addition to
vi
identifying regularities in intraday trading patterns, the FDA curves have helped
in
rc
i
r
le
us identify outliers in the data. Outliers are very important when using historical
pe
ne
irc
data for analysis, backtesting, and designing algorithms. Quite often, an outlier
vi
in
le
irc
it is crucial to keep track of these outliers and account for them in the design
vi
in
i
le
volume, AAPL's mean daily volume function drawn in the right panels is lower
ne
irc
in
rc
p
vi
r
le
4.2 lntraday Activity 67
pe
irc
vi
rc
le
pe
ne
irc
5
vi
in
in
rc
r
le
pe
�4
ne
irc
vi
in
3
rc
le
second.
pe
ne
irc
vi
in
in
rc
1�--�--�--�-�
r
le
pe
250 500 750 999
ne
irc
ms
vi
in
rc
le
pe
ne
than it would have been if we had not included those four particular dates in the
irc
vi
estimation.
in
in
rc
In order to contrast the intraday behaviour of AAPL with that of a less fre
r
le
pe
ne
quently traded asset, Figure 4.2 displays the same analysis for MENT. We ob
irc
vi
serve that the daily peaks at the beginning and the end of the day are also there,
in
rc
though slightly modified, and distorted by the discreteness of trading lots. For
le
pe
ne
irc
MENT, the initial burst of trading is not as frequent as with AAPL. As we can
vi
discern from the pictures on the right, there are a substantial number of days for
in
in
rc
r
le
which trading starts unusually slowly. These slow days balance out the bursts
pe
ne
irc
of trading from other days, so that on average volume in early trading does not
vi
in
seem to differ substantially from that during the rest of the day. It is at the end
rc
le
irc
We have omitted ISNS and FARO from this analysis, as the frequency of
vi
in
in
trading for those assets is even lower than for MENT, and thus there are many
rc
r
le
although there is a lot more noise in the estimation, and a much larger number
vi
in
le
pe
ne
irc
vi
in
rc
r
le
pe
When working at time intervals much finer than a second, a natural question
ne
irc
to ask is whether we observe time patterns at such small intervals, like the
vi
in
rc
ones we found over the duration of the day. Focusing only on AAPL we look
r
le
pe
ne
at the millisecond trading pattern, that is, for each transaction we look at the
irc
in
rc
of transactions at each millisecond for each day in 2013 (AAPL), as well as the
r
le
pe
ne
quartiles (Ql, median and Q3) for the daily means for each millisecond (the
irc
We see that there is hardly a persistent pattern at the millisecond level, al
r
le
pe
ne
in
rc
1 To improve the visual presentation the 10 highest realisations in the year have been
le
in
rc
p
vi
r
le
68 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
r
le
0.8
pe
ne
irc
vi
-ms:4
in
Q function of transaction count for specific
rc
-ms:5
0 0.4
r
le
-ms:6 milliseconds.
pe
ne
irc
-ms:104
0.2 -ms: 105
vi
in
-ms: 106
rc
0 .__.--=--�---�--�-
i
r
le
pe
0 20 40 60
ne
irc
Number of Trades
vi
in
rc
le
pe
ne
valley that ends around the 100 ms point. To explore this in more detail, in Fig
irc
vi
ure 4.4 we identify the empirical cumulative distribution function of the number
in
rc
i
of transactions ending at six different milliseconds: three early ones (at 4, 5, and
r
le
pe
ne
6 milliseconds), and three later ones (at 104, 105, and 106 ms). From the figure
irc
vi
we can see that the early milliseconds stochastically dominate the other three.
in
rc
(The choice of 104-106 is arbitrary and the same pattern is observed if we choose
le
pe
ne
rc
i
r
le
are recorded just after the exact beginning of a second. A plausible explanation
vi
in
is that there may be an unusual number of transactions that are entered (auto
rc
le
irc
rc
i
r
le
pe
vi
in
rc
It is quite standard to look at volume patterns, but not price patterns. In this
r
le
pe
section we ask whether executions at prices that end in multiples of 5 cents (round
ne
irc
values) are different from those that do not. There is no strong fundamental
vi
in
rc
reason why the price of an asset, which in theory represents a fraction of the
i
r
le
pe
income for shareholders generated by a firm, should have a round value, such as
ne
irc
le
the price, we find the pattern displayed in Figure 4.5.2 The figure also shows the
pe
ne
irc
rc
The patterns are quite evident. There is a very large accumulation of transac
i
r
le
pe
ne
tions whose prices end in exact dollar-valued prices, a large number of transac
irc
vi
tions with prices that end in 50 cents, and spikes of larger than usual numbers
in
rc
of transactions at prices that end in units of 10 cents, and even 5 cents (these
r
le
pe
ne
2 To improve the visual presentation the 10 highest realisations in the year have been
rc
i
le
removed from the picture and the quartile estimation (10 out of 98,280).
ne
irc
in
rc
p
vi
r
le
4.3 Trading and Market Quality 69
pe
irc
vi
rc
le
pe
ne
Trade by cents in Price (AAPL)
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
Figure 4.5
rc
le
executions by number of cents in the price.
pe
ne
irc
vi
in
rc
i
r
le
10 20 30 40 50 60 70 80 90
pe
ne
irc
Cents in price
vi
in
rc
le
pe
ne
irc
vi
that for some reason (rational or not) there is a preference for providing liquidity
in
rc
i
r
at prices that end in round cent values. We use the term 'preference for providing
le
pe
ne
irc
vi
filling a standing posted LO, so it is liquidity providers who decide to accept a
in
rc
le
larger number of executions at a particular price level.
pe
ne
irc
Why would agents provide liquidity in this way? We can hypothesise that there
vi
in
i
r
le
MOs at round prices. These could be latent, having been programmed by agents
pe
ne
irc
who decide to enter/exit when the price moves beyond a certain barrier, which
vi
in
le
is consistent with chartist ideas such as 'price supports' and 'price ceilings'. If
pe
ne
irc
i
r
le
then happily provided by agents who do not have such psychological inclinations
pe
ne
irc
and expect the unusual demand for liquidity at these prices to be unjustified by
vi
in
rc
le
pe
ne
irc
vi
in
rc
pe
ne
irc
vi
Financial markets play a key role in helping a market economy to allocate re
in
rc
le
sources over time and uncertainty. Financial markets provide a forum for firms
pe
ne
irc
progress of the economy. In this context, the stock market provides a forum
in
rc
i
r
le
where equity holders can convert their equity into cash (and vice versa) quickly
pe
ne
irc
ing the market's effectiveness in this role under the generic heading of 'market
rc
le
quality'.
pe
ne
irc
that new information increases trading volume, and that an increased desire to
rc
i
le
trade (e.g. due to increased trader urgency) interacts with the quality of the mar-
ne
irc
in
rc
p
vi
r
le
70 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
ket which feeds back to motivate further trading. Market quality enters directly
irc
vi
into the second argument: an expected increase in volume generates expecta
in
rc
i
r
tions of better market quality, that is of improved effectiveness of the market
le
pe
ne
in facilitating trade via lower execution costs (spreads), greater price efficiency
irc
vi
(less mean-reversion in price levels or lower transitory volatility), etc., which in
in
rc
le
duces greater volume. In the first argument, market quality enters indirectly, as
pe
ne
irc
it modulates the relationship between the exogenous forces of new information
vi
in
and traders' desire to execute trades. Either way, if the quality of the market
rc
i
r
le
pe
ne
irc
vi
in
rc
market in facilitating trade? Naturally, the direct cost of trading matters: how
r
le
pe
ne
much does one pay for shares one wishes to buy; what is the price one pays
irc
relative to one's opinion of its market value; how much does one value the infor
vi
in
rc
i
mation obtained from the market, and how easy is it to complete a transaction?
r
le
pe
ne
Think of a medieval cattle market. Suppose one lives on a farm which is equidis
irc
vi
tant from two towns that hold their weekly cattle market on the same day of the
in
rc
month. How does one choose between them? One will probably go to the market
r
le
pe
ne
that is most likely to offer the best price, and which can be obtained after an
irc
vi
easy sale process, and with the best guarantees that the transaction is finalised
in
rc
i
and one can walk away with the money. In a financial market, where agents are
r
le
pe
ne
buying and selling, these dimensions along which to evaluate the quality of a
irc
vi
market are: having sufficient information to identify the true market value of the
in
rc
asset, being able to buy (or sell) any quantity at prices sufficiently close to the
le
pe
ne
irc
asset's value, and having the confidence that the deals are honoured. Of course,
vi
in
one may have qualms about the existence of such a thing as 'the true market
rc
i
r
le
price' of an asset, but regardless, it is a useful concept to work with and is the
pe
ne
irc
basis of much of the literature. If one does not believe there is or can ever be
vi
in
such a thing as the true market price, the concept is still useful as a theorectical
rc
le
construct in the study of market microstructure, in the same way as the concept
pe
ne
irc
rc
From our short list of dimensions of market quality, the last one (honouring of
i
r
le
pe
ne
deals) is usually taken for granted, although when prices suffer large fluctuations
irc
they occur at 'ridiculous' prices). The other two issues are captured by measures
r
le
pe
ne
rc
immediate cost of executing a trade aggressively; price impact measures the cost
r
le
pe
ne
of executing larger trades via their impact of trading on prices; volatility mea
irc
vi
sures the effectiveness of the price in transmitting information about the market
in
rc
value of an asset; resilience is related to market impact and measures the mar
le
pe
ne
irc
ket's ability to return to equilibrium after a trade; depth measures the amount
vi
of visible liquidity in the market, and PIN measures the degree of information
in
rc
i
le
asymmetry in the market and hence, like volatility, the ability of the market
ne
irc
in
rc
p
vi
4.3 Trading and Market Quality 71
r
le
pe
irc
vi
rc
le
pe
ne
to transmit information about the market value of an asset. We now look at
irc
vi
spreads, volatility, depth and price impact.
in
in
rc
r
le
pe
ne
irc
4.3.1 Spreads
vi
in
rc
r
Spreads measure the execution costs of small transactions by measuring how
le
pe
ne
irc
close the price of a trade is to the market price. The first problem, naturally, is
vi
to determine what is the 'true market price'. The simplest, and most common
in
in
rc
r
le
pe
ne
irc
( 4.1)
vi
in
rc
le
pe
the simple average of the bid (bt ) and the ask (a t ) price. This reference is based
ne
irc
on the economic concept that the market price is the equilibrium price, the price
vi
in
in
rc
at which demand equals supply, and in a market with frictions that generate a
r
le
pe
gap between the best buy price (the ask) and the best sell price (the bid), the
ne
irc
equilibrium should lie somewhere in between. The midprice is the simplest way
vi
in
rc
to estimate this market price, although, as we saw in Chapter 2, the spread may
r
le
pe
ne
arise for different reasons (compensation for inventory risk, or adverse selection
irc
vi
from trading against more informed traders) and in some cases the 'true price'
in
in
rc
pe
ne
We saw an alternative estimate of the market price earlier as well, the micro
irc
vi
price defined in (3.3). This seems more meaningful economically (and to develop
in
rc
le
pe
ne
buy at the bid and ask (respectively) to weigh the bid and ask prices, and which
irc
vi
may better reflect some of the microstructure issues described above. There are
in
in
rc
other, more sophisticated models that try to estimate the equilibrium price, e.g.
le
pe
ne
irc
component (the permanent being the equilibrium price), but we do not treat
in
rc
le
them here.
pe
ne
irc
The two most common spread measures are the quoted and the effective
vi
in
in
spread, both of which use the midprice as the market price. The quoted spread,
rc
r
le
QS, is the difference between the ask and the bid prices,
pe
ne
irc
QSt = a t - bt ,
vi
in
rc
le
and represents the potential cost of immediacy: the difference in price between
pe
ne
irc
in
'crossing the spread') at any point in time. It also reflects distance from the
rc
r
le
market price, if one takes the midprice as reference. The direct trading cost of a
pe
ne
irc
market sell order would be St - b t = QStf 2, while that of a market buy order
vi
in
rc
le
pe
irc
between the price paid and the midprice, which for a market buy order is
vi
in
in
rc
le
ne
irc
in
rc
p
vi
72 Empirical and Statistical Evidence: Activity and Market Quality
r
le
pe
irc
vi
rc
le
pe
while for a market sell order it is
ne
irc
vi
in
rc
i
r
le
pe
For an MO executed in full on an exchange against a visible LO, the effective
ne
irc
spread is equal to the quoted halfspread (if it does not walk the LOB). Sometimes
vi
in
rc
le
pe
ne
hidden order inside the spread - it could even be negative, if the hidden order
irc
vi
was aggressively posted. ewe saw hidden orders in the context of different order
in
rc
i
types in subsection 1.3.4 and we will discuss this further in subsection 4.5 - a
r
le
pe
ne
hidden order is an LO that is posted in the LOB but is not visible to market
irc
vi
participants.) A negative effective spread reflects that one is buying at a price
in
rc
below or selling at a price above the 'market price' (represented by the midprice).
r
le
pe
ne
In empirical analysis, these spreads are usually normalised and expressed in bps
irc
vi
rc
i
r
In Table 4.2 we look at the quoted spread for our four assets during 2013
le
pe
ne
irc
(ordered from least to most traded). For each asset we compute the time-weighted
vi
average quoted spread, tQS, for each minute of the day. This is calculated as
in
rc
le
follows: for each minute of the day, t = 1 : 390, while the market is open (from
pe
ne
irc
9:30-16:00),
vi
in
rc
n-1
i
r
le
i=l
vi
in
rc
where i E {l, ...,n} indexes the time (in minutes) at which the quoted spread
r
le
changes during minute t, Ti· Table 4.2 describes the statistics for the minutes of
pe
ne
irc
rc
i
r
le
pe
ne
irc
le
irc
i
r
le
pe
ne
irc
le
pe
The descriptive statistics of the resulting sample are provided in Table 4.2.
ne
irc
The first thing to note is that the data on the table suggest that more frequently
vi
in
rc
traded assets trade at lower spreads. This positive relationship between volume
i
r
le
pe
and market quality can work both ways: volume attracts liquidity and improves
ne
irc
market quality, or higher market quality facilitates trade and generates greater
vi
in
rc
volume.
r
le
pe
irc
discussion on tick size earlier, the large spread for AAPL is an illusion as we
vi
in
rc
have not adjusted for the relative tick size. The average midprices (at the end
i
le
ne
irc
in
rc
p
vi
4.3 Trading and Market Quality
r
le
73
pe
irc
vi
rc
le
pe
ne
of each minute) for our assets are: ISNS $5.25, FARO $40.62, MENT $19.93,
irc
vi
and AAPL $473.00. This implies that the median quoted spreads are: for ISNS
in
in
rc
r
419bps, FARO 29.5bps, MENT 5.5bps and AAPL 2.9bps. By evaluating spreads
le
pe
ne
irc
relative to the midprice we recover the expected relationship between quoted
vi
spreads and volume.
in
rc
le
pe
Also from Table 4.2 we can compute the interquartile range (as a percentage of
ne
irc
the median). From these calculations we find that more frequently traded assets
vi
in
in
rc
tend to have less volatile quoted spreads (the numbers arc: 1.32bps for ISNS,
r
le
pe
0.64bps for FARO, 0.91bps for MENT, and 0.42bps for AAPL).
ne
irc
vi
in
The MENT example illustrates another aspect of the importance of tick sizes
rc
le
which is of great interest, especially to regulators. In the US (for assets with
pe
ne
irc
prices greater than one dollar), the minimum tick size is legally fixed at one
vi
in
in
cent there are ways to trade in fractions of a cent but the one cent minimum
rc
r
le
is binding in most cases. Imposing a minimum tick size of one cent may affect
pe
ne
irc
trading for some assets, such as MENT. From Table 4.2 we can see that for
vi
in
almost 50 percent of all minutes, the one cent minimum is constraining MENT's
rc
le
quoted spread at that level (one cent). This translates to a possibly significantly
pe
ne
irc
large relative minimum quoted spread (around 5bps for MENT) and may be
vi
in
in
rc
r
le
pe
ne
A final comment on Table 4.2: the numbers in this table are contaminated
irc
vi
by an event we mentioned earlier, in subsection 4.2.1, namely that the data is
in
rc
le
not corrected for trading stops, and in particular for the trading halt during
pe
ne
irc
August 22nd. We do not include the corrected table as they are not significantly
vi
different and so it is not necessary, but only because our data set includes all
in
in
rc
r
le
the minutes in 2013, almost 100,000 observations per asset, so the overall effect
pe
ne
irc
opportunity to point out the importance of knowing the details of your dataset.
rc
le
In the ITCH dataset, all messages are recorded and timestamped, even when the
pe
ne
irc
in
22nd the NASDAQ halted trading for three hours. During that time, messages
rc
r
le
kept coming into the exchange and were time-stamped. In particular, many or
pe
ne
irc
ders were cancelled and the 'ask' and 'bid' moved dramatically. As trading was
vi
in
suspended, these fluctuations led to huge and also negative art�ficial spreads, and
rc
le
they contaminate the data in Table 4.2 (primarily the mean and standard devi
pe
ne
irc
ation, although the effect is small). If we wanted to use our analysis for trading
vi
in
in
rc
pe
vi
that are comparable to those in Table 4.2 we doubled the effective spreads and
le
pe
ne
irc
included them in Table 4.3. Again we have constructed one-minute buckets, and
vi
for each, we have computed the quantity-weighted effective spreads, qES, for our
in
in
rc
le
four assets:
ne
irc
in
rc
p
vi
74 Empirical and Statistical Evidence: Activity and Market Quality
r
le
pe
irc
vi
rc
le
pe
ne
irc
Asset Mean StdDev POI Ql Median Q3 P99
vi
in
rc
ISNS 12.56 45.00 -42.00 3.50 9.23 19.00 65.00
i
r
le
pe
FARO 7.63 8.61 -10.00 3.33 6.50 10.76 32.84
ne
irc
vi
in
AAPL 9.32 3.85 2.67 6.61 8.83 11.47 20.20
rc
le
pe
ne
irc
Table 4.3 Quantity-weighted Effective spread (in cents).
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
where j E {1, ..., m} indexes the trades that took place during minute t, qj
in
rc
i
r
le
denotes the number of shares in trade j, and ESj is the effective spread for trade
pe
ne
irc
j.
vi
in
rc
Effective spreads differ from quoted spreads in several ways. Earlier we saw
r
le
that the effective spread is equal to the quoted halfspread when a trade executes
pe
ne
irc
against a visible LO and does not walk the LOB. In our dataset, trades are
vi
in
rc
recorded via the execution of the posted LO, so we do not have information on the
i
r
le
pe
MO that was sent to the market. This implies that none of our executions walk
ne
irc
the LOB. This biases our measure of the ES downwards, but the bias is small,
vi
in
rc
as we see very few executions of LOs away from the bid/ask during previous
r
le
pe
irc
as the remaining quantity may need rerouting in search of best execution in all
vi
in
rc
markets). Another reason why this bias is small, is that in the fragmented US
i
r
le
pe
market, when an MO comes into a market and it is greater than the depth at
ne
irc
the bid/ask, the part that is not executed is usually routed to other markets,
vi
in
rc
and only under very special circumstances will it literally walk the LOB. Note,
r
le
pe
irc
rc
pe
ne
Thus, our measured ES has to be equal to or lower than the (current) quoted
irc
spread. A visible trade will generate ES = QS/2. As not all posted LOs are
vi
in
rc
visible, some trades will be executed at prices better than the bid/ask. This will
r
le
pe
ne
generate an ES that is strictly smaller than the QS, and may even produce a
irc
negative ES. One obtains a negative effective spread if an incoming market buy
vi
in
rc
(sell) order meets a hidden sell (buy) order that is below (above) the midprice.
r
le
pe
ne
That this occurs is evident by looking at the first percertile of the empirical
irc
vi
There is another difference between ES and QS, namely that ES can only be
le
pe
ne
irc
measured when there is a trade, while quoted spreads are always observable.
vi
Therefore, it may be possible that quoted spreads differ from effective spreads if
in
rc
i
le
market conditions around trades are systematically different from those without
ne
irc
in
rc
p
vi
r
le
4.3 Trading and Market Quality 75
pe
irc
vi
rc
le
pe
AAPL
ne
irc
vi
in
rc
�
i
r
le
Cl)
pe
ne
irc
�20,
vi
Figure 4.6
in
lntraday spread pattern:
rc
le
interquartile range for one-minute returns.
pe
ts..
ne
10
irc
vi
in
rc
0 '---'---�---�--�
i
r
le
pe
10:00 12:00 14:00 16:00
ne
irc
Time of Day
vi
in
rc
le
pe
ne
irc
vi
trades. Looking at the interquartile range and the standard deviations of ES and
in
rc
i
r
le
QS in Tables 4.2 and 4.3 we find that ES is less volatile than QS. This would
pe
ne
irc
vi
spreads, something we explore in more detail in subsection 4.4.
in
rc
le
We have seen that assets with greater trading frequency have better market
pe
ne
irc
quality in the sense that execution costs for small trades (the quoted spread)
vi
in
i
r
le
that lower execution costs occur when trading is high (as anticipated by the
pe
ne
irc
formed traders stays constant and the number of uninformed traders increases,
r
le
pe
the spread shrinks). In Figure 4.6 we plot the one-minute time-averaged quoted
ne
irc
spreads for AAPL in 2013, as well as the first quartile, median and third quartile.
vi
in
rc
As the figure shows, quoted spreads are initially high, decline rapidly during the
i
r
le
pe
first half-hour of trading, and are mostly constant throughout the remainder of
ne
irc
the day until the last (half) hour of trading, when the spread rapidly declines.
vi
in
rc
This pattern in quoted spreads is also seen in the effective spread. Recall that
r
le
pe
in Figure 4.2 we saw that the afternoon is associated with increased trading,
ne
irc
and hence we find, as hypothesised, that during a period with a constant flow of
vi
in
rc
pe
ne
This connection between trading volume and spreads fails during the morning
irc
vi
with declining spreads. This can be explained by appealing to the other fac
le
pe
ne
tor affecting volume which we discussed earlier, namely information. W hen the
irc
vi
market opens, and during the subsequent hour of trading, the market absorbs
in
rc
i
r
le
all the information that has accumulated since the last market close. This would
pe
ne
irc
explain the heavier trading. But a lot of new information is also associated with
vi
le
irc
the market making algorithms developed in Chapter 10, see for example Section
vi
10.3, we show that greater price uncertainty increases the depths of the quotes
in
rc
i
le
that a risk-averse market makers sends to the LOB. Thus, more information at
ne
irc
in
rc
p
vi
76 Empirical and Statistical Evidence: Activity and Market Quality
r
le
pe
irc
vi
rc
le
pe
ne
the beginning of the day explains the coincidence of wider spreads with greater
irc
vi
volume.
in
rc
i
r
le
pe
ne
irc
vi
in
4.3.2 Volatility
rc
le
pe
ne
vVe now consider another dimension of market quality, namely volatility. Volatil
irc
vi
ity measures price fluctuations and represents a cost (i.e. low market quality) in
in
rc
i
the sense that a rapidly changing price makes it difficult to determine the actual
r
le
pe
ne
market price of the asset. Of course, one may observe price changes because the
irc
vi
true market value of the asset is changing, and hence the literature differentiates
in
rc
between fundamental volatility and microstructure noise. The first captures the
le
pe
ne
irc
fluctuations in the true market price, while microstructure noise represents ex
vi
traneous fluctuations due to the way the market operates. There is a large (and
in
rc
i
r
le
pe
ne
irc
vi
in
microstructure volatility.
rc
le
For simplicity we use the term volatility to refer to raw volatility, and we
pe
ne
irc
measure the volatility of asset returns, rather than of asset prices. We have seen
vi
in
i
r
le
and volatility in Section 4.1. The simplest such measure is the realised volatility:
pe
ne
irc
using the square (or the absolute value) of the return � this is useful if you have
rc
le
very few observations and you are working in a sufficiently small time scale so
pe
ne
irc
that the mean return can be safely assumed to be (essentially) equal to zero.
vi
in
rc
Another common alternative is to use the range of the return (or price): e.g. by
i
r
le
taking the difference between the maximum (max) and minimum (min) values of
pe
ne
irc
the price over a certain interval and normalising it by either the minimum value,
vi
in
rc
the mean/median, the initial value, or the average of the min and the max. Here
r
le
pe
we look at realised volatility, the range of returns, and the number of times the
ne
irc
rc
i
r
le
pe
ne
irc
le
pe
irc
i
r
le
pe
ne
irc
le
pe
ne
O"t,
the standard deviation of one-minute returns over fifteen minute periods (for
in
rc
i
le
every day in 2013), that is, for every 15-minute period (each 15-minute period
ne
irc
in
rc
p
vi
r
le
4.3 Trading and Market Quality 77
pe
irc
vi
rc
le
pe
indexed by t) ,
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
where j E {1, ..., 15} is the index for each of the individual minutes within the
rc
le
15 minute period (t), and rj is the realised return for minute j int. What we
pe
ne
irc
observe as we go from AAPL to ISNS in Table 4.4 is that the more frequently
vi
in
in
rc
traded asset also has a higher mean volatility.
r
le
pe
ne
irc
vi
Asset Mean StdDev POl Ql Median Q3 P99
in
rc
le
pe
irc
FARO 3.77 2.33 1. 10 2.50 2.84 4.26 12.05
vi
in
in
MENT 3.00 3.47 0.00 0.00 2.18 5.04 12.84
rc
r
le
pe
ne
irc
vi
in
le
pe
ne
irc
Table 4.5 displays an alternative way to look at the same idea, only now
vi
in
in
rc
r
le
pe
smaller time intervals. In Table 4.5 we include the statistics for the interquartile
ne
irc
range of one-minute returns. That is, for AAPL, 5.28bps is the median of 25 2
vi
in
rc
observations, one for each trading day, of the interquartile range observed for
r
le
pe
irc
in
rc
ences. ISNS displays a zero interquartile range for most days. This is natural,
r
le
pe
as it is an asset that displays very few price movements - the median realised
ne
irc
interquartile range for each day, this sampling method misses the very large
r
le
pe
ne
but relatively rare price movements that are responsible for the high volatility
irc
vi
in
rc
A different effect is responsible for the differences between MENT and FARO.
r
le
pe
ne
Despite MENT having similar trading activity than FARO, it has lower volatility.
irc
vi
MENT has more than 25% of days with an interquartile range equal to zero, but
in
rc
it also has lower realised one-minute volatility. The difference between MENT
le
pe
ne
and FARO has probably much more to do with MENT's relative tick size. As we
irc
vi
saw above when looking at the quoted spread, the one cent tick size is a binding
in
in
rc
r
le
constraint for MENT most of the time. This leads to an unusual degree of price
pe
ne
irc
stickiness, as many small price movements are not sufficient to push the bid or
vi
ask a whole cent ( 5 bps) away from their current levels. Thus, despite having
in
rc
le
irc
in
found that there is a significant tendency (at least for AAPL on July 3 0th, 2013)
rc
le
in
rc
p
vi
78 Empirical and Statistical Evidence: Activity and Market Quality
r
le
pe
irc
vi
rc
le
pe
ne
irc
Asset Mean StdDev POl Ql Median Q3 P99
vi
in
in
rc
ISNS 2 29 0 0 0 0 16
r
le
pe
FARO 11 25 0 0 3 13 100
ne
irc
MENT 6 18 0 0 2 7 75
vi
in
AAPL 150 149 7 64 109 185 709
rc
le
pe
ne
irc
Table 4.6 Number of Changes in the ask or bid.
vi
in
in
rc
r
le
pe
ne
irc
vi
one-minute returns misses many such price movements. To account for all price
in
rc
le
pe
ne
irc
changes in the bid and ask within a one-minute period, and report the statistics
vi
in Table 4.6.
in
in
rc
r
le
We find that the less frequently traded assets (ISNS, FARO and MENT) also
pe
ne
irc
have more stable prices (bid and ask) - at least 25 percent of the time we see no
vi
in
price changes at all. For ISNS this is even more marked, as it happens at least
rc
irc
that price changes occur infrequently but when they do, there are a lot of them.
vi
in
in
For MENT and FARO we see more price movements than for ISNS which is
rc
r
le
consistent with what we found earlier. MENT sees fewer price changes than
pe
ne
irc
FARO even though there is more trading in the former stock, but this is linked
vi
in
le
The statistics in Table 4.6 indicate that AAPL displays almost two orders
pe
ne
irc
of magnitude more price changes than MENT or FARO. However, the realised
vi
in
in
rc
volatility of its return is lower than that of FARO and similar to that of MENT
r
le
pe
(in Table 4.4). We interpret this as reflecting the interaction of small relative
ne
irc
tick size and large frequency of trading. A one cent price change for AAPL (with
vi
in
rc
an average price of around $500 in 2013) is 0.2 bps. An asset with such a small
r
le
pe
relative tick size and with such a large trading activity is bound to have a price
ne
irc
level that is very sensitive (and hence generates many changes in the bid/ ask
vi
in
in
rc
within a minute), but most of the resulting changes will be rapidly reversed (as
r
le
pe
we saw in Tables 3.5 and 3.6), generating relatively low realised volatility (Table
ne
irc
4.4).
vi
in
rc
le
pe
ne
(in terms of the interquartile range of one-minute returns) changes over the
irc
vi
course of one trading day. The figure uses dots to displays the interquartile
in
in
rc
range for each minute of the day, estimated using all trading days in 2013 (390
r
le
pe
ne
observations - one per minute). The lines represent fitted quartic curves. The
irc
vi
blue line is fitted with standard OLS while the red line is fitted using robust
in
rc
OLS, which controls for outliers by reducing the weight of the more extreme
r
le
pe
ne
irc
in
pattern in Figure 4.2, we see a common pattern: high at the beginning of the
ne
irc
in
rc
p
vi
r
le
4.3 Trading and Market Quality 79
pe
irc
vi
rc
le
pe
ne
AAPL
irc
25��--�---------,
vi
in
rc
w'20··
i
r
le
P,
pe
ne
irc
';;' 15
vi
in
bO
� Figure 4.7 lntraday volatility:
rc
c;J 10
r
le
p:; interquartile range for one-minute returns.
pe
ne
irc
5
vi
in
rc
i
r
le
pe
ne
Time of Day
irc
vi
in
rc
le
pe
day, lower as the day progresses until it reaches a plateau between noon and
ne
irc
15:00, followed by an increase until market close. While Figure 4.7 shows a large
vi
in
rc
left-slanted smile for the volatility pattern, Figure 4.2 shows a more symmetric
i
r
le
pe
volume smile and, if anything, slanted to the right. This is consistent with trading
ne
irc
at the beginning of the day being subject to more uncertainty and also being
vi
in
rc
more informationally driven, while trading at the end of the day is driven less
r
le
pe
ne
rc
i
r
le
vi
in
rc
le
irc
rc
i
r
le
pe
le
pe
Table 4.7 Average Depth at the Bid and Ask (number of shares).
ne
irc
vi
in
rc
Market quality is not just about the informational content of prices or the
i
r
le
pe
ne
cost of executing a small order, it is also about depth. By depth, we mean the
irc
vi
volume posted in the LOB and available for immediate execution. In this section
in
rc
we focus mostly on the volume at-the-touch, that is at the bid and ask price
r
le
pe
ne
levels. Mutual and pension funds manage a large fraction of people's wealth and
irc
vi
they need markets to adjust their positions, pay their investors, and evaluate
in
rc
i
r
their performance. These funds move large quantities of shares. In any one day a
le
pe
ne
irc
fund may want to buy or sell thousands, tens of thousands, or even more shares
vi
of any one company. Table 4.7 illustrates how unreasonable it is to think that
in
rc
le
the market will match those trades at the published bid/ask prices. The table
pe
ne
irc
of shares available at the ask and bid on NASDAQ for every day in 2013. This
in
rc
i
le
number does not exceed 1,000 shares in 75% of cases for any one of the four
ne
irc
in
rc
p
vi
r
Empirical and Statistical Evidence: Activity and Market Quality
le
80
pe
irc
vi
rc
le
pe
ne
irc
1500
vi
in
rc
i
(!)
r
le
N
pe
ne
irc
� 1000
vi
in
Figure 4.8 Average monthly trade size,
rc
le
AAPL 2000-2013.
pe
bO
ne
>
irc
-er::
vi
in
rc
i
r
le
pe
ne
irc
Month
vi
in
rc
le
pe
assets (not even AAPL). Recall (see Table 3.1) that in 2013, NASDAQ intraday
ne
irc
trading represents around 22 percent of total volume.
vi
in
rc
Depth and trade size are not independent of one another: the decision of how
i
r
le
pe
ne
much to trade depends on the expected availability of shares resting as LOs for
irc
immediate execution, and similarly, the decision of how much to offer will depend
vi
in
rc
on the expected flow of incoming MOs. If the depth is thin (few orders resting
r
le
pe
ne
in the LOB), MOs will be small - which implies that in thin markets, relatively
irc
vi
urgent large orders that would walk the LOB need to be broken up into smaller
in
rc
i
MOs which are then sequentially executed over a period of time.
r
le
pe
ne
vi
. years have produced a steady decline of the average trade size (the number of
in
rc
shares in a single trade). We can see this for AAPL in Figure 4.8 which displays
le
pe
ne
irc
the monthly average trade size, computed from CRSP data - the dots are the
vi
rc
i
r
le
average). It shows a sharp increase in the early 2000s to a peak of around 1,300
pe
ne
irc
shares per trade, and a steady decline to around 200 shares by the end of 2013.
vi
in
(Nowadays, with the 7:1 split, the numbers should be different, though a similar
rc
le
pattern is observable in most stocks.) Table 4.8 gives the statistics on NASDAQ
pe
ne
trade sizes (total number of shares traded, Q, divided by the number of trades,
irc
vi
in
n) for 2013. As can be seen there, trade sizes in AAPL are smaller than for the
rc
i
r
le
vi
in
rc
le
pe
ne
rc
pe
vi
in
rc
le
pe
ne
irc
vi
in
When developing algorithms that provide liquidity to the market, the depth,
rc
i
le
captured by the shape of the LOB, is critical because this dictates where a trader
ne
irc
in
rc
p
vi
r
4.3 Trading and Market Quality
le
81
pe
irc
vi
rc
le
pe
ne
AAPL
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
quantity of shares posted at the bid and at
rc
le
the ask.
pe
ne
irc
vi
in
rc
i
r
le
pe
10:00 12:00 14:00 16:00
ne
irc
Time of Day
vi
in
rc
le
pe
ne
should post her LOs. We already discussed a simple model of market making
irc
vi
rc
i
the context of optimising market making and optimal execution algorithms. For
r
le
pe
ne
instance, Chapter 8 looks at optimal execution (buying or selling large positions)
irc
vi
when the agent employs LOs and possibly also MOs. In Chapter 10 the shape
in
rc
of the LOB plays a critical role in the optimal posting of liquidity for a market
r
le
pe
ne
irc
maker, and we consider how different assumptions about the shape of the book
vi
rc
i
r
le
To close this discussion we look at the intraday patterns of depth in Figure 4.9. pe
ne
irc
This figure shows the intraday pattern of the average quantity of shares posted
vi
in
at the bid and ask every minute of 2013. As expected, there is the usual sharp
rc
le
increase at the end of the trading day. This is consistent with greater market
pe
ne
irc
quality in the form of narrower spreads (as seen earlier, in Figure 4.6) and the
vi
in
increased desire of traders to close positions at the end of the day. Somewhat,
rc
i
r
le
though only marginally, surprising is that depth is also higher at the beginning
pe
ne
irc
of the day, where we hypothesised that high price uncertainty leads to wider
vi
in
spreads. The figure suggests that the theoretical trade-off between the benefits of
rc
le
market making from increased order arrival and the cost from higher uncertainty
pe
ne
irc
rc
liquidity.
i
r
le
pe
ne
irc
vi
in
le
pe
ne
A main concern for participants that wish to execute a large order is that the
irc
vi
order will have an adverse price impact: increasing the price when buying aggres
in
rc
i
r
sively and lowering it when selling. There are several variables that can be used
le
pe
ne
irc
to measure the price impact of an order. Measuring depth, as we have just done,
vi
in
gives us a measure of price impact, in the sense that the depth at the bid/ ask
rc
le
tells us how large a market order can be with a zero price impact, i.e. without
pe
ne
irc
But, in a single market, a large order would consume all the volume at the
rc
i
le
best quote and work its way through to the next tick and so on until the order
ne
irc
in
rc
p
vi
82 Empirical and Statistical Evidence: Activity arnd Market Quality
r
le
pe
irc
vi
rc
le
pe
ne
is filled. Thus, whenever an MO walks the LOB, the average price per share
irc
vi
is worse than the best quote at the moment the MO was sent to the LOB. In
in
rc
i
r
Chapter 6 we have a thorough discussion of how to devise optimal strategies to
le
pe
ne
irc
vi
in
So far we have only considered what happens to the MO as it reaches the LOB,
rc
le
but executing a (relatively large) trade can be quite complex. In the US, with
pe
ne
irc
11 public exchanges, regulators have felt a need to regulate what should happen
vi
in
to orders that consume all existing liquidity in one venue at the best bid/ask,
rc
i
r
le
pe
ne
irc
raise related issues of time delays between different venues. So, when sending an
vi
in
MO one has to design the routing strategy very carefully: to which exchanges
rc
le
and when to submit the order, and what will happen if that order consumes all
pe
ne
irc
available liquidity at some point. So, an agent needs to know what happens as
vi
in
the order is executed, but also what happens in the aftermath of a trade.
rc
i
r
le
With the information we have from NASDAQ we now look at what happens
pe
ne
irc
after orders are executed there. Table 4.9 looks at the executions for AAPL on
vi
in
rc
NASDAQ on July 30th, 2013. As mentioned earlier (in Chapter 3), we do not
r
observe MOs, but rather, what happens to existing posted orders. To illustrate le
pe
ne
irc
the kind of analysis that can be done, we make the simplistic assumption that
vi
in
rc
all orders executed at the same time (same millisecond) and at the same price
i
r
le
level, are all part of the same MO, and are aggregated accordingly.
pe
ne
irc
Table 4.9 looks at what happens when different types of buy and sell orders are
vi
in
rc
executed, i.e. we look at the arrival of MOs under different circumstances. The
r
le
pe
irc
10 ms interval during the trading day (2.34 million observations). This serves
vi
in
rc
i
r
le
pe
AFTER an MO comes in. We compare this benchmark with what happens after
ne
irc
le
e Buy[Sell] Order: an order is executed against orders posted on the ask (sell
pe
ne
irc
• Buy[Sell] Order (n-o): same as Buy [Sell] Order but ignoring buy [sell] orders
rc
i
r
le
® Buy[Sell] Order-Large: buy [sell] orders for strictly more than 300 shares.
vi
in
rc
In Table 4.9 we include statistics on order arrival on the bid and ask side in the
r
le
benchmark case, as well as after these six events. The columns labelled 'n = O'
pe
ne
irc
vi
rc
the bid/ask side after an execution. In the benchmark case we see that despite
r
le
pe
ne
the high level of trading activity in AAPL, our interval size is sufficiently small so
irc
vi
that in roughly 99.4 percent of cases we do not observe an order arriving. After
in
rc
le
any type of execution, this proportion falls on both sides of the book. We observe
pe
ne
irc
and at least one sell MO in 5 percent of cases. A similar pattern is observed after
rc
i
le
in
rc
vi
r
le
4.3 Trading and Market Quality 83
pe
irc
vi
rc
le
pe
ne
irc
other MO, while in at least 5 percent of cases a sell MK is followed by a buy MO.
vi
We also see very similar patterns if we exclude MO arrivals that occur just after
in
rc
i
le
other MOs. T he number of arrivals, however, increases substantially after a large
pe
ne
irc
order: a large buy (sell) is followed by other buys in 43 (38) percent of cases, and
vi
in
by sells in 8 (8) percent of cases. If we look at the quartiles conditional on there
rc
le
being at least one MO (the columns labeled 'Ql', 'Q2' and 'Q3'), the arrival
pe
ne
irc
of a market buy (sell) order seems to have no clear effect on the distribution
vi
in
of arriving sell (buy) orders, but we do see evidence suggesting that incoming
rc
i
le
orders on the same side may be more frequent. So, our very preliminary and
pe
ne
irc
limited analysis suggests that order arrival seems to be followed by further order
vi
in
rc
arrival on both sides of the book, and more on its own side than on the other
r
le
pe
irc
vi
in
rc
Buy Market Orders Sell Market Orders
i
le
pe
Event n n=O Ql Q2 Q3 n=O Ql Q2 Q3
ne
irc
vi
Benchmark 2,340,000 99.6 1 1 2 99.7 1 1 2
in
rc
Buy Order
le
pe
irc
Buy Order-Large 532 57.5 1 2 5 92.1 1 1 2
vi
in
Sell Order
i
le
le
irc
vi
in
rc
i
le
pe
affect the bid and ask prices. For this table we follow the convention that + 1 is a
ne
irc
one cent move away from the best price, that is: if the ask price is $453.02, a + 1
vi
in
rc
in the ask is a change from $453.02 to $453.03, while on the bid side, with the bid
le
pe
price at $452.96, + 1 in the bid is a price drop of one cent, that is a change from
ne
irc
vi
$452.96 to $452.95. W ith this convention, positive price changes represent moves
in
rc
i
away from the midprice and negative price changes represent moves towards
le
pe
ne
irc
le
Returning to Table 4.10, we consider how different orders affect the best price
pe
ne
irc
on their own side of the LOB, that is, the left side of the table describes how the
vi
ask price reacts to an aggressive buy MO, and the right decribes how the bid
in
rc
i
le
We consider two benchmark cases: the column 'Ask' ('Bid') is the benchmark
vi
case that looks at average changes in the ask (bid), that is after every 10 ms
in
rc
le
interval. The first row tells us the percentage of time for which there was no
pe
ne
irc
change in the bid (99.5 percent) and no change in the ask (also 99.5 percent).
vi
in
We also look at what happens to the ask (bid) after a 'Buy' ('Sell') order comes
rc
i
le
in, and the percentage of times when the ask (bid) stays the same drops to
ne
irc
in
rc
p
vi
r
le
84 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
Changes in ASK Changes in BID
vi
in
in
rc
Ticks Ask Buys L# 0 L > 3c Bid Sells L#O L > 3c
r
le
pe
ne
Obs 6,852 3,259 1,165 7,358 4,052 1,910
irc
vi
in
0 99.5 28.2 10.7 9.7 99.5 22.7 7.2 6.1
rc
le
pe
::0--5 12.8 0.1 0.0 0.0 17.2 0.3 0.4 0.2
ne
irc
-4 4.5 0.1 0.1 0.3 4.5 0.0 0.0 0.0
vi
in
in
c
-3 5.6 0.1 0.1 0.0 5.6 0.1 0.1 0.0
r
le
r
-2 8.6 0.1 0.1 0.1 7.0 0.1 0.1 0.1
pe
ne
1.1
irc
vi
1 14.2 19.5 20.5 0.9 13.3 15.7 14.3 0.9
in
c
le
r
pe
ne
irc
4 4.4 9.8 9.2 15.3 4.3 9.5 9.4 12.2
vi
in
in
rc
:S5 14.3 43.4 44.2 80.0 17.5 51.3 53.9 84.4
r
le
pe
ne
irc
Table 4.10 Market Impact of an execution on the best price - own side (AAPL
vi
in
rc
20130730).
r
le
pe
ne
irc
vi
in
in
rc
28 (23) percent. This percentage falls even further if we only look at executions
r
le
pe
that sweep the order book (6. # 0), that is after a buy (sell) order that generates
ne
irc
. an immediate change in the ask (bid). Such 'large' executions are more long-lived
vi
in
rc
in the sense that 10 ms after such a change the probability that the ask (bid)
r
le
pe
has returned to its pre-order arrival level drops to 11 (7) percent. The columns
ne
irc
labelled '6. > 3c' look at the subset of the executions that sweep the order book,
vi
in
in
rc
and we also observe a large (greater than three cent) change in the ask (bid)
r
le
pe
price respectively. The likelihood of returning is smaller than that for all sweep
ne
irc
The rows of Table 4.10 (except the 'Obs' and 'O' rows) reflect the distribution
r
le
pe
ne
mark distributions for bid and ask price movements are symmetric and very
in
in
rc
similar, something that is not true for the distributions after MOs arrivals. After
r
le
pe
ne
a buy (sell) order, the distribution of the ask (bid) clearly shifts away from its
irc
vi
previous level and is almost never better ( closer to the midprice) than before the
in
rc
arrival of the MO 10 ms later. The difference we observe for a sweep order seems
r
le
pe
ne
not seem to have much effect on the distribution of price changes for non-zero
in
in
rc
pe
ne
irc
distribution of bid/ ask price changes, and we see little evidence that these large
vi
le
In Table 4.11 we repeat the analysis but looking at the effect of an order arrival
pe
ne
rc
on the other side of the book, that is how the arrival of a buy (sell) MO affects
vi
ci
in
in
the bid (ask). We keep the signs so that a positive move in Table 4.10 is also a
le
positive move on the other side of the book in Table 4.11. That is, suppose the
r
ne
irc
in
rc
p
vi
r
4.3 Trading and Market Quality
le
85
pe
irc
vi
rc
le
pe
ne
irc
Changes in BID Changes in ASK
vi
in
Buys 6 #0 6 > 3c
rc
Ticks Bid Ask Sells 6#0 6 > 3c
i
r
le
pe
ne
Obs 6852 3259 1165 7358 4052 1910
irc
vi
in
0 99.5 81.6 78.7 75.4 99.5 82.2 80.3 79.1
rc
le
pe
2:-5 17.5 6.9 6.5 7.7 14.3 6.0 6.0 8.3
ne
irc
-4 4.3 1.8 1.7 2.8 4.4 1.7 1.8 2.0
vi
in
rc
i
r
le
pe
ne
irc
vi
1 17.9 29.5 28.7 34.8 22.6 29.2 27.7 28.8
in
rc
le
pe
irc
4 4.5 6.1 5.0 2.4 4.5 6.8 5.6 4.5
vi
in
rc
:::;5 17.2 24.2 25.9 17.8 12.8 24.7 26.1 21.3
i
r
le
pe
ne
irc
Table 4.11 Market Impact of an execution on the best price - other side (AAPL
vi
in
rc
20130730).
r
le
pe
ne
irc
vi
in
rc
ask price is $453.02 and the bid is $452.96. After a buy order, a+1 cent change
i
r
le
pe
in the ask is an increase from $453.02 to $453.03 (Table 4.10), and a +l cent
ne
irc
move in the bid is an increase from $452.96 to $452.97 (Table 4.11). Whereas
vi
in
rc
after a sell order, a+l cent change in the bid results in a decrease from $452.96
r
le
pe
to $452.95 (Table 4.10), and a+l cent move in the ask results is a change from
ne
irc
rc
With this convention, we see that the effect of an arrival on one side of the
i
r
le
pe
LOB is followed by a similar but weaker effect on the other. The probability of
ne
irc
the price remaining/returning to the pre-arrival level drops from 99.5 to 82 for
vi
in
rc
both the bid and the ask after a buy and a sell order arrive, respectively. This
r
le
pe
ne
shift in the distribution of non-zero price changes that (weakly) follows that of
vi
in
rc
the changes on the other side of the book. So we see how the arrival of a buy
i
r
le
pe
ne
order is followed by a shift in the (non-zero) bid price changes away from the
irc
vi
midprice, so the conditional probability of a 1 cent move away from the pre
in
rc
arrival bid price goes from 17.9 to 29.5 percent after a buy order, and that of a
r
le
pe
ne
1 cent move away from the pre-arrival ask price goes from 22.6 to 29.2 percent
irc
vi
after a sell order. The pattern is very similar after a buy (sell) order, a sweep
in
rc
buy (sell) order, or a sweep buy (sell) order with a large price move. Combining
r
le
pe
ne
this observation with the price moves in Table 4.10, we find evidence that the
irc
vi
quoted spread increases after a buy or sell order, and substantially so after a
in
rc
le
irc
To conclude our look at the impact of MOs, in Table 4.12 we look at the effect
vi
in
on the changes we observed at the 10 ms horizon, we consider longer (30 ms, 100
rc
i
le
ms and 1,000 ms) horizons. Table 4.12 is split horizontally into three sections:
ne
irc
in
rc
p
vi
r
le
86 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
Changes in ASK Changes in BID
vi
in
rc
Ticks 10 30 100 1,000 10 30 100 1,000
i
r
le
pe
ne
<=-3 0.1 0.3 1.0 7.7 0.1 0.4 1.2 8.9
irc
vi
in
rc
Bench 0
r 99.5 98.7 96.0 72.9 99.5 98.6 95.7 70.3
le
pe
{1,2} 0.1 0.3 0.7 3.9 0.1 0.4 1.1 6.9
ne
irc
>=3 0.1 0.3 1.0 7.7 0.1 0.4 1.3 9.9
vi
in
rc
<=-3 0.2 0.3 0.4 1.3 6.9 9.8 13.2 26.2
i
r
le
pe
{-1,-2} 0.8 1.0 1.4 3.1 7.4 7.8 8.3 11.3
ne
irc
vi
in
23.8 22.4 21.8 18.4 2.2 2.4 2.6 4.1
rc
{1,2}
r
le
>=3 47.0 49.6 52.1 61.3 1.9 2.2 3.5 9.2
pe
ne
irc
<=-3 6.8 8.3 12.0 24.0 4.1 4.2 4.6 6.8
vi
in
rc
{-1,-2} 7.3 8.3 9.3 13.3 4.1 4.0 4.3 6.2
i
r
le
pe
ne
irc
vi
>=3 1.8 2.4 2.7 6.4 28.5 31.4 35.0 44.4
in
rc
le
pe
ne
irc
Table 4.12 Market Impact of an execution on the midprice over time (AAPL 20130730).
vi
in
rc
i
r
le
pe
ne
irc
the first ('Bench') is the benchmark table that looks at changes in the bid and
vi
in
rc
ask over the corresponding horizons for all such time intervals; the bottom two
r
le
pe
sections consider the effects of the arrival of a buy and a sell order respectively
ne
irc
on bid and ask prices. For this table we continue to keep the signs matched on
vi
in
rc
the bid and ask sides, but to avoid confusion we keep the sign of changes on the
i
r
le
pe
bid (ask) side the same as in the benchmark case, as well as after a buy or a
ne
irc
sell order, that is, the interpretation of the sign does not depend on whether it
vi
in
rc
follows a buy or a sell MO, but only on which side of the book we are looking at.
r
le
pe
ne
So, suppose the ask price is $453.02 and the bid is $452.96. After a buy order, a
irc
+ 1 cent in the ask is a move from $453.02 to $453.03, and a + 1 cent move in the
vi
in
rc
bid is a move from $452.96 to $452.95 (a 1 cent move away from the midprice).
i
r
le
pe
ne
The same happens after a sell order (and in the benchmark case): a +1 cent
irc
in the ask results in an increase from $453.02 to $453.03, and a + 1 cent move
vi
in
rc
in the bid is move from $452.96 to $452.95 (one cent away from the midprice).
r
le
pe
ne
Note also, that all percentiles reflect probabilities (we are not conditioning on
irc
vi
rc
i
r
The first thing to notice in Table 4.12 is the natural effect of time on all prices:
le
pe
ne
irc
as we expand the horizon, prices tend to move more, and the distributions become
vi
more dispersed. We also see that the initial price movements are not followed
in
rc
le
by quick reversals and that even one second (1,000 ms) after a buy order there
pe
ne
irc
is a marked shift of the bid and ask away from its pre-execution level, with
vi
in
worse prices and a hint of a delayed price impact on future executions and wider
rc
i
le
spreads.
ne
irc
in
rc
p
vi
r
le
4.3 Trading and Market Quality 87
pe
irc
vi
rc
le
pe
ne
irc
All these results must be interpreted in context, and not causally. As we will
vi
now see, MOs do not arrive at random times. They tend to arrive when spreads
in
rc
i
r
le
are narrow, and opportunistically hit orders that are posted closer to the mid
pe
ne
irc
price, so it is only natural that we should observe a wider spread after an exe
vi
in
cution.
rc
le
pe
ne
irc
4.3.5 Walking the LOB and Permanent Price Impact
vi
in
rc
i
r
le
We have seen that one of the key ingredients in trading algorithms is how the
pe
ne
irc
investor's own actions together with the order flow of the other market partic
vi
in
ipants affect the price of the assets she is trading in. In the trading algorithms
rc
le
developed in Part III we show how strategics depend on the market impact of
pe
ne
irc
trades. For example in Chapter 6 we show how to trade large positions when
vi
in
rc
the investor's own trades walk the LOB, in addition to adversely affecting the
i
r
le
pe
ne
irc
vi
in
rc
wishing to liquidate a large position when the order flow from other traders in
r
le
pe
the market also impacts the midprice. In this case, if the agent's execution pro
ne
irc
gramme is going with or against net order flow, the strategy adapts to maximise
vi
in
rc
i
r
le
Here we want to empirically assess the parameter values for the different effects
pe
ne
irc
a trade can have on prices: the permanent and the temporary price impact. We
vi
in
rc
look at these impacts for five stocks using data from NASDAQ and for the year
r
le
pe
irc
permanent price impact by looking at the impact of order flow on the change in
vi
in
rc
price over five-minute intervals. Let b..Sn = Sm - - S(n -l)T be the change in the
i
r
le
pe
ne
midprice during the time interval [(n - l)T, nT] where T = 5 min. Let µn be the
irc
net order flow defined as the difference between the volumes of buy and sell MOs
vi
in
rc
during the same time interval. We then estimate the permanent price impact as
r
le
pe
ne
rc
(4.2)
i
r
le
pe
ne
where En is the error term (assumed normal). The model (4.2) is estimated
irc
vi
every day, using Winsorised data, excluding the upper and lower 0.5% tails. The
in
rc
first row of Table 4.13 shows the average value of the estimated parameters for
r
le
pe
ne
permanent price impact and the second row shows its standard deviation.
irc
vi
In the third and fourth rows of the table we show the parameter estimate
in
rc
i
r
le
for temporary impact and its standard deviation respectively. To estimate this
pe
ne
vi
ear in the volume traded. Specifically, the difference between the execution price
in
rc
that the investor receives and the best quote is k Q, where Q is the total volume
r
le
pe
ne
irc
traded. To perform the estimation, we take a snapshot of the LOB each second,
vi
in
determine the price per share s; xec (Qi) for various volumes {Q1, Q 2, . . . , QN}
rc
i
le
(by walking the LOB), compute the difference between the execution price per
ne
irc
in
rc
p
vi
r
88 Empirical and Statistical Evidence: Activity and Market Quality
le
pe
irc
vi
rc
le
pe
ne
share and the best quote at that time, and perform a linear regression. That is
irc
we regress,
vi
in
in
rc
r
le
sexec,ask = sask + kask Q. + ask
pe
ne
irc
i,t t i ci,t ,
vi
in
where Ei,t represent the estimation error of the i th volume for the t th timestamp.
rc
le
pe
The slope argument of the linear regression k is an estimate of the temporary
ne
irc
price impact per share at that time. We do this for every second of every trading
vi
in
in
rc
day and in the table we report the mean and standard deviation of these daily
r
le
pe
estimates (for the buy side) when we exclude the first and last half-hour of the
ne
irc
trading day an�insorise the data. Moreover, the fifth row shows the mean of
vi
in
rc
the daily ratio bjk, and the sixth row shows its standard deviation. We observe
r
le
pe
ne
that FARO shows the smallest ratio of 1.02 and SMH shows the largest at 7.43
irc
vi
in
rc
r
le
pe
ne
irc
vi
in
rc
1.41 X 10-4 5.45 X 10-6 5.93 X 10-6 le 1.82 X 10-6 6.15 X 10-7
pe
b
ne
irc
(9.61 X 10-5) (4.20 X 10-6 ) (2.31 X 10-6) (7.19 X 10-7) (2.16 X 10-7)
vi
in
in
rc
r
le
k 1.86 X 10-4 8.49 X 10-7 3.09 X 10-6 8.23 X 10-7 2.50 X 10-7
pe
ne
(2.56 X 10-4) (8.22 X 10-7) (1.75 X 10-6) (3.78 X 10-7) (1.25 X 10-7)
irc
vi
in
rc
le
irc
in
rc
Table 4.13 Permanent and temporary price impact parameters for NASDAQ stocks for
r
le
pe
vi
in
rc
le
irc
ter, the first panel of Figure 4.10 depicts the estimate of b for each day of 2013
vi
in
in
- the dashed line shows the average b. The second panel in the figure shows a
rc
r
le
histogram of the five-minute net order flow using all the data in 2013. Finally,
pe
ne
irc
the last panel shows the expected net order flow (with error bars) conditional on
vi
in
a given price change being observed.3 As already shown by the regression results
rc
le
there is a positive relationship between net order flow and price changes. The
pe
ne
irc
figure shows further details of this relationship to support the finding that when
vi
in
in
net order flow is positive (negative), that is more (less) buy than sell MOs, the
rc
r
le
mid price tends to increase (decrease). Moreover, we see that assuming a linear
pe
ne
irc
relationship between price changes and net order flow is plausible for a wide
vi
in
rc
range of midprice changes. Only in the two extremes, very high or very low price
r
le
changes, does the relationship fails to be linear, but we note that there are fewer
pe
ne
irc
vi
in
in
3 For the year 2013, 99% of the 5 minute price changes for INTC were within the range
rc
le
[-0.1,0.1].
ne
irc
in
rc
p
vi
r
4.3 Trading and Market Quality
le
89
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
r
le
Figure 4.10 Order Flow and effect on the
pe
ne
irc
drift of midprice of INTC.
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
Trading Day of 2013
irc
vi
in
rc
2500�----------�
r
le
pe
ne
irc
2000 <l 0.5
vi
in
rc
§J 1500
i
r
le
:j_ 0
pe
ne
irc
g' 1000
&; +
vi
in
3-0.5
rc
500
r
�
le
pe
ne
irc
�2 -1 0 1 2 -0.05 0 0.05 0.1
vi
i
r
le
pe
ne
irc
vi
in
rc
observations in the tails as shown by the histogram and this is also shown by
r
le
pe
irc
Figure 4.11 explores the temporary price impact for INTC. The top panel
vi
in
rc
shows a snapshot of the LOB for INTC on Nov 1, 2013 at 11am. The bottom
i
r
le
pe
left panel captures the empirical temporary price impact curve generated by
ne
irc
hypothetical MOs of various quantities as they walk through the buy side of the
vi
in
rc
LOB. Each curve represents the curve at every second from 11:00 to 11:01. We
r
le
pe
also include a linear regression with intercept set to the half-spread (the dash
ne
irc
line) which would correspond to the model used to estimate the parameter k
vi
in
rc
above. Notice that the impact function fluctuates within the minute, and with it
i
r
le
pe
the impact that trades of different size could have. The linear regression provides
ne
irc
The third picture in the Figure shows how the slope of this linear impact
r
le
pe
ne
model fluctuates throughout the entire day. We see that the largest impact tends
irc
vi
to occur in the morning, then this impact flattens and stays flat throughout the
in
rc
i
r
day, and towards the end of the day it lessens. Such a pattern is seen in a number
le
pe
ne
of assets and is consistent with the reduction in spreads and increases in depth
irc
vi
le
The analysis above looks at temporary and permanent effects separately but
pe
ne
irc
and acquisition strategies take into account the trade-off between costs that stem
rc
i
le
from walking the book and the permanent impact. In particular, when both types
ne
irc
in
rc
p
vi
r
le
90 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
vi
in
24.6·---
rc
Figure 4.11 An illustration of how the
i
r
le
24.55
pe
temporary impact may be estimated from
ne
irc
vi
in
·.::: 24.45 1, 2013. The first panel is at 11:00am, the
rc
p._, r
le
24.4 second from 11:00am to 11:01am and the
pe
ne
irc
24.35 third picture contains the entire day.
vi
24.31---------
in
rc
i
r
le
0 2 4 6
pe
ne
Volume 4
irc
X 10
vi
in
rc
0.03�----------� 10·5
r
le
pe
0.025
ne
irc
0
t
vi
0.02 0 10·6
in
._s 0.015
rc
i
r
le
pe
ne
<l)
irc
-� 0.01
-�<l) 10·7
vi
in
p._,
rc
0.005 * p._,
r
le
pe
ne
10·8
irc
2 3 4 5 10 12 14 16
vi
in
Volume X 10
4
Time
rc
i
r
le
pe
ne
irc
vi
in
-of impact are linear in the rates of trading, this trade-off is in part captured by
rc
the ratio b/k (see for example Section 7.3 in the context of a liquidation algorithm
r
le
pe
ne
irc
and Chapter 9 for strategies that track volume such as POV and VWAP). In the
vi
left panel of Figure 4.12 we show a scatter plot of the daily pair (b, k) for INTC
in
rc
i
r
le
impact. This is consistent with the theoretical relationship between price impact
vi
in
and depth, so that days with little depth will be associated with high price
rc
le
impact, both permanent and temporary, while a deep market will be associated
pe
ne
irc
with lower price impacts. Finally, in the right panel of the figure we see the
vi
in
histogram for the ratio b/k which ranges between 1 and 4 and is symmetric
rc
i
r
le
vi
in
rc
le
pe
irc
vi
in
rc
i
r
le
An important feature in the way exchanges operate is the ability to cancel LOs
pe
ne
irc
which have not been filled. Traders who provide liquidity must be able to change
vi
in
their views on the market and therefore cancel their LOs or reposition them in
rc
le
the light of new information. Later, when we look at algorithms that provide
pe
ne
irc
liquidity to the market (see for instance Chapters 7, 8 and 10) we will see that
vi
in
these rely on the ability to reposition LOs in the LOB. For example, when
rc
i
le
we develop market making algorithms that require low latency, the agent is
ne
irc
in
rc
p
vi
r
le
4.4 Messages and Cancellation Activity 91
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
50
i
r
le
pe
ne
()'40
irc
i:::
vi
Q)
in
g.30
rc
le
Q)
pe
&; 20
ne
irc
10
vi
in
rc
i
r
le
2 3
pe
0.5 4 5
ne
b b/k
irc
vi
in
rc
le
pe
Figure 4.12 Price Impact INTC using daily observations for 2013.
ne
irc
vi
in
rc
i
r
le
constantly cancelling LOs to reposition them as new information arrives and the
pe
ne
irc
agent's view on short-lived deviations in the midprice are taken into account.
vi
in
rc
Here we employ our detailed ITCH data to measure trading activity by the
r
le
pe
irc
data in the ITCH dataset, as we saw at the beginning of the chapter. The total
vi
in
rc
number of messages is slightly greater than twice the number of posted orders,
i
r
le
vi
in
rc
le
irc
i
r
le
le
irc
vi
in
rc
i
r
Table 4.14 contains the descriptive statistics for daily messages for our four
le
pe
ne
assets (in thousands; POl and P99 refer to the 1st and 99th percentile, respec
irc
vi
tively). We can see how, as with trading activity, the number of messages for
in
rc
each asset is different by orders of magnitude (except that for of MENT which
le
pe
ne
irc
is about 2.5 times that for FARO). In order to adjust for trading activity, a
vi
rc
i
r
le
4.15) or by trading volume. The results in Table 4.15 suggest an interesting phe
pe
ne
irc
nomenon: more frequently traded assets 'require' fewer messages per trade than
vi
in
le
The reverse of this phenomenon is captured in Table 4.16, where we look at the
pe
ne
irc
Only for AAPL do we see less than 45% of orders being cancelled most of the
rc
i
le
time.
ne
irc
in
rc
p
vi
r
Empirical and Statistical Evidence: Activity and Market Quality
le
92
pe
irc
vi
rc
le
pe
ne
irc
Asset Mean StdDev POl Ql Median Q3 P99
vi
in
rc
i
ISNS 226.7 749.1 10.8 44.4 80.7 159.1 2885.1
r
le
pe
223.5
ne
FARO 88.2 55.8 20.7 57.8 79.4 106.1
irc
vi
in
rc
le
pe
ne
irc
Table 4.15 Messages per Number of Trades.
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
irc
MENT 47.2 1.0 44.1 46.7 47.4 48.0 48.9
vi
in
rc
AAPL 43.1 1.9 37.8 41.8 43.3 44.3 47.1
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
For intraday trading, it is very important to understand the posting and can
vi
in
rc
cellation dynamics, especially around the bid and ask. Table 4.17 looks at the
i
r
le
orders posted by their distance to the midprice ('Distance to Mid', k) for AAPL
pe
ne
irc
on July 30th, 2013 and to illustrate the contents of the table we use Figure
vi
in
rc
4.13. The second column ('Posts') counts the number of messages posted k ticks
r
le
pe
(cents) from the midprice. In Figure 4.13 we display this visually using a hypo
ne
irc
thetical midprice of $101.05, and split the quantities evenly between the bid and
vi
in
rc
the ask. Thus, for example, the total quantity posted two ticks from the midprice
i
r
le
pe
ne
(3,053 units) is displayed as 1,527 units posted at $101.07 and 1,527 units posted
irc
at $101.03 (the total length of the bars). The third column ('% Exe') looks at
vi
in
rc
the percentage of those posted messages that were executed, that is, the posted
r
le
pe
ne
order was crossed with an incoming MO. In Figure 4.13 this is illustrated by
irc
vi
using a lighter colour for the orders that were executed (and a darker one for
in
rc
i
those cancelled). Thus, for example, of the 1,527 units posted at $101.07, 64.7
r
le
pe
ne
percent (988 units) were executed. Finally, the fourth column ('Exe') describes
irc
vi
the percentage of the total number of executed orders that were executed at that
in
rc
level. So, these 988 orders executed at $101.07 plus the 988 executed at $101.03,
r
le
pe
ne
If we consider that the (one-minute time-average) quoted spread for that day
in
rc
i
r
is 10.3 cents on average (Ql: 8.5, median: 10.2, Q3: 11.7), most of the time the
le
pe
ne
irc
distance to the midprice (half of the quoted spread) is between 4 and 6 cents.
vi
Using the information in Table 4.17 we compute that 26% of orders executed
in
rc
le
were initially posted at between 1 and 3 cents from the midprice, but only 32%
pe
ne
irc
are posted between 4 and 6 and the remaining 42% of orders executed had been
vi
in
originally posted relatively far from the midprice (7+ cents away).
rc
i
le
If, on the other hand, we look at the distance from the midprice at the time
ne
irc
in
rc
p
vi
r
le
4.4 Messages and Cancellation Activity 93
pe
irc
vi
rc
le
pe
ne
irc
Distance At Post
vi
At Exit
in
rc
i
r
to Midprice Posts % Exec Exec Posts % Exec Exec
le
pe
ne
irc
vi
in
rc
le
3 5,193 55.4 13.5 6,236
pe
67.5 19.7
ne
irc
4 5,617 44.4 11.7 6,448 51.5 15.6
vi
in
rc
i
r
le
pe
ne
7 7,996 20.2 7.6 7,624 20.4 7.3
irc
vi
5.4
in
rc
le
pe
irc
> 10 195,415 2.3 21 192,205 0.4 3.8
vi
in
rc
i
r
le
pe
Table 4.17 Messages by distance to midprice at post and at exit (AAPL 2013-07-30).
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
Figure 4.13 Illustration of orders posted
ne
irc
le
pe
ne
irc
101
E:'.::i
vi
in
rc
i
r
le
Quantity
pe
ne
irc
vi
in
rc
the trade was executed, not posted, in Table 4.17, we find that the distance
r
le
pe
ne
to the midprice is (naturally) shorter, and we can compute that 36% of orders
irc
vi
were executed at prices between 1 and 3 cents from the midprice, and 42% at
in
rc
i
r
prices between 4 and 6, so that only 22 % of executions were relatively far from
le
pe
ne
irc
the midprice (7+ cents away). This illustrates the point made earlier (when
vi
comparing the volatility of the effective and the quoted spreads) that executions
in
rc
le
tend to occur more often when the spread is narrower, and hence the effective
pe
ne
irc
In Figure 4.14 we display the survivor function, S(x), (one minus the CDF:
in
rc
S(x) = Pr(X > x) = l-F(x)) of total executions, as the distance from the price
i
r
le
pe
ne
irc
to the 'fill probability' - the probability that a posted order is executed. The
rc
le
thick blue line describes the distribution in Table 4.17. We have also included
pe
ne
irc
the same distribution separating executions on the bid and ask side, and it is
vi
in
i
le
below (above) the one for all executions. This indicates that market buy orders
ne
irc
in
rc
p
vi
r
le
94 Empirical and Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
AAPL
irc
100
vi
in
-All
rc
i
-Ask
r
80
le
pe
-Bid
ne
irc
� 60
Mkt Start
Figure 4.14 Survivor function for
vi
in
rc
le
,...; IC
mid price.
pe
IC
ne
irc
20
,c
,c
vi
IC ,c
xx xxxxxx
in
,c
xx
rc
i
r
0
le
pe
0 5 10 15 20 25
ne
irc
vi
in
rc
le
pe
ne
irc
vi
tended to occur much closer to the midprice than market sell orders on this
in
rc
i
r
particular day, which had an overall positive order flow for AAPL shares and a
le
pe
ne
irc
vi
in
In Figure 4.14, we have also included total executions separated by the time
rc
le
of day: the first half hour after the market opens (Mkt Start), the last half hour
pe
ne
irc
before the market closes (Mkt Close), and the time in between (Intraday). We
vi
in
observe that Mkt Close tends to be below that of Intraday, implying that during
rc
i
r
le
the last half hour of trading, executions tend to be close to the midprice, which is pe
ne
irc
consistent with the pattern of the quoted spread in Figure 4.6. But the difference
vi
in
rc
le
pe
W hat happens at the market open does look very different, as the distribution
ne
irc
is above and quite far away from that for Intraday. It appears that the wider
vi
in
rc
spreads we observed in Figure 4.6 and the uncertainty from Figure 4.7 combine
i
r
le
pe
to generate executions for orders posted quite far from the midprice.
ne
irc
vi
Figure 4.15 looks at the same data from a different angle. In it we consider
in
rc
(in logs) the proportion of orders posted a certain distance from the midprice,
r
le
pe
ne
figure displays the natural decreasing relationship between the distance from the
in
rc
i
midprice and the probability of the order being executed. We have drawn these
r
le
pe
ne
curves for: all executions, aggressive buys and sells, and executions by time of
irc
vi
day: around the market open, the market close, and the rest of the day. All of
in
rc
them are very similar with only one exception: that for the first half hour of the
le
pe
ne
irc
trading day (Mkt Start). What we observe (looking at the underlying data) is
vi
in
that, at Mkt Start, an unusually high proportion of trades which were posted six
rc
i
r
le
cents from the midprice were later executed, and this generates the shift in the
pe
ne
irc
CDF we observe in Figure 4.15. Looking at the quoted spreads during that time,
vi
in
we find that the mean was 15.2 cents on average (Ql: 12.5, median: 14.2, Q3:
rc
le
19.0), which suggests that as early morning uncertainty over the 'true market
pe
ne
irc
price' was reduced, the quoted spread was slow to react and a relatively large
vi
in
number of executions occurred - and this happened when the quoted spread had
rc
i
le
in
rc
vi
r
le
4.5 Hidden Orders 95
pe
irc
vi
rc
le
pe
ne
AAPL
irc
vi
in
rc
i
le
;:ju -6
pe
ne
irc
<l)
:,<: Figure 4.15 Log of the proportion of
vi
8
in
,::: - posted orders that are executed as a
rc
le
P-. function of distance from midprice.
pe
....
0
ne
irc
�-10
vi
o Intrad ay
in
x Mkt Close
rc
-12 '-----�-�--�-�--'
i
le
pe
5 10 15 20 25
ne
irc
vi
in
rc
le
pe
irc
vi
in
rc
When discussing market quality earlier (Section 4.3), and spreads in particular,
i
le
pe
ne
we saw that one of the reasons why the quoted spread is generally greater than
irc
vi
the effective spread is the presence of posted orders that are not visible to market
in
rc
participants, but that will match with incoming MOs ahead of existing visible
le
pe
ne
irc
ones (at a price at or better than the current bid/ask). These are hidden orders.
vi
in
rc
i
le
vi
ISNS 4 59 0 0 0 0 100
in
rc
le
pe
irc
rc
i
le
pe
16.9
rc
le
pe
ne
irc
Table 4.18 Execution against hidden orders (volume (Q) and percentage).
vi
in
rc
i
le
pe
ne
irc
Table 4.18 is split into two panels. The top panel of the table describes the
vi
quantity executed against hidden orders in NASDAQ per minute, for each minute
in
rc
le
of 2013. As we can see, for the less traded assets, ISNS, FARO and MENT, there
pe
ne
irc
is little trading taking place against hidden orders (less than 25 percent of the
vi
time), though when it happens it can be quite significant. But for AAPL, the case
in
rc
i
le
is quite different. We find trading against hidden orders more than 75 percent
pe
ne
irc
of the time, and for a substantial amount of shares (more than 1,000 units per
vi
in
minute). Note that these large quantities are not indicative of large trades, but
rc
le
irc
executed against a hidden order (per minute) has a mean of 127, with Ql equal
vi
in
i
le
The bottom panel of Table 4.18 considers the same variable, the quantity of
ne
irc
in
rc
p
vi
r
le
96 Empirical a11d Statistical Evidence: Activity and Market Quality
pe
irc
vi
rc
le
pe
ne
irc
shares executed against hidden orders, but rather than in absolute numbers, as
vi
in
a proportion of the total number of shares executed (in that minute). For ISNS,
rc
i
r
le
FARO and MENT, executions are relatively infrequent, and when they occur
pe
ne
irc
against hidden orders they tend to be isolated trades. In those cases, the hidden
vi
in
order is a large proportion, if not one hundred percent, of all shares traded
rc
le
during that minute. For AAPL, execution against hidden orders is a common
pe
ne
irc
phenomenon and half the time they represent between 33 and 56 percent of all
vi
in
trades. An agent posting visible offers for AAPL at the bid and ask (during 2013)
rc
i
r
le
found her offers trumped by more aggressive hidden ones relatively often.
pe
ne
irc
vi
in
rc
le
4.6 Bibliography and Selected Readings
pe
ne
irc
vi
in
rc
Boehmer, Fong & Wu (2012), Chabaud, Hjalmarsson, Vega & Chiquoine (2009),
i
r
le
pe
Moallemi & Saglam (2013), SEC (2010), CFTC & SEC (2010), Hendershott,
ne
irc
Jones & Menkveld (2011), Biais, Bisiere & Spatt (2010), Biais et al. (2005),
vi
in
rc
Hagstromer & Norden (2013), Andersen & Bondarenko (2014), Pascual & Vere
r
le
pe
das (2009), Hirschey (2013), Martinez, Nieto, Rubio & Tapia (2005), Hasbrouck
ne
irc
(2013), Hasbrouck & Saar (2013), Cartea & Meyer-Brandis (2010), Cartea (2013),
vi
in
rc
Brogaard, Hendershott & Riordan (2014), Menkveld (2013), Riordan & Starken
i
r
le
maier (2012), Hendershott & Riordan (2013), Foucault, Kadan & Kandel (2013),
pe
ne
irc
Moro, Vicente, Moyano, Gerig, Farmer, Vaglica, Lillo & Mantegna (2009), Gerig
vi
in
rc
(2012), Hall & Hautsch (2007), Gould, Porter, Williams, McDonald, Fenn &
r
le
pe
ne
Howison (2013).
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc rc
Part 11
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc
athematical ools
i i i i i i i i
in in in in in in in in
ne n ne ne ne ne ne ne
rc rc
er
c rc rc rc c r rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc c r rc
irc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
i i i i i i i i
p
vi
r
le
pe
irc
vi
rc
le
pe
Introduction to Part 11
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
In this part of the book, we develop the mathematical tools for the analysis of
r
le
pe
irc
readers without previous exposure to these techniques equip themselves with the
vi
in
rc
necessary tools to understand the mathematical models behind some algorithmic
i
r
le
pe
trading strategies. Readers are expected to have basic knowledge of continuous
ne
irc
time finance; however, the approach taken here is a pragmatic one and we do not
vi
in
rc
delve into subtle mathematical issues. Focus is instead placed on the mechanics
r
le
pe
irc
at low and high frequencies. To provide readers who need a refresher, and to keep
vi
in
rc
the book self contained, we include in Appendix A a concise review of the main
i
r
le
pe
ne
tools and results of Stochastic Calculus required to study stochastic control and
irc
stopping problems.
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
5
pe
ne
irc
vi
in
in
rc
Stopping
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
5.1
vi
Introduction
in
rc
le
pe
ne
irc
Stochastic control problems arise in many facets of financial modelling. The
vi
in
in
rc
classical example is the optimal investment problem introduced and solved in
r
le
pe
continuous-time by Merton (1971). Of course there is a multitude of other ap
ne
irc
plications, such as optimal dividend setting, optimal entry and exit problems,
vi
in
rc
le
pe
ne
(cost) function by tuning a strategy which itself affects the dynamics of the un
in
in
rc
derlying stochastic system, and to find the strategy which attains the maximum
r
le
pe
ne
(minimum). For example, in the simplest form of the Merton problem, the agent
irc
vi
is trying to maximise expected utility of future wealth by trading a risky as
in
rc
set and a risk-free bank account. The agent's actions affect her wealth, but at
r
le
pe
ne
the same time the uncertain dynamics in the traded asset modulate the agent's
irc
vi
wealth in a stochastic manner. The resulting optimal strategies are tied to the
in
in
rc
dynamics of the asset and perhaps also to the agent's wealth. It is a surprising
le
pe
ne
irc
fact that, in many cases, the optimal strategies turn out to be Markov in the un
vi
le
irc
One tool keeps coming to the forefront when solving stochastic control prob
vi
in
in
rc
lems: the dynamic programming principle (DPP) and the related non-linear
r
le
pe
The DPP allows a stochastic control problem to be solved from the terminal
r
le
pe
date backwards and the HJB equation / DPE can be viewed as its infinitesimal
ne
irc
version.
vi
in
in
rc
r
le
Here, the subtle mathematical issues are not addressed and focus is instead
pe
ne
irc
trading problems employed at low and high frequencies. The interested reader
rc
le
is referred to the many excellent texts which focus on the theoretical aspects of
pe
ne
irc
stochastic control for a thorough treatment of the subject: Yong & Zhou (1999),
vi
in
in
Fleming & Saner (2006), 0ksendal & Sulem (2007), Pham (2010), and Touzi
rc
le
(2013).
ne
irc
in
rc
p
vi
r
le
5.2 Examples of Control Problems in Finance 101
pe
irc
vi
rc
le
pe
5.2 Examples of Control Problems in Finance
ne
irc
vi
in
rc
i
r
le
This section provides a few examples of financially motivated stochastic control
pe
ne
irc
problems. The first example is a classical one in finance and pertains to optimal
vi
in
investment over long time horizons. The second is one of the first algorithmic
rc
le
trading control problems and pertains to the optimal liquidation of assets. The
pe
ne
irc
third refers to optimal placement of orders in a limit order book (LOB). All of
vi
in
these are essentially toy models and the last two will encompass the focus of
rc
i
r
le
pe
ne
irc
vi
in
rc
le
5.2.1 The Merton Problem
pe
ne
irc
As a first example let us consider the classical portfolio optimisation problem
vi
in
rc
of Merton (1971), in which the agent seeks to maximise expected (discounted)
i
r
le
pe
ne
wealth by trading in a risky asset and the risk-free bank account (see Merton
irc
(1992) for many more examples and generalisations). Specifically, at time t, she
vi
in
rc
places Kt dollars of her total wealth Xt in the risky asset St and seeks to obtain
r
le
pe
ne
rc
i
r
le
1rEAo,T
pe
ne
irc
which depends on the current wealth x and asset price S, and the resulting
vi
in
rc
le
pe
ne
irc
rc
i
r
le
pe
ne
irc
le
pe
irc
vi
• W
rc
i
r
le
®
ne
irc
1ft invested in the risky asset at time t (with the remaining funds in the
r
le
pe
irc
® x
1r
= (X!:){O:"'.t:"'.T} is the agent's discounted wealth process given that she
vi
in
rc
pe
vi
Jt
pe
ne
irc
F-predictable self-financing strategies that have 1r; ds < +oo. This con
vi
in
i
le
to exist.
ne
irc
in
rc
pe
vi
102 Stochastic Optimal Control and Stopping
r
le
pe
irc
vi
rc
le
pe
In this classical example, the agent's trading decisions affect only her wealth
ne
irc
n
process, but not the dynamics of the asset which she is trading. On long time
vi
in
in
rc
scales, and if the agent's strategy does not change "too quickly", this is a reason
r
le
pe
ne
able assumption. However, if an agent is attempting to acquire (or sell) a large
irc
number of shares in a short period of time, her actions most certainly affect the
vi
in
rc
dynamics of the price itself - in addition to her wealth process. This issue is
r
le
pe
ne
ignored in the Merton problem, but is at the heart of research into algorithmic
irc
n
vi
in
rc
r
le
pe
ne
irc
vi
in
rc
le
As mentioned above, imagine that an agent has a large number of shares 1)1 of
pe
ne
irc
an asset whose price is St . Furthermore, suppose her fundamental analysis on
n
vi
in
in
the asset shows that it is no longer a valuable investment to hold. She therefore
rc
r
le
wishes to liquidate these shares by the end of the day, say at time T. The fact
pe
ne
irc
that the market does not have infinite liquidity (to absorb a large sell order)
vi
in
at the best available price implies that the agent will obtain poor prices if she
rc
attempts to liquidate all units immediately. Instead, she should spread this out le
pe
ne
irc
over time, and solve a stochastic control problem to address the issue. She may
n
vi
in
in
also have a certain sense of urgency to get rid of these shares, represented by
rc
r
le
denotes the rate at which the agent sells her shares at time t, then the agent
vi
in
rc
le
[x:;, +
pe
ne
T
irc
n
H(x, S, q) = sup lE QT(Sf - aQT) - ¢ { (Q�) ds]
2
(5.3)
vi
lo
in
in
vEAo,T
rc
r
le
pe
vi
in
(5.4a)
r
le
irc
n
vi
in
rc
)
r
le
In the above,
vi
in
rc
le
pe
irc
in
rc
pe
e g : lR+ --+ lR+ denotes the permanent (negative) impact that the agent's
r
le
pe
ne
v
® ,s
in
in
rc
ne
irc
in
rc
pe
vi
5.3 Control for Diffusion Processes 103
r
le
pe
irc
vi
rc
h : lFt+ ----), lFt+ denotes the temporary (negative) impact that the agent's
le
pe
111
ne
trading action has on the price they can execute the trade at,
irc
n
e x = (Xr){ost:ST} is the agent's cash process,
v
vi
in
in
rc
r
le
e At , T is the admissible set of strategies: .F-predictable non-negative bounded
pe
ne
irc
vi
in
liquidation rate finite.
rc
le
pe
ne
irc
n
vi
in
in
5.2.3 Optimal Limit Order Placement
r
le
pe
ne
In the optimal liquidation problem above, the agent is assumed to post market
irc
orders spread through time to liquidate her shares. Such a strategy is intuitively
vi
in
c
sub-optimal since she will consistently be crossing the spread and potentially
r
le
r
pe
ne
walking the book in order to sell her shares. Since she may also place limit
irc
n
vi
orders, she can at least save the cost of crossing the spread, and perhaps even
in
in
achieve better performance by posting deeper in the limit order book LOB - at rc
r
le
pe
ne
a depth of 6t relative to the midprice St . The risk in doing so is that she may not
irc
vi
execute her shares. Conditional on a market sell order arriving, the probability
in
rc
le
pe
ne
irc
function of bt which we call the fill probability and denote by P(!5t ). The agent
n
vi
therefore can pose a control problem to decide how deep she must post in the
in
in
rc
r
le
LOB to optimise the value of liquidating her shares, subject to crossing the
pe
ne
irc
le
pe
ne
irc
n
H(x,S,q) sup m:[x,f+Q}(Sf-aQ})-¢ { (Q�/ds],
vi
.J0
in
in
.
rc
OEA[o.TJ
r
le
pe
ne
where
irc
vi
in
rc
le
pe
St (5.5b)
irc
= n
xg
vi
in
(5.5c)
rc
=
r
le
,' +i >P(o,) }
ne
{ uM
irc
vi
in
rc
. . .
le
pe
ne
irc
n
vi
in
in
rc
r
le
vi
in
le
r
pe
ne
rc
H(x) (5.6)
vi
Jo
ci
in
in
uEAo,T
le
r
ne
irc
in
rc
p
vi
r
104 Stochastic Optimal Control and Stopping
le
pe
irc
vi
rc
le
pe
where u = (u t ) o < t <T is the vector (dim p) valued control process, x u =
ne
irc
vi
(X t ) o < t <T is the vector (dim n) valued controlled process assumed (in this sec
in
in
rc
tion) to be an Ito diffusion satisfying
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
the admissible set) of F-predictable processes such that (5.7) admits a strong
vi
in
in
solution (and may contain other constraints such as the process being bounded),
rc
G : ]Rn f--t JR is a terminal reward and F : lR+ x ]R n+p f--t JR is a running
r
le
pe
ne
irc
vi
in
rc
le
while the terminal reward depends solely on the terminal value of the controlled
pe
ne
irc
process. For simplicity, the functions G and F are assumed uniformly bounded
vi
in
in
and the vector of drifts µt and volatilities at are, as usual, Lipschitz continuous.
rc
r
le
The integrability assumption on the controls, drift and volatility are necessary
pe
ne
irc
to ensure that the steps outlined below can be made rigorous. The predictability
vi
in
rc
assumption on the controls is necessary since otherwise the agent may be able
r
to peek into the future to optimise her strategy, and strategies which do peek le
pe
ne
irc
into the future cannot be implemented in the real world.
vi
in
in
rc
The value function (5.6) has the interpretation that the agent wishes to
r
le
acting in an optimal manner. Her actions u affect the dynamics of the underlying
vi
in
rc
system in some generic way given by (5.7). Thus, her past actions affect the future
r
le
pe
dynamics and she must therefore adapt and tune her actions to account for this
ne
irc
feedback effect.
vi
in
in
rc
pe
teria Hu (x) by
ne
irc
vi
in
rc
(5.8)
r
le
pe
ne
irc
vi
The agent therefore seeks to maximise this performance criteria, and naturally
in
in
rc
r
le
(5.9)
ne
irc
uEAo,T
vi
in
rc
le
pe
ne
in
rc
pe
ne
tive solution to the original problem. If a classical solution 1 to the DPE exists, it
vi
in
rc
le
pe
ne
to the original control. The next three subsections take on this programme.
irc
vi
in
in
1 Here, a classical solution means that the solution is once differentiable in time and twice in
rc
le
all (diffusive) state variables, so that the infinitesimal generator can be applied to it.
ne
irc
in
rc
p
vi
r
le
5.3 Control for Diffusion Processes 105
pe
irc
vi
rc
le
pe
ne
irc
8 Er,x; [c(Xf)+ j;'F(s,X)',u,)ds]
vi
in
rc
i
r
le
function to be written as an expectation of
pe
6
ne
irc
vi
to flow the dynamics of the controlled
in
rc
le
pe
ne
irc
2
performance criteria.
vi
in
rc
i
r
le
pe
1.5 2 2.5 3
ne
Time t
irc
vi
in
rc
le
pe
ne
irc
5.3.1 The Dynamic Programming Principle
vi
in
rc
i
r
le
pe
ne
irc
to embed the original problem into a larger class of problems indexed by time
vi
t E [O, T] but equal to the original problem at t = 0. To this end, first define
in
rc
irc
vi
in
rc
i
r
le
uEAt,T
vi
in
rc
(5.1Gb)
r
le
pe
ne
irc
vi
in
rc
i
r
le
pe
vi
two objects are the time indexed analog of the original control problem and the
in
rc
le
pe
ne
Next take an arbitrary admissible strategy u and imagine flowing the X pro
in
rc
i
cess forward in time from t to an arbitrary stopping time T � T. Then, condi
r
le
pe
ne
vi
in
the terminal reward can be viewed as the performance criteria starting from the
rc
new value of X": (see Figure 5.1). This allows the value function to be written
le
pe
ne
irc
in terms of the expectation of its future value at T plus the reward between now
vi
in
and T.
rc
i
r
le
pe
vi
in
rc
le
pe
ne
2 There is another approach to controlling both deterministic and stochastic systems which
irc
makes use of Pontryagin's maximum principle. See Yong & Zhou (1999) for a wonderful
vi
in
rc
exposition of its use for stochastic systems and the connection between it and the DPP
i
le
formulation.
ne
irc
in
rc
p
vi
106 Stochastic Optimal Control and Stopping
r
le
pe
irc
vi
rc
le
pe
becomes
ne
irc
vi l7
in
rc
Hu (t,x) =lEt,x [ G(X '!:j,) + 1 F(s, X 1;, u ,)ds + F(s, X 1;, u 8) ds]
i
r
le
pe
ne
l7
irc
vi
T
in
=lEt,x [IE 7,X;' [G(X'!:j,) + 1 F(s, X 1;, u s)ds] F(s, X 1;, u s)ds]
rc
r +
le
l7
pe
ne
irc
=lEt,x [ H (T, X �) + F(s, X 1;, u 5)ds], (5,11)
vi
u
in
rc
i
r
le
pe
ne
Now, H(t,x) 2: Hu (t,x) for an arbitrary admissible control u (with equality
irc
vi
holding if u is the optimal control u * � assuming that u * EAt , T , i,e, the supre
in
rc
le
pe
ne
irc
vi
time T is bounded above by the value function H(T, X�). T he equality can then
in
rc
i
be replaced by an inequality with the value function (and not the performance
r
le
pe
ne
criteria) showing up under the expectation:
irc
l7
vi
in
rc
7
irc
vi
in
i
r
le
uEA t
pe
ne
irc
Note that on the right-hand side of the above, the arbitrary control u only acts
vi
in
over the interval [t, T] and the optimal one is implicitly incorporated in the value
rc
le
function H(T, X�) but starting at the point to which the arbitrary control u
pe
ne
irc
rc
Taking supremum over admissible strategies on the left-hand side, so that the
i
r
le
7
vi
in
rc
(5.12)
le
pe
ne
uEA t
irc
vi
rc
i
r
le
Next, we aim to show that the inequality above can be reversed. Take an arbi
pe
ne
irc
le
but of course not as good as H(t, x), i.e. a control such that
pe
ne
irc
vi
(5.13)
rc
i
r
le
pe
Such a control exists, assuming that the value function is continuous in the space
ne
irc
le
pe
(5.14)
ne
irc
vi
in
3 It may be the case that the supremum is obtained by a limiting sequence of admissible
rc
i
le
in
rc
p
vi
r
le
5.3 Control for Diffusion Processes 107
pe
irc
vi
rc
le
i.e. the modification is c-optimal after the stopping time but potentially sub
pe
ne
irc
T,
optimal on the interval [t, T]. Then we have that
vi
in
in
rc
H(t,x)?.H"'(t,x)
r
le
pe
ne
r
irc
c
=lEt,x [ H"'(T, x� ) + l F(s, x�'' v\) ds (from (5.11)),
vi
in
rc
l7
r
le
pe
ne
irc
17
vi
in
in
rc
r
le
pe
ne
irc
vi
Taking the limit as c \I 0, we have
in
rc
le
pe
ne
H(t,x)?.
irc
vi
in
in
rc
Moreover, since the above holds true for every u E A we have that
r
le
pe
ne
irc
vi
H(t,x)?. sup lEt,x [H(T,X�) + l F(s, x�, Us)dsl (5.15)
T
in
rc
uEA t
le
pe
ne
irc
The upper bound (5.12) and lower bound (5.15) form the dynamic program
vi
in
in
ming inequalities. Putting them together, we obtain the theorem below.
rc
r
le
pe
ne
THEOREM
value function (5.10) satisfies the DPP
vi
in
rc
le
pe
ne
(5.16)
T
vi
in
in
uEA t
rc
r
le
for all (t, x) E [O, T] x ]Rn and all stopping times T::;; T.
pe
ne
irc
This equation is really a sequence of equations that tie the value function to its
vi
in
rc
le
pe
ne
in
rc
r
le
pe
ne
irc
le
pe
ne
in
rc
(i) Setting the stopping time T in the DPP to be the minimum between (a)
r
le
pe
the time it takes the process Xf to exit a ball of size E around its starting
ne
irc
point, and (b) a fixed (small) time h - all while keeping it bounded by T.
vi
in
rc
le
pe
ne
irc
in
rc
ne
irc
in
rc
p
vi
r
le
108 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
Figure 5.2 The DPE is an infinitesimal
rc
r
le
version of the DPP where the stopping
pe
ne
irc
vi
size E or a small time whichever occurs
in
rc
le
X:;"
pe
the corresponding value and stopping
ne
irc
time T indicated by the black circles for
vi
in
in
rc
-------------------•------ E = 0.05 and h = 0.01.
r
le
pe
Timet
1.002 1.004 1.006 1.008 1.01
ne
irc
vi
in
rc
le
sufficiently small - since as the time span h shrinks, it is less and less likely
pe
ne
irc
that X will exit the ball first.
vi
in
in
rc
(ii) Writing the value function (for an arbitrary admissible control u) at the
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
T T (5.17)
H(t, x ) + l (ot + .C�)H(s, X �)ds + l Dx H(s, X�) ' u�dW s,
vi
=
in
in
rc
t t
r
le
pe
ne
where u"f := O"(t, Xf, Ut) for compactness, .C"f represents the infinitesimal
irc
vi
generator of Xf, and Dx H(·) denotes the vector of partial derivatives with
in
rc
le
pe
ne
case,
irc
vi
in
in
rc
£f = µf Ox + ½(O"f) Oxx
2
r
le
pe
ne
2
vi
in
rc
le
pe
ne
First, taking v E A to be constant over the interval [t, r ], applying the lower
irc
bound (5.15), and substituting (5.17) into the right-hand side implies that
vi
in
in
rc
r
le
pe
T
ne
vi
uEA t
in
rc
T
r
le
irc
vi
in
in
r
le
pe
ne
irc
T
+ 1�x H(s,X�)1 u�dWs+l F(s, X �,v)ds]
vi
in
rc
le
pe
The integrand in the stochastic integral above, i.e . Dx H(s, X �)' u�, is bounded
ne
irc
on the interval [t, r] since we have ensured that 1xr - xi :s; E on the interval.
vi
in
in
rc
ne
irc
in
rc
pe
vi
5.3 Control for Diffusion Processes 109
r
le
pe
irc
vi
rc
le
assured that its expectation is zero. Therefore,
pe
ne
irc
T
n
H(t,x) 2 lEt,x [ H(t,x) +1 { (8t +£�) H(s, X�) +F(s, X�, v)} ds]
vi
in
in
rc
r
le
pe
and recall that T = t +h.
ne
irc
Moving the H(t,x) on the left-hand side over to the right-hand side, dividing
vi
in
rc
le
by h and taking the limit as h '\, 0 yields
pe
ne
irc
T
[¼ 1 + £�) H(s, X�) + F(s, X�, v)} ds]
n
{ (8t
vi
0 2 �Yc}lEt,x
in
in
rc
r
le
pe
ne
irc
vi
in
The second line follows from:
rc
le
(i) as h '\, 0, T = t +h a.s. since the process will not hit the barrier of E in
pe
ne
irc
n
extremely short periods of time,
vi
in
in
rc
(ii) the condition that IX� - xi ::; E, which implies that if the process does hit
r
le
pe
ne
the barrier it is bounded,
irc
vi
in
rc
le
pe
ne
irc
Since the above inequality holds for arbitrary v E A, it follows that
n
vi
in
in
rc
pe
ne
uE.A
irc
vi
Next, we show that the inequality is indeed an equality. To show this, suppose
in
rc
le
pe
ne
irc
T
= lEt,x [ H(T,x�·) + 1 F(s,x�·,u*) ds]
n
H(t,x)
vi
in
in
rc
r
le
pe
vi
the integral of its increments, taking expectations, and then the limit as h '\, 0,
in
rc
le
we find that
pe
ne
n
vi
in
in
rc
Combined with (5.18), we finally arrive at the DPE (also known in this context
r
le
pe
ne
vi
in
le
pe
uE.A (5.19)
ne
irc
H(T,x) = G(x).
n
vi
in
in
rc
r
le
The terminal condition above follows from the definition of the value function in
pe
ne
irc
(5.10) from which we see that the running reward/penalty drops out and G(X'!f,)
vi
in
is Fr measurable.
rc
le
Notice that the optimisation of the control in (5.19) is only over its value at
pe
ne
irc
time t, rather than over the whole path of the control. Hence, it appears that
n
vi
in
in
rc
the optimal control can be obtained pointwise. Treating the value function as
le
ne
irc
in
rc
p
vi
r
le
110 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
known, the optimal control can often be found in feedback control form in
irc
vi
terms of the value function itself. Substituting the feedback control back into
in
rc
i
(5.19) results in non-linear PDEs. In fact the function
r
le
pe
ne
irc
vi
in
rc
r uEA
le
pe
is called the Hamiltonian of the associated stochastic control problem. Here
ne
irc
Dx H and D;H represent the collection of first and second order derivatives of
vi
in
rc
the value function H respectively (recall that in general X is vector-valued) and
i
r
le
pe
in particular
ne
irc
vi
in
and H.
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
Example: The Merton Problem
ne
irc
Consider now the Merton optimisation problem described in Section 5.2.1. The
vi
in
optimisation problem is given in (5.1) and has the associated time dependent
rc
performance criteria le
pe
ne
irc
= lEt,x,S [U (Xr)l
vi
H K (t, x, 8) (5.20)
in
'
rc
i
r
le
pe
where x 1r (investor wealth) and 8 (risky asset price) satisfy the SDEs (5.2) with
ne
irc
1r representing the dollar value of wealth invested in the risky asset 8. From
vi
in
rc
(5.2b), the infinitesimal generator of the pair of processes (X;, 8t)o�t�T is then
r
le
pe
ne
Lf = (r x + (µ.-r) 1r) Bx +
vi
xx
in
rc
i
According to (5.19), the value function H(t, x, 8)
r
le
pe
ne
irc
= ( Ot + r x Bx + ½ 0' 2 8 2 Bss) H
in
rc
0
r
le
irc
vi
in
rc
subject to the terminal condition H(T, x, 8) = U(x). Note that the argument
i
r
le
pe
ne
of the sup is quadratic in 7r and as long as Bxx H(t, x, 8) < 0, the sup attains a
irc
vi
le
7r ((µ-r) Ox + O'Oxs) H
ne
irc
rc
i
r
le
pe
ne
where
irc
vi
in
rc
le
pe
ne
irc
vi
is the optimal control in feedback form - i.e. it is the optimal control given the
in
rc
known value function H(t, x, 8). Substituting this optimum back into the DPE
le
ne
irc
in
rc
p
vi
r
le
5.3 Control for Diffusion Processes 111
pe
irc
vi
rc
le
pe
ne
yields the non-linear PDE for the value function
irc
vi ((µ-r)BxH+a8x sH)2
in
rc
,::, +l2 a 2S2;::,
t + r x ux
i
0-(B uss )H-
r
le
-
2 (J"2 8xx H
pe
ne
irc
vi
in
rc
le
pe
which case we obtain a simpler, but still non-linear, equation for h(t,x)
ne
irc
vi
..\ (8xh(t,x )) 2
in
rc
0=(8t+r x 8x )h(t,x )-- ,
i
r
le
2 O" 8xxh(t,X )
pe
ne
irc
with terminal condition h(T,x)= U(x) and where,.\.= µ� r is the market price of
vi
in
rc
risk, also referred to as the Sharpe ratio. Moreover, the optimal control simplifies
r
le
pe
ne
to
irc
vi
in
=-
rc
a Bxxh
i
r
� (�)
le
7r*
pe
ne
irc
The explicit solution of the non-linear PDE depends on the precise form of
vi
the utility function U(x). Two classic examples are
in
rc
le
pe
irc
U(x) =-e-,x , r > 0,
vi
in
rc
i
r
le
U(x)= _l-,
le
"I -,
ne
irc
Admissible wealth has a lower bound in this case and the investor is in
vi
in
rc
i
r
le
pe
ne
irc
For exponential utility, the value function admits an affine solution and we
vi
in
le
irc
vi
where a(t) and /3(t) are yet to be determined functions of time alone. From the
in
rc
terminal condition h(T,X) =-e-, x we have that a(T) = /3(T) = 1 and upon
i
r
le
pe
ne
irc
substituting this back into the non-linear PDE above, we find that
vi
in
rc
le
pe
ne
Since this must hold for every x and t, the terms in braces must individually
irc
vanish. These two equations Ota- 2>;,. a=0 and Bt/3 +r /3=0, together with the
vi
in
rc
i
r
le
2 (T-t)
a(t)=e- --"- /3(t)=er (T-t).
vi
0- ,
in
rc
Upon back substitution, we find that the optimal amount to invest in the risky
le
pe
ne
irc
ra
le
ne
irc
in
rc
p
vi
r
le
112 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
As risk-aversion increases, the investor puts less into the risky asset. The fact that
irc
vi
the amount invested is independent of wealth results from the agent's absolute
in
in
rc
risk aversion, defined as -U"(x)/U'(x) = 1, being a constant since she uses
r
le
pe
ne
irc
exponential utility. For HARA utilities, e.g., neither the absolute risk aversion nor
vi
the relative risk aversion, defined as R(x) = -x U"(x)/U'(x), are constants.
in
rc
le
In the HARA case, the agent's risky investment is a non-trivial function of both
pe
ne
irc
wealth and time.
vi
in
in
rc
r
le
5.3.3
pe
Verification
ne
irc
vi
in
The derivation of the DPE (5.19) in the previous section provides a necessary
rc
le
condition for the value function. A pertinent question, however, is whether or
pe
ne
irc
not a solution of the DPE does indeed provide the solution to the original control
vi
in
in
problem. The main workhorse for showing this is indeed the case, when classical
rc
r
le
pe
ne
irc
We state the result below and refer the reader to many of the excellent texts
vi
in
rc
on optimal control for its proof, see e.g., Yong & Zhou (1999), Fleming & Saner
r
irc
vi
THEOREM 5.2 Verification Theorem. Let 'ljJ E C 1 • 2 ([0,T] x 1Rn ) and satisfies,
in
in
rc
r
for all u EA,
le
pe
ne
irc
Ot 'Ip (t, X) + (,C''(ljJ (t,X) + F (t,X, U)) :S: 0 , V (t,X) E [0,T] X JRn ,
vi
in
rc
G(x)-'1/J(T,x):::; 0 .
r
le
pe
ne
irc
Then
vi
in
in
rc
pe
ne
irc
Moreover, if for every (t,x) E [O,T] x 1Rn , there exists measurable u*(t,x)
rc
le
such that
pe
ne
irc
tx
0 = 8tl/J(t,x) + ( ,e�*( , )'lj)(t,x) + F(t,x,u*(t,x)))
vi
in
in
rc
\/ (t,x) E [O,T] ]R ,
n
X
pe
ne
uEA
irc
vi
= G(x),
in
le
dX:
irc
vi
in
in
r
le
pe
= 'lj)(t,x) ,
ne
vi
in
rc
le
pe
ne
irc
The theorem states that if we can find a solution to the DPE and demon
vi
strate that it is a classical solution, i.e. once differentiable in time and twice
in
in
rc
le
differentiable in the state variables, and the resulting control is admissible, then
ne
irc
in
rc
p
vi
r
le
5.4 Control for Counting Processes 113
pe
irc
vi
rc
le
the solution is indeed the value function we seek and the resulting control is the
pe
ne
irc
optimal one - at least an optimal Markov control. Another key result is that, un
vi
in
rc
der some more technical assumptions, the optimal control is Markov, even if we
i
r
le
pe
search over general F-predictable controls. See, e.g., Theorem 11.2.3 in 0ksendal
ne
irc
(2010).
vi
in
rc
le
pe
ne
irc
5.4 Control for Counting Processes
vi
in
rc
i
r
le
pe
In the previous section, diffusion processes were the driving sources of uncertainty
ne
irc
vi
in
rc
le
pe
to drive uncertainty. There are many features that can be incorporated into the
ne
irc
analysis, but the general approach remains the same, and as such only the case
vi
in
rc
of a single counting process with controlled intensity will be investigated. This
i
r
le
pe
amounts to treating doubly stochastic Poisson processes, or Cox processes, which
ne
irc
arc counting processes with intensity that itself is a stochastic process and in this
vi
in
rc
le
pe
Consider the situation in which the agent can control the frequency of the
ne
irc
jumps in a counting process N and does so to maximise some target. In this
vi
in
rc
i
r
le
pe
ne
irc
T
( F(s,N.:',v s )ds] ,
vi
H(n) = sup lE [c(Nr) + (5.21)
in
rc
Jo
r
le
uEAo,T
pe
ne
rc
xr
i
r
pe
ne
irc
i
1
vi
Nt = Nt - >.� ds
in
rc
le
pe
ne
irc
rc
i
r
le
bounded.
vi
1
le
given by
pe
ne
irc
vi
T
Hu (n) = lE [ G (Nr) + 1 F(s, Ni)ds] , (5.22)
in
rc
i
r
le
pe
ne
irc
le
pe
ne
uEAo,T
irc
In the next two subsections we provide a concise derivation of the DPP and the
vi
in
rc
associated DPE.
i
le
ne
irc
in
rc
p
vi
114 Stochastic Optimal Control and Stopping
r
le
pe
irc
vi
rc
le
pe
ne
5.4.1 The Dynamic Programming Principle
irc
vi
As before, the original problem is embedded into a larger class of problems
in
rc
i
indexed by time t E [O, T] by first defining
r
le
pe
ne
irc
vi
H(t,n) := sup Hu (t,n), and (5.24a)
in
rc
le
uEAt,T
pe
ne
irc
(5.24b)
vi
in
rc
i
r
le
pe
ne
irc
vi
take an arbitrary admissible strategy u and flow the N process forward in time
in
rc
le
from t to an arbitrary stopping time T � T. Then, conditional on N}/:, the
pe
ne
irc
contribution of the running reward/penalty from T to T and the terminal reward
vi
in
can be viewed as the performance criteria starting from the new value of N}/:.
rc
i
r
le
This allows the value function to be written in terms of the expectation of its
pe
ne
irc
vi
in
becomes le
pe
ne
irc
vi
in
i
r
le
pe
ne
vi
in
rc
le
pe
ne
irc
rc
holding if u is the optimal control ·u*) and an arbitrary n. Hence, on the right
i
r
le
hand side of (5.25) the performance criteria Hu (T, N;;') is bounded above by
pe
ne
irc
the value function H (T, N}/:) and the equality can be replaced by an inequality
vi
in
rc
with the value function (and not the performance criteria) showing up under the
r
le
pe
expectation:
ne
irc
7
.l
vi
in
rc
u
le
pe
ne
irc
vi
lt
r
le
·uEA
pe
ne
irc
Note that on the right-hand side of the first line of (5.26), the arbitrary control u
vi
in
only acts over the interval [t, T] and the optimal control is implicitly incorporated
rc
i
r
le
in the value function H (T, N;;'), but with the state variable N beginning at the
pe
ne
irc
point where the arbitrary control ·u caused N to flow, namely N;;'. Next, taking
vi
in
rc
the best control on the right-hand side must also dominate the left-hand side,
r
le
since the arbitrary one does. Then, the right-hand side is no longer dependent on
pe
ne
irc
the arbitrary control. Finally, taking a supremum over all admissible controls on
vi
in
rc
the left-hand side allows us to replace the left-hand side with the value function
i
le
ne
irc
in
rc
p
vi
r
5.4 Control for Counting Processes ll5
le
pe
irc
vi
rc
le
and provides us with the first inequality
pe
ne
irc
vi
in
rc
H(t,n) <::'. suplEt,n [H(T,N;/)+l F(s,N:,u s )d) (5.27)
J
i
r
le
pe
-uEA t
ne
irc
vi
in
rc
such that
r
le
pe
ne
irc
E.
vi
in
Such a control exists if the value function is continuous in the space of controls.
i
r
le
r
Consider its modification up to time T:
pe
ne
irc
vi
(5.29)
in
c
le
r
pe
irc
'U
vi
in
i
r
le
pe
ne
T
=lEt,n [ Hij (T,N:/)+ 1 F(s,NY,u!)ds] ,
0
irc
(from (5.25)),
vi
in
rc
T
=lEt,n [ Hv (T,N;/)+ 1 F(s,N:,·u 3 )ds] ,
0
le
pe
ne
(using (5.29)),
irc
vi
in
T
rc
i
-E,
r
(by (5.28)).
le
pe
ne
irc
Since the above holds for every v. and every E, it holds for the sup, and we take
vi
in
rc
le
pe
ne
irc
T
H(t,n) 2 suplEt,n [H(T,N;/)+l F(s,N:, U s )ds] (5.30)
vi
in
rc
-uEA t
i
r
le
vi
THEOREM
r
irc
r
vi
in
i
r
le
pe
uEA .It
ne
irc
le
pe
ne
irc
rc
This section develops the DPE satisfied by the value function, which we obtain
r
le
pe
ne
vi
diffusion case, set the stopping time T in the DPP to be the minimum of (i) the
in
c
time it takes the process Nt to exit a ball of size E around its starting point, and
r
le
r
pe
ne
ci
in
T
r
ne
irc
in
rc
p
vi
r
le
116 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
Next, write the value function (for an arbitrary admissible control u) at the
irc
vi
stopping time T in terms of the value function at t using Ito's lemma. Specifically,
177
in
rc
i
r
le
pe
H(T,N,:') = H(t,n) + (8t + ,C�)H(s,N8u)ds
ne
irc
vi
(5.32)
in
rc
le
pe
ne
irc
vi
rc
i
r
h : lll+ x Z+ r-+ lll as follows:
le
pe
ne
irc
vi
in
rc
le
Taking v E A to be constant over the interval [t, T], applying the lower bound
pe
ne
irc
(5.30), and substituting (5.32) into the right-hand side implies that
vi
in
rc
7
H(t,n) 2' sup!E:t,n [ H(T,N,:') + ft F(s,N::,u s )ds]
i
r
le
pe
ne
uEA
irc
7
2' Et,n [ H(T,N�) + }� F(s,N:;',v)ds]
vi
in
rc
le 7 F(s,N:;',v)ds]
pe
ne
rc
i
r
+ ft
le
=Et,n [H(t,n) pe
ne
irc
vi
The third equality follows because the stochastic integral with respect to Nt
in
rc
because we have INt" - nl :c:; E, and so ,Cf H(t, Nt") is bounded. Subtracting
irc
vi
H(t, n), dividing by h, and taking the limit as h '\i O implies that
17
in
rc
i
r
le
pe
ne
0 2' �fr} Et ,n [ ¼
vi
= (8t + (5.33)
r
le
pe
ne
irc
In the above, the control is constant, and equals v, on the interval [t, T]. The
vi
in
rc
pe
ne
irc
(i) as h '\i 0, T = t + h a.s. since the process will not hit the barrier of E in
vi
in
le
(ii) the condition that IN� - nl :c:; E, so that if the process does hit the barrier,
pe
ne
irc
it is bounded,
vi
t+
in
i
r
le
pe
vi
in
le
pe
(5.34)
irc
uEA
vi
in
rc
Next, we show the inequality is indeed an equality. For this purpose, suppose
le
ne
irc
in
rc
p
vi
5.4 Control for Counting Processes 117
r
le
pe
irc
vi
rc
le
pe
ne
that u* EA is an optimal control, then from the DPP (5.31) we have
irc
T
vi 1
in
rc
i
r
le
pe
ne
irc
Repeating the steps from above (i.e. applying Ito's lemma, taking expectations,
vi
in
rc
le
pe
OtH(t,n) + £f H(t,n) + F(t,n,u*) = 0.
ne
irc
vi
in
c
Combining this result with (5.34), we arrive at the DPE (also known in this
i
r
le
pe
ne
context as the Hamilton-Jacobi-Bellman equation)
irc
vi
8tH(t,n) + sup (£fH(t,n) + F(t,n,u)) = 0 ,
in
c
le
r
uEA, (5.35)
pe
ne
H(T,n) = G(n).
irc
vi
in
rc
i
r
le
The terminal condition follows from the observation that the integral in the
pe
optimisation problem (5.24) vanishes as t /' T. Recall that the generator Ct for
ne
irc
vi
in
irc
vi
in
As in the diffusion case, the optimisation of the control in (5.35) is only over its
rc
value at time t, rather than over the whole path of the control. Hence, it appears
i
r
le
pe
ne
irc
that the optimal control can be obtained pointwise. Treating the value function
vi
in
as known, the optimal control can often be found in feedback control form
rc
le
in terms of the vaJue function itself. Substituting the feedback control back into
pe
ne
irc
(5.35) typically results in non-linear PDEs. In this Poisson case, the supremum
vi
in
rc
i
r
le
sup (£fH(t,n)+F(t,n,u))
pe
ne
irc
uEA,
vi
in
le
pe
uEA,
ne
irc
i
r
le
H (t, n + l) - H (t,n) < 0. Such controls are called bang-bang controls because
pe
ne
irc
the quantity being controlled (in this case the intensity) reaches its extremal
vi
in
rc
points. To make the problem more interesting we either need to (i) include a
r
le
pe
irc
vi
rc
and therefore controlled indirectly, and have this stochastic process affect the
r
le
pe
ne
vi
in
c
le
r
pe
ne
Process
rc
vi
One such way to do this, which will also appear in later chapters as a result
ci
in
r
ne
irc
in
rc
p
vi
118 Stochastic Optimal Control and Stopping
r
le
pe
irc
vi
rc
le
pe
ne
controlled process satisfying the SDE
irc
vi = µ(t,xr,Nt,Ut ) dt + O"(t,xr-' N;'-'Ut ) dNt.
in
dXt (5.36)
rc
i
r
le
pe
ne
In this manner, the counting process N u acts as the source of jumps in x u , and
irc
vi
the control u may modulate the size of those jumps as well as the drift of the X
in
rc
le
pe
ne
In this more general context, the performance criteria can depend on both N
irc
and X. Specifically, let
vi
in
rc
i
r
le
pe
u
ne
irc
uEA
T
vi
1 F(s,X�,N�,u
in
rc
ds] ,
le
8)
pe
ne
irc
vi
in
rc
i
r
le
lowing the same arguments as in the previous sections, the DPP for this problem
pe
ne
irc
can be written as
T
vi
in
[H (T,x;',N:;') + 1
rc
H(t,x,n)
le
pe
uEA t
ne
irc
vi
rc
i
r
le
pe
ne
uEA
(5.39)
irc
{
= G(x,n) .
vi
H(T,x,n)
in
rc
le
irc
= µ(t,x,n,u) 8x H(t,x,n)
vi
£f H(t,x,n)
in
rc
i
r
le
pe
ne
irc
Notice that the control appears in both the intensity factor and in the difference
vi
in
rc
operator, and there is a partial derivative with respect to the state variable x.
r
le
pe
irc
the control and what that change does to the process X;;', as well as what the
vi
in
rc
pe
ne
irc
Trades
r
le
pe
irc
purchase one share at the best offer and then seeks to unwind her position by
vi
in
rc
posting a limit order (LO) at the midprice plus the depth u which she controls.
i
r
le
pe
She repeats this operation over and over again until a future date T. Her cost
ne
irc
from acquiring the share is St + 6../2, where 6. is the spread between the best
vi
in
rc
bid and best ask and is assumed constant, and since St is the midprice, the best
r
le
pe
ask is resting in the LOB at St + 6../2. The revenue from selling (if her LO is
ne
irc
vi
rc
ne
irc
in
rc
p
vi
5.4 Control for Counting Processes 119
r
le
pe
irc
vi
rc
le
There is, however, no guarantee that the sell LO will be filled, and in this case
pe
the agent's wealth X satisfies (5.36) with µ. = 0 and CTf = (ut - % ) so that
ne
irc
vi
in
in
rc
= (?L t - % )
r
le
dX;" dN;" .
pe
ne
irc
vi
Here Nt counts the number of round-trip trades that the agent has completed
in
rc
up until time t. The agent controls the intensity of this counting process because
r
le
pe
ne
the larger she chooses u, the lower is the probability of her LO being filled.
irc
vi
There are many ways in which we can model the probability of the LO being
in
in
c
r
filled given how deep in the LOB the agent posts the order. We need two ingre
le
pe
ne
irc
dients. First, we need to assume an arrival rate for the buy MOs that are sent
vi
by other market participants. Here we assume, for simplicity, that this rate is a
in
c
le
constant A > 0. The other ingredient is the probability of the LO being filled
r
pe
ne
irc
conditional on the MO arriving. A popular choice in the literature is to assume
vi
in
in
that when posted u 2> 0 away from the midprice, the probability of being filled,
given that an MO arrives, is P(u) = e-,rn,, and another is P(v.) = (1+K.?L t )-1,
rc
r
le
pe
ne
irc
where r;. and I are positive constants. Putting these ingredients together gives us
two choices to model the fill probability: Af = e-" u,A and At = (1+r;. ?L t )-, A.
vi
in
rc
To solve the agent's optimisation problem we use the performance criteria and le
pe
ne
irc
value function as in (5.37) with F = 0 and G(x, n) = x. If we assume that the
vi
in
rc
r
le
pe
8t H+supAe-"u (H(t, x +(u-½6.), n+ 1)- H(t, x, n)) = 0 ,
ne
irc
u:2'.0
vi
in
rc
le
pe
ne
assume H(t, x, n) = h(t, x) so the value function depends solely on wealth and
irc
vi
in
in
rc
time. Furthermore, due to the linear nature of the problem, we can further write
h(t, x) = x +g(t) for some deterministic function g(t) with terminal condition
r
le
pe
ne
vi
in
rc
le
8tg+supAe-"u(u-½6.) =0 . (5.40)
pe
ne
u:2'.0
irc
vi
in
in
This shows that the optimal control is independent of t, x and n. In particular,
rc
r
le
pe
ne
irc
vi
in
rc
le
irc
* 1A 1
vi
in
in
7L =2u+-K. .
rc
r
le
pe
ne
irc
It is not difficult to check that this is indeed a maximum and not a minimum,
vi
in
and upon substituting the feedback control (which in this case is just a constant)
c
le
pe
ne
rc
+ !:_ e-"(½L+-¼) = 0.
vi
ci
Ot9
in
in
K.
le
r
ne
irc
in
rc
p
vi
Stochastic Optimal Control and Stopping
r
120
le
pe
irc
vi
rc
le
pe
ne
The value function is therefore given by the very compact expression
irc
vi
in
rc
H(t, x, n) = x + � e-/i0(½ 6 +-¼) (T - t).
i
r
le
pe
r;
ne
irc
vi
in
The optimal posting strategy (5.4.2) has a simple interpretation. The agent
rc
le
must recover the half-spread cost she incurred when using an MO to acquire the
pe
½,6,
ne
irc
asset, and this is given by in the optimal posting (5.4.2). In addition she
vi
in
posts further away from the midprice by an amount which maximises how much
rc
i
r
le
deeper her posting can rest in the book, given the probability of being filled, and
pe
ne
irc
vi
in
The strategy derived here is optimal, but naive because it is a result of our
rc
le
simplifying assumptions in the way we model the state variables, and the simple
pe
ne
irc
performance criteria employed by the agent. For instance, this strategy does not
vi
in
rc
make any adjustments to the optimal posting based on important quantities
i
r
le
and costs such as: accumulated inventory, wealth, remaining time to trade, and
pe
ne
irc
adverse selection costs. The economic principles that underpin the link between
vi
in
rc
these quantities and costs to the optimal postings were discussed in Chapter 2. In
r
le
pe
the latter parts of this book we incorporate these issues in the trading strategies
ne
irc
when developing algorithms where the agent maximises profits executing round
vi
in
rc
trip trades in a more realistic and general setting than the one developed here.
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
As already hinted above, there are many situations in which the agent is exposed
vi
in
rc
to more than one source of uncertainty. Typically, an agent is faced with control
i
r
le
pe
problems where both diffusive and jump uncertainty appear, and she may be
ne
irc
able to control all or only parts of the system. Such scenarios will appear in
vi
in
rc
several of the algorithmic trading problems that arise in the sections ahead and
r
le
pe
ne
here we simply state the main results for a fairly general class of models.
irc
rc
dim p) with controlled intensities >... u = (>...f)o<e:t<e:T, and let u = (ut ) o<e:t<e:T
i
r
le
pe
ne
denote the control processes (of dim rn). Furthermore, let W = (Wt )o<e:t<e:T
irc
denote a collection of independent Brownian motions (of dim rn). Next, let X u =
vi
in
rc
(X"f )o<t<T denote the controlled processes (of dim rn) which will appear directly
r
le
pe
ne
in the agent's performance criteria. If one (or more) of the counting processes
irc
rc
and/ or 1'f, shown below, then take Xi = N! for some j, i.e. include it through
i
r
le
pe
ne
vi
le
pe
(5.41a)
irc
vi
in
rc
With a slight abuse of notation we write the controlled drift, volatility and jump
le
ne
irc
in
rc
p
vi
5.4 Control for Counting Processes 121
r
le
pe
irc
vi
rc
le
size as
pe
ne
irc
vi µ"( :=µ(t,X'f,ut), (m. x 1 vector), (5.41b)
in
rc
i
r
le
CT"( :=CT(t,X'f,ut), (m x m matrix), (5.41c)
pe
ne
irc
vi
in
rc
le
Furthermore, we assume that the controlled intensity takes the form
pe
ne
irc
(5.4le)
vi
in
i
r
le
The modelling approach above implies that the agent can control, in general,
pe
ne
irc
the drift, volatility, jump size and jump arrivals. Precisely how much control she
vi
in
has depends on the specific form of the various functions appearing in (5.41b),
c
le
r
irc
The agent's performance criteria is given by
vi
in
rc
i
r
le
pe
(5.42a)
ne
irc
vi
in
rc
le
pe
ne
irc
H(t,x) = sup Hu (t,x). (5.42b)
vi
in
rc
uEA[t,T]
i
r
le
Repeating the analysis along similar lines to the previous sections, we arrive
pe
ne
irc
le
THEOREM
pe
ne
rc
i
r
le
uEA[t.TJ .ft
vi
in
rc
for all (t,x) E [O,T] x IRm and all stopping times T::;; T.
r
le
pe
ne
irc
rc
i
r
pe
uEA,.
ne
(5.44)
irc
{
vi
H(T,x) = G(x),
in
c
le
er
pe
vi
in
i
r
le
pe
ne
irc
j=l
r
le
r
pe
where 'Y. denotes the vector corresponding to the / h column of 'Y, Dx H rep
ne
irc
j
resents the vector of partial derivatives with respect to x, and D;H represents
vi
in
rc
ne
irc
in
rc
p
vi
122 Stochastic Optimal Control and Stopping
r
le
pe
irc
vi
rc
le
pe
ne
The various terms in the generator can be easily interpreted: in the first line,
irc
the first term represents the (controlled) drift of X, and the second term repre
vi
in
rc
sents the (controlled) volatility of X; in the second line, the intensity for each
i
r
le
pe
ne
counting process is shown separately, and each term in the sum has the (con
irc
vi
trolled) rate of arrival of that jump component through Aj , the difference terms
in
rc
that appear are due to the jump arriving and causing that component of N to
r
le
pe
ne
irc
vi
by r-;·
in
rc
i
r
le
pe
ne
irc
vi
in
rc
5.5
r
Optimal Stopping
le
pe
ne
irc
vi
in
In many circumstances the agent wishes to find the best time at which to enter
rc
i
r
le
or exit a given strategy. The classical finance example of this is the 'American
pe
ne
irc
put option' in which an agent who owns the option has the right, at any point
vi
in
in time up to, and including, the maturity date T, to exercise the option by
rc
receiving the amount of cash K in exchange for the underlying asset. The net
le
pe
ne
irc
cash value of this transaction at the exercise date Tis (K -ST ). Naturally, the
vi
in
agent will not exercise when ST > K, hence the effective payoff is (K -ST ) +
rc
i
r
le
where (·)+ = max(·, 0). This simple observation provides only a trivial part of
pe
ne
irc
the strategy: to determine the full strategy, the agent seeks the stopping time
vi
in
rc
T which maximises the discounted value of the payoff, i.e. she searches for the
r
le
irc
vi
in
suplE[e-n(K-ST )+J,
rc
i
r
le
TET
pe
ne
irc
where Tare the F-stopping times bounded by T. This is just one of many such
vi
in
rc
problems, and in general, problems which seek optimal stopping times are called
r
le
pe
ne
stopping problems admit a DPP and have an infinitesimal version, i.e. a DPE.
vi
in
rc
i
In this section we provide a concise outline of the DPP and DPE for optimal
r
le
pe
ne
stopping problems.
irc
vi
Rather than first developing the diffusion case, then the jump, and then the
in
rc
le
pe
ne
model. For this purpose, let X = (X t )o< t <T denote a vector-valued process of
irc
vi
rc
i
r
le
pe
ne
irc
vi
in
rc
whereµ: [O,T] X IRm H IRm , a: [O,T] X IRm H IRm X IRm , 1: [O,T] X IRm H
r
le
pe
ne
rc
The filtration F is the natural one generated by X, and the generator of the
le
ne
irc
in
rc
p
vi
r
5.5 Optimal Stopping 123
le
pe
irc
vi
rc
le
pe
ne
process L t acts on twice differentiable functions as follows:
irc
vi
L t h(t,x) = µ(t,x) · Dx h(t,x) + ½Tro-(t,x)a(t,x)' D�h(t,x)
in
rc
i
r
le
L A (t,x) [h(t, x + r
p
pe
ne
+
irc
1 ,x)) � h(t,x)]
j (t
vi
in
j=l
rc
le
Recall that D x h represents the vector of partial derivatives with respect to x,
pe
ne
irc
and D�h represents the matrix of (mixed) second order partial derivatives with
vi
in
rc
respect to x.
i
r
le
pe
The agent then has a performance criterion, for each F-stopping time T E
ne
irc
1Tt,T], given by
vi
in
rc
(5.45a)
r
le
pe
ne
irc
where G ( X 7) is the reward upon exercise, and she seeks to find the value function
vi
in
rc
=
i
H(t,x) sup H7 (t,x) ,
r
(5.45b)
le
pe
ne
irc
TE'Tit,T]
vi
and the stopping time T which attains the supremum if it exists. At first glance,
in
rc
7
r
irc
we included when studying optimal control. Such terms can, however, be cast
vi
into the above form by choosing one of the components of X, say X 1 , to satisfy
in
rc
i
r
le
dXf =F(t,X;,...,xtm)dt ,
pe
ne
irc
vi
and writing G(x) = x 1 + G(x 2 , ... ,x m ). It is therefore no loss of generality
in
rc
le
to consider only terminal rewards. In the stochastic control case, we kept the
pe
ne
irc
i
r
le
From the posing of the stopping problem in (5.45), intuitively, we see that the
rc
le
agent is attempting to decide between stopping 'now' and receiving the reward
pe
ne
irc
rc
However, on closer examination it seems clear that she should continue to wait
i
r
le
at the point (t,x) E [O,T] x ]Rm as long as the value function has not attained
pe
ne
irc
a value of G(x) there. This motivates the definition of the stopping region, S,
vi
in
rc
which we define as
r
le
pe
ne
rc
It should be evident that whenever (t,x) E S, i.e. if the state of the system
i
r
le
pe
vi
this region, s c , is known as the continuation region. In this region, the agent
r
le
pe
ne
can still improve her value and therefore continues to wait. Both regions can be
irc
vi
rc
ne
irc
in
rc
p
vi
r
le
124 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
irc
vi
in
rc
i
r
le
Figure 5.3 A generic depiction of the
pe
ne
irc
vi
optimal stopping problem (5.45). A
in
rc
le
pe
ne
irc
Stopping
Region S
vi
in
rc
i
r
le
pe
ne
Time
irc
vi
in
rc
le
pe
equivalently its boundary 8S) must be solved simultaneously with the value
ne
irc
function itself. Hence, the DPEs which arise in this context are free-boundary
vi
in
rc
problems, also called obstacle problems, or variational inequalities. Such PDEs
i
r
le
pe
ne
are more difficult to solve, and even very simple examples typically do not admit
irc
explicit solutions take for example the American put option when the under
vi
in
rc
le
pe
ne
often enough to characterise the solution and many numerical schemes exist for
irc
solving them.
vi
in
rc
i
r
le
pe
ne
irc
Reasoning along similar lines as before, we can show that the following DPP
r
le
pe
ne
irc
applies.
vi
in
rc
i
THEOREM
r
le
vi
in
rc
le
pe
TE'7it,T]
ne
irc
for all (t,x) E [O,T]x ]Rm and all stopping times 8::::; T.
vi
in
rc
i
r
le
pe
The intuition of this DPP is that if the optimal stopping time T* occurs prior
ne
irc
to 8, then the agent's value function equals the reward at T*. If, however, the
vi
in
rc
agent has not stopped by 8, then at 8 she receives the value function evaluated
r
le
pe
ne
rc
i
r
le
vi
As in the optimal control problems studied earlier, the DPP for optimal stopping
in
rc
can be recast in its infinitesimal version - a much more useful form for compu
r
le
pe
ne
tation - i.e. it can be used to derive a DPE. This time, we state the result first
irc
vi
in
and then provide the proof. We follow closely the proof in Touzi (2013) as it
rc
i
le
provides a nice alternative to the usual construction. It also opens the door for
ne
irc
in
rc
p
vi
r
le
5.5 Optimal Stopping 125
pe
irc
vi
rc
le
pe
ne
the interested reader to move on to studying the viscosity solution approach
irc
vi
to stochastic optimal control and optimal stopping, which relies heavily on the
in
rc
i
proof by contradiction approach taken here.
r
le
pe
ne
irc
vi
in
rc
lems. Assume that the value function H(t, x) is once differentiable in t and all
r
le
pe
second order derivatives in x exist, i.e. HE C 1 , 2 ([0,T], JR m ), and that G: JRm c-+
ne
irc
JR is continuous. Then H solves the variational inequality, also known as an
vi
in
c
obstacle problem, or free-boundary, problem:
i
r
le
pe
ne
irc
vi
in
c
le
r
irc
vi
in
Proof The proof is broken up into two steps by showing (on D) that (i) the
rc
i
r
le
left-hand side is first smaller than or equal to zero, and that (ii) by contradiction
pe
ne
irc
the left-hand side is also greater than or equal to zero. Therefore, equality must
vi
in
hold.
rc
le
pe
ne
rc
i
r
le
pe
ne
irc
To show this, first note that the constant stopping rule T = t is admissible.
vi
in
rc
Therefore, the performance criteria on this constant rule equals G and we must
r
le
irc
Next, take any point (to,xo) E D. We show that the desired inequality holds
vi
in
rc
i
r
le
pe
ne
irc
0h = inf{t>to: (t,JJXt-xoll)tf:.[to,to+h]xl},
vi
in
rc
where 11 · I I denotes the Euclidean norm. That is, we take a stopping time equal
r
le
pe
ne
to the minimum of to+ h and the time it takes X to exit a ball of size 1 from
irc
vi
its current position. As long as h < T- to, this is an admissible stopping time.
in
rc
i
r
pe
ne
irc
vi
in
rc
le
We then expand the term under the expectation using Ito's lemma for jump
pe
ne
irc
diffusions to write
vi
in
rc
H (0h,Xe h )
i
r
1
le
pe
=
ne
H(to,xo)
irc
1/h
vi
in
0h
c
+ {8tH(t, Xt) + LtH(t, Xt)} dt+ (a(t, Xt) D x H(t, Xt))' dWt
r
le
r
pe
� �
t,_
ne
rc
vi
h
ci
dN�'
in
r
ne
irc
in
rc
p
vi
r
le
126 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
J�
pe
ne
where N t =N t - >..(s, X s) ds are the compensated versions of the counting
irc
vi
process, and /.j denotes the l h column of T
in
rc
i
Since the stopping time 0h is chosen so that the process X remains bounded
r
le
pe
ne
by the ball of size 1 around x0 plus the potential of a jump (which we assume
irc
vi
bounded), it follows that the stochastic integrals with respect to both the
in
rc
le
Brownian motions and the compensated counting processes vanish under the
pe
ne
irc
expectation. Hence, we have
vi
in
i
r
le
pe
ne
irc
vi
in
c
Dividing by hand taking h\i 0, in which case 01i \i h a.s. (since Xt will a.s.
r
le
r
pe
not hit the edge of the bounding ball), the Mean-Value Theorem implies that
ne
irc
vi
rc
i
r
le
pe
ne
This completes the first part of the proof.
irc
vi
(ii) We next show by contradiction that
in
rc
le
pe
max{ 8t H + L t H , G - H } 2': 0,
ne
on D.
irc
vi
in
rc
If the above inequality does not hold on D, then there exists a point (to, x0) E
i
r
le
pe
D such that
ne
irc
vi
le
pe
ne
We show that (5.48) contradicts the DPP in (5.46). To this end, introduce
irc
vi
a new function i.ps which approximates the value function near (to, xo) but
in
rc
i
r
pe
ne
irc
E > 0.
in
rc
le
Under the assumption (5.48), for E>0 but sufficiently small, there is a small
pe
ne
irc
neighbourhood around (to, xo) on which the value function is at least o larger
vi
in
than the reward G and for which the operator (8t + L t ) renders the approxi
rc
i
r
le
mation i.ps negative. More precisely, there exists h>0 and c5>0 such that
pe
ne
irc
�
rc
le
pe
where Bh is a ball of size h around xo, i.e. Bh = {x E ]Rm : llx - xoll � h}.
ne
irc
rc
i
r
le
DDh
vi
in
le
r
vVe now take a stopping time equal to the first time the process exits this
pe
ne
rc
ball:
vi
ci
in
0 :=inf{t>to : (t,Xt)t/:.Dh}·
i
le
r
ne
irc
in
rc
p
vi
r
le
5.5 Optimal Stopping 127
pe
irc
vi
rc
le
pe
Take a second stopping rule, this time arbitrary, T E Tft ,TJ, and let '1/; =
ne
0.
irc
TI\
vi
Then we have
in
rc
i
r
le
H('1/;, X1/i) - H(to,xo)
pe
ne
(5.51)
irc
vi
in
rc
since 4J c and H coincide at (to,xo). From Ito's lemma, and the fact that X 1/i
r
le
pe
ne
is bounded due to stopping the first time X exits the ball Bh, we have
irc
[I:
vi
in
c
= lEt0 ,x 0
i
r
le
lEt0 ,x 0 [cp c (?/J, X,;1) - 4J c (to, Xo)] (8t + .Ct) t.ps(t, Xt) dt] :::; 0 .
pe
ne
irc
vi
in
The diffusive and jump terms vanish because they are martingales, and the
c
le
r
irc
Hence, putting this together with (5.51), we have
vi
in
rc
i
lEt0 ,x 0 [H('1/;, X¢) - H(to, Xo)] :::; lEt0 ,x 0 [(H - 4J e: )(?j; , X,p )] :::; -(lP'(T 2: 0) ,
r
le
pe
ne
irc
vi
in
rc
H(to,xo), we have
r
le
pe
ne
rc
i
r
le
vi
in
le
where we have replaced H(T, X7 ) by its lower bound (G(XT ) + 15) on { T < 0},
pe
ne
irc
since in that event we are still in D1i. Finally, since lEto ,x o []_ T <0] = lP'(T < 0),
vi
in
rc
i
we have
r
le
pe
ne
irc
vi
in
rc
By the arbitrariness of T E 'Tft ,TJ, and the fact that the constants added to the
r
le
pe
ne
rc
i
r
le
pe
D
ne
irc
vi
The approximating function cp 6 in the second part of the above proof can
in
rc
le
irc
the viscosity solution approach makes heavy use of both upper and lower semi
vi
in
i
r
le
differentiate. We do not divert into these discussions here, and instead refer the
pe
ne
irc
le
pe
ne
rc
ci
in
on D .
le
r
ne
irc
in
rc
p
vi
r
128 Stochastic Optimal Control and Stopping
le
pe
irc
vi
rc
le
pe
ne
This really represents two possibilities: either we have
irc
vi
in
in
8tH + LtH = 0 and H < G,
rc
(i)
r
le
pe
ne
irc
or we have
vi
in
8tH + LtH < 0.
rc
r (ii) H = G and
le
pe
ne
irc
The first of these possibilities corresponds to the value function H being lower
vi
in
in
than the reward G, and in this region the value function satisfies a linear PDE.
rc
r
le
If we introduce the stochastic process ht = H (t, Xt ), then due to the linear PDE
pe
ne
irc
having zero right-hand side, h t is a martingale. The region in which (i) holds is
vi
in
what we identified earlier as the continuation region s c , since it is suboptimal
rc
le
pe
to stop there. The second of these possibilities corresponds to the value function
ne
irc
H equalling the reward G, and hence occurs in the stopping region S. Moreover,
vi
in
in
the linear operator 8t + Lt renders the value function negative. In this region,
rc
r
le
pe
if we did not pin the value function to the reward, we see that the process h t
ne
irc
vi
in
rc
le
pe
irc
entire V.
vi
in
in
rc
r
le
pe
ne
irc
vi
5.6 Combined Stopping and Control
in
rc
le
pe
ne
irc
There are many instances in which an agent wishes to solve a combined opti
vi
in
in
mal stopping and control problem - i.e. she wishes to solve simultaneously
rc
r
le
for the optimal timing and optimal strategy in order to maximise a reward. Such
pe
ne
irc
problems inherit features from both problem types and we will see that the re
vi
in
sulting DPEs are in effect a combination of the HJB equation and variational
rc
le
inequality.
pe
ne
irc
In this case, we adopt the modelling assumptions and notation from subsection
vi
5.4.3 but repeat it here. First, let Nu = (N"(' ) o :s;t:s;T denote a collection of
in
in
rc
r
le
counting processes (of dim p) with controlled intensities A u = (A"t) o <t<T, and
pe
ne
irc
let u = (ut) o :s;t:s;T denote the control processes (of dimension m). Furthermore,
vi
in
rc
le
dim m). Next, let Xu = (X"f) o :s;t:s;T denote the controlled processes (of dim m)
pe
ne
irc
which will appear directly in the agent's performance criteria. If one (or more)
vi
in
in
r
le
dependence in µ'f, lT'f and/or '"Y'f, shown below, then take Xf = Nf for some
pe
ne
irc
j. i.e. include it through one of the components in X. We next assume that the
vi
in
rc
le
pe
ne
irc
in
rc
le
With a slight abuse of notation we write the controlled drift, volatility and jump
ne
irc
in
rc
p
vi
r
le
5.6 Combined Stopping and Control 129
pe
irc
vi
rc
le
pe
ne
irc
size as
vi
in
in
rc
µf := µ(t, Xf' Ut)' (m x 1 vector) , (5.52b)
r
le
pe
ne
irc
vi
in
,f :=,(t,Xf,ut), (m x p matrix) . (5.52d)
rc
le
pe
ne
irc
Furthermore, we assume that the controlled intensity takes the form
vi
in
in
>..f := )\ (t, Xf' Ut)
rc
(5.52e)
r
le
pe
ne
irc
The modelling approach above implies that the agent can control, in general,
vi
in
rc
the drift, volatility, jump size and jump arrivals. Precisely how much control she
r
le
pe
has depends on the specific form of the various functions appearing in (5.52b),
ne
irc
(5.52c), (5.52d) and (5.52e).
vi
in
in
rc
Next, the agent's performance criteria for a given admissible control u and
r
le
pe
admissible stopping time T is given by
ne
irc
vi
Hu, T (t,x) = lEt,x [ G (X�)] ,
in
(5.53a)
rc
le
pe
ne
in
rc
TE'Tit,TJ uEA[t,TJ
pe
ne
irc
vi
In this manner, the agent selects a stopping rule, seeks the best strategy, and
in
rc
then selects the stopping rule which provides the best overall performance. As
r
le
pe
ne
such, she is aiming to decide whether to stop 'now' and receive the reward at
irc
vi
the point in state space to which her strategy took her, or wait and continue to
in
in
rc
pe
ne
irc
A DPP still applies in the current setting; however, now we must take care
vi
le
irc
in
rc
pe
ne
irc
TE7it,TJ uEA[t.TJ
r
le
pe
ne
irc
in
rc
r
le
The intuition here is similar to the previous DPPs. If stopping has not yet
pe
ne
occurred (T 2: 0), then the agent receives the value function at that point in
irc
vi
in
time, at that point in state space, where the optimal control has driven her to. If
rc
stopping has already occurred (T < 0), then the agent has already received the
le
pe
ne
irc
reward, and her value equals the reward at the time it was paid, at the point in
vi
in
in
in
rc
p
vi
r
le
130 Stochastic Optimal Control and Stopping
pe
irc
vi
rc
le
pe
ne
irc
THEOREM 5.8 Dynamic Programming Equation for Stopping and Con
vi
trol Problems. Assume that the value function H(t, x) is once differentiable ·in
in
in
rc
t and all second order derivatives ·in x exist, i.e. H E C 1• 2 ([O, Tl, ]Rm ), and that
r
le
pe
ne
G : ]Rm H IR is continuo11,s. Then H solves the quasi-variational inequality
irc
vi
(QVI),
in
rc
le
pe
ne
irc
on D , (5.55)
vi
uEA,
in
in
rc
r
le
pe
where D [O, T] x lRm .
ne
irc
vi
in
This is similar in spirit to the variational inequality (5.47) for the optimal
rc
le
stopping problem, but now contains an optimisation over the control process as
pe
ne
irc
well. The optimisation results in the equation becoming non-linear, as in the HJB
vi
in
in
equation (5.44), and hence the above equation is referred to as a quasi-variational
rc
r
le
pe
ne
irc
We once again have the notion of a stopping region S and continuation region
vi
s c , where
in
rc
= { (t, x) le = G(x)}.
pe
S
irc
vi
in
in
The only difference is that in the continuation region s c , the value function
rc
r
le
uEA,
r
le
pe
ne
in
rc
r
le
pe
vi
in
rc
le
Merton (1971), Bertsekas & Shreve (1978), Merton (1992), Yong & Zhou (1999),
pe
ne
irc
Chang (2004), Fleming & Soner (2006), 0ksendal & Sulem (2007), 0ksendal
vi
in
in
(2010), Pham (2010), Tonzi (2013).
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le Part 111 le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
Algorithmic and
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc rc rc
irc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
High-Frequency Trading
pe pe pe pe pe pe pe pe
r r r r r r r r
in in in in in in in in
in in in in in in in in
ne n ne ne ne ne ne ne
rc rc
er
c rc rc rc c r rc rc
irc irc irc irc irc irc irc irc irc
le le le le le le le le le
vi vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe p
r r r r r r r r
in in in in in in in in
ne ne ne ne ne ne ne ne
rc rc rc rc rc rc c r rc
irc irc irc irc irc irc irc irc
le le le le le le le le
vi vi vi vi vi vi vi vi
pe pe pe pe pe pe pe pe
r r r r r r r r
i i i i i i i i
p
vi
r
le
pe
irc
vi
rc
le
pe
Introduction to Part 111
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
In this part of the book we delve into the modelling of algorithmic trading
r
le
strategies. The first two chapters are concerned with optimal execution strategies
pe
ne
irc
where the agent must liquidate or acquire a large position over a pre-specified
vi
in
in
rc
window and trades continuously using only market orders. Chapter 6 covers the
r
le
pe
classical execution problem when the investor's trades impact the price of the
ne
irc
asset and also adjusts the level of urgency with which she desires to execute the
vi
in
rc
le
pe
i) carries out the execution programme as long as the price of the asset does
ne
irc
not breach a critical boundary, ii) incorporates order flow in her strategy to take
vi
in
in
rc
the buy or sell side of the market, and iii) trades in both a lit venue and a dark
pe
ne
irc
pool.
vi
in
rc
le
pe
ne
tion over a trading window, but she employs only limit orders, or uses both limit
irc
and market orders. Moreover, we show execution strategies where the investor
vi
in
in
rc
pe
ne
vi
schedules. We develop strategies for investors who wish to track the overall vol
in
rc
le
pe
ne
Cumulative Volume, and Volume Weighted Average Price, also known as VWAP.
irc
vi
The final three chapters cover various topics in algorithmic trading. Chapter
in
in
rc
10 shows how market makers choose where to post limit orders in the book. The
r
le
pe
ne
models that are developed look at how the strategies depend on different factors
irc
vi
including the market maker's aversion to inventory risk, adverse selection, and
in
rc
irc
Chapter 12 shows how information on the volume supplied in the limit order
in
in
rc
r
le
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
6
pe
Optimal Execution with Continuous
ne
irc
vi
in
in
rc
Trading I
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
6,1 Introduction
vi
in
rc
le
pe
ne
irc
A classical problem in finance is how an agent can sell or buy a large amount of
vi
in
in
shares and yet minimise adverse price movements which are a consequence of her
rc
r
le
own trades. Here, the term 'large' means that the amount the agent is interested
pe
ne
irc
in buying or selling is too big to execute in one trade. One way to think about
vi
in
the volume posted on the limit order book (LOB) at the best bid or best offer.
le
pe
ne
irc
Clearly, if the number of shares that the agent seeks to execute is significantly
vi
in
in
larger than the average size of a trade, then it is probably not a good idea to try
rc
r
le
Investors who regularly come to the market with large orders (orders that are
vi
in
rc
le
pe
pension funds, hedge funds, mutual funds, and sovereign funds. These investors
ne
irc
often delegate their trades to an agency broker (the agent) who acts on their
vi
in
in
rc
behalf. The agent will slice the parent order into smaller parts (sometimes
r
le
pe
called child orders) and try to execute each one of these child orders over a
ne
irc
period of time, taking into account the balance between price impact (trade
vi
in
rc
quicker) and price risk (take longer to complete all trades). What we mean by
r
le
pe
this trade-off is the following: imagine the situation in which the agent is selling
ne
irc
shares. If she trades quickly, then her orders will walk through the buy side of
vi
in
in
rc
the LOB and she will obtain worse prices for her orders. Even if she breaks up
r
le
pe
ne
each order into small bits (so that each one does not walk the book), and sends
irc
them quickly to the market, then other traders will notice an excess of sell orders
vi
in
rc
and reshuffle their quotes inducing again a negative price impact. If on the other
r
le
pe
ne
hand, she trades slowly, so as to avoid this price impact, then she will be exposed
irc
vi
to the uncertainty of what precisely the future prices will be. Hence, she must
in
in
rc
pe
ne
irc
The time the agent takes to space out and execute the smaller orders is crucial.
vi
Short time horizons will lead to faster trading (and hence more price impact)
in
rc
le
and less price uncertainty, but there are also many reasons why a long trading
pe
ne
irc
horizon might not be desirable. For instance, it might be that it is decided to sell
vi
in
in
a large chunk of shares because the price is convenient but by the time the agent
rc
le
executes all child orders, the share price could have dropped to a less desirable
ne
irc
in
rc
p
vi
r
le
6.2 The Model 135
pe
irc
vi
rc
le
pe
ne
level. Another reason which constrains the time needed to sell all the shares,
irc
vi
is that this particular operation is part of a bigger one which is the result of a
in
in
rc
r
le
portfolio rebalance which also requires the purchase of a large number of shares
pe
ne
irc
vi
in
the same time period.
rc
le
Hence the agent must formulate a model to help her decide how to optimally
pe
ne
irc
liquidate or acquire shares, where the aim is to minimise the cost of executing
vi
in
in
her trade(s) and balance it against price risk. Execution costs are measured as
r
le
the difference between a benchmark price and the actual price (measured as
pe
ne
irc
the average price per share) at which the trade was completed. Our convention
vi
in
is that when the sign of the execution cost is positive, it means that there is loss
c
le
r
of value in the operation because the actual price of the trade was worse than
pe
ne
irc
the benchmark price.
vi
in
in
rc
The benchmark price represents a perfectly executed price in a market with no
r
le
frictions. It is customary to use the midprice of the asset at the time the order
pe
ne
irc
is given to execute the trade. This benchmark is known as the arrival price
vi
in
rc
which is generally taken to be the average of the best bid and best ask, i.e. the
r
le
pe
midprice. Moreover, when the arrival price is the benchmark, the execution cost
ne
irc
is known as the implementation shortfall or slippage, see Almgren (2010).
vi
in
in
rc
r
le
pe
ne
irc
le
pe
ne
To pose the optimal execution problem we require notation to describe the num
irc
vi
ber of shares the agent is holding (inventory), the dynamics of the midprice, and
in
in
rc
pe
ne
irc
v =
(vt){o<::t<::T} is the trading rate, the speed at which the agent is liqui
r
le
@
pe
ne
dating or acquiring shares (it is also the variable the agent controls in the
irc
vi
optimisation problem),
in
in
rc
pe
ne
irc
& 3
rc
v
r
le
5 v = (Sn{o<::t<::T} corresponds to the price process at which the agent can sell
irc
@
vi
in
in
or purchase the asset, i.e. the execution price, by walking the LOB, and
rc
r
le
v
ne
@
irc
execution strategy.
vi
in
c
le
pe
ne
rc
ci
in
in
Q� = q, (6.la)
le
r
ne
irc
in
rc
p
vi
r
le
136 Optimal Execution with Continuous Trading I
pe
irc
vi
rc
le
pe
ne
while the midprice is assumed to satisfy the SDE
irc
vi
in
rc
i
r
le
pe
ne
where
irc
vi
in
• W = (Wt){o::;t:s;T} is a standard Brownian motion, and
rc
le
• g: lR+ -+ lR+ denotes the permanent price impact that the agent's trading
pe
ne
irc
action has on the midprice.
vi
in
rc
i
The execution price satisfies the SDE
r
le
pe
s,
ne
irc
vi
in
rc
where
le
pe
ne
irc
• f : lR+ -+ lR+ denotes the temporary price impact that the agent's trading
vi
in
rc
action has on the price they can execute the trade at, and
i
r
le
pe
• fl 2: 0 is the bid-ask spread, assumed here to be a constant.
ne
irc
vi
in
Equations (6.la, 6.lb, and 6.lc) apply to both liquidation and acquisition
rc
problems, where the sign ± changes depending on whether the problem is that le
pe
ne
irc
of liquidating ( -) or acquiring (+) shares.
vi
in
In equity markets the fundamental price of the asset (also known in the
rc
i
r
le
literature as the efficient price or true price of the asset) refers to the share
pe
ne
irc
price that reflects fundamental information about the value of the firm and this
vi
in
is impounded in the price of the share. In this chapter we assume that during
rc
le
the optimal execution trading period the fundamental price is the same as the
pe
ne
irc
midprice of the asset. Thus, as new information about the actual and expected
vi
in
rc
performance of the firm is revealed to the market, the midprice changes. This is
i
r
le
(6.lb).
vi
in
rc
A key element of the model is how the agent's trades affect the midprice.
r
le
pe
Here the agent's market orders affect the midprice in two ways: through f(vt ) in
ne
irc
(6.lc), and through g(vt ) in (6.lb). These functions capture two different ways
vi
in
rc
pe
At any one time, the number of shares displayed and available in the market
ne
irc
at the quoted bid/ask prices S{± ½fl is limited. A large MO will walk the book,
vi
in
rc
so that the average price per share obtained will be worse than the current
r
le
pe
bid/ask price. This is captured in our model, as an order of size v dt will obtain
ne
irc
an execution price per share of S{±(½ fl+ f(v)) with f(v) 2'. 0. Note, however,
vi
in
rc
that the impact of the order as captured by f(vt ) is limited to the execution
i
r
le
pe
ne
In Figure 6.1 we show a snapshot of the LOB (top left panel) for SMH on Oct
vi
in
rc
1, 2013 at 11am, together with the price impact per share (top right panel) that
r
le
pe
ne
an MO of various volumes would face as it walks through the buy side of the
irc
vi
LOB. The bottom left panel shows the impact every second from 11:00 to 11:01
in
rc
as well as the average of those curves over the minute (the dash-dotted line).
le
ne
irc
in
rc
p
vi
r
6.2 The Model 137
le
pe
irc
vi
rc
le
pe
ne
SMH on Oct 1, 2013
irc
0.04
vi
at 10:59:59.960
in
40.45�----------�
rc
i
r
le
0 0.03
pe
40.4 eel
ne
irc
P..
(!)40.35 E1
vi
>-< 0.02
in
u
rc
le
P-. ·,:::
pe
ne
irc
vi
40.2
in
rc
0
i
r
le
pe
ne
Volume 4
Volume 4
irc
x 10 X 10
vi
in
0.04r========;----, 10-4
rc
·····Mean Impact
r
le
pe
• • • Linear Regression
ne
irc
0 0.03 5
eel
vi
� 10·
in
P.. P..
rc
E1 E1
i
r
le
pe
ne
(l)
irc
5
-� 10·
vi
in
rc
le
pe
1
ne
10·
irc
0.5 1 1.5 2 10 12 14 16
vi
rc
i
r
le
pe
ne
irc
Figure 6.1 An illustration of how the temporary impact may be estimated from
vi
snapshots of the LOB using SMH on Oct 1, 2013. The top two panels are at 11:00am.
in
rc
The bottom left from 11:00am to 11:01am and the bottom right the entire day.
r
le
pe
ne
irc
vi
in
rc
We also include a linear regression (the dashed line) with intercept set to the
i
r
le
pe
the simple model we adopt in this chapter, and which is also widely used. Figure
vi
in
rc
6.1 illustrates that the f(vt) function seems better described by a power law,
r
le
pe
and the model can be extended to incorporated this. We discuss this extension
ne
irc
in Section 6.7.
vi
in
rc
Notice that the impact function fluctuates within the minute, and with it
i
r
le
pe
ne
the impact that trades of different size have. The linear regression provides an
irc
vi
approximation of the temporary impact during that one minute. The bottom
in
rc
right panel shows how the slope of this linear impact model fluctuates throughout
r
le
pe
ne
the entire day. We see that the largest impact tends to occur in the morning,
irc
vi
then this impact flattens and stays flat throughout the day, and towards the end
in
rc
pe
ne
irc
The second way in which the agent's execution can affect the midprice is
vi
through g(vt)- We refer to this as the permanent impact of the trading rate. If
in
rc
g(vt) > 0 in (6.lb) then a trade of size vdt > 0 moves the midprice of the asset
le
pe
ne
irc
trading on information that reflects permanent changes in the value of the firm,
rc
i
le
and market participants adjust their quotes in response to the agent's trades.
ne
irc
in
rc
p
vi
r
138 Optimal Execution with Continuous Trading I
le
pe
irc
vi
rc
le
pe
ne
Earlier on, in Chapter 4 we discussed linear market impact models and estimated
irc
the parameters for various stocks, see in particular subsection 4.3.5.
vi
in
rc
i
The model can also be modified to incorporate the situation where the agent's
r
le
pe
ne
trades exert pressure on the midprice and then the pressure subsides after the
irc
vi
agent has completed her execution target. But, as we are focusing on an agent's
in
rc
execution of a single block of shares, this is not relevant as she will never receive
r
le
pe
ne
any of the benefits of the 'price correction' once she stops trading, and we exclude
irc
vi
rc
i
r
To conclude the description of the model, we turn to the agent's cash process,
le
pe
x;:. This process satisfies the SDE
ne
irc
vi
in
rc
le
pe
ne
irc
and the expected revenue from the sale is
vi
in
= lE [It st Vt dt] rc
i
r
le
pe
R V = lE [xrJ (6.3)
ne
irc
vi
in
rc
which is easy to see if we look at the sales proceeds over discrete time-steps.
r
Suppose that the agent must liquidate Q0 = 5Jt amount of shares over the time le
pe
ne
irc
period [O, T]. Now, split this trading horizon into equally spaced time intervals
vi
in
i
r
le
Next, assuming that over the time interval [O, t 1 ) the agent sells Qo- Qt, shares
pe
ne
irc
at the price So, and over the interval [ti, t2) she sells Qt,- Qt 2 at the price St,,
vi
in
rc
and so on, then the total expected revenue from selling shares is
r
le
pe
ne
irc
vi
in
rc
i
r
le
and recalling that the speed of trading is given by (6.la) we observe that as
pe
ne
irc
The rest of this chapter looks at different optimal strategies to trade a block
r
le
pe
of shares using only MOs, where in each section the setup of the control prob
ne
irc
lem makes different assumptions about how the agent penalises and/ or controls
vi
in
rc
inventory, and how her rate of trading affects her execution price as well as the
i
r
le
pe
midprice of the asset. We also alternate between share liquidation and share ac
ne
irc
quisition problems. In Section 6.3 the agent must liquidate a block of shares, and
vi
in
rc
the agent's trades affect her execution price but do not affect the midprice of the
r
le
asset (g(v) = 0). The setup of the problem assumes that the execution strategy
pe
ne
irc
is designed so that all shares are liquidated by the terminal date. In Section 6.4
vi
in
rc
the agent solves for the optimal acquisition rate where any remaining unacquired
i
r
le
pe
ne
inventory may be purchased at the terminal date but subject to a penalty (and
irc
g (v) = 0). In Section 6.5 the agent has to liquidate a block of shares, and the
vi
in
rc
agent's actions have both a permanent effect (g(v) :2': 0) on the execution price
r
le
pe
and a temporary effect (.f(v) :2': 0) on the midprice of the asset. In addition, we
ne
irc
vi
incorporate a parameter for the agent's urgency to execute the trade, through a
in
rc
ne
irc
in
rc
p
vi
r
le
6.3 liquidation without Penalties only Temporary Impact 139
pe
irc
vi
rc
le
pe
liquidation without Penalties only Temporary Impact
ne
6.3
irc
vi
in
rc
i
r
We start by discussing how an agent uses only MOs to optimally liquidate 1)1
le
pe
shares between t = 0 and T. vVe assume that the agent's own trades do not
ne
irc
vi
affect the midprice of the asset, thus the stock's midprice is as in (6.1 b) with
in
rc
le
g(vt ) = 0. On the other hand, the agent's trades have temporary impact on
pe
ne
irc
her own execution price because these MOs walk the LOB. We assume that the
vi
in
i
r
le
in (6.lc) and recall that the speed of trading Vt is what the agent controls. For
pe
ne
simplicity, we assume that the bid-ask spread 6. = 0, or equivalently, that St
irc
vi
in
represents the best bid price. It is a simple matter to include a non-zero spread
c
le
r
and we leave it as an exercise for the interested reader. Finally, we also assume
pe
ne
irc
that the agent is adamant that all lJ1 shares are liquidated by time T.
vi
in
The agent's objective is to choose the rate at which she liquidates 1)1 shares
rc
i
r
le
so that she obtains the maximum amount of revenue from the sale, and her
pe
ne
irc
strategy must be such that all shares are liquidated by time T, i.e. cannot reach
vi
in
rc
expiry with any inventory left. In other words the agent wishes to find, among
r
all admissible liquidation strategies v, the one that minimises the execution cost le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
which is equivalent to maximising the expected revenues from the target sale of
in
rc
le
T
pe
[1
ne
irc
vi
(S u - k vu) Vu du]
rc
i
vEA t
r
le
pe
ne
irc
le
pe
This constraint excludes repurchasing of shares and keeps the liquidation rate
ne
irc
finite.
vi
in
rc
To solve this optimal control problem we use the dynamic programming prin
i
r
le
pe
ciple (DPP) which suggests that the value function satisfies the dynamic pro
ne
irc
le
(6.4)
pe
ne
irc
vi
in
The agent requires that the optimal strategy liquidates all the inventory by time
rc
i
r
le
T, thus the value function reflects this by 'penalising' any terminal inventory
pe
ne
irc
t--+T
H ( T, S, q) ------+ q > 0,
r
-oo,
le
for
r
pe
ne
rc
and
vi
ci
in
t--+T
H ( T, S, 0 ) ------+ 0 .
i
le
r
ne
irc
in
rc
p
vi
r
Optimal Execution with Continuous Trading I
le
140
pe
irc
vi
rc
le
pe
ne
The first order condition applied to DPE (6.4) shows that it attains a supre
irc
vi
mum at
in
rc
i
r
le
(6.5)
pe
ne
irc
vi
which is the optimal trading speed in feedback control form. Upon substitution
in
rc
le
pe
ne
irc
(6.6)
vi
in
rc
i
r
le
pe
ne
irc
To propose an ansatz for the above equation it is helpful to look at the bound
vi
in
ary conditions to get an idea of which variables are relevant in the value function.
rc
le
We know that if the strategy reaches the terminal date with a non-zero inven
pe
ne
irc
tory, the value function must become arbitrarily large and negative - because
vi
in
the optimal strategy must ensure that all shares are liquidated. We propose that
rc
i
r
le
the value function be written in terms of the book value of the current inventory
pe
ne
irc
(marked-to-market using the midprice as reference) plus the excess value due to
vi
in
(6.7)
ne
irc
vi
in
i
r
le
t approaches T.
pe
ne
irc
The way the problem is set up, the best the agent can do is achieve the
vi
in
midprice. Hence, the correction h(t, q) to the book value must be negative, and
rc
le
pe
irc
ansatz into the DPE (6.6), we arrive at the following equation for h(t, q):
vi
in
rc
A (o h) = o.
i
2
ath+
r
le
pe
q
ne
irc
vi
Interestingly, the volatility of the asset's midprice drops out of the problem. The
in
rc
reason for this is that the Brownian component is a martingale, and hence on
r
le
pe
ne
Focusing on the above non-linear PDE for h, we see that writing a separation
in
rc
of variables in the form h(t, q) = q2 h2 (t) (note the subscript 2 represents that
i
r
le
pe
ne
this function is the coefficient of q2 ) allows us to factor out q and obtain a simple
irc
vi
8t h2 + ½ h� = O,
r
le
(6.8)
pe
ne
irc
rc
)-l
i
r
le
1 1
pe
h2(t) = ( -- - - (T - t)
ne
irc
h2(T) k
vi
in
rc
As discussed above, the optimal strategy must ensure that the terminal inven
le
pe
ne
tory is zero and this is equivalent to requiring h 2 (t) --+ -oo as t --+ T. In this
irc
vi
way the value function heavily penalises non-zero final inventory. An alternative
in
rc
i
le
way to obtain this condition is to calculate the inventory path along the optimal
ne
irc
in
rc
p
vi
r
le
6.4 Optimal Acquisition with Terminal Penalty and Temporary Impact 141
pe
irc
vi
rc
le
pe
ne
irc
strategy and impose that the terminal inventory be zero. To see this, use the
vi
ansatz (6.7) to reduce (6.5) to
in
rc
i
r
le
* 1 / v"
= -k 12 (t) Q t
pe
(6.9)
ne
Vt '
irc
vi
then integrate dQ(
in
rc
le
optimal strategy:
1
pe
ne
irc
vi
t dQ( ·t h2(s)
in
rc
= ; ds
i
r
=}
le
Qt
v'
k
pe
0 , 0
ne
irc
To satisfy the terminal inventory condition Q:{ = 0, and also ensure that the
vi
in
rc
correction h(t, q) to the book value of the outstanding shares that need to be
r
le
pe
ne
irc
vi
in
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
so the optimal inventory to hold is
vi
in
rc
i
r
le
5)1, (6.11)
pe
ne
irc
vi
in
rc
le
pe
ne
irc
(6.12)
vi
in
rc
i
r
le
pe
This final result for the optimal trading speed is quite simple: the shares must
ne
irc
be liquidated at a constant rate and this strategy is the same as that of the time
vi
in
rc
le
pe
ne
irc
vi
in
rc
pe
Impact
ne
irc
vi
in
rc
The problem now is to acquire (not liquidate) 5)1 shares by time T, starting
r
le
pe
with Q0 = 0. As in the previous section the agent's MOs walk the LOB so her
ne
irc
rc
i
r
le
time T, she allows for strategies that fall short of this target, QT < sn, and
irc
vi
in this case she must execute a buy MO for the remaining amount and pick
in
rc
le
a > 0, which includes the cost of walking the book at T and any other additional
irc
vi
in
penalties that the agent must incur for the execution of the trade at the terminal
rc
i
le
date.
ne
irc
in
rc
p
vi
r
le
142 Optimal Execution with Continuous Trading I
pe
irc
vi
rc
le
pe
ne
Thus, the agent's expected costs from strategy is
irc
Vt
= IE[ Its�
vi
in
ECV + �- �].
rc
Vu du+ (IJ1- QT) Sr (6.13)
i
r
le
pe
� � -----y---
ne
irc
Terrninal Cash Terminal execution at mid Terminal Penalty
vi
Compared to the expected costs in the previous section we have two additional
in
rc
le
terms. In the liquidation problem of the previous section, the agent seeks a
pe
ne
irc
strategy that ensures all shares are liquidated by T and the expected costs arise
vi
exclusively from continuous trading. Now, the agent can reach T short of her
in
rc
i
r
le
target, but this generates the additional terms that incorporate that sale plus
pe
ne
irc
vi
To simplify notation, we introduce a new stochastic process Y = (Yt)o<::t<::r
in
rc
le
to denote the shares remaining to be purchased between t and the end of the
pe
ne
irc
trading horizon T:
vi
in
rc
t = IJ1- Qr, dY/ = -Vt dt'
i
so that
r
Y
le
pe
ne
irc
vi
[Its�
in
= !�� lEt,S, y
rc
Vu
le
pe
ne
irc
where it is clear that the strategy seeks to minimise the cash paid to acquire the
vi
in
rc
shares.
i
r
le
pe
ne
Applying the DPP, we expect that the value function should satisfy the DPE
irc
vi
0 = 8tH + ½o. 2 8ssH + inf {(S
in
le
V
pe
ne
with terminal condition H(T, S, y) = y S + a y2 . Solving for the first order con
irc
vi
in
i
r
A (8 H - S)
le
=
pe
(6.15)
ne
v*
irc
y
vi
in
le
A (8 H - s)
pe
2
irc
y
vi
in
rc
To solve this DPE, we can write the value function in terms of the book
i
r
le
value of the assets remaining to be acquired and the excess value function from
pe
ne
irc
optimally acquiring these shares. From looking at the terminal condition, and
vi
in
rc
the way y enters into the DPE, we hypothesise that the excess value function
r
le
pe
irc
is
vi
in
rc
pe
ne
irc
time (note that the subscripts on the functions indicate the power of y which
r
le
multiplies them in the full ansatz). Recalling that the value function at the
pe
ne
irc
rc
and
le
ne
irc
in
rc
vi
r
le
6.4 OptimalAcquisitionwithTerminalPenaltyandTemporarylmpact 143
pe
irc
vi
rc
le
pe
ne
irc
Moreover, upon substituting the ansatz into the above non-linear PDE we find
vi
that
in
rc
i
r
le
pe
ne
irc
vi
in
rc
Since this equation must be valid for each y, each term in braces must individually
r
le
pe
vanish. This provides us with three equations for the three functions h o , h 1 and
ne
irc
h 2 . Due to the terminal condition h1 (T) = 0, we see that the solution we get
vi
in
for h 1 (by setting the second term in braces to zero) is h1(t) = 0. Similarly, due
rc
i
r
le
to the terminal condition h o (T) = 0, we see that the solution we get for ho (by
pe
ne
irc
setting the third term in braces to zero, and knowing that h 1 (t) = 0) is h 0 (t) = 0.
vi
in
rc
le
pe
ne
ended up with the same equation for h 2 . The final equation (obtained by setting
irc
the first term in braces to zero) allows us to obtain h2 ( t) and in this case, since
vi
in
rc
h 2 (T) = a, we obtain the non-trivial solution
i
r
le
pe
ne
irc
1
h 2 ( t) = ( 'f1 (T - t) + ;;;1 )-
vi
in
rc
le
pe
Putting this together with the ansatz for the value function we find that the
ne
irc
optimal trading speed is
vi
in
rc
i
r
= ( (T - t) + ;;;k )-1
le
�v *
v;
pe (6.17)
ne
irc
vi
in
le
rate converges to that of TWAP. Similarly, the smaller the value of a, all else
pe
ne
irc
being equal, the slower the acquisition rate will be. Furthermore, in the limiting
vi
in
rc
case a -+ 0, the optimal strategy is not to purchase any shares until the terminal
i
r
le
pe
date is reached, at which point all 1)1 shares are purchased. In this limiting case,
ne
irc
there are no costs of walking the book at date T, so it is optimal to purchase all
vi
le
pe
As before, we can solve for the optimal inventory path explicitly by integrating
ne
irc
rc
i
r
le
pe
ne
irc
vi
le
inventory path as
pe
ne
irc
Qu* = _t_\)1
vi
in
rc
(6.18)
T+
i
t
r
le
1':_ •
pe
Ct
ne
irc
vi
From this equation we can see that for any finite a > 0 and finite k > 0, it is
in
rc
le
always optimal to leave some shares to be executed at the terminal date, and
pe
ne
irc
the fraction of shares left to execute at the end decreases with the relative price
vi
rc
i
le
in
rc
p
vi
r
le
144 Optimal Exerntion with Continuous Trading I
pe
irc
vi
rc
le
pe
ne
expression for v;, so that
irc
vi
in
rc
m
i
(6.19)
r
le
T+ '5c_ .
pe
ne
irc
Cl!
vi
in
rc
Comparing this with the result from the previous section (see (6.11) and
r
le
(6.12)), we see that the agent acquires at a constant, but slower rate than that
pe
ne
irc
of an agent who heavily penalises (i.e. a -+ oo) paths which do not complete the
vi
in
rc
execution fully. Moreover, the agent trades at a constant speed and this speed
i
r
le
pe
is the same as that of an agent who must execute everything by the end of the
ne
¾.
irc
period, but who has a terminal date T' that is further into the future, T' = T +
vi
in
rc
le
pe
ne
irc
vi
rc
i
r
le
pe
ne
irc
In this section we switch from acquisition back to liquidation. The agent contin
vi
ues to use only MOs to liquidate a total of5)1 shares, but now her trades have both
in
rc
a temporary and a permanent price impact. The midprice dynamics arc given by
le
pe
ne
irc
(6.lb) with drift g(vt) > 0, which enters the equation with negative sign because
vi
in
the agent's sell trades exert a permanent downward pressure, and the execution
rc
i
r
le
price by (6.lc) with f(vt) > 0, which enters the equation with a negative sign pe
ne
irc
because the sell trades have an adverse temporary impact. Here we assume that
vi
in
if the agent's strategy reaches the terminal date T with inventory left, then she
rc
le
must execute an MO to reach m for a total revenue of Q'f (Sf - aQ'f), where
pe
ne
irc
i
r
le
pe
ne
irc
� )],
vi
in
le
pe
ne
we have switched from writing out the cash process explicitly in terms of the inte
vi
in
rc
grated execution costs, to including the cash process directly. This way the cash
i
r
le
pe
ne
process becomes a state variable. Naturally, we could in principle keep using the
irc
choice of ansatz for the forthcoming problems when value functions are written
r
le
pe
ne
ft
vi
In this section, we also introduce another element into the model: a running
in
rc
pe
ne
penalty is not (and should not be considered) a financial cost to the agent's strat
irc
vi
egy. The parameter ¢ allows us to incorporate the agent's urgency for executing
in
rc
the trade. The higher the value of ¢, the quicker the optimal strategy liquidates
le
pe
ne
irc
the shares, as it increases the penalty for the late liquidation of shares and incen
vi
tivises strategies that front load the liquidation of inventory. Cartea, Donnelly
in
rc
i
le
& Jaimungal (2013) show that the running inventory penalty is equivalent to
ne
irc
in
rc
p
vi
145
r
6.5 liquidation with Permanent Price Impact
le
pe
irc
vi
rc
le
pe
ne
introducing ambiguity aversion on the part of the agent, where the ambiguity is
irc
over the midprice which, in their model, may have a non-zero stochastic drift.
vi
in
rc
i
Then, the agent's perfonnance criterion is
r
le
pe
ne
irc
Hv(t, X, S,q) = lE,t x ,S, q [ X!f + Qf (S�" -aQf)- ¢.f (Q�)2 du],
vi
in
rc
'-y-/ -------� �
Terminal Cash Tcnninal Execution
r Inventory Penalty
le
pe
(6.20)
ne
irc
and the value function
vi
in
i
= sup Hv(t, x, S,q) .
r
le
H(t, x, S,q)
pe
ne
vEA
irc
vi
The DPP implies that the value function should satisfy the HJB equation
in
c
le
r
0= (at+½a.2ass)H -¢q 2
pe
ne
irc
(6.21)
+ sup {(v (S - f(v))ax - g(v)as- vaq ) H},
vi
in
rc
i
r
le
pe
subject to the terminal condition H(T, x, S,q)=x+Sq - aq 2 .
ne
irc
We use the simplifying assumption that permanent and temporary price im
vi
in
rc
pact functions are linear in the speed of trading, i.e. f(v) = k v and g(v) = b v
r
le
pe
ne
for finite constants k 2: 0 and b 2: 0. The first order condition allows us to obtain
irc
the optimal speed of trading in feedback control form as
vi
in
rc
i
r
le
* 1 (Sa,r
- bas-aq )H pe (6.22)
v =21c
ne
irc
aHX
vi
in
rc
Upon substituting the optimal feedback control into the DPE, it reduces to
r
le
pe
2
ne
ax H
in
rc
i
r
= x+Sq
le
the ansatz
vi
in
le
pe
ne
The first term of the ansatz is the accumulated cash of the strategy, the second
rc
i
r
le
and h is the extra value stemming from optimally liquidating the rest of the
vi
in
shares.
rc
le
Using this ansatz in the equation above and simplifying, we find the following
pe
ne
irc
A [b (q+ash)+a hJ
rc
q
pe
ne
irc
Since the above PDE contains no explicit dependence on S and the terminal
vi
le
h(t, S,q) = h(t,q) (with a slight abuse of notation). The equation then simplifies
r
pe
ne
rc
even further to
vi
ci
in
= at h(t,q) 2
+ 1
[bq + aq h(t,q)]
2
i
0 - <pq
le
4k
r
ne
irc
in
rc
p
vi
146 Optimal Execution with Continuous Trading i
r
le
pe
irc
vi
rc
le
Furthermore, the optimal control in feedback form from (6.22) takes on the much
pe
ne
irc
more compact form
vi
in
rc
i
v* = -� (oqh(t, q) + bq)
r
le
(6.24)
pe
2K:
ne
irc
vi
In this form, it appears that the solution admits a separation of variables
in
rc
le
h(t, q) = h2 (t) q 2 where h2 (t) satisfies the non-linear ODE (recall that the sub
pe
ne
irc
script 2 represents that this function is the coefficient of q 2 )
vi
in
i
(6.25)
r
le
pe
ne
irc
subject to the terminal condition h2 (T) = -a. This ODE is of Riccati type and
vi
in
c
can be integrated exactly. First, let h2 (t) = -½b + x(t), then re-arranging the
r
le
r
pe
ne
ODE we obtain
irc
1
vi
in
rc
OtX
i
k'
r
le
kc/>- x 2
pe
ne
irc
subject to x(T) = ½b - a. Next, integrating both sides of the above over [t, T]
vi
in
rc
yields
r
le
pe
ne
irc
+ (T) + (t)
log vfc/j x - log vfc/j x = 21 (T - t)
vi
'
in
i
r
le
pe
so that
ne
irc
1 + ( e2 1 (T-t)
vi
in
rc
le
pe
ne
irc
where
vi
in
rc
i
r
le
pe
(6.26)
ne
irc
vi
in
rc
At this point the solution of the DPE is fully determined and the optimal speed
r
le
pe
ne
of trading can now be explicitly shown in terms of the state variables rather than
irc
rc
i
r
le
pe
* = _s ________ Qv
*
Vt
in
rc
le
pe
irc
current inventory level, as we found in the previous simpler models, but now the
vi
in
rc
pe
ne
that results from following this strategy. Recall that the agent's inventory satisfies
vi
in
c
le
r
pe
ne
{1t
rc
t) x s) d
dQ( = xk Q( dt so that Q( = SJtexp
vi
ci
� s} .
in
i
le
r
ne
irc
in
rc
p
vi
6.5 liquidation with Permanent Price Impact 147
r
le
pe
irc
vi
rc
le
To obtain the inventory along the optimal strategy we first solve the integral
pe
ne
irc
1 + (e2,(T-s)
vi 1 t
t ( )
in
xs
rc
1 -ds=- 1 Vk¢----
i
r
1-(e2,(T-s) ds
le
k k O
_ t t
pe
ne
0
irc
e-2,(T-s) (e21(T-s)
, Jo e-2 (T-s) ( ds + r Jo
vi
in
- , 1-(e2,(T-s) ds
rc
r -
le
pe
=log (e-,(T-s)-(e'(T-s)) 16
ne
(6.28)
irc
vi
in
( e,(T-t) _ e-,(T-t)
rc
i
=log-------- (6.29)
r
le
( e,T-e-,T
pe
ne
irc
vi
hence
in
rc
le
* ( e,(T-t) _ e-,(T-t)
pe
ne
v ------
irc
Qt = SJt · (6.30)
( e,T _ e-,T
vi
in
rc
i
r
le
pe
Substituting this expression into (6.27) allows us to write the optimal speed to
ne
irc
vi
in
rc
le
( e' (T-t) + e-, (T-t)
pe
SJt
ne
v; =r
irc
---------
( e, T-e-, T
vi
in
rc
i
In the limit in which the quadratic liquidation penalty goes to infinity, i.e. as
r
le
pe
ne
a -+ +oo, we get ( -+ l. Then, the optimal inventory to hold and the optimal
irc
vi
speed to trade simplify to
in
rc
le
pe
sinh (,(T-t))
ne
irc
Qr
*
. (,T) sn.
smh
vi
a-++oo
in
rc
i
r
le
and
pe
ne
irc
cosh (,(T-t))
vi
1)1
in
*
1
rc
le
pe
ne
irc
Both of these expressions are independent of b. For other values of a the relation
vi
in
ship between a and the permanent price impact parameter b is more complex
rc
i
r
le
Figure 6.2 contains plots of the inventory level under the optimal strategy for
vi
in
two levels of the liquidation penalty a and several levels of the running penalty
rc
le
¢. Note that with no running penalty, ¢ = 0, the strategies are straight lines
pe
ne
irc
As the running penalty ¢ increases, the trading curves become more convex and
rc
i
r
le
the optimal strategy aims to sell more assets sooner. This is an intuitive result
pe
ne
irc
since ¢ represents the agent's urgency to liquidate the position, and therefore
vi
in
rc
le
pe
irc
As an exercise, one can check that in the limit in which the running penalty
vi
in
rc
vanishes, ¢ -+ 0, the analog of the result from the previous section is recovered,
i
le
ne
irc
in
rc
p
vi
r
le
148 Optimal Execution with Continuous Trading I
pe
irc
vi
rc
le
pe
ne
irc
0 ¢=0 0 ¢=0
vi
· ¢=0.001 ¢=0.001
in
+ ¢=0.01 + ¢=0.01
rc
¢=0.1 � ¢=0.1
i
r
le
pe
ne
irc
vi
in
rc
le
0.2
pe
ne
irc
0
0.2 0.4 0.6 0.8
vi
rc
Time Time
i
r
le
pe
(a) a= 0.01
ne
irc
vi
in
12
rc
0 ¢=0 0 ¢=0
r
le
10 ·
pe
c, ¢=0.1 u ¢=0.1
irc
� 8
vi
in
rc
gjl 6
i
r
le
pe
4
ne
irc
0.2 E'.1
vi
in
� �
rc
1
r
Time Time
ne
irc
(b) a= +oo
vi
in
Figure 6.2 The investor's inventory along the optimal path for various levels of the
rc
i
= 3
= 3
r
le
running penalty rj;. The remaining model parameters are k pe 10- , b 10- .
ne
irc
vi
in
rc
i.e.
r
le
pe
ne
irc
Q{ ------+ t
_
T+i!:_
vi
in
¢--+0
rc
C,
i
r
le
pe
ne
irc
vi
le
Penalty
pe
ne
irc
vi
In the previous section we solved the general case when the agent's trades have
in
rc
i
temporary impact on the execution price and permanent impact on the midprice.
r
le
We assumed that these two impacts were linear in the speed of trading, f(v) =
pe
ne
irc
k v and g ( v) = b v for constants k 2:: 0 and b 2:: 0. One typically observes that
vi
in
le
pe
ne
a and the permanent price impact parameter b - the discussion for acquisition
vi
in
rc
i
r
pe
ne
irc
The basis for the analysis comes from observing that in the optimal speed of
vi
trading, as described in (6.27), the permanent impact and the liquidation penalty
in
rc
always appear in the form a - ½b, see (6.26). This implies that in the current
r
le
pe
ne
irc
model, where the permanent impact is linear in the speed of trading and the
liquidation of terminal inventory is quadratic, a Q}, one could define a single
vi
in
rc
ne
irc
in
rc
vi
149
r
6.5 Liquidation with Permanent Price Impact
le
pe
irc
vi
rc
le
pe
impact and the liquidation penalty affect the optimal speed of trading. Obviously,
ne
irc
we cannot do this for other variables in the model, such as for the cash obtained
vi
in
rc
from liquidating shares. The impact of the permanent price impact parameter
i
le
pe
on this variable is quite distinct from that of the liquidation penalty.
ne
irc
To see this, we consider how the proceeds from selling the SJ1 shares are affected
vi
in
rc
by the permanent impact that the agent's trades have on the midprice. First,
r
le
pe
we calculate the agent's terminal cash when she follows an arbitrary strategy Vt .
ne
irc
Recall that the agent's cash position satisfies the SDE
vi
in
rc
i
le
= (St - k Vt ) Vt dt'
pe
dX[
ne
irc
vi
where
in
rc
le
=
pe
irc
vi
rc
i
le
from liquidating her shares, including the liquidation of the terminal inventory,
pe
ne
irc
is
vi
in
rc
Rv
le
pe
ne
irc
= f0T {-b J;vu du+ er Wt } Vt dt + QT(Sf - a Qr)
vi
in
rc
i
= f0T {-b (SJ1- Qr)+ er Wt} Vt dt+ QT(Sf - a Qr)
le
pe
ne
irc
le
pe
ne
rc
i
Having expressed R v in this way, we see that both a and b appear together
le
pe
ne
irc
with (QT)2 and both act to penalise inventories different from zero. Nevertheless,
vi
le
pe
ne
irc
vi
in
It is now clear that not only do a and b affect the revenue process in a very
rc
i
le
pe
different way than they do the speed of trading, but also that the effect of the
ne
irc
parameter of the permanent price impact cannot be absorbed into the liquidation
vi
in
rc
penalty.
r
le
pe
irc
rc
i
le
pe
Since x(t) is what determines the optimal trading strategy, we see that b can
ne
irc
be absorbed into a for the purpose of the trading strategy. But this effect does
vi
in
rc
not extend to the revenue process. We can see this most clearly when the agent
r
le
pe
follows the optimal strategy in the limiting case where a -+ oo. In this limiting
ne
irc
case, the agent will complete the trade by the terminal date, hence QT* = 0,
vi
in
rc
and any terminal penalty would be applied to a terminal quantity equal to zero.
i
le
ne
irc
in
rc
p
vi
150 Optimal Execution with Continuous Trading I
r
le
pe
irc
vi
rc
le
pe
Nevertheless, the impact of the agent's trades on the midprice will be strictly
ne
irc
positive: a loss of ½ b IJ12 .
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
In the previous sections, the agent was viewed as a risk-neutral one in the sense
ne
irc
that she is maximising her expected terminal wealth ( from optimally trading and
vi
in
in
c
liquidating any remaining shares at maturity). With the exception of Section
r
le
pe
ne
6.3, the agent is not strictly risk-neutral because she is also penalising holding
irc
vi
in
c
the agent is risk-averse with exponential utility then she acts in the same manner
r
le
r
pe
ne
as the risk-neutral, but inventory averse, agent studied in the previous sections.
irc
vi
Let us consider the agent who sets preferences based on expected utility ofter
in
in
rc
minal wealth with exponential utility: 'U(x) = -e-, x. Her performance criteria
r
le
pe
ne
is
irc
Q'y))}] ,
vi
= lEt,x ,s,q [ - exp { - ,( XT +
in
v
H (t,x,S,q) Q'y (S!f - a
rc
le
pe
ne
= supHv (t,x,S,q) ,
in
in
rc
H(t,x,S,q)
r
le
uEA pe
ne
irc
where S", Q and X" satisfy, as usual, the equations in (6.1) and (6.2). The
v
vi
in
agent's terminal wealth has two components: the cash that she has accumulated
rc
le
from trading through Xy, and the value she receives from liquidating any re
pe
ne
maining assets at the end ofthe trading horizon through Q'r (Sy - a Q'r) - which
irc
vi
in
in
accounts, as before, for the impact of making a lump trade.
rc
r
le
0 (6.31a)
in
rc
u
r
le
pe
irc
= - exp{-1 (x + q (S - a q))}.
vi
H(T, x, S, q)
in
in
(6.31b)
rc
r
le
pe
ne
irc
= - exp{-, (x + q S + h(t,q))},
r
le
H(t,x,S,q) (6.32)
pe
ne
irc
and upon substitution into (6.31), we find that h satisfies the non-linear PDE
vi
in
in
rc
0
pe
ne
irc
negative, due to the terminal condition, we can factor out the common -1 h
r
le
pe
ne
rc
ci
in
in
V
ne
irc
in
rc
p
vi
6.6 Execution with Exponential Utility Maximiser 151
r
le
pe
irc
vi
rc
It is straightforward to obtain the optimal control v* in feedback form as
le
pe
ne
irc
(6.34)
vi
in
in
rc
r
le
pe
and upon substitution into (6.33), we further find that h solves
ne
irc
vi
in
rc
0= 8t h - l2 u 2 1 q 2 + � (q b + 8 h) 2
r
le
2k q .
pe
ne
irc
A further observation is that if we consider h to be quadratic in q, then all the
vi
in
in
terms in this non-linear equation are quadratic in q, and so is the terminal con
rc
r
le
dition. Hence, we expect that h(t, q) = h2 (t) q 2 for some deterministic function
pe
ne
irc
h 2 (t) with terminal condition h 2 (T) =-a since h(T,q) =-aq 2 . Inserting this
vi
in
rc
second ansatz, and factoring out q 2 , we find that h2 (t) satisfies the non-linear
r
le
ODE
pe
ne
irc
vi
(6.35)
in
in
rc
r
le
pe
Comparing (6.35) to (6.25), we see that the two ODEs coincide whenever ¢ =
ne
irc
½ru 2 , and since the terminal conditions are identical, the solutions to the two
vi
in
rc
PDEs are identical. Hence, using the same steps that show how to solve (6.25),
r
le
pe
ne
we find that in the case of an agent with exponential utility preferences, we have
irc
vi
in
in
1 + ( e 2 I; (T-t) 1
rc
h 2 (t)=vk10" 2 u
r
le
1-(e2 T-t)
--b,
2
pe
ne
irc
le
a- lb+ yhk u2
pe
ne
�,
irc
2 2 1
�
=
v2k
and (=
vi
a- ½ b- V ½ k r u 2
in
in
rc
r
le
pe
ne
Recalling that h(t, q) = q 2 h 2 (t) and substituting in the above solution into
irc
vi
le
pe
irc
(
in
in
rc
r
le
pe
This strategy is identical in form to the one for the risk-neutral agent who is
ne
irc
inventory averse appearing in (6.27). Furthermore, the value functions for the two
vi
in
rc
problems (the exponential utility maximiser and the risk-neutral with inventory
r
le
pe
irc
vi
in
in
rc
r
le
pe
ne
where the superscript exp-util emphasises that this is for the exponential utility
irc
vi
le
X
irc
vi
in
in
where the superscript inv -aver emphasises that this is for the inventory averse
rc
le
ne
irc
in
rc
p
vi
152 Optimal Execution with Continuous Trading I
r
le
pe
irc
vi
rc
le
½, a , we can write the value
pe
2
ne
agent. Since the h 2 functions coincide when ¢ =
irc
functions in terms of one another as follows:
vi
in
rc
i
r
le
pe
supE[-exp{-,(Xf+ Qr(Sf-aQr))}]
ne
l}.
irc
vEA
f 1( Q�)
vi
in
rc
2
r
le
= - exp{-, E du
��� [ Xf+ Qr(Sf-aQr) - 'Y
pe
ne
irc
vi
in
rc
In later sections, we see how the agent with exponential utility can be mapped
i
r
le
pe
back to a risk-neutral, but inventory averse agent in several different settings.
ne
irc
For example, in Section 8.3 we study the mapping when the agent uses LOs to
vi
in
rc
liquidate, in Section 9.5 we see how an agent who aims to target percentage of
r
le
pe
ne
irc
modifies the behaviour of a market marker.
vi
in
rc
i
r
le
pe
ne
irc
vi
6.7 Non-Linear Temporary Price Impact
in
rc
le
pe
ne
In the previous sections we assumed the price impact function f (v), see (6.lc),
irc
vi
in
to be linear in the speed of trading. From Figure 6.1, which shows a snapshot
rc
i
r
le
of the LOB and how an order of various volumes walks the book, we see that
pe
ne
irc
a linear model is a good approximation, but some research has shown that a
vi
in
power law with power less than one fits the data better. Others also argue that,
rc
le
given the extremely low predictive accuracy of market impact models (typically
pe
ne
irc
< 5% R 2 ), the cost of increased complexity arising from moving away from a
vi
in
rc
linear model would outweigh any gains from better describing market impact.
i
r
le
le
pe
agent with inventory aversion through a running penalty as in all sections, other
ne
irc
than Section 6.6, and so the agent's performance criteria is as in (6.20) repeated
vi
in
rc
It(Q�)
pe
ne
v
du],
vi
in
rc
and the dynamics of s v , x v and Q v are also repeated here with the explicit
r
le
pe
ne
dSt = - b Vt dt + a dWt ,
rc
i
r
le
pe
ne
vi
in
dQt = - Vt dt .
rc
le
pe
ne
= supH v(t,x,S,q) ,
rc
H(t,x,S,q)
i
le
vEA
ne
irc
in
rc
p
vi
6.7 Non-Linear Temporary Price Impact 153
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
rc
r
Figure 6.3 Graphical representation of
le
pe
the Legendre Transform F* (y) of function
ne
irc
vi
in
rc
le
'
pe
X
transform evaluated at the slope at the
ne
____________ _J
irc
tangent point.
vi
F'(y)
in
in
c
r
le
pe
ne
irc
vi
in
c
le
r
irc
0 = (8t + ½ 0' 2
8ss) H - cpq2 + sup { (v (S - f(v)) Ox - bv8s - v8q ) H},
vi
in
in
rc
V
r
le
with terminal condition H(T, x, S, q) = x+q (S-cx q). Applying the usual ansatz,
pe
ne
irc
H(t, x, S, q) = x + q S + h(t, q), which separates out the book value of cash in
vi
in
rc
hand and inventory from the value of optimally trading the remaining shares,
r
le
pe
ne
0 = Oth-¢q2
in
in
rc
r
le
V pe
ne
To proceed, let us denote F(v) = vf(v), and assume that vf(v) is convex.
vi
in
rc
le
The implication is that the net cost ( and not the price impact alone) of trading
pe
ne
irc
at a rate of v is convex. This certainly holds true for the linear price impact
vi
model, for which f(v) = kv and so F(v) = v . It also holds for the popular
in
in
2
rc
power law price impact models f(v) = kva where a > 0. Under this convexity
r
le
pe
ne
irc
le
pe
II
ne
irc
in
rc
pe
ne
X
irc
vi
The Legendre transform is a mapping from the graph of a function to the set
in
rc
le
of its tangents, and can be best understood from Figure 6.3. The figure shows
pe
ne
that the Legendre transform F*(y) of the function F equals the value at which
irc
vi
in
in
the tangent at a point intersects the vertical axis, and the argument y is the slope
rc
r
le
of the function at that tangent point. Since the function is convex, the slope is
pe
ne
irc
increasing and therefore for each slope y, there exists only one point with that
vi
in
For example, in a power law impact model we write f(x) = kxa , and so
r
le
r
pe
ne
ci
in
in
X
ne
irc
in
rc
p
vi
154 Optimal Execution with Continuous Trading I
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
Figure 6.4 The effect of non-linear
rc
*:,.-0.8
r
le
()> impact on the optimal strategy in the case
pe
ne
...
:>, 0.6 of a power law temporary impact function
irc
vi
0 with power parameter a. The model
in
rc
.µ
§ 0.4 4
parameters are b = k = 10- , ¢ = 10 k,
r
le
a= 100 k, and T = 1.
pe
ne
>-< 0.2
irc
vi
in
in
rc
0.5
r
le
pe
Time
ne
irc
vi
in
rc
le
pe
We can find the optimal point x* from the first order condition
ne
irc
vi
in
in
rc
y-k( l +a) (x*)a =O =} x*= ( ,
:a)k)"
r
le
pe
(
ne
irc
and so
vi
in
rc
F*(y)
= (y i+ ¼' ak
r
le
pe
( ((l+a)k)l+¼'
ne
irc
vi
in
in
and the optimal trading speed in feedback form is
rc
r
le
pe
= bq+aqh "
ne
irc
v* (- (6.37)
(1 + a) k )
vi
in
rc
le
irc
2
8th -cpq +F* (-(bq+8qh ))=0,
2
h (t,q)=-a.q
vi
and . (6.38)
in
in
rc
r
le
pe
In general, this equation cannot be solved analytically, and one must resort to
ne
irc
In Figure 6.4, we show the effect of the strength of the power in the power
r
le
law parameter a on the inventory path from following the optimal strategy Q' .
(
pe
ne
irc
These curves are obtained by numerically solving (6.38) with a finite difference
vi
in
in
rc
scheme, substituting the solution into (6.37), and then numerically integrating
r
le
( ( (
dQ' = -v; dt, with Qr = l, to obtain Q' . The striking result is that as the
pe
ne
irc
power law parameter decreases, so that orders of the same size have less and less
vi
in
rc
of an impact, the agent liquidates faster. The intuition here is that since trading
r
le
pe
ne
does not impact prices as much, the agent prefers to liquidate shares early and
irc
reduce her inventory risk, and doing so does not cause her to lose too much from
vi
in
in
rc
temporary market impact. In some sense, the agent behaves as if she has a larger
r
le
pe
ne
vi
in
rc
le
pe
irc
vi
in
in
rc
Bertsimas & Lo (1998), Large (2007), Obizhaeva & Wang (2013), Bayraktar
le
ne
irc
in
rc
p
vi
6.9 Exercises 155
r
le
pe
irc
vi
rc
le
pe
& Ludkovski (2011), Schied (2013), Almgren (2003), Almgren, Thum, Haupt
ne
irc
mann & Li (2005), Almgren & Chriss (2000), Cont, Kukanov & Stoikov (2013),
vi
in
in
rc
Lorenz & Almgren (2011), Kharroubi & Pham (2010), Alfonsi, Fruth & Schied
r
le
pe
ne
(2010), Gatheral (2010), Gatheral, Schied & Slynko (2012), Alfonsi, Schied &
irc
Slynko (2012), Schied & Schoneborn (2009), Gueant & Lehalle (2013), Bayrak
vi
in
rc
tar & Ludkovski (2012), Guo, De Larrard & Ruan (2013), Gatheral & Schied
r
le
pe
ne
(2013), Graewe, Horst & Qiu (2013), Graewe, Horst & Sere (2013), Li & Alm
irc
vi
gren (2014), Almgren (2013), Frei & Westray (2013), Curato, Gatheral & Lillo
in
in
rc
(2014), Jaimungal & Nourian (2015).
r
le
pe
ne
irc
vi
in
rc
le
pe
6.9 Exercises
ne
irc
vi
in
in
rc
E.6.1 The agent wishes to liquidate SJ1 shares between t and Tusing MOs. The value
r
le
pe
ne
irc
function is
[1T
vi
in
rc
],
r
irc
vEAt,T t
vi
in
in
rc
pe
ne
vi
in
le
pe
ne
irc
vi
in
in
rc
r
le
(6.39)
in
rc
le
pe
ne
in
rc
v* = Q(
r
le
(6.40)
pe
t T-t+!:E.·
ne
irc
a
vi
in
rc
(c) Leto:---+ oo and show that (6.40) converges to (6.12). Moreover, discuss the
r
le
pe
irc
vi
E.6.2 This exercise is similar to that above but with a slightly different setup. The
in
in
rc
r
le
agent wishes to liquidate SJ1 shares and her objective is to maximise expected
pe
ne
irc
terminal wealth which is denoted by X!f (in the exercise above we wrote ter
ft
vi
in
le
pe
ne
irc
(6.41)
vi
in
in
rc
le
ne
irc
in
rc
p
vi
156 Optimal Execution with Continuous Trading I
r
le
pe
irc
vi
rc
le
pe
ne
where
irc
vi
in
in
(6.4 2)
rc
r
le
pe
ne
(a) Show that the HJB satisfied by the value function H(t,S,q,x) is
irc
vi
in
rc
le
pe
ne
1/
irc
vi
in
rc
r
le
pe
8q H -S8x H
ne
v;=----
irc
(6.44)
-2k8x H
vi
in
rc
(b) To solve (6.43), use the terminal condition H(T, x, S , q)=x+ q S -aq 2 to
r
le
pe
ne
irc
propose the ansatz
vi
in
in
H(t, s, x, q) =
rc
+ h(t)q2 + q S ,
r
le
X (6.45)
pe
ne
irc
vi
in
rc
h(t) = -
k le
pe
ne
(6.46)
irc
T-t+ ;-;_k '
vi
in
in
rc
r
le
and pe
ne
irc
* Q(-� .
----'-
vi
V
t =T-t+i:,;_
in
rc
°'
r
le
pe
ne
irc
in
rc
= 1idt + udWt,
r
dSt
le
pe
ne
irc
agent wishes to liquidate 5)1 shares and her trades create a temporary adverse
r
le
pe
ne
sr =
vi
in
in
rc
st - k Vt,
r
le
pe
ne
irc
le
pe
ne
irc
in
rc
pe
ne
constant.
irc
vi
le
pe
ne
irc
(6.4 7)
vi
in
in
rc
le
ne
irc
in
rc
p
vi
6.9 Exercises 157
r
le
pe
irc
vi
rc
le
pe
-
ne
(a) Show that the optimal liquidation rate in feedback form is
irc
vi * aq H S.
in
in
V =- --
rc
(6.48)
r
le
-2k
pe
ne
irc
(b) Use the ansatz H(t, S, q) = q S + h(t, S, q) to show that the optimal liqui
vi
in
rc
le
pe
Qr (T - t) + 2¾
ne
* 1
irc
Vt _ (T - t) + ¾ - 4k µ. (T - t) (T - t) + ¾
vi
-
in
in
c
r
le
r
Comment on the magnitude of µ. and the sign of the liquidation rate.
pe
ne
irc
(c) Let a -+ oo and show that the inventory along the optimal strategy is given
vi
in
c
by
(1)1T + 4kµ t) .
r
le
r
pe
ne
v*
= ( T - t)
irc
Qt
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
rc
vi
ci
in
in
le
r
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
7
pe
Optimal Execution with Continuous
ne
irc
vi
in
in
rc
Trading 11
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
7.1 Introduction
vi
in
rc
le
pe
ne
In the previous chapter we studied the problem of optimal execution for an agent
irc
who aims to liquidate/acquire a considerable proportion of the average daily
vi
in
in
rc
volume (ADV) of shares. There we saw how the agent trades off the impact on
r
le
pe
ne
prices that her trades would have if she traded quickly, with the uncertainty in
irc
vi
prices she would receive/pay if she traded slowly. We find that the agent's optimal
in
rc
strategy is to trade quickly initially (ensuring that she receives a price close to the
r
le
pe
ne
arrival price, but with a non-trivial impact) and then slow down as time goes by
irc
vi
(to reduce her overall impact, but increase price uncertainty ). Surprisingly, the
in
in
rc
r
le
le
of the problem that the agent may wish to include in her optimisation decision,
pe
ne
irc
and explore how her trading behaviour adjusts to account for them.
vi
in
in
Specifically, we look at three distinct aspects of the optimal execution problem.
rc
r
le
pe
An upper price limit: In Section 7.2 we study the problem of an agent wishing
ne
1.
irc
to acquire a large position, who has an upper price limit on what she is
vi
in
rc
willing to pay. We find that the optimal strategy in this case is no longer
r
le
pe
ne
independent of the midprice, beyond the obvious change that the agent stops
irc
in
rc
11. Informative order flow: In Section 7.3 we study the problem of an agent
r
le
pe
ne
wishing to liquidate a large position, taking into account that the order
irc
vi
flow from other traders in the market also impacts the midprice. We show
in
rc
that the agent alters her strategy so that when the net effect of other market
r
le
pe
ne
participants is to trade in her direction, she increases her trading speed; con
irc
vi
versely, if the net effect of other agents is to trade in the opposite direction,
in
in
rc
pe
ne
m. Dark pools: In Section 7.4, the agent has access to a (standard) lit market
irc
vi
and also to a dark pool. Trading in the dark pool exposes her to execution
in
rc
le
risk, but removes some of the price impact. We find that the optimal strategy
pe
ne
irc
is still deterministic: initially the agent trades in the lit market at speeds
vi
below that dictated by Almgren & Chriss (2000) (AC), and posts the whole
in
in
rc
le
of the remaining order in the dark pool, in the hope of it being filled there.
ne
irc
in
rc
pe
vi
7.2 Optimal Acquisition with a Price limiter 159
r
le
pe
irc
vi
rc
After a while, if the order has not been filled in the dark pool, the agent's
le
pe
ne
irc
n
vi
in
in
rc
Throughout this chapter we use the same notation as in Chapter 6.
r
le
pe
ne
irc
vi
in
rc
le
7.2 Optimal Acquisition with a Price Limiter
pe
ne
irc
n
vi
in
in
In this section we solve the problem for an agent whose target is to acquire
r
le
i)1 shares over a trading horizon of T, with a cap on the price at which she
pe
ne
irc
acquires shares equal to S. If the midprice reaches this limit price before T,
vi
in
all remaining shares are immediately purchased and the acquisition programme
c
le
r
stops. 'vVe assume that the midprice dynamics follow (6.lb) with g(vt ) = bvt ,
pe
ne
irc
b 2:'. 0, and the execution price is as in (6.lc) with linear price impact f(vt ) = k V t ,
n
vi
in
in
k > 0. The agent will stop trading if any one of the following events occur:
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
irc
n
vi
in
in
rc
pe
ne
irc
When either of events (b) or (c) occur, the agent acquires the remaining iJ1-Q�
le
pe
ne
irc
units of the security and pays S T +a(iJ1-Q�) per unit, where a > 0. To simplify
n
vi
in
rc
r
le
satisfying
pe
ne
irc
dYt = -V t dt ,
vi
in
rc
le
irc
n
To complete the setup of the problem, we write the agent's performance criteria
vi
in
in
rc
as
r
le
pe
ne
irc
T T
H (t,S,y)=lEt ,S,y [l (Su+kvu)vudu+ Y T (S T +ayT )+c/>l y�&u],
vi
v
in
c
(7.1)
r
le
er
pe
where cJ>ft y� du with c/> 2:: 0 is a running inventory penalty of the remaining
irc
T
n
n
vi
shares to be acquired (as discussed in the previous chapter this penalty is not a
in
in
rc
pe
ne
irc
v
c
vEA
r
le
r
pe
ne
n
vi
in
rc
le
ne
irc
in
rc
p
vi
r
le
160 Optimal Execution with Contimmus Trading 11
pe
irc
vi
rc
le
pe
ne
Applying the dynamic programming principle (DPP), the value function should
irc
vi
satisfy the dynamic programming equation (DPE)
in
in
rc
r
le
+ ½a 2 8ssH + </>y2
pe
OtH
ne
irc
(7.2a)
+ min { -v Oy H + b v osH + (S + k v) v} = 0 ,
vi
in
rc
le
pe
subject to the terminal and boundary conditions
ne
irc
vi
H(T,S,y) = (S+ay)y,
in
in
rc
(7.2b)
r
le
pe
H(t,S,y) = (S + ay)y, (7.2c)
ne
irc
vi
H(t,S,0)=0. (7.2d)
in
rc
le
pe
The terminal and boundary conditions reflect the fact that the agent acquires
ne
irc
the remaining shares at the stopping time. Note that when her inventory equals
vi
in
in
rc
the target 1)1: at t < T, she stops acquiring and there is no penalty, hence the
r
le
pe
value function equals zero along y = 0.
ne
irc
vi
From the first order conditions, we obtain the optimal acquisition strategy in
in
rc
feedback form as
r
le
pe
s, y) = - A. (bosH - OyH + S)
ne
irc
v*(t,
vi
in
in
rc
r
le
and upon substituting back into the DPE above, the value function H then solves
pe
ne
irc
le
pe
ne
irc
vi
in
rc
r
le
pe
ne
irc
In general, the DPE (7.3) will have to be solved numerically; however, in practice
in
rc
le
it is normally the case that the effect of permanent impact is much smaller than
pe
ne
irc
the temporary impact from walking the LOB, so to reduce the dimension of the
vi
problem we set b = 0.
in
in
rc
r
le
In this case, due to the form of the DPE (7.3) and its terminal and boundary
pe
ne
irc
the ansatz
rc
le
pe
H(t,S, y) = yS + y2 h(t, S) ,
ne
irc
vi
in
in
rc
pe
f h2 + </> = 0,
ne
0th+ ½a 2 8ssh - ,
irc
irc
in
rc
ne
irc
in
rc
pe
vi
7.2 Optimal Acquisition with a Price Limiter 161
r
le
pe
irc
vi
rc
r
and, furthermore, the optimal acquisition strategy v* reduces to
le
pe
ne
irc
n
vi v*(t,S,y) = ¼yh(t,S ).
in
in
7
( .5)
rc
r
le
pe
ne
irc
vi
in
decreases), all else being equal, the optimal rate of acquisition slows down.
rc
le
pe
ne
irc
Numerical Solution I: Crank-Nicolson
n
vi
in
in
The (1+1 )-dimensional terminal boundary value problem (7.4) can be efficiently
r
le
r
solved numerically using a Crank-Nicolson scheme, by placing the problem on a
pe
ne
irc
grid in the domain [O,T] x [�,SJ and treating the quadratic term h2 explicitly.
vi
in
c
By introducing this grid, we now have a new boundary at �' and, in order to
r
le
r
pe
ne
irc
� « S. A usual approach is to specify the boundary condition as 8sshls=Q = 0.
n
vi
in
in
In order to evaluate whether this is a reasonable boundary or not we determine
rc
r
le
pe
what this condition implies about the behaviour of the optimal strategy at the
ne
irc
lower boundary.
vi
in
Denote x(t) = h(t,�). Combining (7.4) with 8ssh(t,�) = 0, we see that x(t)
rc
le
pe
irc
n
vi
OtX - ½ X 2 + ¢ =
in
in
0, t E [O,T),
rc
{
= r
le
x(T) a.
pe
ne
irc
le
pe
ne
( e 2 1(T-t) +1
irc
n
¢ > 0,
vi
in
rc
x(t) � { (7.6)
r
le
T-t)-i
pe
1
ne
irc
( -+-- ¢= 0 ,
a k
vi
in
rc
le
irc
a+vkcp
n
= ( =
vi
{tk
7
Vk and .
in
in
c
a-vkcp
r
le
pe
ne
Note that O :S x(t):S a and that x is increasing int and takes on its maximum
irc
at t = T.
vi
in
c
Moreover, q S+q 2 x(t) is precisely the value function in which there is no limit
r
le
er
pe
irc
price, as studied in Section 6.5 with permanent impact b set to zero. Therefore,
n
in
rc
r
le
vi
in
le
pe
ne
irc
desired boundary behaviour: v must equal the no limit price strategy when S =
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
162 Optimal Execution with Continuous Trading 11
pe
irc
vi
rc
le
pe
ne
fi. We therefore impose that the agent ignores the limit price when the midprice
irc
vi
is sufficiently far away from it.
in
rc
i
r
Although we cannot obtain an explicit solution to (7.4), we can obtain upper
le
pe
ne
and lower bounds on the function h(t, S) by appealing to the maximum principle.
irc
vi
in
First, from standard results in PDEs, a unique solution to (7.4) exists. Hence,
rc
by treating the non-linear term h 2 = h · Ti, where the term Ti is the solution to
r
le
pe
ne
irc
the PDE, we can invoke a standard maximum principle.
vi
in
rc
THEOREM 7.1 (Maximum Principle) Suppose that D C JR is a bounded con
i
r
le
pe
nected set and that u : D x [O, oo) --+ JR satisfies
ne
irc
vi
8tU + 8xxU = 0, > 0,
in
x ED, t
rc
le
·u(t,x) = p(t), x E 8D, t > 0,
pe
ne
irc
u(O,x) = q(x), x E 8D, t > 0.
vi
in
rc
i
r
le
Then
pe
ne
irc
vi
__max u� max (p(t) ; m_0xq) and
in
nx[O,T] n nx[o,TJ n
r
le
pe
ne
irc
As noted earlier, x(t) is increasing in t and O � x � a. Hence a direct ap
vi
in
i
condition h(t,;i) = x(t) (or as discussed, equivalently by restricting the trading
r
le
pe
ne
strategy to equal the no limit price strategy along S = fi) provides us with upper
irc
vi
in
le
pe
ne
Since the optimal trading rate v* (t, S, y) = ½ y h(t, S), the above inequality
rc
i
r
le
pe
ne
implies that at each inventory level, the agent with the limit price constraint
irc
trades at least as fast as the agent without the limit price, and attains a maximal
vi
in
rc
speed of trading of'/; y. This implies that the agent with the limit price constraint
r
le
pe
ne
will have acquired more shares than the agent without the constraint at any given
irc
rc
i
Finally, it is important to point out that the inventory held by the agent at
r
le
pe
ne
any given time can be obtained in terms of the path of the midprice process by
irc
vi
-½ Yth(t,St)dt ,
r
le
dY/ = -v; dt =
pe
ne
irc
vi
hence
in
rc
i
r
t�T.
pe
ne
irc
vi
This has the same form as in the case without the limit price, but here the
in
rc
le
path that the midprice takes plays an important role in determining how much
pe
ne
irc
inventory the agent has at any given time. Below, after discussing an alternative
vi
in
numerical solution and the case T --+ oo, we show some examples of the optimal
rc
i
le
in
rc
p
vi
7.2 Optimal Acquisition with a Price limiter 163
r
le
pe
irc
vi
rc
le
pe
Numerical Solution II: Iterative Scheme
ne
irc
An alternative approach to solving the non-linear terminal boundary value (TBV)
vi
in
in
rc
problem (7.4) is to use an exact iterative scheme, rather than resorting to finite
r
le
pe
ne
difference methods. The essential idea is to take an approximate solution to the
irc
vi
in
rc
the TBV to obtain an updated approximation h(m)(t, S) which solves the linear
r
le
pe
ne
TBV
irc
f h(m-l)(t, S)) h(m)(t, S) + ¢ = 0
vi
+ ½a 2 Oss -
in
in
( Ot (7.8a)
rc
r
le
pe
ne
subject to
irc
= a, = x(t),
vi
h(ml(t,S) h Cml (t,;i) Vt E [O,T) , (7.8b)
in
rc
le
pe
and
ne
irc
h(m)(T,S) = a, VS E (/:l,S).
vi
(7.8c)
in
in
rc
r
le
pe
At each iteration, the boundary and terminal conditions are respected, so all
ne
irc
that changes is the behaviour of the solution in the interior. The solution to the
vi
in
rc
le
pe
irc
h(ml (t, S) = ef J; h
vi
-l)(u, S ) du g Cml(t, S) ,
(m
in
in
rc
r
le
(7.9a)
rc
le
pe
subject to
ne
irc
vi
in
(7.9b)
rc
r
le
[O,T) , (7.9c)
ne
irc
vi
in
and
rc
le
(7.9d)
pe
ne
irc
vi
where
in
in
rc
r
le
pe
ne
irc
The system of linear PDEs requires an initial guess to begin the iteration. One
vi
in
rc
simple approach is to use a linear interpolation (in S) between h(t, /:l) = x(t)
r
le
and h(t, S) = a at each point in time. This initial guess can be written as
pe
ne
irc
vi
in
in
S-S S-S
= - - x(t) +=-a.
rc
O
h () (t,S)
r
le
S-/:l S-/:l
pe
ne
irc
Armed with the initial guess, the above system of linear PDEs can in principle
vi
in
rc
be solved using Laplace transform techniques. The final steps are to show that
r
le
pe
ne
functions, and then show that the sequence of solutions converges to the solution
in
in
rc
ne
irc
in
rc
p
vi
r
le
164 Optimal Execution with Continuous Trading 11
pe
irc
vi
rc
le
pe
ne
irc
The Perpetual Case
vi
As mentioned earlier, the acquisition problem with the price limit may always
in
rc
i
be solved numerically, e.g. via a Crank-Nicolson scheme. However, if we assume
r
le
pe
ne
that the agent's terminal date T -t oo, i.e. the agent trades until she acquires
irc
vi
all inventory or the limit price is reached, then the problem reduces to a simpler
in
rc
r
one that we can solve analytically. In this case, h is independent of time and
le
pe
ne
irc
equation (7.4) reduces to a boundary value problem for the ODE
vi
in
rc
i
(7.10a)
r
le
pe
ne
irc
vi
in
rc
Vkef>.
le
=
pe
irc
vi
in
The boundary condition h(S_) = -!k¢ arises by recalling that we impose the
rc
i
r
le
condition h(t, S..) = x(t) and from (7.6) we have limr-+oo x(t) = -!k<f>.
pe
ne
irc
The general solution of equations of the above kind are elliptic functions -
vi
in
rc
see e.g., Chapter 18 in Abramowitz & Stegun (1972). In our specific case (with
r
le
¢ > 0), the solution can be written in terms of the Weierstrass g::i-function as
pe
ne
irc
follows:
vi
in
rc
i
r
le
pe
ne
(7.11)
irc
vi
in
rc
where the last two arguments denote the invariants of the elliptic function and
r
le
pe
ne
conditions in (7.10b).
in
rc
i
r
le
pe
ne
functions by solving the ODE (7.10a) using the ansatz h(S) = /3 1 (S + /32) /3 3,
irc
vi
in
where /3 1 , /32, /33 are constants to be determined. Two of the constants can be
rc
le
obtained from the boundary conditions, and the third is obtained by ensuring
pe
ne
irc
the ansatz closes the ODE. We leave it as an exercise to show that the solution
vi
in
i
r
le
pe
ne
irc
vi
(7.12)
in
rc
le
pe
ne
irc
Recall that the optimal trading speed v* = ¼ y h(t, S). Hence, the perpetual
vi
in
rc
solution shows that the agent's speed of trading increases (for the same fixed
r
le
pe
ne
vi
natural, since the agent observes the price getting closer to the limit and therefore
in
rc
wishes to acquire as many shares as possible prior to breaching the price cap
r
le
pe
ne
without paying too much in immediate impact costs. Note, however, as inventory
irc
vi
is acquired, the speed of trading slows down. The net result of these two opposing
in
rc
i
le
in
rc
p
vi
r
le
7.2 Optimal Acquisition with a Price Limiter 165
pe
irc
vi
rc
le
pe
ne
irc
vi
2
10 =====:-------=-----,
in
rc
-a=0.05
i
r
le
-a=O.l
pe
-a=0.2
ne
irc
-a=0.3
vi
in
rc
le
pe
ne
10'
irc
vi
in
rc
i
r
le
pe
20.05 20.06 20.07 20.08 20.09 20.1
s
ne
irc
vi
in
rc
le
Figure 7.1 Left panel: The rate of acquisition relative to remaining inventory as a
pe
ne
irc
function of time and fundamental price. Right panel: the rate of acquisition relative
to inventory as a function of S at t = 0 for various volatility levels.
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
We now illustrate several aspects of the agent's optimal behaviour when she
r
le
pe
ne
rc
i
r
le
T = lday , k = 10-4' b = 0,
pe
ne
irc
a= 100k, ¢=10- 3
u=O.l.
vi
,
in
rc
le
irc
a percentage of the ADV, and we assume the agent trades once per second).
vi
in
rc
Recall that the ratio a/k sets the maximum trading speed, hence our choice for
i
r
le
a. We set the limiting price to S = S0 + u with initial price S0 = 20, and our
pe
ne
irc
le
pe
First, in the left panel of Figure 7.1 we depict the optimal execution strategy
ne
irc
z;* relative to the current remaining inventory, i.e. z;* /y. As maturity approaches,
vi
in
rc
the trading rate increases, because for a fixed number of shares remaining the
i
r
le
pe
ne
agent must acquire faster to avoid the terminal penalty cost. Moreover, as the
irc
fundamental price approaches the limit price, the speed of trading also increases
vi
in
rc
to avoid the terminal penalty. The bounds on the rate of trading implied by
r
le
pe
ne
the maximum principle (7.7) can also be seen in the figure. In the case with no
irc
vi
limit price, the agent's optimal strategy is independent of the asset's volatility.
in
rc
However, with the limit price, as shown in the right panel of Figure 7.1, the
r
le
pe
ne
agent's behaviour does indeed depend on volatility. The more volatile the market,
irc
vi
the faster the agent trades, but as the price moves far away from the limit price,
in
rc
irc
inventory (due to her own trading) and the innovations in the midprice, hence
in
rc
i
le
the static views in Figure 7.1 do not tell the full story. To gain additional insight
ne
irc
in
rc
p
vi
Optimal Execution with Continuous Trading 11
r
le
166
pe
irc
vi
rc
le
pe
6�------ ---�
ne
irc
:§, 20.1
vi
in
in
rc
�
r
le
·;::::
pe
ne
p..
irc
ciJ 19.9
vi
in
rc
E:
r
le
19.8
pe
ne
o:l
irc
] 19.7
vi
in
in
rc
r
le
0 0.5
pe
ne
irc
Time
20.05�-- -------�
vi
in
rc
le
pe
ne
irc
..c:
vi
in
in
rc
if]
r
le
ti;
pe
A.
ne
irc
+'
� 19.95
vi
in
rc
le
pe
ne
irc
0.5 0.5
vi
in
in
Time
rc
Time
r
le
pe
ne
irc
Figure 7.2 Sample paths of the evolution of the midprice, acquisition rate and
vi
in
rc
inventory. Dashed line in the bottom left panel represents the evolution of inventory
r
le
irc
vi
in
in
rc
r
le
into the dynamic behaviour, in Figure 7.2 we plot three sample paths of the
pe
ne
irc
fundamental price together with the rate of acquisition, inventory, and cost per
vi
in
rc
share. In the bottom left panel, using a dashed line, we include the inventories'
r
le
irc
in (7.7).
vi
in
in
rc
As the figures show, the red path is mostly away from the limit price and
r
le
pe
after some initial noise, the agent's strategy is very close to the deterministic AC
ne
irc
strategy. The blue path stays mostly near the arrival price so that the trading
vi
in
rc
speed displays stochastic dynamics. The agent has an increased trading rate
r
le
between t = 0.2 and t = 0.3 when the midprice approaches the limit price.
pe
ne
irc
Also, around t = 0.6 the midprice almost touches the limit price and the agent's
vi
in
in
rc
trading speed spikes there; however, due to aggressive trading earlier on, by that
r
le
pe
ne
time she has already acquired a significant proportion of her shares, and the
irc
spike is not very large. The green path hits the limit price early on, and as the
vi
in
rc
figure illustrates, the agent trades quickly (relative to the AC strategy) up until
r
le
pe
ne
The bottom right panel of Figure 7.2 shows the cost per share along the three
in
in
rc
paths. Note that the green path, which hits the limit price early on, is more
le
ne
irc
in
rc
p
vi
7.3 Incorporating Order Flow 167
r
le
pe
irc
vi
rc
le
pe
ne
0.2 0.1
irc
Mean
vi
in
in
-.,,,.
0.8 Strategy "O 4
rc
0.08
0.15
r
Mean
le
(l)
>, (l)
pe
Strategy
ne
::; 0.6 0.0 6
irc
�3,
0.1
vi
;a,::1 2
in
(l)
rc
� 0.4 r 0.0 4
le
>-< c1l
-�----..............
pe
0.0 5 AC Strategy
ne
'
irc
0.2 E=11 ;( 0.0 2
vi
in
in
rc
0 0 0
r
0 0.5 0 0.5
le
pe
Time Time
ne
irc
vi
in
rc
le
Figure 7.3 Inventory and trading speed heat-maps from 1,000 simulations of the
pe
ne
irc
optimal strategy.
vi
in
in
rc
r
le
pe
expensive than the other paths for two somewhat interrelated reasons: (i) the
ne
irc
midprice was generally higher (and it hit the limit price) during trading; and
vi
in
rc
(ii) since the price generally trended upwards, the agent trades more quickly and
r
le
pe
ne
hence has a large temporary impact compared with the other paths.
irc
Finally, in Figure 7.3, we show heat-maps of the agent's inventory (left panel)
vi
in
in
rc
and trading speed (right panel) resulting from 1,000 simulations. We see a thin
r
le
pe
ne
vi
trading speed of 0. These represent those paths that breached the price limit
in
rc
early. We also show the mean inventory path and the mean trading speed tra
r
le
pe
ne
jectory. As expected, the mean inventory path lies above the AC strategy, since
irc
vi
the trading speed for the same level of inventory must lie above the AC strategy
in
in
rc
pe
ne
irc
Inequality (7.7), does not, however, imply that the trading speed will always
vi
lie below the AC trading speed. This is because the inventory level varies with
in
rc
le
the sample path and will not generally equal that of the AC inventory. Indeed,
pe
ne
irc
as the right panel of Figure 7.3 shows, the mean trading speed starts above that
vi
in
in
of the AC, but as time passes, it eventually falls below it. The intuition for this is
rc
r
le
that since the optimal strategy requires the agent to trade more quickly than the
pe
ne
irc
AC, her inventory is generally higher (and closer to the target inventory) than
vi
in
if she were trading according to the AC strategy. Since she eventually has less
rc
le
inventory, her trading speed generally slows down which results in the behaviour
pe
ne
irc
in
rc
r
le
pe
ne
irc
le
pe
ne
In the previous chapter and in the last section, we assume that in the absence
irc
vi
in
rc
that when the agent begins to liquidate (acquire) shares, her actions induce
le
ne
irc
in
rc
p
vi
r
168 Optimal Execution with Continuous Trading 11
le
pe
irc
vi
rc
le
pe
ne
a downward (upward) drift in the midprice process. In other words, the act
irc
of her selling (buying) shares induces the market as a whole to adjust prices
vi
in
rc
i
downwards (upwards). Yet at the same time we are ignoring the trades of other
r
le
pe
ne
market participants, implicitly assuming that on average their actions even out
irc
vi
to yield a net of zero drift. This may be acceptable at an aggregate level, but
in
rc
over short time horizons, there may be order flow imbalance, which very often
r
le
pe
ne
irc
vi
this section, we show how to incorporate the order flow from the remainder of
in
rc
i
the market into the midprice dynamics and how the agent modifies her strategy
r
le
pe
ne
irc
to adapt to it locally.
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
the previous chapter, we now also model the dynamics of the buy and sell rate
pe
ne
of order flow µt and assume that they satisfy the SDE
irc
vi
in
rc
(7.13)
r
le
pe
ne
rc
processes as well) with equal intensity A. This assumption implies that the buy
i
r
le
and sell order flows arrive independently at Poisson times with rate A, and induce
pe
ne
irc
an increase in the order flow rate by T/ and jumps in order flow rate decay at the
vi
in
rc
speed "'·
r
le
pe
Next, we incorporate the order flow in the midprice process St , which now
ne
irc
rc
i
r
le
pe
ne
irc
vi
an impact function which dictates how the midprice drift is affected by buy/ sell
r
le
pe
ne
order flow. In this manner, the action of the agent's trades and other traders'
irc
actions are treated symmetrically. vVe can define the net order flow µt = µi - µ;,
vi
in
rc
i
and a short computation shows that
r
le
pe
ne
irc
le
pe
ne
irc
Hence, if the permanent impact functions g(x) = bx are linear (with b � 0), we
vi
in
can use the net order flow as a state process rather than having to keep track of
rc
i
r
le
dSt dWt
in
rc
(7
r
le
pe
irc
rc
i
le
ne
irc
in
rc
p
vi
7.3 incorporating Order Flow 169
r
le
pe
irc
vi
rc
le
pe
and her cash process x v satisfies the SDE
ne
irc
=
vi
dXf (Sf - k Vt) Vt dt '
in
rc
i
r
le
pe
where k > 0 is the temporary linear impact parameter. Also,the agent's perfor
ne
irc
vi
in
[xr + Q� (Sf- aQ7°) -¢ Jt(Q�)
rc
le
pe
ne
irc
and her value function is
vi
in
rc
H(t,x,S, µ,q)= sup H v(t,x,S, 11,,q ),
i
r
le
pe
ne
vEA
irc
vi
in
rc
le
pe
ne
irc
The DPP for the value function suggests that the value function H(t,x,S, µ,q)
vi
in
rc
satisfies the DPE (the value function now has an additional state variable,µ)
i
r
le
pe
= + ½o2 8ss) H + [J 1H - cpq 2
ne
0 (8t
irc
vi
in
rc
le
pe
ne
H(T,x,S, µ,q)= x + q S - a q 2
in
rc
i
r
le
pe
ne
where the infinitesimal generator for the net order flow acts on the value function
irc
vi
as follows:
in
rc
le
pe
ne
rc
(7.15)
i
r
le
pe
ne
H(t,x,
rc
le
pe
we see that the excess book value function h(t, µ,q)satisfies the equation
ne
irc
vi
rc
i
r
le
pe
ne
vi
in
sents the cash from the sale of shares so far plus the book value (at midprice) of
rc
le
irc
The optimal control in feedback form is the same as in (6.22), but the function
vi
h satisfies a new equation, More specifically,the first order conditions imply that
in
rc
i
r
le
1
pe
v* = - k (bq+oq h),
ne
irc
2
vi
in
rc
and upon substitution back into the previous equation we find that h satisfies
r
le
pe
irc
vi
in
rc
(7,16)
i
le
ne
irc
in
rc
p
vi
Optimal Execution with Continuous Trading Ii
r
170
le
pe
irc
vi
rc
le
pe
Solving the DPE
ne
irc
vi
in
rc
Due to the existence of linear and quadratic terms in q in (7.16), and its terminal
i
r
le
conditions, we expect h(t, µ, q) to be a quadratic form in q, and we assume the
pe
ne
irc
ansatz
vi
in
rc
le
pe
ne
irc
Inserting this into (7.16) and collecting like terms in q leads to the following
vi
in
rc
coupled system of PIDEs:
i
r
le
pe
ne
irc
(7.17a)
vi
in
rc
le
pe
(7.17b)
ne
irc
vi
in
rc
(7.17c)
i
r
le
pe
ne
irc
vi
in
rc
= 0, = 0,
r
ho(T, µ) h1(T, µ)
le h2 (T, µ)=-a.
pe
ne
irc
Note that since (7.17c) for h2 contains no source terms inµ, and its terminal
vi
in
rc
i
condition is independent of µ, the solution must be independent of µ, i.e. h2 is
r
le
pe
ne
a function only of time. In this case, (7.17c) reduces to (6.25) - the equation for
irc
vi
h2 (t) in the AC problem. Thus
in
rc
le
1 + ( e2,(T-t)
pe
= x(t)- ½ b, =
ne
irc
rc
i
r
le
with the constants I and ( as defined in (6.26), but repeated here for convenience:
pe
ne
irc
a- ½b + v1fcp
vi
in
=
rc
and (
a- 21 b-v1fqj
r
le
pe
ne
irc
Next, to solve for h 1 in (7.17b), we exploit the affine structure of the model
vi
in
rc
i
for the net order flow and write
r
le
pe
ne
irc
vi
in
rc
le
in which case,
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
vi
in
rc
le
pe
ne
irc
vi
Since this must hold for every value of µ, each term in the braces must vanish
in
rc
individually and we obtain two simple ODEs for £ 0 and £ 1 . Since R0 (T) = 0 and
i
le
ne
irc
in
rc
p
vi
7.3 Incorporating Order Flow 171
r
le
pe
irc
vi
rc
le
pe
its ODE is linear in £ 0, the solution is f0 (t) = 0. For £ 1 , due to the source term
ne
irc
b, the solution is non-trivial and can be written as
vi
in
rc
T
l
i
r
le
t
pe
f1(t) =b e-"'(s- )e½f,8x(u)duds. (7.18)
ne
irc
vi
i
in
rc
le
pe
ne
irc
t ( ) ( e,(T-t) _ e-,(T-t)
Eds= log
vi
in
.o k (e,T - e-,T
rc
i
r
le
pe
to simplify the expression for f1 to
ne
irc
vi
in
(7.19)
rc
le
pe
ne
where
irc
vi
in
1 1 - e-C,.,,+,)T 1 - e-(t£-,)T
rc
l1(T) = ----- { e'fT _____ (- e-,T ____ _}
i
r
le
pe
ne
irc
and T = T - t represents the time remaining to the end of the trading horizon.
vi
in
rc
le
pe
ne
but the optimal speed of trading does not depend on ho since as we showed
irc
earlier, v* = -(bq + 8q h)/2k, and Oq h(t,µ) = h1(t,1t) + 2qh2(t,µ). Putting
vi
in
rc
i
these results together we find that the optimal speed of trading is
r
le
pe
ne
irc
1 b -
vi
*
v* = -- x(t) Q v - - f1(t) µt · (7.20)
in
rc
t k t 2k
r
le
pe
ne
irc
The optimal trading speed above differs from the AC solution by the second
vi
rc
i
r
le
the trading speed due to excess order flow. Recall that in the limit a -f oo,
pe
ne
irc
x ::; 0, and from the explicit equation above £1 2:: 0, hence, when the excess
vi
order flow is tilted to the buy side (µt > 0), the agent slows down trading since
in
rc
le
she anticipates that excess buy order flow will push the prices upwards - and
pe
ne
irc
therefore will receive better prices when she eventually speeds up trading to
vi
in
sell assets later on. Contrastingly, she increases her trading speed when order
rc
i
r
le
flow is tilted to the sell side (µt < 0), since other traders are pushing the price
pe
ne
irc
downwards and she aims to get better prices now, rather than waiting for other
vi
in
le
hide her orders by trading when order flow moves in her direction. Finally, recall
pe
ne
irc
that f 1 (t) � 0, hence, the order flow influences the agent's trading speed less
vi
in
rc
and less as maturity approaches because there is little time left to take advantage
i
r
le
pe
Somewhat surprisingly, the volatility of the order flow process 77 does not
vi
in
rc
appear explicitly in the optimal strategy. It does, however, affect the way the
r
le
pe
agent trades through its influence on the path which order flow takes. vVhen the
ne
irc
order flow path is volatile, the optimal trading speed will be volatile as well. It
vi
in
rc
is also interesting to observe that if the jumps 77 in the order flow at the Poisson
i
le
ne
irc
in
rc
p
vi
172 Optimal Execution with Continuous Trading II
r
le
pe
irc
vi
rc
le
pe
ne
times were random and not constant, the resulting strategy would be identical,
irc
see Exercise E.7.1. Similarly, if we add a Brownian component to the order flow
vi
in
rc
process µt, the resulting optimal strategy in terms of µt would be identical, i.e.
i
r
le
pe
ne
(7.20) remains true. Naturally, the actual path taken by the order flow, and
irc
vi
therefore also that of trading, would be altered by these modifications to the
in
rc
model.
r
le
pe
ne
A final point we make about this optimal trading strategy is that Vt is not
irc
vi
necessarily strictly positive. If the order flow µt is sufficiently positive, then the
in
rc
i
agent m ay be willing to purchase the asset to make gains from the increase in
r
le
pe
ne
asset price (i.e. her liquidation rate becomes negative). This is because the way
irc
vi
we have introduced order flow into the model generates predictability in the price
in
rc
le
process which can be exploited, even if the agent is not executing a trade. In
pe
ne
fact, if the agent has liquidated the target 1)1 at t < T the optimal strategy is
irc
vi
in
not to stop, but to continue trading and exploit the effect of the order flow, and
rc
i
r
le
we see this as her inventory can become negative at intermediate times. If there
pe
ne
irc
vi
in
One approach to avoid such scenarios is to simply restrict the trading strategy
le
pe
ne
irc
in a naive manner, by setting
vi
in
rc
i
r
le
pe (7.21)
ne
irc
vi
in
In other words, we can follow the unrestricted optimal solution whenever the
rc
le
trading rate is positive and the agent has positive inventory, otherwise we impose
pe
ne
irc
a trading stop. This trading strategy, v t , is not the true optimal strategy. To
vi
in
obtain the true optimal strategy we would need to go back to the DPE and
rc
i
r
le
condition along q = 0. In this case, the DPE will not have an analytical solution,
vi
in
although numerical schemes can be used to solve the problem. Nonetheless, the
rc
le
irc
vi
in
rc
i
Simulations of the Strategy with Order Flow
r
le
pe
ne
irc
le
pe
ne
</> = 0.01,
vi
in
i
r
le
pe
where 17 � Exp(170) denotes the exponential distribution with mean size lE['IJ] =
ne
irc
vi
'/JO·
in
rc
Figure 7.4 shows three scenarios of the midprice, the order flow, the optimal
r
le
pe
ne
inventory, and the optimal speed of trading when the agent uses the augmented
irc
vi
strategy v t in (7.21). As the figure shows, when the order flow is positive/negative
in
rc
the agent trades more slowly/quickly than the AC trading speed. For example,
le
ne
irc
in
rc
p
vi
7.3 Incorporating Order Flow
r
le
173
pe
irc
vi
rc
le
pe
ne
irc
50.3 300
vi
in
rc
200
3 100
i
r
le
50.2
�
pe
ne
irc
Cl) �
0
vi
-� 50.1 0
in
rc
r I-<
Cl)
le
'D '"d -100
pe
�
ne
I-<
irc
-200
vi
in
rc
-300
i
r
le
pe
Time (day) Time (day)
ne
irc
--
vi
in
4
rc
le
pe
"-
ne
irc
�3
'D
vi
in
Cl)
rc
-;::o.6 Cl)
i
r
le
I-< �2
1:l
pe
ne
0.4 bO
irc
�
2 0.2
Cl)
vi
]1
in
rc
.....,
�
r
le
pe
ne
irc
0 0
0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8
vi
rc
i
r
le
pe
ne
irc
Figure 7.4 Optimal trading in the presence of order flow. The dashed lines show the
vi
classical AC solution.
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
the large order flow in the buy direction (µt > 0), shown by the green path,
vi
in
rc
causes the agent to trade more slowly in the initial stages of the trade. As the
le
pe
ne
irc
end of the trading horizon approaches, the order flow influences her strategy less,
vi
in
but she must speed up her trading since there is little time remaining in which
rc
i
r
le
to liquidate the remaining shares. The red path has order flow that fluctuates
pe
ne
irc
mostly around zero, and as shown in the diagrams, she follows closely the AC
vi
in
strategy, but locally adjusts her trades relative to the path. Finally, the blue path
rc
le
has a bias towards sell order flow, and the agent adds to this flow by trading
pe
ne
irc
more quickly throughout most of the trading horizon and eventually liquidates
vi
in
i
r
le
pe
ne
To gain further insight into the strategy, Figure 7.5 shows heat-maps from
irc
5,000 scenarios of the optimal inventory to hold and the optimal speed of trading.
vi
in
rc
Panel (a) shows the results when 77 � Exp(5) as in Figure 7.4, while panel (b)
r
le
pe
ne
shows the results when 77 � Exp(lO). As expected, the optimal trading strategy
irc
vi
in scenario (b) is more volatile than in scenario (a), despite the optimal strategy
in
rc
ne
irc
in
rc
p
vi
174 Optimal Execution with Continuous Trading II
r
le
pe
irc
vi
rc
le
pe
ne
irc
0.2 3.5---------- 0.1
vi
in
rc
-�o.8
i
r
0.15
le
pe
6,
ne
irc
-;::o.6
''
vi
..... 0.1
'
in
0
rc
'i:] 0.4
r
le
pe
ne
irc
,£:l 0.2
vi
in
OL--�-�-�-��
rc
i
r
le
pe
ne
Time
irc
vi
(a) T/ � Exp(5)
in
rc
le
pe
ne
irc
0.1 3.5 0.05
vi
in
3,
2,
rc
�0.8 0.08 '' 0.04
i
r
le
"d 2.5
'
pe
Q>
ne
irc
Q)
';:: 0.6 0.06 Q)
2 0.03
vi
'
in
r:r:,
',
'i:l0
rc
Q)
ne
,
irc
,£:l 0.2 0.02 0.01
E::1 0.5
vi
in
rc
i
0 0 0 0
r
le
Time Time
irc
(b) T/ � Exp(lO)
vi
in
rc
le
pe
ne
Figure 7.5 Heat-maps of the optimal trading in the presence of order flow for two
irc
vi
rc
i
r
le
pe
ne
irc
le
irc
pants' rate of trading µt. Here we provide a general solution where we do not
vi
in
assume a particular model for µ, all we specify is the generator ,CY,, which nests
rc
i
r
le
(7.15) as a particular case. In this general setup the solution to the problem
pe
ne
irc
is very similar to that derived above. We need to solve the system of coupled
vi
in
PIDEs in (7.17) and in particular we must solve for h 1 which satisfies equation
rc
le
irc
vi
in
rc
i
r
le
pe
ne
irc
where
vi
+ (e "f(T-t)
in
- 1 2
1
rc
h2(t,µ) - Vk¢J - 2 b.
( e 2 "I (T-t)
r
le
1 -
pe
ne
irc
rc
i
le
rate and b µ is a source term. The general solution of such an equation can be
ne
irc
in
rc
p
vi
r
7 .4 Optimal Liquidation in Lit and Dark Markets 175
le
pe
irc
vi
rc
le
represented using the Feynman-Kac Theorem. Thus we write
pe
ne
irc
T u
vi
in
rc
h1(t,µ)=bIB'.t,µ [1 exp{½1 (h2(s)+½b) ds} µudu]
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
(7.22)
vi
in
rc
i
r
le
pe
Recall that the optimal speed of trading is given by
ne
irc
vi
* 1
in
rc
v = -2 k (bq +aqh) ,
r
le
pe
ne
irc
with
vi
in
rc
h(t,µ,q) = ho(t,µ)+qh1(t,µ)+q h2(t,µ).
i
2
r
le
pe
ne
irc
Hence, we have
vi
in
rc
* ( e2 ,(T-t) + 1 v*
r
le
pe
t =r ( e2 ,(T-t) - 1 Qt
ne
irc
v
(7.23)
vi
T (e'(T-u) _ e-,(T-u)
in
b
rc
i
r
le
- 2k t -
pe
ne
irc
vi
In the limit in which the terminal penalty becomes infinite (a ---+ oo), so
in
rc
that the agent must completely liquidate her position by the end of the trading
le
pe
ne
lE [µu IF.µ
i
r
le
r vt 1 t ] u.
, d
- sinh(, (T-t)) Qt
pe
vi
The first term corresponds to the classical AC solution, while the second corrects
in
rc
le
the liquidation speed based on the weighted average of the future expected net
pe
ne
irc
order flow. If this weighted average future order flow is positive (which would
vi
occur, e.g., if the current order flow is positive and hence biased towards buying),
in
rc
i
r
le
then the agent slows down to take advantage of the upward trend in prices
pe
ne
irc
that the excess positive order flow will have. The opposite holds if order flow
vi
in
le
irc
vi
in
rc
i
r
le
pe
vi
in
rc
Up until now, the agent has been trading on transparent (lit) markets, where
r
le
pe
all agents can observe quantities being offered for sale or purchase at different
ne
irc
prices, that is, the LOB is visible to all interested parties. We now consider the
vi
in
rc
possibility that the agent can also trade in what are known as dark pools. Dark
i
le
ne
irc
in
rc
p
vi
r
le
176 Optimal Execution with Continuous Trading II
pe
irc
vi
rc
le
pe
ne
pools are trading venues which, in contrast to traditional (or lit) exchanges, do
irc
not display bid and ask quotes to their clients. Trading may occur continuously, as
vi
in
in
rc
soon as orders are matched, or consolidated and cleared periodically (sometimes
r
le
pe
ne
referred to as throttling). We focus on a particular kind of dark pool known as a
irc
vi
crossing network defined by the Securities Exchange Commission (SEC) as (see
in
rc
le
pe
ne
irc
"... systems that allow participants to enter unpriced orders to
vi
in
in
c
buy and sell securities, these orders are crossed at a specified
r
le
pe
time at a price derived from another market... "
ne
irc
vi
Typically, the price at which transactions are crossed is the midprice in a corre
in
c
le
sponding lit trading venue. When a trader places an order in a dark pool, she
r
pe
ne
irc
may have to wait for some time until a matching order arrives so that her order is
vi
in
in
executed. Thus, on the one hand the trader who sends orders to the dark pool is
rc
r
le
exposed to execution risk, but on the other hand does not receive the additional
pe
ne
irc
vi
in
Here we analyse the case when the agent trades continuously in the lit market
rc
and simultaneously posts orders in the dark pool with the aim to liquidate SJ1 le
pe
ne
irc
shares.
vi
in
in
rc
r
le
pe
ne
irc
Model Setup
vi
in
rc
On the lit market, we assume, as before, that the agent is exposed to a temporary
r
le
pe
ne
market impact from her market orders so when trading Vt dt in the lit market,
irc
in
rc
Brownian motion. In addition to trading in the lit market, the agent posts Yt :::; qt
r
le
pe
ne
units of inventory in the dark pool, where qt _.:; SJ1 are the remaining shares to be
irc
vi
liquidated, and she may continuously adjust this posted order. Matching orders
in
rc
in the dark have no price impact because they are pegged to the lit market's
r
le
pe
ne
midprice, so the agent receives St per share for each unit executed in the dark
irc
vi
in
rc
r
le
Furthermore, other market participants send matching orders to the dark pool
pe
ne
irc
which are assumed to arrive at Poisson times and the volumes associated with
vi
the orders are independent. More specifically, let Nt denote a Poisson process
in
rc
le
pe
ne
irc
in
ious matching orders which are sent by other market participants into the dark
rc
r
le
pool. The total volume of buy orders (which may match the agent's posted sell
pe
ne
irc
order) placed in the dark pool up to time t is the compound Poisson process
vi
in
c
le
r
pe
ne
rc
vi
ci
in
in
When a matching order arrives, it may be larger or smaller than the agent's
le
r
ne
irc
in
rc
p
vi
7 .4 Optimal liquidation in lit and Dark Markets 177
r
le
pe
irc
vi
rc
le
posted sell order, hence the agent's inventory (accounting for both the continuous
pe
ne
irc
trading in the lit market and her post in the dark pool) satisfies the SDE
vi
in
in
rc
,
dQ� y = -lit dt - min (Yt, 6+N,_) dNt,
r
le
pe
ne
irc
and recall that the agent's aim is to liquidate 1)1 shares on or before the terminal
vi
in
date T. In the equation above the first term on the right-hand side represents
rc
le
the shares that the agent liquidates using MOs in the lit market and the second
pe
ne
irc
represents the orders she sends to the dark pool.
vi
in
in
c
We assume that the agent is at the front of the sell queue in the dark pool,
r
le
pe
so that she is first to execute against any new orders coming into that market.
ne
irc
The model can be modified to account for the agent not being at the front. This
vi
in
c
le
r
pe
orders in front of the agent. This, however, complicates but does not alter the
ne
irc
approach in a fundamental way, so we leave the interested reader to try this, see
vi
in
in
Exercise E.7.2.
rc
r
le
pe
Hence, the agent's cash process X('Y satisfies the SDE
ne
irc
vi
in
le
pe
irc
vi
in
in
H v ,y(t,x,S,q) + Q�,Y (ST - a Q� Y) - c/> 1
rc
T
= lEt , x ,S, q [XT (Q�'Y) du]
2
r
le
pe 0
ne
irc
le
pe
T=TAinf{ t: Qt=O} ,
ne
irc
vi
in
in
represents the time until the agent's inventory is completely liquidated, or the
rc
r
le
v,
H(t,x,S,q)= sup H y(t,x,S,q) ,
vi
in
v , EA
rc
y
r
le
pe
irc
from above, and her posted volume in the dark pool is at most her remaining
vi
in
in
,
rc
pe
ne
irc
vi
in
rc
le
pe
Applying the DPP shows that the value function should satisfy the DPE
ne
irc
vi
in
rc
r
le
vi
y� q
le
pe
ne
rc
ci
in
in
H(T,x,S,q) = x + q (S - a q) .
le
r
ne
irc
in
rc
p
vi
r
le
178 Optimal Execution with Continuous Trading II
pe
irc
vi
rc
le
pe
ne
In the above, the expectation represents an expectation over the random variable
irc
vi
� and the various terms in the DPE carry the following interpretations:
in
rc
i
r
le
the term 055 represents the diffusion of the midprice,
pe
ne
@
irc
2
® the -¢ q term represents the running penalty which penalises inventories
vi
in
rc
le
pe
,;, the sup v { ·} term represents optimising over continuous trading in the lit mar
ne
irc
ket,
vi
in
rc
o the supy :C::q term represents optimising over the volume posted in the dark
i
r
le
pe
pool, and the expectation is there to account for the fact that buy volume
ne
irc
vi
in
rc
= x +q S +
r
le
The terminal condition once again suggests the ansatz H(t, x, S, q)
pe
ne
h(t, q). Recall that x + q S represents the cash from sales so far, in both lit and
irc
vi
in
dark markets, plus the book value (at midprice) of the shares the agent still
rc
i
r
le
holds and aims to liquidate. Hence, h represents the value of optimally trading
pe
ne
irc
beyond the book value of cash and assets. The DPE then reduces to a simpler
vi
in
equation for h:
rc
le
pe
- v8qh}
irc
vi
(7.24)
in
i
r
le
y:C:q
pe
ne
irc
subject to the terminal condition h(T, q) = -a q 2 . Next, the first order condition
vi
in
rc
for v implies that the optimal speed to trade in feedback control form is
r
le
pe
ne
1
irc
* =--Oh (7.25)
vi
V
in
q 2k
rc
i
r
le
so
pe
ne
irc
vi
in
rc
le
pe
To determine the optimal over y (i.e. the optimal volume to post in the dark
ne
irc
pool), we need to either resort to numerics or place more structure on the random
vi
in
rc
variable�-
i
r
le
pe
ne
irc
vi
in
le
pe
ne
To obtain an explicit solution to the problem we assume that the agent's desired
irc
vi
execution (the liquidation order) is small relative to the volume coming into the
in
rc
dark pool, �i � IJt (for all i = 1, 2, ...). This assumption ensures that when a
i
r
le
pe
ne
matching buy order arrives in the dark pool, the agent's order is executed in
irc
vi
full, as the incoming buy order is larger than the amount posted in the agent's
in
rc
sell order - the agent's inventory at any point in time is at most 1)1 (the initial
r
le
pe
ne
amount she must liquidate). As the agent's posts are always filled entirely, in
irc
(7.24) min(6, y) = y.
vi
in
rc
ne
irc
in
rc
p
vi
7 .4 Optimal liquidation in lit and Dark Markets 179
r
le
pe
irc
vi
rc
le
ansatz, note that the DPE contains an explicit q2 penalty, the optimum over v
pe
ne
irc
is quadratic in 8q h, and the terminal condition is -a q2 . Thus this suggests the
vi
in
in
following ansatz for h(t, q):
rc
r
le
pe
ne
h(t, q) = ho(t) + h 1 (t) q + h 2(t) q2,
irc
vi
in
rc
with terminal conditions ho(T) = h 1 (T) = 0 and h2 (T) = -a. The supremum
r
le
pe
over y becomes
ne
irc
vi
in
rc
r
le
pe
y<;q
ne
= sup [h (t, q - y) - h(t, q)]
irc
vi
in
rc
y"5cq
le
pe
ne
irc
y<;q
1
vi
in
in
= (h1 -2 q h2 )2
-4 h2
rc
r
le
pe
ne
and the optimal dark pool volume in feedback form is
irc
vi
in
1 h1
rc
y*
r
= q+ -- . le
2 h2
pe
ne
irc
From the terminal condition, h2(t) < 0. It remains to be seen that h 1 (t) 2: 0 so
vi
in
in
rc
pe
ne
vi
in
rc
le
pe
ne
irc
in
rc
determining the value function, it is irrelevant for obtaining the optimal strategy.
r
le
pe
Inserting the above feedback controls into the DPE (7.24), collecting terms in
ne
irc
powers of q, and setting each to zero, leads to the coupled system of ODEs
vi
in
rc
le
irc
in
rc
h
r
le
8t ho + lk h21 - i =0 (7.26c)
pe
2-.4
ne
h2
irc
vi
in
Since h 1 vanishes at T and its ODE in (72 . 6b) is linear in h 1, the solution
rc
le
is h 1 (t) = 0 and it is also trivial to see that h0 (t) = 0. If there was a drift in
pe
ne
irc
the midprice, these terms would not vanish, see Exercise E.7.3. Then, overall,
vi
in
in
we are left with only the h2 equation, which is modified somewhat from the no
rc
r
le
dark pool case ( (6.25) with b = 0) by the term ->.h2 . This term represents a
pe
ne
irc
"leakage" of inventory resulting from the possibility that the order posted in the
vi
in
dark pool is fully executed. Clearly, we see that if there is no dark pool, that
rc
le
irc
above in Chapter 6. For instance, see that for >. = 0, ODE (7.26a) is the same
vi
in
in
rc
ne
irc
in
rc
p
vi
180 Optimal Execution with Continuous Trading 11
r
le
pe
irc
vi
rc
le
pe
The equation for h 2 is of Riccati type and can be solved explicitly. Let (±
ne
irc
denote the roots of the polynomial¢+ >..p - ½ p 2 = 0, then write (7.26a) as
vi
in
rc
i
-½ (h2-c+)(h2-C),
r
le
Bt h 2 =
pe
ne
irc
vi
where
J¼k >.. + kr/>.
in
rc
le
( ± = ½k A± 2 2
pe
ne
irc
Cross multiplying and writing as partial fractions, we have
vi
in
i
r
le
pe
ne
irc
vi
in
c
le
r
pe
ne
irc
h2-(- a+(- + -(-)(T-t,
log ( ) -log ( ) =-i;:((
1
)
vi
+ a+(+
in
h 2 -(
rc
i
r
le
pe
where we have used the terminal condition h 2 (T) = -a. Re-arranging the equa
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
a+ C-
irc
le
irc
1
vi
* = Qv*
* *
in
v; ,Y Yt t
i
r
le
pe
ne
irc
le
pe
1
ne
* * * *
irc
rc
i
so that
r
le
Jt h (u) du}
pe
ne
*
irc
Qt,y = Qo exp { ½
vi
2
in
c
le
er
pe
irc
n
vi
in
(7.28)
rc
i
r
le
pe
ne
irc
In the limit in which the terminal penalty a is very large, i.e. a --+ oo (so that
vi
in
c
the agent guarantees full execution by the end of the trading horizon), p' --+ 1
r
le
r
pe
and hence,
ne
irc
-+ sinh(�(T-t))
vi
v* * a-+=
Qt ,y -----+ e (\ �}
in
m.
rc
.
smh('2T)
i
le
ne
irc
in
rc
p
vi
r
le
7 .4 Optimal liquidation in lit and Dark Markets 181
pe
irc
vi
rc
le
pe
ne
Furthermore, in the limit ,\--+ 0, (- --+ -vfc{> and 1--+ 2J¢lk and thus
irc
vi {i (T - t))
in
rc
i
r
sinh (
le
pe
m,
ne
(a,.\)-+(oo,O)
sinh ( {ir)
irc
vi
in
rc
le
pe
ne
which recovers the results from the AC case without the dark pool.
irc
vi
in
rc
i
r
le
pe
Liquidation Strategy with Dark Pool
ne
irc
vi
in
It is clear that the optimal amount to send to the dark pool is always what
rc
le
remains to be liquidated. This makes sense because in our model there is no
pe
ne
irc
market impact in the dark pool so the agent obtains the midprice for orders that
vi
in
are crossed in the dark pool. The more interesting part of the liquidation strategy
rc
i
r
le
is how much the agent should send to the lit markets now that she has access
pe
ne
irc
to a dark pool. To answer this question it is useful to compare the lit market
vi
in
rc
liquidation rate v* in (7.27) with the optimal liquidation strategy when there is
r
le
pe
no dark pool, i.e. ,\ = 0. Recall that when ,\ = 0 the optimal speed of trading
ne
irc
in the lit market is that given by the AC solution, see for instance (6.27) with
vi
in
i
r
le
pe
modified rate at which the agent is trading in the lit market is larger or smaller
ne
irc
than the liquidation rate when the agent does not have access to a dark pool.
vi
in
Also, it is not clear whether the trading rate is decreasing as in the AC case.
rc
le
pe
In Figure 7.6 we plot the optimal liquidation rate in the lit market given in
ne
irc
(7.27) for different levels of the rate of arrival of matching orders in the dark
vi
in
rc
pool. The figure shows that the trading rate may be larger or smaller than the
i
r
le
pe
hold (up to the time at which a matching order arrives) may be either convex or
vi
in
rc
concave or neither.
r
le
pe
ne
In particular, the top two panels of Figure 7.6 show the optimal inventory path
irc
vi
and optimal speed of trading where we also assume that the liquidation penalty
in
rc
at time T is a --+ oo and the paths shown are prior to the order posted in the
i
r
le
pe
ne
dark pool being executed. Other model parameters are k = 0.001 and</>= 0.01.
irc
vi
The bottom two panels of the figure show the case where the order in the dark
in
rc
pool was executed at time t = 0.6 and the agent's inventory drops to zero. Since
r
le
pe
ne
the execution of the orders in the dark pool occur according to a Poisson process
irc
vi
with intensity ..\, the time at which this occurs is exponentially distributed with
in
rc
i
r
mean 1/ ,\. Thus, when ,\ = 0 there are no executions in the dark pool and the
le
pe
ne
irc
liquidation strategy corresponds to the AC solution. When ,\ > 0 the agent starts
trading slower than the AC speed in the lit market, to allow for the potential of
vi
in
rc
le
dark pool execution, but then as time runs out and no execution occurs, her rate
pe
ne
irc
the optimal trading curve ceases to be convex, and its convexity changes signs.
in
rc
i
le
In the limiting case when ,\ --+ oo, the agent does not trade at all in the lit
ne
irc
in
rc
p
vi
r
le
182 Optimal Execution with Continuous Trading 11
pe
irc
vi
rc
le
pe
ne
irc
market, since execution in the dark pool is guaranteed. In this case, the optimal
inventory path flows along Q; = SJ1 ]t<T, but is then infinitely fast at T to rid
vi
in
rc
i
r
le
herself of the assets.
pe
ne
irc
vi
--- ---,n
in
"O 6r===�
rc
r Q! -l.=O
le
�5 -l.=2
pe
ne
(/) -l.=4
irc
bO -l.=8
vi
4
in
P -l.=16
rc
] -).=32
i
r
le
3
A
pe
ne
0.4
irc
vi
in
-A=B
rc
�0.2
-l.=16
r
le
pe
-l.=32
ne
irc
0.5 0.5
vi
Time Time
in
rc
i
r
le
"O 4
pe
ne
Q)
irc
Q)
t, 0.8 P.
vi
in
(/) 3
rc
le
Q)
� 0.6
pe
ne
irc
ol 2
0.4 A
vi
in
]
rc
i
.§
6 0.2 r
le
.µ 1 pe
ne
.µ
irc
P.
Oo
vi
0
in
0 0.5 0 0.5
rc
Time Time
le
pe
ne
irc
Figure 7.6 The top panels show optimal inventory path and speed of trading prior to a
vi
in
rc
matching order in the dark pool. The bottom panels show the optimal inventory and
i
r
le
trading speed where we assume that the dark pool matching order arrives at t = 0.6,
pe
ne
irc
le
pe
ne
irc
vi
in
rc
pe
ne
irc
vi
Laruelle, Lehalle & Pages (2011), Buti, Rindi & Werner (2011b), Buti, Rindi
in
rc
& Werner (2011a), Crisafi & Macrina (2014), Iyer, Johari & Moallemi (2014),
le
pe
ne
irc
Moallemi, Saglam & Sotiropoulos (2014), Bechler & Ludkovski (2014), Cartea
vi
in
i
r
le
pe
ne
irc
vi
in
7 .6 Exercises
rc
le
pe
ne
irc
E.7.1 Use the same setup as in Section 7.3 but allow for 'r/ to be random so that
vi
in
rc
i
le
(7.29)
ne
irc
in
rc
p
vi
r
le
7 .6 Exercises 183
pe
irc
vi
rc
le
pe
ne
where 7/ are i.i.d. with finite first moment. Find the optimal speed of liquidation
irc
vi
and compare this result to (7.20).
in
in
rc
E.7.2 Assume the setup in Section 7.4. Instead of the agent's orders always being at
r
le
pe
ne
the front of the queue in the dark pool, assume that ahead of her order there
irc
vi
are other market participants' orders which have priority. Model this volume
in
rc
le
as a random variable and derive the optimal speed of trading in the lit market
pe
ne
irc
and the number of shares that the agent sends to the dark pool.
vi
E.7.3 The setup is as in section 7.4.1 and let the midprice satisfy
in
in
rc
r
le
pe
ne
irc
vi
in
where µ is constant. Derive the DPE and propose an ansatz to specify the
rc
le
optimal speed of trading. Compare your results to the case where µ = 0.
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
8 Optimal Execution with Limit and
pe
ne
irc
vi
in
rc
Market Orders
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
8.1 Introduction
vi
in
rc
le
pe
ne
irc
vi
on market orders (MOs) only. One of the advantages of sending MOs is that
in
rc
i
r
execution is guaranteed. The execution price, however, is generally worse than
le
pe
ne
irc
the midprice due to both the existence of non-zero spread and the fact that
vi
in
orders may walk the book. In practice, the agent also employs limit orders (LOs)
rc
irc
costs, the prices at which LOs are filled are better than the midprice, but there
vi
in
i
r
le
To address these issues, this chapter looks at optimal execution problems when pe
ne
irc
the agent employs LOs and possibly also MOs. In Sections 8.2 and 8.3, the agent
vi
in
rc
is only allowed to use LOs. In Section 8.4, the agent is allowed to trade with
r
le
both LOs and MOs, and in Section 8.5, the agent aims to track a given schedule
pe
ne
irc
rc
In all cases, when the agent posts LOs to liquidate a position, she posts a limit
i
r
le
pe
sell order for a fixed volume (e.g., some percentage of the average size of an MO,
ne
irc
Hence, o is a premium the agent demands for providing liquidity to the market.
o,
r
le
pe
The larger the larger the premium, but the probability that an order arrives
ne
irc
and walks the limit order book (LOB), up to the posted depth, decreases with o.
vi
in
rc
The strategy used by the agent relies on speed to post-and-cancel LOs. At every
i
r
le
pe
ne
instant in time: the agent reassesses market conditions, cancels any LO resting
irc
in the book, posts a new LO at the optimal level, and so on. To do this, requires
vi
in
rc
software, hardware, and connection to the exchange so that the strategy does
r
le
pe
ne
not have stale quotes in the LOB and can quickly process information.
irc
o,
vi
rc
on the arrival of an MO, is called the fill probability which we denote by the
r
le
pe
vi
and it is sensitive to the current status of the LOB. To see this, consider the left
in
rc
le
panel of Figure 8.1 which shows a block-shaped LOB together with (i) a post at
pe
o = 10 (the dashed line); (ii) the depth to which an MO of volume 700 lifts sell
ne
irc
vi
in
orders (dark green region); and (iii) the depth to which an MO of volume 1,500
rc
i
le
lifts sell LOs (dark plus light green region). The deeper the LO is posted (i.e.
ne
irc
in
rc
p
vi
8.2 Liquidation with Only Limit Orders 185
r
le
pe
irc
vi
rc
le
pe
120
ne
irc
0
10
vi
100
in
rc
0
0
i
r
le
80 �
pe
s 1
0
ne
irc
0
0 0
60
vi
..D
in
rc
� 40
r
le
0.. 1
0 0 0 0
pe
ne
;:::: 10-
irc
20 �
vi
0
in
rc
i
0
r
le
0 10 20 30 0 10
pe
5
ne
Ticks (o)
irc
Ticks (o)
vi
in
rc
le
Figure 8.1 (Left) A flat (or block shaped) LOB. (Right) Empirical fill probabilities for
pe
ne
irc
NFLX on June 21, 2011 for the time interval 12:55pm to 1:00pm using 500
vi
millisecond resting times. The straight line shows the fit to an exponential function.
in
rc
i
r
le
pe
ne
irc
further away from the midprice), the less likely it is that MOs large enough walk
vi
in
the LOB up to that price level. Hence, the probability of being filled decreases
rc
as o increases. le
pe
ne
irc
If we assume that the volume of individual MOs, denoted by V, is exponentially
vi
in
rc
distributed with mean volume of 77, and that the LOB is block shaped with height
i
r
le
maximum price level of S + 8, then the probability of fill is exponential. That is,
vi
in
le
pe
LO is lifted is given by
ne
irc
o}.
vi
(8.1)
rc
i
r
le
pe
ne
One could in principle also use power law fill probabilities; however, to keep
irc
vi
the analysis consistent and self-contained we use the exponential fill probability
in
rc
throughout.
r
le
pe
ne
irc
vi
in
rc
pe
ne
irc
vi
Chapters 6 and 7 looked at the optimal execution problem for an agent who
in
rc
le
places only MOs. In this section, the agent posts only LOs and the setup of
pe
ne
irc
the problem is similar to that in Chapter 6. Now we must track not only the
vi
in
agent's inventory, but also the arrival of other traders' MOs, which is what will
rc
i
r
le
(possibly) lift the agent's posted sell LOs. We summarise the model ingredients
pe
ne
irc
le
pe
irc
• S = (St ) o<t<T is the asset's midprice with St = So + O" Wt , O" > 0, and
vi
in
rc
ne
irc
in
rc
p
vi
r
Optimal Execution with limit and Market Orders
le
186
pe
irc
vi
rc
le
=
(5)o<t<T denotes the depth at which the agent posts limit sell orders, i.e.
pe
e 5
ne
irc
the agent posts LOs at a price of St + 6t at time t,
vi
in
in
rc
e M = (Mt)o<t<T denotes a Poisson process (with intensity >-) corresponding
r
le
pe
to the number of market buy orders (from other traders) that have arrived,
ne
irc
vi
°
in
rc
the number of market buy orders which lift the agent's offer, i.e. MOs which
r
le
pe
ne
walk the sell side of the book to a price greater than or equal to St + 6t ,
irc
e P( 5) = e-" 0 with "' > 0 is the probability that the agent's LO will be lifted
vi
in
in
rc
when a buy MO arrives,
r
le
pe
ne
irc
X 0 = (Xf)o �t�T is the agent's cash process and satisfies the SDE
vi
@
in
rc
(8.2)
le
pe
ne
irc
Qf = SJt - Nf is the agent's inventory which remains to be liquidated.
vi
in
in
rc
@
r
le
Note that whenever the process N jumps, the process M must also jump, but
pe
ne
irc
when M jumps, N will jump only if the MO is large enough to walk the book
vi
in
and lift the agent's posted LO. Moreover, conditional on an MO arriving (i.e. }YI
rc
jumps), N jumps with probability P(5 t) = e-" 0'; however N is not a Poisson le
pe
ne
irc
process since its activity reacts to the depth at which the agent posts. Moreover,
vi
in
in
in contrast to the setup in Chapters 6 and 7, here, when the agent's orders are
rc
r
le
Finally, the filtration F on which the problem is setup is the natural one
vi
in
rc
generated by S , N and NI. Moreover, the agent's depth postings (or strategy) 5
r
le
irc
vi
in
in
rc
r
le
The agent wishes to maximise the profit from liquidating 5)1 shares, but also
vi
in
rc
requires that most, if not all, of the shares are sold by the terminal time T.
r
le
pe
ne
If the agent has inventory remaining at the end of the trading horizon, she
irc
liquidates it using an MO for which she obtains worse prices than the midprice.
vi
in
in
rc
pe
ne
vi
is to find
in
rc
le
H(x,S) I , (8.3)
ne
irc
oEA
vi
in
in
rc
where a 2:: 0 is the liquidation penalty (linear impact function). Moreover, the
r
le
pe
admissible set A consists of strategies 5 which are bounded from below, and the
ne
irc
stopping time
vi
in
rc
= T !\ min{ t : Qf = O}
r
le
pe
T
ne
irc
is the minimum of T or the first time that the inventory hits zero, because then
vi
in
in
rc
ne
irc
in
rc
p
vi
8.2 liquidation with Only limit Orders
r
187
le
pe
irc
vi
rc
le
pe
ne
The corresponding value function is
irc
H(t,x, s, q)
vi = sup lEt,x,S,q xt + Q� ( ST -a Q�)]
in
in
rc
[ (8.4)
r
SEA
le
pe
ne
irc
vi
St = S, and Qt_ = q. In this setup, the agent does not have any urgency,
in
rc
le
pe
i.e. does not penalise inventories different from zero as discussed in Section 6.5.
ne
irc
Indeed, one can add in such a penalty and we leave this as an exercise for the
vi
in
in
c
reader, see Exercise E.8.1.
r
le
pe
ne
irc
vi
in
The Resulting DPE
c
le
r
pe
ne
The dynamic programming principle (DPP) suggests that the value function
irc
1
solves the following dynamic programming equation (DPE):
vi
in
in
rc
r
8tH + ½o- 2 8ssH
le
pe
ne
irc
vi
in
:
rc
H(t,x,S, 0) - x,
r
le
pe
ne
H(T,x,S,q) = x+q(S-aq).
irc
vi
in
in
rc
We have an optimal trading problem where the state variables jump and the
r
le
pe
ne
vi
rather than a non-linear PDE. Below we elaborate on the interpretation of the
in
rc
le
pe
ne
irc
(i) The operator 8ss corresponds to the generator of the Brownian motion which
vi
in
in
rc
pe
(ii) The supremum takes into account the agent's ability to control the depth of
ne
irc
(iii) The term A e-"s represents the rate of arrival of other market participants'
r
le
irc
in
rc
the change in the agent's value function when an MO fills the agent's LO -
r
le
vi
The terminal condition at t = T represents the cash the agent has acquired up
in
rc
le
to that point in time, plus the value of liquidating the remaining shares at the
pe
ne
irc
worse than midprice of (S - a q) per share - recall that at T she must execute
vi
in
in
rc
an MO to complete her trade and as a result walks the book. The boundary
r
le
condition along q = 0 represents the cash the agent has at that stopping time
pe
ne
irc
and since q = 0 there is no liquidation value, and the agent simply walks away
vi
in
rc
with x in cash.
r
le
pe
The terminal and boundary conditions suggest that the ansatz for the value
ne
rc
function is
vi
ci
in
in
H(t,x, s, q) = + q s + h(t,q)'
le
X (8.5)
r
ne
irc
in
rc
p
vi
r
le
188 Optimal Execution with limit and Market Orders
pe
irc
vi
rc
le
pe
ne
for a yet to be determined function h(t,q). This ansatz has three terms. The first
irc
vi
term is the accumulated cash, the second term denotes the book value of the
in
in
rc
r
le
remaining inventory which is marked-to-market using the midprice, and finally
pe
ne
the function h(t, q) represents the added value to the agent's cash from optimally
irc
vi
in
liquidating the remaining shares. With this ansatz, upon substitution into the
rc
r
DPE above, we find that h(t,q) satisfies the coupled system of non-linear ODEs
le
pe
ne
irc
8th+ s�p {Ae-'"5 [5 + h(t,q - l)- h(t, q)l}
vi
in
in
0,
rc
r
le
{ h(t,0) (8.6)
pe
0,
ne
irc
h(T, q) -aq2.
vi
in
rc
le
The optimal depth can be found in feedback form by focusing on the first
pe
ne
irc
order conditions for the supremum. This provides us with the following:
vi
in
in
rc
r
= 8o{ >.e-'"5
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
and hence the optimal strategy 5* in feedback control form is given by
vi
in
in
rc
r
le
pe
ne
(8.7)
""
vi
in
rc
le
pe
This form for the optimal depth has an interesting interpretation. Consider the
ne
¾.
irc
first term It stems from optimising the instantaneous expected profits from
vi
in
in
selling one share. The profit is given by the revenue of selling one share at ( S + 5),
rc
r
le
pe
minus the cost S, which results in 5. Hence, the expected profit is 5 P(5), and
ne
irc
when the fill probability is P(5) = e-"6, the maximum is attained at Jt = ¾, see
vi
in
rc
le
pe
The difference term h(t, q) - h(t, q- l) can be viewed as the agent's correction
ne
irc
to this static optimisation taking into account her future optimal behaviour. In
vi
in
in
rc
pe
vi
demands for selling the asset such that her value function remains unchanged.
in
rc
We expect that 5*(t, q) is decreasing in q, since the more inventory the agent
r
le
pe
ne
has, the more urgent she should be in getting rid of her holdings and hence the
irc
vi
closer to the midprice she should post. It may be that for large enough q the
in
in
rc
optimal depth becomes negative and the solution to the control problem is no
le
pe
ne
irc
le
irc
indicator that the agent should execute a market order instead of positing a limit
vi
in
in
order. The sound approach to addressing the optimal posting of LOs versus MOs
rc
le
in
rc
p
vi
8.2 liquidation with Only limit Orders 189
r
le
pe
irc
vi
rc
le
Inserting the optimal depth in feedback control form into (8.6) provides a
pe
ne
irc
non-linear coupled system of ODEs for h(t, q)
vi
in
in
rc
r
le
Oth +�exp { - [h(t, q) - h(t,q - 1)]} =0,
pe
K (8.8)
ne
irc
vi
where ,\ = A e- 1 and the same terminal and boundary conditions as in (8.6)
in
rc
le
apply. This system of ODEs can be solved exactly by making the substitution
pe
¾
ne
h(t,q) = logw(t, q) and writing a new equation for w(t, q), in which case,
irc
vi
in
in
rc
A
r
le
pe
ne
irc
vi
1 Ot w(t, q) ,\ w(t, q - l)
in
=----+-----
rc
le
K
pe
ne
irc
which implies that
vi
in
in
+ ,\w(t,q- l) ,
0 = Otw(t,q)
rc (8.9)
r
le
pe
ne
irc
vi
in
2
rc
le
pe
ne
irc
respectively.
vi
in
in
rc
r
le
pe
Solving the DPE
ne
irc
vi
in
The coupled system of ODEs (8.9), which the DPE reduces to, can be solved
rc
le
irc
L In. e-"'
q
(q-n) (T - tt.
vi
5'n 2
w(t, q) =
in
in
rc
a (8.10)
r
le
n=O
pe
ne
irc
This solution provides the function h(t, q) which can then be substituted into
vi
in
rc
le
pe
ne
irc
q 5'n
� - e-"'a (q-n) (T - tt
2
vi
in
in
rc
�n!
r
1
le
b*(t, q) = - 1 + log -l -
_n=_O __________
(8.11)
pe
ne
irc
K q >.n
tt
2
� - e-1<a (q-1-n) (T -
vi
in
rc
�n!
n=O
r
le
pe
ne
irc
for q > 0. The optimal depth at which to post is a decreasing function of time
vi
in
in
rc
for any model parameter, a decreasing function of the agent's inventory q, and
r
le
increases the rate of arrival of MOs. The increasing behaviour in activity rate is
pe
ne
irc
intuitive since as market order arrival rates increase, the agent is willing to post
vi
in
rc
deeper in the book so that her effective rate of filled LOs remains essentially
r
le
pe
irc
In Figure 8.2, the optimal depths are shown as a function of time for several
vi
in
in
inventory levels as well as penalty parameter a. MOs arrive at the rate of 50/ min
rc
le
ne
irc
in
rc
p
vi
r
190 Optimal Execution with Limit and Market Orders
le
pe
irc
vi
rc
le
pe
ne
irc
a= 0.0001 a= 0.001
vi
�0.04
in
rc
i
�
r
le
:5:P.. 0.03 :5:P.. 0.03
pe
ne
irc
vi
(j) (j)
Ci
in
Ci
rc
� 0.02 � 0.02
s s
r
le
i,j i,j
pe
ne
irc
:g_o.01 increasing :g_ 0.01
vi
inventory
in
0 0
rc
i
r
le
40 60 60
pe
20 20 40
ne
irc
vi
in
rc
Figure 8.2 The optimal depths b* at which the agent posts LOs as a function of time
r
le
pe
ne
and current inventory. The parameters are >. = 50/ min, r;, = 100, and iJt = 5 with the
irc
penalty ct shown in each panel. The lowest depth corresponds to q = 5 and the
vi
in
rc
highest depth to q = 0.
i
r
le
pe
ne
irc
vi
in
and the agent is attempting to liquidate SJ1 = 5 shares - and is hence 10% of
rc
le
the average market volume. These plots show several interesting features of the
pe
ne
irc
optimal depths, as described below.
vi
in
rc
i
r
le
(i) The depths are decreasing in inventory. This is natural, as if the agent's inven
pe
o,
ne
irc
tory is large, she is willing to accept a lower premium for providing liquidity,
vi
in
to increase the probability that her order is filled. At the same time, this en
rc
le
sures that she may complete the liquidation of the SJ1 shares by end of the time
pe
ne
irc
horizon and avoid crossing the spread (i.e. using MOs) and paying a terminal
vi
in
o,
i
r
le
in exchange for large because with low inventory the terminal penalty she
pe
ne
irc
(ii) For fixed inventory level, the depths all decrease in time. Once again, this is
r
le
pe
due to the agent becoming more averse to holding inventories as the terminal
ne
irc
time approaches, due to the penalty they will receive from crossing the spread.
vi
in
rc
(iii) As the penalty parameter a increases, all depths decrease because increasing
i
r
le
pe
ne
the penalty induces the trader to liquidate her position faster, but at lower
irc
prices. We point out that if a or q is large then the optimal depths can become
vi
in
rc
negative. In practice one cannot post LOs which improve the best quote on
r
le
pe
ne
the other side of the LOB, so one may want to interpret this as the agent being
irc
vi
very keen to get her LO filled, but here we do not allow the agent to submit
in
rc
pe
ne
irc
(iv) The depths keep increasing as one moves further from the end of the trading
vi
in
horizon. The reason is that the agent is only being penalised by her terminal
rc
le
inventory, so far from terminal time, there is no incentive to liquidate her posi
pe
ne
irc
tion. If the agent instead penalises inventories through time, the strategies will
vi
in
become asymptotically constant far from maturity. For this case, see Exercise
rc
i
le
E.8.4.
ne
irc
in
rc
p
vi
8.2 Liquidation with Only Limit Orders 191
r
le
pe
irc
vi
rc
le
Far from the terminal time, i.e. when T = T - t » l, the ratio appearing in
pe
ne
irc
the logarithm above (i.e. w(t,q)/w(t,q-l)) is too ( (T - t)-1) given by the ratio
vi
in
in
of the two terms n = q - l and n = q in the numerator to the term n = q - l in
rc
r
le
pe
ne
the denominator. Therefore we can write
irc
vi
5.q-l -1<a(q-(q-1)) 2 q-1
+ .\q! e-1<a(q-q) Tq
2
in
q
w(t,q)
rc
(q-l)! e T
+ 0 (T-l)
r
le
w(t,q-l) >,q-i -"' a(q-l-(q-1))2 q-1
pe
e
ne
irc
(q-1)! T
vi
>.
in
in
e-"'°'+-T+o(T-1).
rc
r
le
pe
ne
irc
Therefore, far from the terminal time, the agent posts at depths that grow log
vi
in
rc
arithmically as follows:
r
le
pe
ne
irc
vi
in
in
rc
r
le
pe
In this expression, the dependence of the optimal depth on the parameters be
ne
irc
comes clear: it is increasing in activity rate and decreasing in inventory, time, fill
vi
in
rc
le
pe
ne
irc
vi
in
in
Numerical Experiments
rc
r
le
pe
ne
irc
In this section we carry out a simulation study to explore the optimal execution
vi
strategy. Throughout we use the following parameters:
in
rc
le
irc
and 0.01 ,
in
in
rc
r
le
pe
so that the agent is trading 10% of the market over this time interval.
ne
irc
Figure 8.3 shows three simulated sample paths for the midprice (panel a), the
vi
in
rc
optimal depth (panel b), the resulting inventory (panel c) and the average price
r
le
pe
per share (panel d) computed as Xt/(91 - qt)- In the average price per share
ne
irc
in
rc
T
= �1
r
le
pe
ArwAP Sudu,
ne
irc
vi
in
rc
le
pe
ne
Panel (c) shows that the algorithm may sometimes acquire all assets early, e.g.
irc
along the blue and green paths, or may need to execute MOs at the end of the
vi
in
in
rc
interval, e.g., as in the red path. When we combine this panel with panel (b),
r
le
pe
ne
which shows the inventory path, it illustrates how immediately after the agent's
irc
vi
LO is filled, the agent increases the posted depth, but if the agent's LO is not
in
rc
filled, she posts closer to the midprice. Panel (d) illustrates how the algorithm
r
le
pe
ne
(solid lines) outperforms TWAP (dashed lines). The key reason is that the agent
irc
vi
mostly uses LOs to achieve her goal of liquidating S)1 shares, which provides
in
in
rc
profits in excess of the midprice. However, some paths that do not completely
le
ne
irc
in
rc
p
vi
Optimal Execution with Limit and Market Orders
r
le
192
pe
irc
vi
rc
le
pe
ne
irc
30.6 0.0 4
vi
in
rc
�30.4
i
r
le
� � 0.0 3
pe
ne
S:,
irc
� 30.2
·.:: '5 0.0 2
vi
in
rc
0...I r 0..
le
Q)
"d
pe
Q
ne
irc
0.0 1
� 29.8
vi
in
rc
i
r
le
29.6 0
pe
0 20 40 60 0 20 40 60
ne
irc
vi
in
(a) (b)
rc
le
pe
ne
irc
5 30.2
,
,,
vi
in
rc
�4 ,
,,
i
,,
r
le
� 30.1
- - -. ,,
pe
'1l
,,
ne
�===-- ---�<::: -----
..c:::
irc
-;:: 3
� if]
vi
--.......
in
30
rc
1:1 2
--
r
Q)
u
le
·.::
pe
Q)
ne
�
irc
0... 29.9
'""'1
vi
in
rc
i
r
le
0 29.8 pe
0 20 40 60 0 20 40 60
ne
irc
(c) (d)
rc
le
pe
ne
irc
Figure 8.3 Three sample paths for the agent following the optimal strategy. In panel
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
liquidate prior to maturity, such as the red one, force the agent to execute MOs
in
rc
i
r
le
at the end of the trading horizon. Doing so causes her to lose some of the premia,
o,
pe
ne
irc
The left panel of Figure 8.4, which shows the histogram of the number of
r
le
pe
executed MOs over 10,000 scenarios, demonstrates that only a small number
ne
irc
of paths require executing MOs at the terminal time. The right panel shows a
vi
in
rc
heat-map of the agent's inventory through time for the same 10,000 scenarios.
i
r
le
pe
The dashed line is the mean inventory at each point in time - notice that it is
ne
irc
almost linear and reduces to almost, but not equal to, zero at the end of the
vi
in
rc
trade horizon.
r
le
pe
ne
irc
To illustrate the savings provided by the algorithm, Figure 8.5 shows the
vi
in
histogram of the difference between the price per share from the algorithm and
rc
i
le
in
rc
p
vi
8.3 Liquidation with Exponential Utility Maximiser 193
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
rc
0.8
r
''
le
6000
pe
;,.,
ne
0.6
irc
t) 3
''
�
vi
4000 ''
in
rc
Q)
2 '' 0.4
2
r
le
>-< '
pe
ne
irc
2000 0.2
vi
in
in
rc
0 0
r
0 20 40 60
le
pe
0 1 2 3 4 5
ne
Time (sec)
irc
vi
in
rc
Figure 8.4 Left panel shows the histograms (from 10,000 scenarios) of executed MOs at
r
le
pe
ne
the end of trade execution. Right panel shows a heat-map of inventory through time.
irc
vi
in
in
rc
r
le
350�-----------�
pe
ne
irc
300
vi
Figure 8.5
in
250
r
200
ne
irc
150
vi
in
in
rc
100
r
le
pe
ne
irc
vi
in
-0.05 0 0.05
rc
le
irc
vi
in
in
rc
pe
ne
irc
vi
In the previous section the agent is indifferent to uncertainty in the value of her
in
rc
le
sales and so her objective is to maximise expected proceeds from selling 1)1 shares.
pe
ne
irc
A more realistic setup is one in which the agent includes a running inventory
vi
in
in
penalty. Exercise E.8.4 shows that in this case the agent's performance criteria
rc
r
le
becomes
pe
ne
irc
vi
in
(8.12)
rc
le
pe
ne
irc
and, compared to the case with no running inventory penalty (i.e. ¢ = 0), the
vi
in
in
rc
pe
ne
and then less aggressive towards the end of the trading horizon. This allows her
irc
vi
to control the distribution of the value of the total sales, as well as how fast
in
rc
the agents have a running inventory penalty, or urgency, constraint. Some agents,
irc
vi
however, may instead wish to penalise uncertainty in their sales directly. Here,
in
in
rc
le
we show that if the agent uses exponential utility as a performance measure, her
ne
irc
in
rc
p
vi
r
le
194 Optimal Execution with Limit and Market Orders
pe
irc
vi
rc
le
pe
ne
strategy is identical (up to a constant and a re-scaling of parameters) to the one
irc
vi
implied by (8.12).
in
in
rc
r
To demonstrate this equivalence, first let us consider the agent who sets pref
le
pe
ne
erences based on expected utility of terminal wealth with exponential utility
irc
vi
in
rc
le
pe
0
H (t,x,S,q)=IB\x,S,q[-exp{-,1(X�+Q�(ST - aQ�))}],
ne
irc
vi
in
rc
r
le
= supH0 (t,x,S,q)
pe
H(t,x,S,q)
ne
irc
oEA
vi
in
rc
le
pe
8 tH + ½CT 2 8ssH
ne
irc
vi
in
>. e-"'0 H
rc
r
le
pe
ne
irc
vi
in
= -e-,, (x+q(S-aq))
rc
le
pe
ne
irc
We leave it as an exercise for the reader to show that ansatz
vi
in
in
rc
pe
ne
irc
1 _ e_,, [Hh(t,q-1)-h(t,q)]
r
2
8h
t - lCT ,1 q2 (8.14)
pe
ne
2
8 'Y
irc
vi
in
in
with terminal and boundary conditions
rc
r
le
= -a q2
pe
h(T,q) = 0.
ne
and h(t, 0)
irc
vi
in
The interpretation of the ansatz (8.13) is similar to that of (8.5), in particular, the
rc
le
right-hand side of equation (8.13) is the utility derived from the sum of: accumu
pe
ne
irc
lated cash, the book value of the remaining inventory which is marked-to-market
vi
in
in
using the midprice, and, finally, the functionh(t,q) representing the added value
rc
r
le
If one takes the limit in which 'Y -+ 0, we see that h satisfies the PDE
vi
in
rc
0 +h(t,q-1)-h(t,q)J}
t + sup{). e-"' 8 = 0, (8.15)
r
8h [
le
pe
ne
0
irc
which is precisely the equation that the excess value function h satisfied in the
vi
in
in
rc
previous section when the agent has linear utility (see (8.6)).
r
le
pe
ne
Going back to the general case 'Y > 0, we obtain, from the first order condition,
irc
vi
le
pe
= �log (1 + �) + h
ne
[ (t,q)-h(t,q-1) ]. (8.16)
irc
o*
vi
in
in
rc
le
This form is very similar to, but slightly differs from, the optimal depth in the
ne
irc
in
rc
p
vi
r
le
8.3 liquidation with Exponential Utility Maximiser 195
pe
irc
vi
rc
le
pe
previous section provided in (8.7). The h functions may differ and the base line
ne
irc
level K;-l is modified to r:.,- 1 = �log +�)-This modification can be seen as a
vi
in
rc
risk aversion bias. Indeed, in the limit of zero risk-aversion
i
r
le
pe
ne
irc
vi
in
rc
and the result from the previous section is recovered. Furthermore, we can view
r
le
pe
ne
the contribution �log ( 1 +�) as stemming from the agent maximising her util
irc
vi
rc
i
measuring relative to midprice):
r
le
pe
ne
irc
vi
mg,x { u(x + o) P(o) + u(x) (1 -P(o))} t log ( 1 + �) .
in
rc
=
r
le
pe
ne
Substituting the feedback form of the optimal depth (8.16) into the DPE
irc
(8.14), we now find the non-linear system of coupled ODEs for h to be
vi
in
rc
i
r
le
pe
ne
8th - 21 o- 2 1q2 +- exp{-K; [h(t,q) -h(t,q -1)]} 0, (8.17)
irc
), =
vi
K;
in
rc
where,
r
le
pe
ne
irc
vi
in
rc
In the limit of zero risk-aversion J ,+D e-1 ,\ = J and once again we recover the
i
r
le
pe
ne
parameter that appears in (8.8). The above ODE is in fact identical in structure
irc
vi
to (8.8), except that it contains the additional term -½o- 2 1q 2 . As shown in
in
rc
Exercise E.8.4, when the value function G for the running penalty performance
r
le
pe
ne
of coupled ODEs (where we write the parameters in the running penalty model
in
rc
i
with a subscript 0)
r
le
pe
ne
irc
e-1 Ao
vi
=
K;o
r
le
pe
ne
rc
0� = .!_ + g ( t, q) -g ( t, q -l) .
i
r
le
K;o
pe
ne
irc
Hence, with
vi
in
rc
le
= = =
pe
ne
irc
we see that the h(t,q) and g(t,q) coincide and the optimal strategies satisfy the
vi
in
rc
relation
i
r
le
pe
ne
(8.18)
irc
vi
in
rc
In other words, with a re-scaling of model parameters, the optimal strategy for
r
le
pe
the utility maximising agent is the same, up to a constant shift, as that of the
ne
irc
agent who only penalises running inventory - with an appropriate choice of risk
vi
in
rc
ne
irc
in
rc
p
vi
Optimal Execution with limit and Market Orders
r
196
le
pe
irc
vi
rc
le
pe
In addition to the relationship between the optimal strategies, the value func
ne
irc
tions can be written in terms of one another. Since h(t, q) = g(t, q), we have
vi
in
in
rc
'
r
le
1
pe
G(t,x,S,q) = --log(-H(t,x,S,q)),
ne
irc
vi
in
rc
le
pe
irc
vi
suplE� x S q 2
ds]
in
in
rc
oEA ' ' '
r
le
(8.19)
J)
pe
ne
irc
vi
, oEA
in
rc
le
pe
where JE 0 [·] represents expectation under a probability measure where the arrival
ne
irc
rate is .\ 0 . This relationship between the value functions is in fact part of a more
vi
in
in
rc
general result that relates optimisation problems with exponential utility and
r
le
pe
optimisation problems with penalties (see the further readings section).
ne
irc
vi
in
rc
le
pe
ne
in
rc
r
le
In the previous two sections, the agent considers posting only LOs and, as shown,
pe
ne
irc
posts more aggressively (i.e. depth 5 decreases so LOs are posted nearer the
vi
in
le
consider the situation in which the agent is allowed to post MOs in addition
pe
ne
irc
to LOs. In this case, when she is far behind schedule, i.e. when maturity is
vi
in
in
approaching but she still has many shares to liquidate, then she could be willing
rc
r
le
to execute an MO in order to place her strategy back on target. In this case, the
pe
ne
irc
agent searches for both an optimal control and a sequence of optimal stopping
vi
in
le
pe
ne
irc
vi
in
in
The Agent's Optimisation Problem
rc
r
le
pe
To formalise the problem, we now need to keep track of the agent's posted
ne
irc
MOs, in addition to other traders' MOs, and her executed LOs. Below we list
vi
in
rc
the additional stochastic processes and changes to the cash process to account
r
le
pe
ne
for executing MOs. All other stochastic processes, including the midprice S,
irc
other trader's MOs M, and the agent's filled LOs N, posted at depth 5, remain
vi
in
in
rc
pe
ne
irc
le
@
pe
ne
Mt = �f=l ].Tk"St· Note that the agent may place fewer, but never more,
vi
in
in
rc
ne
irc
in
rc
p
vi
r
le
8.4 liquidation with limit and Market Orders 197
pe
irc
vi
rc
le
pe
l denotes the half-spread, i.e. half-way distance between the best ask and best
ne
irc
I!!
vi
in
bid.
rc
i
= (Xt )o<t<r denotes the agent's cash process and satisfies the SDE
r
le
X
pe
®
ne
irc
vi
in
rc
le
pe
ne
irc
The first term on the right-hand side of the cash process denotes the cash
vi
in
received from having an LO lifted, and the second term is the cash received
i
r
le
from selling a share using an MO. Note that when the agent executes a sell
pe
ne
irc
MO she crosses the spread, which is why the proceeds from selling one
vi
in
unit of the asset is the midprice minus the half-spread, i.e. the best bid.
c
le
r
Furthermore, we assume that the size of the MOs is small enough not to
pe
ne
irc
walk the LOB.
vi
in
rc
i
r
le
We assume that the agent is averse to holding inventory throughout the strat
pe
ne
irc
egy - unlike in Section 8.2 where she wishes to rid herself of inventory due only
vi
in
performance criteria, much like in Section 6.5, and more specifically equation
le
pe
ne
irc
(6.20). Hence, her performance criteria is
vi
in
rc
i
,
H(T /5) (t, x, s, q)
r
le
pe
ne
irc
(8.20)
= Et ,x,S,q [x;,/5 + Q;· 15 Sr - £ (Q;, 15 ) - ¢ft (Q:• 15 ) du],
2
vi
in
rc
le
x;_,_ 15 = x, St - = S,
pe
ne
irc
rc
i
r
le
pe
= q (l + a q) .
ne
irc
£(q)
vi
in
rc
The terminal liquidating cost per share of the shares remaining at the end is
r
le
pe
written as (Sr - l - a Qr) because the agent must cross the spread and then
ne
irc
vi
walk the LOB to liquidate the remaining shares - recall that we assumed that
in
rc
i
r
the MOs sent during the liquidation strategy before the terminal date did not
le
pe
ne
irc
walk the LOB. And, since the agent may execute MOs, her inventory is reduced
vi
le
er
pe
irc
n
vi
in
rc
The set of admissible strategies A now includes seeking over all F-stopping
r
le
pe
ne
vi
le
r
irc
(T,IS)EA
vi
in
rc
i
le
in
rc
p
vi
r
le
198 Optimal Execution with Limit and Market Orders
pe
irc
vi
rc
le
pe
ne
The Resulting DPE
irc
vi
in
in
rc
Now, the DPP implies that the value function should satisfy the quasi-variational
r
le
pe
inequality (QVI), rather than the usual non-linear PDE,
ne
irc
vi
in
= max{ OtH + ½0" 2 8ssH - cpq 2
rc
le
0
pe
ne
irc
vi
in
rc
r
le
pe
ne
irc
vi
in
rc
q)]},
r
le
pe
ne
irc
vi
in
rc
r
le
H(t,x,S,O) = x,
pe
ne
and
irc
H(T,x, s, q) = X + q s - C(q) .
vi
in
rc
le
pe
ne
irc
Note that the first part of the maximisation above is identical to the previous
vi
section where we have limit orders only. The various terms in the QVI may be
in
in
rc
r
le
vi
in
(i) The overall max operator represents the agent's choice to either post an LO
rc
le
(the continuation region) resulting in the first term in the max operator, or to
pe
ne
irc
in
rc
r
le
(ii) Within the continuation region where the agent posts LOs (the first term in
vi
in
rc
the max):
r
le
(a) the operator ass corresponds to the generator of the Brownian motion which
pe
ne
irc
vi
drives midprice,
in
in
rc
r
le
penalty,
vi
in
rc
(c) the supremum over 8 takes into account the agent's ability to control the
r
le
pe
posted depth,
ne
irc
(d) the ,\e-K,o coefficient represents the arrival rate of MOs which fill the agents
vi
in
rc
r
le
(e) the difference term [H(t, x + (S + 8), S,q -1) - H(t,x,S, q)] represents the
pe
ne
irc
vi
in
change in the value function when an MO fills the agent's LO - the agent's
rc
le
pe
ne
irc
vi
in
in
As before, the terminal and boundary conditions suggest the ansatz for the
value function H(t,x,S,q) = x + q S + h(t,q). Making this substitution, we find
rc
le
ne
irc
in
rc
vi
r
le
8.4 liquidation with limit and Market Orders 199
pe
irc
vi
rc
le
pe
ne
that h(t,q) satisfies the much simplified QVI
irc
vi
in
rc
i
max { Oth-rpq2 +s�p,\e [5 +h(t,q-1) - h(t,q)]
r
"'°
le
pe
ne
irc
(8.22a)
-� + h(t,q - 1) - h(t, q)}
vi
= 0,
in
rc
le
pe
ne
irc
with terminal and boundary conditions
vi
in
rc
and (8.22b)
i
r
le
pe
h(t,0) = 0.
ne
(8.22c)
irc
vi
in
rc
le
pe
only case leading to (8.7), the optimal posting in feedback control form is
ne
irc
vi
in
rc
5* = I_ + [h(t,q) - h(t,q-1)]. (8.23)
i
r
le
K,
pe
ne
irc
In this feedback control form, the optimal posting is identical to the one without
vi
in
rc
MOs (see (8.7)), but the precise function h(t,q) which enters into its computation
r
le
pe
is different. The first term l"' has the same interpretation as before: it is the
ne
irc
optimal depth to post to maximise the expected instantaneous profit from a
vi
in
rc
round-trip liquidated at midprice, i.e. the 5 that maximises 5 P(5) (and recall
i
r
le
pe
that P( 5) is the probability of the LO being filled conditional on an MO arriving).
ne
irc
The difference term is the correction to this static optimisation to account for
vi
in
rc
le
pe
ne
The timing of MO executions also have a simple feedback form. From (8.22a),
irc
rc
i
r
le
pe
vi
in
le
value function by the half-spread. Combining this observation with the feedback
pe
ne
irc
form for the optimal depth above, we can place a simple lower bound on 5* of
vi
in
rc
- �.
i
r
le
5* � I_
pe
ne
K,
irc
Thus, it is clear that if we require 5 > 0, so that the strategy never posts sell
vi
in
¾.
rc
le
pe
ne
Upon substituting the optimal control in feedback form into the simplified
irc
rc
i
r
le
(8.25)
vi
= 0.
r
le
pe
ne
per share. However, the agent may execute MOs an instant prior to maturity at
in
rc
a cost of� per share. Hence, it is never optimal to wait until T to execute an MO
le
ne
irc
in
rc
p
vi
r
le
200 Optimal Execution with limit and Market Orders
pe
irc
vi
rc
le
pe
ne
to liquidate remaining inventory. As a result, the left-limit of the value function
irc
vi
is not equal to its value at maturity, and instead we have
in
in
rc
r
le
pe
ne
irc
for every q > 0, so that h(T-,q) = -qt This feature of having the left-limit
vi
in
rc
le
pe
ne
face-lifting.
irc
vi
in
rc
r
le
pe
ne
irc
vi
which, after some algebra, leads to the following coupled system of QVIs for
in
rc
w(t, q):
r
le
pe
ne
irc
max{ Otw(t,q)- t,,cpq2w(t,q) + >-w(t,q-1);
vi
in
in
rc
r
=0 ,
le
pe
ne
irc
vi
in
where
rc
le
w(T,q) = e-,,,q(l;+aq), and w(t,0) =1,
pe
ne
irc
for q =1, ..., 5Jl.
vi
in
in
rc
r
le
The intuition behind the system of equations is that one first solves for w(t,1),
pe
ne
knowing the q = 0 condition w(t,0) = l. The q =1 solution then feeds into the
irc
vi
le
pe
ne
irc
in
rc
r
le
We now illustrate how one can in principle first solve the QVI analytically and
pe
ne
irc
le
pe
ne
irc
in
in which case (since
rc
pe
ne
irc
(8.26a)
in
rc
le
irc
vi
As pointed out above, it is optimal to execute MOs for all inventories greater
in
in
rc
than zero an instant prior to maturity, and we therefore have w(T-,q) = e-q" I;_
r
le
pe
ne
vi
in
rc
le
pe
ne
is given by
irc
vi
in
in
rc
(8.27)
le
ne
irc
in
rc
p
vi
8.4 Liquidation with limit and Market Orders 201
r
le
pe
irc
vi
rc
le
The solution to the QVI therefore has two distinct behaviours depending on the
pe
ne
irc
relative sizes of the parameters. First, if
n
vi
in
in
rc
>.. e"'1;
r
le
pe
¢�-,
ne
irc
r;,
vi
then g1(t) :2: e-"'1; for all t E (0,T) (i.e. the continuation value is always larger
in
rc
le
than the execution value), hence, the solution to the QVI (8.26) is
pe
ne
irc
n
vi
in
rc
r
le
pe
and it is never optimal to execute an MO except for an instant prior to maturity.
ne
irc
Moreover, during the trade horizon, the optimal LO depth (see (8.23)) is
vi
in
rc
(1 - e-K cp ( - )))
le
5*(t 1)
pe
'
ne
' K, K, K,cjJ
irc
n
for t < T. In this parameter regime, the depths narrow as maturity approaches.
vi
in
in
rc
r
If on the other hand
le
pe
ne
irc
vi
in
rc
le
then g(t) < e-"'1; for all t E (0,T) (i.e. the continuation value is always less than
pe
ne
irc
n
the execution value), hence, the solution to the QVI (8.26) is
vi
in
in
rc
pe
ne
irc
The financial interpretation of this result is that if the running penalty is small
r
le
pe
enough, the agent is willing to post LOs and wait all the way until maturity before
ne
irc
n
executing an MO. If on the other hand, the running penalty is large enough, it
vi
in
in
rc
pe
outweighs any potential gain in waiting for the possibility of filling her posted LO.
ne
irc
The q = 2 case: This case has more structure in its solution and we must
vi
in
rc
le
pe
ne
irc
in
rc
w(T,2)=e-2K(1;+2a) .
le
pe
ne
irc
condition on w(t, 2), the optimal strategy will force the agent to execute one
r
le
pe
irc
in
rc
Here we only consider the case where ¢ < (>.. e"1;)/ r;, so that it is optimal to
r
le
pe
post LOs when q = l. In this case, we must determine the time T2 at which
ne
irc
vi
the solution to the QVI "peels away" from its immediate execution value of
in
rc
'
w(t,2) = e-"1; w(t, 1). This point is determined by ensuring that w(t, 2) and its
r
le
pe
ne
n
vi
in
in
rc
le
ne
irc
in
rc
p
vi
Optimal Execution with limit and Market Orders
r
202
le
pe
irc
vi
rc
le
pe
ne
From the equation that w(t, 2) must satisfy in the continuation region, we have
irc
vi
in
in
rc
0 = OtW(T2, 2)-4K: <P w(T2, 2) + j_ w(T2, 1)
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
= [-3 K:¢e-"1;+>-]w(T2,l)-e-"1;>-,
vi
in
in
rc
r
le
pe
ne
where the third equality follows from (8.26), i.e. in the continuation region for
irc
vi
in
rc
time at which to execute an MO when the agent has two units of inventory,
r
le
pe
ne
solves
irc
vi
in
in
rc
(8.28)
r
le
pe
ne
irc
The above can be solved explicitly for T2 since w(t, 1) = g 1 (t) where g 1 (t) is
vi
in
rc
irc
Once again, there are two parameter regimes which have differing behaviour.
vi
in
in
First, if
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
then a solution to (8.28) exists. Therefore, when the agent holds two units of
ne
irc
inventory, she posts LOs in the interval [O, Tz) and at T2 immediately executes an
vi
in
in
rc
MO. At that point in time, she will post an LO up until her order is executed,
r
le
pe
ne
vi
in
rc
5- e"I;
r
le
,/.>-
pe
ne
'/-' - 3 K: '
irc
vi
in
in
rc
no solution exists, and the agent never posts LOs and instead immediately exe
r
le
pe
The financial intuition for these two cases is as before: if the running penalty
vi
in
rc
is too high, there is no incentive to post LOs and hope for them to be matched,
r
le
pe
rather the agent aims to liquidate her position quickly. If, on the other hand,
ne
irc
the penalty is low enough, she will be patient and post LOs up until the critical
vi
in
in
rc
pe
ne
In the remainder of the section, we assume that ¢ < (>-e"I;) /3K:. Given the
irc
vi
in
optimal time to execute an MO, we can write the full solution for w(t, 2) by
rc
le
solving the continuation equation from T2 backwards. For this, the solution to
pe
ne
irc
the ODE
vi
in
in
rc
le
ne
irc
in
rc
p
vi
8.4 liquidation with limit and Market Orders 203
r
le
pe
irc
vi
rc
le
[>- - 31,;¢e-"'1;
pe
where Y = e-"'lw(T2, 1) = e- 2"'t. .>-
ne
]-l, is
irc
vi
in
rc
g2 (t) = y e-4¢(T2-t) + >-1 e-4 ¢ (u-t) g1 (u) du
T2
i
r
le
pe
ne
irc
1-e-5K<p(T2 -t)
vi
= y e-4K</,(Trt) + 5- { e-K_
E, ____ _
in
rc
51,;¢
r
le
pe
ne
-e-4K</,(T2-t) 1-e-5K</,(T2-T2)
irc
+ � (1 _ )}
vi
in
¢ 41,;¢ 51,;¢
rc
i
r
le
pe
ne
Hence, the solution to the QVI for w(t, 2) is
irc
vi
in
rc
le
pe
ne
Finally, the optimal depths at which the agent posts LOs is given by
irc
vi
in
i
r
le
(t, )
pe
ne
i,; i,; w
irc
The procedure outlined here can be applied recursively to obtain the optimal
vi
in
rc
times at which to execute MOs for all inventory levels, as well as the optimal
r
le
pe
ne
depths at which to post. The formulae, as one can appreciate, become rather cum
irc
bersome fairly quickly. Hence, in the next section we take a numerical approach
vi
in
rc
and solve the QVIs using finite-difference methods to show different aspects of
i
r
le
pe
ne
vi
in
rc
le
pe
ne
Numerical Experiments
irc
vi
rc
i
execution strategy, including the times at which to post an MO and the depth
r
le
pe
ne
vi
in
rc
le
pe
ne
so that the agent is trading 20% of the market over this time interval. The
rc
i
r
le
running penalty parameter ¢ will be varied to illustrate its effect on the optimal
pe
ne
irc
execution strategy.
vi
in
rc
Figure 8.6 shows the optimal depths as well as the optimal time at which the
r
le
agent should execute an MO. The TWAP schedule is also shown for comparison
pe
ne
irc
rc
inventory and time, i.e. the agent becomes more aggressive, and posts closer to
i
r
le
pe
The right panels show when it is optimal to execute an MO and can be under
vi
in
rc
stood as follows. If the agent holds inventory at a point in time that lies to the
r
le
pe
right of a dot, then she must immediately execute an MO. Prior to this execution
ne
irc
time, she will post LOs at the corresponding depth shown in the left panels. For
vi
in
rc
example, when ¢ = 10-4, at the start t = 0, the agent will immediately execute
i
le
ne
irc
in
rc
p
vi
r
le
204 Optimal Execution with Limit and Market Orders
pe
irc
vi
rc
le
pe
ne
10
irc
vi
� decreasing q
.
in
rc
8
i
r
le
pe
ne
>-,
0 6
irc
,....
1:1
.
vi
in
..q
�0.02
rc
4
5
r (1)
le
(1)
pe
Q >-< '
ne
0.01
irc
2
• Execute MO
I
vi
in
- - -TWAP
rc
0 0
i
r
le
0 20 40 60 0 20 40 60
pe
ne
irc
vi
5
in
(a) ¢ = 10-
rc
le
pe
ne
10
irc
0.04
vi
� decreasing q
in
rc
8
i
.
r
le
pe
ne
>-,
0 6
irc
1:1
vi
in
..q
�0.02
rc
4
5
(1)
r
(1)
le
pe
Q >-<
ne
0.01
irc
2
• Execute MO
vi
J
in
- - -TWAP
rc
0 0
i
r
le
0 20 40 60 o 20 40 60
pe
ne
irc
(b) cp = 10-
rc
le
pe
ne
10
irc
I • Execute MO
0.04
vi
decreasing q
in
- - -TWAP
rc
i
r
le
pe
§: 0.03
ne
>-,
0 6
irc
,....
1:1
vi
in
..q
�0.02
rc
4
5
(1)
r
le
(1)
pe
Q >-<
ne
0.01
irc
2
vi
in
rc
0 0
i
r
le
0 20 40 60 0 20 40 60
pe
ne
irc
3
in
(c) ¢ = 10-
rc
le
pe
ne
irc
Figure 8.6 The optimal execution strategy showing: (left panels) the optimal depths
vi
in
,5* at which an agent posts LOs as a function of time and current inventory; (right
rc
i
r
pe
ne
irc
vi
in
rc
le
a sequence of four MOs reducing her inventory from 10 to 6. She will then post
pe
ne
irc
an LO at a depth of about 0.007 and slowly decrease it towards 0.005 until either
vi
an MO arrives and lifts her order, or if she is not matched by about t '"" 40 sec
in
rc
i
le
she executes an MO, dropping her inventory to 5. Her posts then jump up to
ne
irc
in
rc
p
vi
r
le
8.4 Liquidation with Limit and Market Orders 205
pe
irc
vi
rc
le
pe
ne
irc
30.2 0.03
vi
in
30.15
rc
0.025
i
r
le
30.1 �
pe
§: *
ne
0.02
irc
30.05 �
-�..... 30
vi
(!)
in
..cc: 0.015
rc
.µ
r
le
(!)
pe
Q 0.0 1
ne
� 29.95
irc
vi
29.9 0.005
in
rc
i
r
le
29.85 0
pe
0 20 40 60 0 20 40 60
ne
irc
vi
in
30.1
rc
---
r
le
pe
�
ne
irc
* e:; 30.05
vi
in
rc
UJ
i
r
le
.....
pe
....____
ne
irc
.µ
p u
(!)
>
(!)
·.:::
vi
in
p 0... 29.95
rc
le
pe
ne
irc
0 29.9
0 20 40 60 0 20 40 60
vi
in
rc
i
r
le
pe
ne
irc
Figure 8.7 Some sample paths for the agent following the optimal strategy. In the
vi
in
inventory path (bottom left panel) the blue dots indicate that the agent executed an
rc
MO. The dashed lines indicate the TWAP for that path. Here, ¢ = 10-4_
r
le
pe
ne
irc
vi
in
about 0.007 and she will keep decreasing it until her order is lifted, or t 50 sec
rc
i
rv
r
le
pe
le
pe
penalty of¢= 10- 4. Figure 8.7 shows the midprice, depth, inventory and cost
ne
irc
vi
per share for three simulated paths. In the inventory path (bottom left panel)
in
rc
i
the blue dots indicate when the agent executed an MO. In all scenarios, the
r
le
pe
ne
vi
is executed, the optimal depth instantly jumps upwards and then decays with
in
rc
irc
Finally, in the left panel of Figure 8.8 we show a heat-map of the agent's
vi
inventory through time as well as the mean inventory at each point in time.
in
rc
i
r
le
The agent immediately executes four MOs in all scenarios (hence the drop to
pe
ne
Q 0 = 6), then on average she slowly liquidates the remaining inventory by varying
irc
vi
in
the depth at which she posts her LOs. In most scenarios she ends with one or
rc
le
zero shares just prior to the end of the trading horizon. If she has any inventory
pe
ne
irc
an instant prior to maturity, she executes MOs in sequence to unwind all shares
vi
in
before reaching the terminal date and picking up the terminal penalty as a result
rc
i
le
in
rc
p
vi
r
le
206 Optimal Execution with Limit and Market Orders
pe
irc
vi
rc
le
pe
ne
-3
10
irc
I- - - Mean InventoryI
x
10 15
vi
in
in
rc
/
8 0.8
r
le
10
pe
�
ne
>,
irc
"
6 0.6
I 5
vi
.µ
in
\ / increasing ¢
''
rc
"
I
g2 4 ', 0.4 C:;
r
le
kl
pe
>-< 0
ne
irc
2 ... ... ... 0.2
......
vi
in
in
rc
-5
0
r
le
pe
ne
Time (sec) JV[RJ
irc
vi
in
rc
Figure 8.8 The heat-map of the optimal inventory through time and the risk-reward
r
le
pe
profile as ¢ varies over {5 x 10-6, 5 x 10-5, 1 x 10-4, 2.5 x 10-4, 5 x 10-4, 10-3, 10-2}
ne
irc
from right to left.
vi
in
in
rc
r
le
pe
ne
irc
algorithm as the value of the running penalty ¢ varies. This is shown in the
vi
in
right panel of Figure 8.8 which contains a risk-reward plot of the profit and loss
rc
le
pe
ne
irc
has two effects: (i) it decreases the standard deviation of the revenue; and (ii) it
vi
decreases the P&L. The limiting P&L is -0.005 which equals the half-spread l
in
in
rc
r
le
used in these experiments, and results from large penalties inducing the agent to
pe
ne
irc
liquidate her shares immediately by executing MOs that pick up the half-spread
vi
in
cost.
rc
le
pe
ne
irc
vi
in
in
8.5 Liquidation with Limit and Market Orders Targeting Schedules
rc
r
le
pe
ne
irc
ft
agent who wishes to liquidate S)1 shares and who penalises inventory that differs
r
le
pe
irc
performance criteria. As pointed out before, this penalty term can be interpreted
vi
in
in
rc
pe
to holding too much inventory at any one point in time. Or put another way, the
ne
irc
agent's execution strategy is targeting a schedule where at any point in time the
vi
in
rc
le
pe
ne
this target are penalised. How heavy or light the penalty will be depends on the
irc
parameter¢ 2: 0.
vi
in
in
rc
An agent may, however, have a particular target schedule in mind that her
r
le
pe
ne
strategy should track as part of the liquidation programme. For example, she
irc
vi
may be interested in liquidating shares but also in tracking the inventory sched
in
rc
ule followed by TWAP or a schedule such as those that were solved for in a
r
le
pe
ne
Here, we illustrate how the agent can achieve that goal. To this end, let qt
in
in
rc
denote the (deterministic) schedule she wishes to target. To account for her desire
le
ne
irc
in
rc
p
vi
8.5 Liquidation with Limit and Market Orders Targeting Schedules
r
le
207
pe
irc
vi
rc
le
pe
ne
to target this schedule, we can easily extend the methodology of the previous
irc
vi
section by replacing the penalty term
in
rc
i
r
le
pe
ne
irc
vi
in
rc
r
Making this replacement clearly penalises strategies that deviate from the target
le
pe
ne
strategy qt. Her optimal behaviour will then be modified to track this schedule,
irc
vi
and the parameter ¢ determines how closely she matches the target schedule. It
in
rc
i
is trivial to see that if we choose to target qt = 0 for all t, we obtain the running
r
le
pe
ne
irc
vi
in
We leave it as an exercise for the reader to show that making this replacement
rc
le
in the agent's performance criteria, but keeping the ansatz as H(t, x, S, q)
pe
ne
irc
vi
in
rc
1
i
o* = - + [h(t,q)-h(t,q-1)],
r
le
pe
K,
ne
irc
vi
and the optimal timing Tq of MOs solves
in
rc
irc
vi
in
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
}=o,
irc
-�+h(t,q-1)-h(t,q)
vi
in
rc
i
r
le
pe
T
1
vi
in
rc
le
pe
ne
irc
rc
i
r
1
le
h(t,q) = - logw(t,q) ,
pe
ne
K,
irc
vi
in
le
pe
ne
irc
rc
i
r
le
(8.29)
pe
ne
irc
e-"'� w(t,q-1)-w(t,q) } = 0 ,
vi
in
rc
le
pe
ne
irc
rc
ne
irc
in
rc
p
vi
r
Optimal Execution with Limit and Market Orders
le
208
pe
irc
vi
rc
le
pe
ne
Numerical Experiments
irc
vi
in
in
rc
The QVI in (8.29) can be solved analytically as outlined in the previous section.
r
le
Here, however, we solve it numerically and investigate the resulting strategy. For
pe
ne
irc
vi
in
rc
r
= 10, A = 50/min,
le
T = 60 sec, SJl = 100,
pe
K
ne
irc
So= $30.00, i7 = $0.01, � = 0.005, a= 0.001, </> = 10-3.
vi
in
in
rc
r
le
pe
ne
irc
with temporary and permanent impact studied in Section 6.5, see (6.30), which
vi
in
rc
le
pe
ne
irc
( e,(T-t) _ e-,(T-t)
vi
qt - ------ 1)1 ,
in
in
( e,T - e-,T
rc
r
le
pe
ne
irc
where
vi
in
rc
a - ½b + ykqJ
= =
r
1
VI
and
( le ,
-
pe
{f_k a - ½b ykqJ
ne
irc
vi
in
in
rc
pe
ne
irc
le
Figure 8.9 shows (top left) the optimal depth at which the agent posts at
pe
ne
irc
each point in time and inventory level, (top right) the optimal time at which to
vi
in
in
rc
execute an MO at each inventory level, (bottom left) the heat-map from 10,000
r
le
simulations of inventory she holds through time, and (bottom right) a histogram
pe
ne
irc
of the number of MOs she executes during the strategy. There are several typical
vi
in
rc
features seen here. First, as time evolves the LOs are posted closer to the midprice
r
le
pe
- as the agent runs out of time, she becomes more aggressive in her posts to match
ne
irc
the given target. As before, the less inventory she holds, the deeper she posts to
vi
in
in
rc
pe
Second, the times at which she executes an MO occur when her LO posts are
ne
irc
Third, the optimal time to post MOs (the blue dots) follows the target schedule
r
le
pe
ne
fairly closely when the schedule changes rapidly, but allows for some slack when
irc
the schedule is not changing rapidly. This slack can be removed by increasing
vi
in
in
rc
the penalty ¢.
r
le
pe
ne
In these simulations, the agent posts on average "" 4.36 MOs during the exe
irc
cution, which is considerably smaller than the 1)1 = 10 inventory she wishes to
vi
in
rc
liquidate. Most of these posts occur within the first 10 sec of trading, during
r
le
pe
ne
the time when the target is changing rapidly. In the heat-map there are jumps
irc
vi
in
rc
ne
irc
in
rc
p
vi
r
le
8.6 Bibliography and Selected Readings 209
pe
irc
vi
rc
le
pe
ne
irc
0.2 10
• Execute !VIO
vi
in
-Target Schedule
rc
i
r
le
pe
�
ne
irc
§: 6
....,0i:::
vi
....,
in
0.1
rc
6
Q)
p.. r 4
le
pe
>-<
•
ne
irc
0.05
2
vi
in
rc
i
r
le
pe
20 40 60 0 20 40 60
ne
irc
vi
in
rc
3000
r
le
pe
ne
0.8
irc
�
vi
in
rc
0 6 0.6
i
r
le
pe
mean
ne
irc
4 0.4
>-< 1000
vi
in
rc
2 0.2
r
le
pe
ne
irc
0 0
0 20 40 60 1 2 3 4 5 6 7 8 9 10
vi
rc
i
r
le
pe
ne
irc
Figure 8.9 The optimal depth, time at which to execute MOs, heat-map of inventory,
vi
in
rc
and histogram of executed MOs for the agent who targets an AC schedule. The solid
r
le
pe
blue lines represent the target inventory. The dashed line represents the mean
ne
irc
rc
i
r
le
pe
vi
in
rc
Huitema (2013), Guilbaud & Pham (2013), Cartea, Jaimungal & Kinzebulatov
r
le
pe
ne
(2013), Gueant, Pu & Royer (2013), Gueant, Lehalle & Fernandez Tapia (2012),
irc
vi
(Buti & Rindi 2013), Cartea & Jaimungal (2013), Horst & Naujokat (2014).
in
rc
i
r
le
pe
ne
irc
vi
in
8. 7 Exercises
rc
le
pe
ne
irc
E.8.1 Use the setup provided in Section 8.2. Assume that the agent penalises running
vi
in
rc
pe
ne
irc
T
H(t, x, S, q) = sup IEt,x,S,q [x! + Q� ( ST - a Q�) - ¢ 1
2
( Qt) du]
vi
in
rc
oEA t
r
le
pe
ne
where ¢ ;::: 0. Find the optimal depth at which the agent posts the limit sell
irc
vi
orders.
in
rc
E.8.2 Show that (8.10) is indeed the solution to (8.9) by completing the steps below.
le
ne
irc
in
rc
p
vi
r
le
210 Optimal Execution with limit and Market Orders
pe
irc
vi
rc
le
pe
(a) Compute w(t, q) for q = 1, 2, 3 by explicit integration of (8.9).
ne
irc
vi
(b) Notice that the solutions are all polynomials in (T - t) which increase in
in
rc
i
r
le
order as q increases. Hence, write the ansatz
pe
ne
irc
L a�q) (T - t)"
vi
in
rc
r w(t, q) =
le
pe
n=O
ne
irc
vi
in
c
and show that the coefficients a�q) satisfy the recursion
i
r
le
pe
ne
irc
an(q) - � an(q- 1)
vi
(8.30)
in
n -1 '
c
le
r
pe
ne
= 1, ..., q, q = 1, = e-"'"' q2
irc
for n 2, ... and a�q) •
vi
in
rc
(c) Prove via induction that the above form of the solution is indeed correct.
i
r
le
pe
ne
(d) Solve the recursion and show that
irc
vi
in
rc
le (8.31)
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
E.8.3 In the optimisation problem (8.3), the terminal penalty is assumed to be -aq 2 .
irc
vi
Suppose instead that terminal penalty is a generic bounded and increasing
in
rc
function of the terminal inventory £(q), so that the agent's optimisation prob
r
le
pe
ne
lem is
irc
vi
in
rc
i
r
le
8EA
pe
ne
irc
vi
in
(a) Derive the corresponding DPE for the associated value function, and solve
rc
le
for the value function and the optimal trading strategy using the same
pe
ne
irc
rc
(b) Many markets provide rebates to liquidity providers. This means that each
i
r
le
pe
time that an agent posts an LO and it is filled before being cancelled, the
ne
irc
agent receives a rebate (3. Account for such rebates in the formulation of the
vi
in
rc
le
pe
ne
strategy.
irc
vi
E.8.4 Suppose that the agent wishes to penalise inventories different from zero not
in
rc
i
r
le
just at the terminal time, but also throughout the entire duration of trading. In
pe
ne
irc
this case, the agent adds a running penalty term to the optimisation problem
vi
in
r
r
le
r
pe
ne
rc
.lo
ci
in
8EA
i
le
r
ne
irc
in
rc
p
vi
r
8. 7 Exercises 211
le
pe
irc
vi
rc
le
pe
ne
instead of (8.3), with¢ 2 0. When¢= 0, the agent solves the old optimisation
irc
vi
problem, but when ¢ > 0, the agent modifies her behaviour to reflect her risk
in
rc
i
preference towards holding inventory.
r
le
pe
ne
(a) Show that the corresponding value function can be written as G(t, x, S, q) =
irc
x+q S+g(t,q), where g(t,q) satisfies the coupled non-linear system of ODEs
vi
in
rc
le
Ot9 + 5' exp {-K; [g(t,q) - g(t,q - l)]} u¢q 2 ,
pe
ne
irc
{ g(t,0) - 0, (8.34)
vi
in
g(T,q) =
rc
-aq 2 ,
i
r
le
pe
ne
and that the optimal depth 5* is still provided in feedback form as
irc
vi
in
rc
le
K;
pe
ne
irc
(b) By writing g(t,q) = �w(t,q), solve for w(t,q) and the optimal control 5.
vi
in
rc
(c) Demonstrate that if¢ > 0, then limr-++oo 5*(t,q) is finite for each q and
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
pe
9 Targeting Volume
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
9.1
vi
Introduction
in
rc
le
pe
ne
irc
Execution algorithms are designed to minimise the market impact of large orders.
vi
in
rc
As discussed in the previous chapters, slicing and dicing parent orders into child
i
r
le
pe
orders is the main principle upon which most algorithms are devised. One source
ne
irc
of uncertainty which determines the market impact of each child order is the
vi
in
rc
volume of the child order relative to the volume that the market can bear at
r
le
pe
ne
that point in time. To see why, consider executing one child order. If it is small,
irc
then the order will not walk beyond the best quotes in the limit order book
vi
in
rc
(LOB) and it will have little or no temporary market impact. If the order size is
i
r
le
pe
ne
considerable, then it may walk through several layers of the LOB and, therefore,
irc
vi
receive poor execution prices relative to the midprice. Furthermore, to complete
in
rc
this description of order size and volume we must also ask whether any other
r
le
pe
ne
orders are reaching the market at the same time or just prior to the arrival of
irc
vi
rc
i
r
le
Over short-time scales (seconds), the impact of a market order (MO) depends
pe
ne
irc
on many factors where size, relative to what is displayed in the LOB, is key. But
vi
in
rc
what traders see on the LOB might change by the time their orders reach the
r
le
market. Even traders with access to ultra-fast technology are exposed to the risk
pe
ne
irc
of changes in the quantity and prices displ ayed by limit orders (LOs) because
vi
in
rc
there is a delay between sending an MO and its execution. These changes are due
i
r
le
pe
LOs may be cancelled or more may be added, thus the best quotes and/or depth
vi
in
rc
of the LOB change. Similarly, other MOs may arrive just before the agent's and
r
le
pe
deplete liquidity that was sitting in the LOB. Thus, the size of the agent's child
ne
irc
order is relative to what the LOB can bear when all MOs amalgamate with that
vi
in
rc
pe
ne
vi
agent can exert unusual one-sided pressure which may result in further adverse
in
rc
le
market impact. Ideally, an agent's strategy may avoid adverse over-tilting of the
pe
ne
irc
market order flow by devising algorithms that camouflage her orders. One way
vi
in
i
le
of the total volume traded over the time horizon of the strategy.
ne
irc
in
rc
vi
r
le
9.1 Introduction 213
pe
irc
vi
rc
le
pe
ne
Here arc two strategies that aim at executing a number of shares equivalent
irc
vi
to a fraction of:
in
rc
i
r
le
pe
ne
i. the rate at which other participants are sending MOs; and
irc
vi
ii. the total volume that has been traded over the entire time horizon.
in
rc
le
pe
The rate and the total volume quantities are connected because total volume is
ne
irc
the sum over the rate of trading, but the optimal execution strategy could be
vi
in
rc
quite different in both cases. One simple approach to targeting (i) is to observe
i
r
le
pe
the volume traded over the last several seconds or minutes, and then trade a
ne
irc
percentage of this volume over the next several seconds or minutes. Obviously
vi
in
rc
this approach is not optimal because it does not address the problem of market
r
le
pe
ne
irc
vi
Targeting (ii) is difficult because total volume traded, over the planned execu
in
rc
i
tion horizon, is not known ahead of time. Naturally, trading a percentage of the
r
le
pe
ne
volume that has been traded over the last several seconds will also target (ii),
irc
vi
although it may not be optimal.
in
rc
Moreover, neither (i) nor (ii) is entirely compatible with the objective of com
le
pe
ne
irc
pleting the acquisition or liquidation of an order in full by the end of the trading
vi
horizon, because there is no guarantee that the sum of the fractions of volume
in
rc
i
r
le
traded will add up to the number of shares that the agent set out to acquire or
pe
ne
irc
liquidate.
vi
Trading algorithms that target benchmarks based on volume are extensively
in
rc
le
used. One of the most popular benchmarks is the Volume Weighted Average
pe
ne
irc
in calculating
rc
i
r
le
pe
f�2 Std½
ne
=
irc
d½
in
rc
le
pe
where ½ is the total volume executed up to time t, St is the midprice, and [T1, T2 ]
ne
irc
vi
rc
pe
ne
many shares will be traded over a period of time. Investors target VWAP because
irc
vi
of their desire to ensure that when acquiring or liquidating a large position they
in
rc
obtain an average price close to what the market has traded over the same period
r
le
pe
ne
of time. One way to target VWAP is to follow strategy (i) because targeting a
irc
vi
fraction of the rate of trading at every instant in time ensures that the investor
in
rc
i
r
is tracking the average price. Ideally, if the investor's strategy smoothes the
le
pe
ne
irc
execution of the number of shares she wishes to execute over the planned time
vi
horizon and at the same time adamantly targets a fixed proportion of the rate at
in
rc
le
which other market participants are trading, then the average cost of the shares
pe
ne
irc
In this chapter we show how to formulate and solve the agent's liquidation
rc
i
le
problem for (i) and (ii) in a way that is consistent with the overall goal of full
ne
irc
in
rc
p
vi
r
le
214 Targeting Volume
pe
irc
vi
rc
le
pe
ne
14�--------- 14
irc
0.1
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
0
r
le
2 4 6
pe
2 4 6
ne
irc
Time Time
vi
in
rc
Figure 9.1 Trading volume, for both buy and sell orders, for INTC for Oct-Nov, ·2013
le
pe
ne
irc
vi
in
rc
i
r
le
(or partial) liquidation - the acquisition problem is very similar. Strategies that
pe
ne
irc
target (i) are often called percentage of volume (POV) and we label strategies
vi
in
rc
le
pe
An important source of risk when targeting POV and POCV is that one cannot
ne
irc
anticipate the timing and volume of the arrival of other trader's MOs. This
vi
in
rc
i
r
le
In Figure 9.1 we show the volume of trades (for both buy and sell orders) of
pe
ne
irc
INTC (Intel Corporation) using 5 minute windows for every trading day (which
vi
in
rc
consists of 6.5 hours) of the fourth quarter of 2013. The panel on the left shows
r
le
pe
a heat-map of the data together with the median (second quartile), and first
ne
irc
and third quartile estimates - note that we plot log(l + volume) because there
vi
in
rc
are 5 minute windows with no trades so volume is zero. The panel on the right
i
r
le
pe
ne
shows a functional data analysis (FDA) approach to viewing the data whereby
irc
the volumes are regressed against Legendre polynomials (the thin lines). The
vi
in
rc
mean of the regression is then plotted as the solid blue line, which represents the
r
le
pe
ne
expected (or average) trading volume throughout the day for this ticker. The
irc
vi
data are also shown using the dots. From the two pictures one observes that
in
rc
i
although volume exhibits a 'U'-shape pattern, high volumes at the start and end
r
le
pe
ne
of the trading day and lower volume in the hours in between, there are days
irc
vi
Figure 9.2 uses the same data as Figure 9.1 but instead of the volume it shows
le
pe
ne
irc
the intensity of trades for both buy and sell orders. For each 5 minute window
vi
we calculate the intensity ,,\ as the number of trades that were made over that
in
rc
time window. The figure shows log(l + ..\) because there are 5 minute intervals
i
r
le
pe
ne
irc
where no MOs were sent. The panel on the left shows a heat-map of the data
vi
in
together with the median, and first and third quartile estimates. The panel on
rc
le
the right shows an FDA approach to viewing the data whereby the intensities
pe
ne
irc
are regressed against Legendre polynomials (the thin lines). The mean of the
vi
in
regression is then plotted as the solid blue line, which represents the expected
rc
i
le
(or average) trade intensity through the day. The data are also shown using the
ne
irc
in
rc
p
vi
r
9.2 Targeting Percentage of Market's Speed of Trading 215
le
pe
irc
vi
rc
le
pe
ne
6�------ -�
irc
6 ''-,
vi
in
in
rc
0.06 5
r
le
pe
�4
ne
�4
irc
+ 0.04 +
vi
in
,...., 3
___, ,...., 3
rc
___,
b.O
..sb.O 2
r
le
..92
--· -
pe
ne
. 0.02
irc
vi
in
in
rc
0 �--�-
r
le
2 4 6 0
pe
0 2 4 6
ne
Time
irc
Time
vi
in
rc
Figure 9.2 Trading intensity, for both buy and sell orders, for INTC for Oct-Nov, 2013
r
le
pe
ne
irc
vi
in
in
rc
r
le
dots. As expected, the trading intensity follows a similar pattern to that of the
pe
ne
irc
vi
in
le
optimally liquidates shares when her strategy targets a fraction of the speed of
pe
ne
irc
the rest of the market. We use simulations to show that targeting a fraction of
vi
in
in
rc
POV can deliver an average execution price which is very close to VWAP. Section
r
le
pe
9.3 shows how the agent liquidates shares and her strategy targets POCV. In
ne
irc
Section 9.4 the agent modifies her strategy because her own and other market
vi
in
rc
le
pe
Section 9.5 shows how to manage price risk through exponential utility when the
ne
irc
in
rc
r
le
pe
ne
irc
le
pe
In this section we assume that the agent's execution strategy targets a percent
ne
irc
age of the speed at which other market participants are trading, and we focus
vi
in
in
rc
on the liquidation strategy with MOs only. The setup for optimal acquisition,
r
le
pe
ne
vi
fraction p of the speed at which the overall market ( excluding the agent) is trad
r
le
pe
ne
ing. This is different from a strategy which caps the optimal liquidation speed to
irc
vi
in
rc
become clear when we write down the agent's performance criteria. The agent's
r
le
pe
ne
sn.
vi
in
Q� =
rc
le
pe
ne
irc
Let µt denote the speed at which all other market participants are selling
vi
shares using MOs. This rate of selling can be estimated by summing all shares
in
in
rc
le
that are executed over a small time window, and dividing by the time window.
ne
irc
in
rc
p
vi
r
216
le
Targeting Volume
pe
irc
vi
rc
le
pe
We assume that the agent's speed of liquidation is not taken into account when
ne
irc
calculatingµt. The case when the agent targets a percentage of the total order
vi
in
rc
flow (including her own trades) is left as Exercise E.9.3. Therefore, since the
i
r
le
pe
agent's objective is to seek an optimal liquidation speed Vt which targets the
ne
irc
POV pµ,t at every instant in time, with O < p < l, her performance criteria and
vi
in
rc
le
pe
ne
irc
H v(t,x,S,µ,q) = lEt, x ,S,M [xT + Q'y (Sf-aQ'y) - c.p l(vu- pµu, ) 2 du] (9.2)
vi
in
rc
i
r
le
pe
and
ne
irc
vi
H(t,x,S,µ,q) = supH v(t, :r:,S,µ,q) , (9.3)
in
rc
le
vEA
pe
ne
respectively.
irc
vi
Here Xf is terminal cash, a ::;;, 0 is a liquidation penalty, and c.p ::;;, 0 is the
in
rc
i
target penalty parameter. In this setup, deviations from the target are penalised
r
le
pe
ne
by c.p Jt(vu - pµ u) 2 &u, but this penalisation does not affect the cash process.
irc
vi
High values of c.p constrain the strategy to closely track the target pµt at every
in
rc
le
instant in time, and low values of c.p result in liquidation strategies which are
pe
ne
irc
more lax about tracking the POV target.
vi
The agent's speed of trading Vt has both temporary and permanent impact on
in
rc
i
r
le
the price of the asset. We assume that the impacts are linear in Vt, so
pe
ne
irc
sr =sr-k Vt, = s,
r
s0
le
(9.4b)
pe
ne
irc
rc
i
with b ::,, 0 and k ::,, 0. In this setup we assume that the order flow µt from
r
le
pe
ne
other agents does not affect the midprice process. In Section 9.4 we modify this
irc
vi
assumption and have the order flow of all agents impacting the midprice.
in
rc
le
pe
ne
irc
rc
i
r
We solve the agent's control problem (9.3) assuming that order flow of other
le
pe
ne
irc
independent of the Brownian motion Wt which drives the midprice), and denote
in
rc
le
irc
rc
pe
(9.5)
ne
vi
in
rc
le
pe
a supremum at
ne
irc
V =----�-------- .
in
rc
(9.6)
2(k+c.p)
i
le
ne
irc
in
rc
vi
r
9.2 Targeting Percentage of Market's Speed of Trading 217
le
pe
irc
vi
rc
le
pe
To solve (9.5) we make the ansatz
ne
irc
vi
s, µ,q)= X + q s + h(t,µ,q)'
in
H(t, x,
rc
(9.7)
i
le
pe
ne
which can be interpreted as the accumulated cash of the liquidation strategy, the
irc
vi
marked-to-market book value of the inventory at the midprice, and the added
in
rc
r
value obtained from optimally liquidating the remaining shares (h(t, µ, q)).
le
pe
ne
Upon substituting the ansatz in (9.5) we obtain the following equation satisfied
irc
vi
by h(t,µ,q):
in
rc
i
le
pe
0= (8t+ ,C µ ) h + 4(k� ip ) (8 q h + bq-2cppµ) -cpp µ '
2 2 2
(9.8)
ne
irc
vi
subject to the terminal condition h(T, µ, q) = -aq2 . By observing that the ter
in
rc
le
minal condition and the DPE (9.8) are at most quadratic in q, we use the ansatz
pe
ne
irc
vi
rc
i
le
pe
With this ansatz, the optimal trading speed in feedback form reduces consider
ne
irc
ably to
vi
in
rc
le
pe
ne
irc
vi
in
rc
Moreover, substituting back into the DPE, after straightforward (but tedious)
i
le
pe
manipulations, collecting terms in q, then setting each to zero, we find the prob
ne
irc
le
2
(h 2 + 21 b)
pe
ne
0= (8 t + ,C µ ) h2 + , (9.10a)
irc
k+cp
vi
in
rc
h cp µ
r
i
O= (8 t +£ µ ) h 1 + i ;" : cp P ( h2 + ½ b) , (9.10b)
le
pe
ne
irc
1
vi
2
0= (8t+£ µ ) ho + (h1-2cppµ) -cpp2 µ2 , (9.10c)
in
rc
4(k+cp)
r
le
pe
ne
irc
equation is in fact a linear PDE with non-linear sources terms given by the
in
rc
i
le
solution to the other PDEs. These equations are also dependent in a constructive
pe
ne
irc
le
Now observe that equation (9.10a) for h2 contains no source terms dependent
pe
ne
irc
on µ and its terminal condition is independent ofµ, hence the solution must also
vi
in
i
le
pe
ne
irc
(9.11)
vi
in
rc
and since the optimal speed of trading does not depend on ho , we do not need
r
le
pe
ne
to solve (9.10c). What remains is to solve the PDE for h1(t,µ). At this point,
irc
vi
we instead simply assume we have solved for it and derive expressions for the
in
rc
optimal trading speed and the resulting optimal inventory trajectory. Once we
i
le
ne
irc
in
rc
p
vi
r
218
le
Targeting Volume
pe
irc
vi
rc
le
pe
have these expressions, in the subsections ahead, we make some specific mod
ne
irc
elling assumptions and compute h 1 explicitly as well as provide a probabilistic
vi
in
in
rc
representation for the general case.
r
le
pe
ne
We can then express the optimal speed of trading as
irc
vi
in
rc
le
(9.12)
pe
ne
irc
vi
in
in
rc
where the constant
r
le
I"= k+<p
pe
ne
irc
', .
a- 21 b
vi
in
rc
The optimal speed of trading consists of two terms. The second term on the
le
pe
ne
irc
right-hand side of (9.12) is very similar to the strategy discussed in the optimal
vi
liquidation problems in Chapter 6. For instance, one can see that if in (6.27)
in
in
rc
we let the running inventory penalty parameter ¢ = 0, we obtain the second
r
le
pe
ne
term on the right-hand side of (9.12) with <p = 0. Therefore, one can view
irc
vi
in
because only when ( = 0 do we obtain TWAP). The first term on the right-hand
le
pe
ne
irc
side of (9.12) provides the volume corrections to the TWAP-like strategy. This
vi
in
in
correction depends on the POV target, pµt, and on the function h1(t,µ) which
rc
r
le
encodes how the optimal strategy behaves given the dynamics of the volume
pe
ne
irc
process.
vi
in
Before specifying the stochastic process for the rate of trading µt, we com
rc
le
ment on some general features of the POV strategy. The boundary condition
pe
ne
irc
h 1 (T, µ) = 0 implies that near the end of the trading horizon, (T - t) � 1, the
vi
in
in
rc
pe
ne
{
<pp
irc
* Q'
t = µt +
vi
V k + <p (T - t) + ( '
in
rc
le
pe
irc
First, when a-+ oo, so that the agent must execute all shares by the trading
vi
in
in
rc
end, (-+ 0. For a fixed inventory level, the second term on the right-hand side
r
le
pe
the POV constraint and instead focuses on using TWAP when approaching the
vi
in
rc
end of the trading horizon. Note, however, that the inventory also flows as time
r
le
pe
evolves, so it is not clear if that term truly dominates near maturity. Below, once
ne
irc
{
we solve for Q' , we will see that indeed the POV constraint is ignored near
vi
in
in
rc
maturity.
r
le
pe
Second, if a remains finite, but <p -+ oo, so that the agent heavily penalises
ne
irc
trades that deviate from POV, then (-+ oo and the strategy ignores the TWAP
vi
in
rc
like term, and trades at a rate of pµt as expected. Naturally, these limits do not
r
le
pe
ne
is exactly equal to p percentage of the total volume traded over the execution
in
in
rc
duration.
le
ne
irc
in
rc
p
vi
r
9.2 Targeting Percentage of Market's Speed of Trading 219
le
pe
irc
vi
rc
le
pe
ne
Armed with the optimal trading speed in (9.12), we can obtain an expression
irc
for the optimal inventory to hold by solving for Q(. Recall that dQ( = -v; dt,
vi
in
rc
i
and hence,
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
where
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
Q( = e- Jt((T-s)+()- ds q(
1
pe
ne
irc
(T -t) +( v"
vi
log v*
=e
(T-t)+c
in
r+c =
rc
qt qt '
T +(
i
r
le
pe
ne
irc
and solving for the unknown process q(. By direct computation we have that
vi
in
rc
le
dq( = eJ;((T-s)+()-' ds { ((T -t) +()- 1 Q( dt +dQ(}
pe
ne
irc
vi
= -eft((T-s)+()-' ds h 1 ( t,µt)dt
in
rc
i
r
le
T+(
pe
ne
= - h1 ( t,µt)dt ,
irc
(T -t) +(
vi
in
rc
le
and so
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
t
rc
T +( T +(
r
le
v
Qt * -m = - h 1 ( s,µs )d8'
pe
ne
(T -t) +( Jo (T -s) +(
irc
vi
in
rc
so that finally
i
r
le
pe
ne
irc
Q( =
vi
in
rc
le
(9.13)
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
The optimal inventory to hold at any point in time has two components. The
irc
vi
first term is a TWAP-like strategy. The second term controls for fluctuations in
in
rc
the market's trading rate. Now that we are equipped with this general framework
r
le
pe
ne
for the optimal trading speed (9.12) and the optimal inventory to hold (9.13), we
irc
vi
proceed by specifying the volume dynamics and then solving for explicit formulae
in
rc
for the optimal speed of trading and the optimal inventory path.
le
ne
irc
in
rc
p
vi
r
le
220 Targeting Volume
pe
irc
vi
rc
le
pe
ne
irc
vi
--e-30 sec
in
in
rc
--+-10 sec
r
le
pe
Figure 9.3 AAPL volume rates per
ne
irc
vi
in
rc
le
time windows.
pe
ne
irc
vi
in
in
c
r
le
pe
0.6 0.7 0.8 0.9
ne
irc
Time
vi
in
c
le
r
pe
irc
vi
in
in
Figure 9.3 shows the estimate of the volume rate of trading (per minute) for
rc
r
le
AAPL on Jan 5, 2011 from 10:00 to 10:30. The estimate is computed by counting
pe
ne
irc
the volume traded over 30 sec and 10 sec windows and scaling the counts to one
vi
in
rc
minute. As the figure shows, a reasonable first order model is that traded volume
r
comes in bursts of activity which persists for a while (seconds for instance) and le
pe
ne
irc
then decays to zero. Thus, for an agent whose objective is to target the rate of
vi
in
in
rc
trading over short-time horizons, we assume that the sell volume rate µt is a
r
le
vi
in
(9.14)
rc
le
pe
ne
irc
in
with intensity >-, and {17 1 ,172, ... } are non-negative i.i.d. random variables with
rc
r
le
to (9.14) is
vi
in
rc
µt = e-K,t µo
le
pe
ne
irc
L, e-K(t-Trn) T/
N
vi
= e-Kt µo + '
in
in
(9.15)
rc
m
r
le
m=l
pe
ne
irc
where Tm denotes the time of the m th arrival of the Poisson process. As shown
vi
in
rc
earlier in Figure 9.2, the arrival of trades follows a U-shaped pattern that can
r
le
pe
ne
of the process, but here, for simplicity, we assume that the trading rate always
in
in
rc
mean-reverts to zero. Although the order flow process mean-reverts to zero, its
r
le
pe
ne
vi
in
c
le
r
pe
ne
rc
ci
in
in
le
With order flow satisfying (9.14), its infinitesimal generator acts on the value
r
ne
irc
in
rc
vi
r
le
9.2 Targeting Percentage of Market's Speed of Trading 221
pe
irc
vi
rc
le
pe
function as follows:
ne
irc
vi
in
J:P H(t, S, µ, q) =
rc
µ aµ H + .\lE [H(t, S, µ + 'T/, q) - H(t, S, µ, q)] , (9.16)
i
r
-K,
le
pe
ne
irc
where the expectation is with respect to the random variable 'T/ with distribution
vi
in
function F.
rc
le
We now find the solution h 1 to (9.10b) with this model assumption. Since this
pe
ne
irc
model is of the affine type, and (9.10b) is linear in µ, we expect the function
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
for some deterministic functions of time £ 0 (t) and £ 1 (t). The terminal condition
r
le
pe
h(T,µ) = 0 implies that we must also impose £ 0 (T) = £ 1 (T) = 0. W hen the
ne
irc
generator (9.16) acts on h 1 (t, µ) we obtain
vi
in
rc
i
r
le
pe
ne
irc
vi
in
le
pe
ne
irc
vi
in
rc
i
r
le
pe
To solve for £ 0 (t) and £ 1 (t) in the above equation, we observe that since the
ne
irc
equation must hold for all µ, the terms in braces must vanish individually. We
vi
in
rc
first solve the ODE in the second set of braces and then use the expression for
r
le
pe
irc
For £ 1 , we solve
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
( h2(t) + ½b _ k) dt = (�
pe
ne
J _1_)
irc
vi
-kt
exp + ,
in
e
rc
k + cp k + cp a - 2b1
i
r
le
pe
ne
irc
and after simple algebra and integrating between t and T, the ODE above reduces
vi
in
to solving
rc
le
1T d ((Tk +- 1T
pe
ne
1
irc
t cp a - zb k + cp t
in
rc
i
r
le
pe
vi
1 1 - e-r;,(T-t)
in
rc
le
pe
ne
K,
irc
vi
rc
We proceed in a similar way to solve the ODE for £ 0 resulting from setting the
i
le
ne
irc
in
rc
p
vi
r
le
222 Targeting Volume
pe
irc
vi
rc
r
first set of braces to zero. First substitute the solution for £ 1 into the equation
le
pe
ne
irc
for £ 0 , then multiply the ODE through by the integrating factor
vi
in
in
rc
h ½b T-t
+ _l
r
exp! ( ; ) dt (k _)
le
+
pe
=
<p + <p
ne
2
irc
+ a - 1b
vi
and integrate between t and T, to obtain
in
rc
1T 1T
r
le
1-e-k(T-u)
pe
2'lj; <pp
ne
irc
-k- d ((T-u+()Co(u ))+k k du=0 ,
1
+<p t +<p t
vi
in
in
rc
with terminal condition C 0 (T) = 0. Evaluating the explicit integral, we can then
r
le
pe
ne
write
irc
( t) 1 + 1-,,(T t)
vi
1 e-r;, T-
in
rc
le
pe
- - .
ne
irc
K,
Finally, substituting these results back into the optimal speed of trading in (9.12),
vi
in
in
we have
rc
r
le
pe
ne
irc
(9.17)
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
In this section we show how to solve for the optimal liquidation strategy for the
pe
ne
irc
most general case, where we do not specify the particular process followed by
vi
in
the trading rate µt and the only assumption is that it is Markov and indepen
rc
le
dent of the Brownian motion driving the midprice. We establish this result by
pe
ne
irc
in
for h1 (t, µ), and represent h1 as
rc
r
le
pe
ne
irc
h1(t,µ)
[1T
vi
in
rc
= - �+$ lEt,µ exp { k�<p ftu (h2(s, µs) + ½b) ds} (h2(t, µu) + ½b) µu du
r
le
]
pe
ne
irc
vi
in
u
rc
=
pe
ne
r1
irc
k� <p
vi
µu du]
rc
T
=
r
le
pe
ne
irc
where lEt,µ[·] is shorthand notation for the conditional expectation lE[· I µ t = µ].
vi
in
in
rc
vi
in
Jt lE [µu I µ= µ] du
rc
h 1 (t µ) =2 (9.18)
r
le
' (T-t) + (
pe
t
ne
irc
'Pp
vi
in
in
Recall that the constant ( <p)/(a - ½b). The integral appearing above
rc
= (k +
le
ne
irc
in
rc
p
vi
9.2 Targeting Percentage of Market's Speed of Trading 223
r
le
pe
irc
vi
rc
r
is precisely the expected total volume over the remainder of the trading
le
pe
ne
irc
horizon. This is because it is the integral of the expected trading rate µt between
vi
the current time and the end of the strategy's trading horizon. Moreover, the
in
rc
i
r
le
integral term combined with the factor ((T- t) +()- is approximately the
pe
1
ne
irc
average expected trading rate for the remaining time horizon. This combination
vi
would be exactly the average expected trading rate if k = cp = 0 and/or a--+ oo.
in
rc
le
Using this general form for h 1, the agent's optimal trading speed can be rep
pe
ne
irc
resented as
vi
in
rc
i
JtlE [µulFf"]du
r
cp p Q(
le
pe
µt- + (9.19)
k+ cp [ (T- t) +( l
ne
irc
Vt = (T- t) +( '
vi
in
rc
le
where the conditional expectation is now with respect to the filtration Ff gen
pe
ne
irc
erated by µ. By inserting the general result for h 1 into the optimal inventory to
vi
in
i
r
le
pe
ne
irc
Q( (1--t )
vi
T+(
in
=
rc
1)1
(9.20)
r
t
(T- t) +(
le
[µ _ J:"'lE [µu I Ff]du] ds .
pe
_ __!!_I!_
ne
irc
k+cp}0 (T-s)+( (T-s)+(
vi
in
s
rc
i
r
le
the one hand the strategy aims at liquidating IJ1 shares by T, and on the other
r
le
pe
hand the strategy must track a fraction of other market participants' trading
ne
irc
rate. Only when IJ1 is exactly equal to the desired fraction p of the total volume
vi
in
rc
i
r
le
pe
*
vi
in
p µt (9.21a)
rc
k+ cp
cp
r
=
le
Vt
pe
ne
irc
T
+ - � lE[µu Ff"]du) (9.21b)
vi
(T-�)+( ( Q( 1
in
k cp
rc
I
i
r
le
pe
ne
The first component of the strategy (9.21a) accounts for the trading rate that
irc
vi
must be achieved to meet the POV target, taking into account the trade-off
in
rc
between the POV target penalty cp and the costs stemming from temporary
r
le
pe
ne
price impact k. Although the POV target is p µt, the strategy targets a lower
irc
vi
amount since k'P_( :S p, where equality is achieved if the costs of missing the
in
rc
'P
i
r
+
pe
ne
irc
The second component is a TWAP-like strategy (the first term in the braces
vi
in (9.2la)) with a downward adjustment (the second term in the braces) because
in
rc
le
throughout the trading horizon there is the component targeting the POV. This
pe
ne
irc
is why we see that the TWAP-like strategy is applied to the remaining inventory
vi
in
i
le
ne
irc
in
rc
p
vi
r
le
224 Targeting Volume
pe
irc
vi
rc
le
pe
ne
the POV target, which will be done by the first term of the strategy (9.21a) over
irc
vi
the remaining time of the strategy.
in
in
rc
We continue our discussion of the optimal strategy by looking at some limiting
r
le
pe
ne
cases.
irc
vi
The limiting case in which the agent wishes to always track a fraction p of the
in
rc
r
rate µt is obtained by letting the target penalty parameter c.p-+ oo. In this case,
le
pe
ne
irc
the liquidation speed and inventory path become
vi
in
in
rc
r
le
and
pe
ne
irc
--+
<p CXJ oo.
vi
in
because ( -'--------+
rc
le
Regardless of what the inventory target is, the strategy liquidates at a rate
pe
ne
irc
of pµt . Clearly, as shown by the inventory path, the strategy could liquidate an
vi
in
in
amount of shares which exceeds or falls short of the initial target SJt. When the
rc
r
le
strategy reaches T any outstanding shares, short or long, are liquidated with an
pe
ne
irc
MO at the midprice and receive a finite penalty of o:q} which, in this limit, the
vi
in
rc
agent prefers to picking up the more onerous running penalty which would be
r
irc
The limiting case in which the agent wishes to fully liquidate her inventory
vi
in
in
rc
pe
( � 0, and so we have
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
Suppose that, in addition to requiring full liquidation, the agent is also very
vi
in
rc
averse to trading at a rate different from p µt . As c.p increases, she will target
r
le
pe
more and more closely the required trading rate; however, due to the constraint
ne
irc
that she must fully liquidate, she will not be able to match the required trading
vi
in
in
rc
rate at all times. Therefore, in the limit in which c.p-+ oo, after we have already
r
le
pe
ne
taken o:-+ oo, the value function will become arbitrarily large and negative, and
irc
will not be finite. The limiting optimal strategy, however, does remain finite,
vi
in
rc
as does her optimal inventory path, and the net value of liquidating her shares
r
le
pe
ne
remains finite and well behaved. The optimal speed of trading and inventory
irc
vi
in
rc
pe
. . nq µu I Ff l du Q(
ne
irc
T-t
rc
1t --
le
. .
(i - -Tt )
pe
ne
11m 1 1m Qv*
cp--+= a-+= t -_ P [µ s -
irc
<Y>
'J� -
O T-s T-s
vi
in
in
rc
le
Interestingly, when the other agents trade at a constant rate, i.e. µt is a constant,
ne
irc
in
rc
p
vi
r
le
9.2 Targeting Percentage of Market's Speed of Trading 225
pe
irc
vi
rc
le
pe
ne
irc
::i_200�-�----�-�---, 2
vi
C)
in
rc
i
r
le
� 15 0
pe
ne
,::1 :!
irc
Cl..
vi
in
100 I 0
rc
�
*�
r
le
;:,
pe
ne
irc
-1
vi
in
rc
i
r
-2
le
pe
ne
irc
Time Time
vi
in
rc
1.5
r
le
·�
pe
ne
irc
vi
in
rc
i
r
le
0.5
pe
ne
irc
vi
in
0
rc
>-<
r
le
pe
ne
irc
-0.5
0 0.2 0.4 0.6 0.8 0 0.2 0.4 0.6 0.8
vi
in
Time Time
rc
i
r
le
pe
ne
irc
Figure 9.4 Three sample paths of the market's trading rate, the optimal trading rate,
vi
in
the difference between the optimal trading rate and the targeted rate, and the agent's
rc
inventory.
r
le
pe
ne
irc
vi
in
rc
the POV correction terms in the above cancel and the agent's strategy becomes
i
r
le
TWAP.
pe
ne
irc
vi
in
rc
le
9.2.4 Simulations
pe
ne
irc
vi
In this section we provide some simulations of the optimal strategy for the mean
in
rc
i
reverting volume model in subsection 9.2.2. We focus on the double limiting case
r
le
pe
ne
of first ensuring that all inventory is liquidated (a --+ oo), and second that the
irc
vi
,p) + (T - t) K,p Q(
agent wishes to trade very close to POV ( r.p --+ oo). In this case, we have
in
rc
le
(
pe
(T-t)
[ 1-e-"
l T-t
ne
µt - K
irc
. . *
=p
K
hm hm vt µt - + -- ,
vi
t)
in
,p--+cc a--+cc (T -
rc
i
r
le
pe
ne
where 'ljJ = ,\ JE['T/] and therefore the long-run expected trading rate is lE[µt] = 'ljJ/ "'·
irc
vi
in
le
pe
ne
irc
So =20 , a=0.5 , T= 1 ,
vi
in
rc
i
le
µo =
'lj;/K, 'T/""'Exp(lO), .\=50, K=20,
ne
irc
in
rc
p
vi
r
226
le
Targeting Volume
pe
irc
vi
rc
le
pe
ne
4000�------�--� 2500�---------�
irc
vi
in
in
c
rc
2000
3000
r
le
pe
ne
irc
q � 1500
�2000
[
vi
Q)
in
rc
Q)
1000
r
le
pe
1000
ne
irc
500
vi
in
in
rc
-8.5 0 0.5 1 1.5
r
le
pe
Corr[v*, µ]
ne
irc
vi
in
rc
Figure 9.5 Left: histogram of the correlation between the agent's trading rate v; and
r
le
pe
µt. Right: histogram of the difference between the execution price per share and the
ne
irc
VWAP.
vi
in
in
rc
r
le
pe
k = 0.1, b = 0.1,
ne
and p = 0.05 .
irc
vi
in
rc
she expects to arrive in the market over her trading horizon, thus S)1 = p T 'lj; / K, = le
pe
ne
irc
1.25. Our parameterisation of the exponential distribution is such that JE[r)] = 10.
vi
in
in
rc
In Figure 9.4 we show three sample paths of the trading rate of other market
r
le
participants µt, the optimal trading rate v;, the difference between the optimal
pe
ne
-
irc
rate and the target rate v; p µt, and the agent's inventory Q(. In the bottom
vi
in
rc
left panel, the dotted line is the expected trading rate equal to 'lj; / K, and in the
r
le
bottom right panel, the dotted line is TWAP. Note that v; and µt are strongly
pe
ne
irc
correlated. Indeed, in the left panel of Figure 9.5 we show the histogram of
vi
in
in
rc
the correlation between v; and µt viewed as a time series, along 10,000 sample
r
le
pe
ne
paths. The mean correlation is quite high at 0.88, illustrating the fact that the
irc
trading rate tracks the rate of order flow. There are, however, deviations from
vi
in
rc
the targeted rate of p µt. These differences appear most notably towards the end
r
le
pe
ne
of the trading horizon (as seen in the top right panel in Figure 9.4) where the
irc
vi
agent's main concern is to drive her inventory to zero and she is less concerned
in
in
rc
pe
ne
Moreover, in the right panel of Figure 9.5 we show the difference between the
irc
vi
executed price per share and the VWAP. As discussed in the introduction, if
in
rc
the agent is closely targeting a fraction p of the trading volume then this results
r
le
pe
ne
irc
in
rc
error ±3 x 10- 4.
r
le
pe
ne
irc
In Figure 9.6 we illustrate a heat-map of the agent's trading rate and her
vi
in
inventory. The dotted lines here indicate the 5%, 50% and 95% quantiles. In
rc
le
terestingly, the median inventory path is TWAP, while the agent's inventory
pe
ne
irc
may deviate both above and below this trajectory in her attempt to match the
vi
in
in
POV target. The median path of her optimal trading rate is essentially constant
rc
le
through time, although the mode of this trajectory tends to increase towards
ne
irc
in
rc
p
vi
r
le
9.3 Percentage of Cumulative Volume 227
pe
irc
vi
rc
le
pe
ne
irc
4 0.1 0.1
1.2
vi
+"
in
rc
3 0.08 0.08
i
r
le
bO .... , ......... , .. , .. ,,,.,_ .................
pe
'' ;=:,o.8
ne
i::1 - ........ ,.... .. ...... ,
:.a
irc
2 0.06 0 0.06
1:1 0.6
vi
in
rc
1; 0.4
+" Q)
0.04 0.04
�
r
le
pe
>-<
.§
ne
irc
0.2
+" 0 0.02 0.02
vi
in
0 0
i
-1 0 0
r
le
r
0 0.5 0 0.5
pe
ne
Time Time
irc
vi
in
c
Figure 9.6 Heat-maps of the optimal trading rate and inventory. The dotted lines
r
le
r
pe
ne
irc
vi
in
rc
i
r
le
maturity. This suggests there is a slight bias towards first trading a little more
pe
ne
irc
slowly compared with TWAP and then trading faster to catch up.
vi
in
rc
le
pe
ne
rc
i
r
le
In this section we assume that the agent's execution strategy targets a percentage
pe
ne
irc
of cumulative volume (POCV) and the liquidation strategy relies on MOs only.
vi
in
Here the accumulated volume V of sell orders, excluding the agent's own trades,
rc
le
is given by
pe
ne
irc
t
vi
½=la µudu,
in
rc
i
r
le
pe
ne
vi
le
pe
ne
(9.22)
rc
pe
- 'P
ne
irc
vi
in
rc
where 1)1 is the number of shares that the agent wishes to liquidate by the terminal
r
le
pe
ne
date T.
It
irc
2
((IJt - Q�) - p Vu ) du is not a financial cost
vi
rc
that the agent incurs. Rather, its purpose is to allow the agent to seek for optimal
r
le
pe
liquidation rates where the total amount that has been liquidated up to time t
ne
irc
vi
is not too far away from a percentage of what the entire market has sold. For
in
c
example, when the penalty parameter 'P ---+ oo, the optimal strategy is forced
r
le
r
pe
ne
to liquidate shares so that at any point in time the number of shares that have
rc
vi
already been liquidated, IJt - qt, equals p 1/i;. In this manner, the agent devises a
ci
in
strategy where the cumulative sum of her own sell MOs is a fraction O < p < l
le
r
ne
irc
in
rc
p
vi
r
le
228 Targeting Volume
pe
irc
vi
rc
le
pe
ne
of the market. As in the last section, in this setup the agent's own trades are not
irc
vi
taken into account in the accumulated volume.
in
rc
i
r
As usual, the agent's value function is
le
pe
ne
irc
vi
in
vEA
rc
le
pe
and her cash process x v , the controlled midprice s v , and execution price § v
ne
irc
satisfy the equations in (9.4). Applying the dynamic programming principle sug
vi
in
rc
gests that the value function should satisfy the DPE
i
r
le
pe
= (at +_c S , µ , V ) H - cp((IJ1- q) - p V) 2
ne
0
irc
vi
(9.24)
+sup{-bvasH + (S- kv) vax H - vaq H},
in
rc
le
pe
ne
irc
vi
in
denotes the infinitesimal generator of the joint process (St, µt ,½)o<t<T· More
rc
i
r
le
over, we assume that the volume trading rate µt , and therefore the total volume
pe
ne
irc
vi
in
The first order conditions provide us with the optimal trading rate in feedback
rc
form as
le
pe
ne
A (S a H - a H - b asH) .
irc
v* =
vi
x q
in
rc
i
r
le
The terminal condition suggests that to solve (9.24) we use the ansatz
pe
ne
irc
le
irc
1
0 = (at +_c µY ) h + (a h + bq) - cp (IJ1- q - p V)
2 2
vi
(9.26)
in
4k q
rc
i
r
le
subject to the terminal condition h(T) = -aq2 , where _c µ , V denotes the genera
pe
ne
irc
tor of the process (µt, ½)o<t<T which excludes the midprice because the trading
vi
in
rc
le
pe
ne
The above non-linear equation can be reduced even further by noticing that
irc
the equation and its terminal condition are at most quadratic in q, hence we use
vi
in
rc
i
the ansatz
r
le
pe
ne
irc
le
pe
ne
irc
rc
By substituting this ansatz into equation (9.26), collecting terms with equal
r
le
pe
ne
powers in q, and setting each to zero, we find that ho, h 1 , and h2 must satisfy
irc
vi
le
(9.27a)
ne
(9.27b)
vi
in
rc
µV
0 =(at +_c , ) ho+ 4\ (hi) cp (IJ1- p v) .
2
le
2
- (9.27c)
ne
irc
in
rc
p
vi
r
le
9.3 Percentage of Cumulative Volume 229
pe
irc
vi
rc
le
pe
ne
As in the POV section, each equation above is a linear PIDE with non-linear
irc
vi
source terms given by the solution to the other PIDEs. These equations are also
in
rc
i
dependent in a sequential manner, i.e. h 2 is independent of all others, h 1 only
r
le
pe
ne
irc
vi
in
solved sequentially.
rc
le
Now observe that equation (9.27a) for h2 contains no source terms dependent
pe
ne
irc
vi
in
rc
i
r
le
pe
1
ne
0 = 8t h2 + k ( h2 + 21 b ) - cp ,
2
irc
vi
in
rc
which can be solved explicitly, see (6.25) where we provide detailed steps to solve
r
le
pe
ne
irc
vi
in
1 + (e2� (T-t)
rc
=�
i
½b'
r
le
h2(t) (9.28)
1- (e2�(T-t)
pe
-
ne
irc
vi
where
in
rc
�= le
pe
Vk
Fi_ and (9.29)
ne
irc
vi
in
rc
i
vVhat remains is to solve for h 1, which we defer for now, and instead focus on
r
le
pe
ne
the form of the optimal trading speed, given its solution. Once we have these
irc
vi
expressions, in the subsections ahead, we make some specific modelling assump
in
rc
le
pe
ne
for the general case. As before, ho does not appear in the optimal control and,
irc
vi
hence, we do not attempt to solve for it, although a closed-form expression can
in
rc
i
r
be obtained.
le
pe
ne
irc
Substituting this result into the expression for the optimal liquidation rate
vi
above, we can now express the optimal speed of trading in feedback form as
in
rc
le
pe
ne
irc
(9.30)
vi
in
rc
i
where h 1 (t,µ, V) is the solution to (9.27b) and h2 (t) is given in (9.28).
r
le
pe
ne
irc
Thus, the optimal speed of trading can be decomposed into two terms. The
vi
in
second term is similar to the AC-like solution already seen in (6.27) where the
rc
le
penalty on deviations from POCV plays the same role as the urgency parameter
pe
ne
irc
in the AC-like setting. The first term adjusts the strategy to account for the rate
vi
in
and volume of trades up to that point in time. Its specific form depends on the
rc
i
r
le
precise modelling assumptions onµ and V. In all cases, however, the importance
pe
ne
irc
and the agent trades more and more like the AC solution.
r
le
Recall that the inventory Q( at time t solves the equation dQ( = -v; dt;
pe
ne
irc
hence,
vi
in
rc
(9.31)
le
ne
irc
in
rc
p
vi
230 Targeting Volume
r
le
pe
irc
vi
rc
le
pe
To explicitly solve this ODE, we first multiply (9.31) through by the integrating
ne
irc
factor
vi
in
in
rc
{-¾J (h (t)+ ½ b) dt}
r
le
exp
pe
ne
2
irc
vi
and write the ODE as
in
rc
le
pe
v*
d( e-¾f(h2 t)+½b)dtQt ) = e -¾f( h2 t)+½b)dt__!_ h1 (t' µt. , V,
ne
t )dt. (9.32)
irc
( ( (
2k
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
J
1 · 1 + (e -t)
r
le
-
2f,(T
_
(9.33)
pe
; (h2 (t)+ 2 b) dt - � dt
1
ne
1-(e E, (T-t)
irc
r;, 2
J I(l
vi
e-
E, -t) ( e E, -t)
in
in
rc
2 2 (T
(T
=� dt+ � - dt
r
_
le
e - E, -t) _ ( 1 (e 2f,(T-t)
pe
ne
2 (T
irc
vi
) )
in
2f,(T
rc
le
pe
irc
vi
in
in
rc
(T
pe
ne
irc
le
pe
-------- m
irc
f, (T
r
( T - -f;
vi
in
in
rc
T
e f, e
(9.35)
( ef; (T-t) - e - -t)
r
le
1
pe
f, (T
2 k Jo e -u) - e -f;
( f, (T (T
vi
in
rc
le
In this representation, we can immediately see how the first term represents
pe
ne
irc
AC-like optimal holdings, while the second term accounts for fluctuations in
vi
in
in
trading volume. If we take the limit in which the agent penalises all strategies
rc
which do not completely liquidate her inventory, i.e. a � +oo, then ( � 1, and
le
pe
ne
irc
so
vi
in
rc
le
+ }�� k h i(u,µu,Vu) du .
o:---+oo
pe
1
Qt
ne
2
vi
in
in
rc
Next we show the optimal speed of liquidation and inventory path for the
r
le
pe
subsection 9.3.2, we assume that volume increments are due to a trading rate
vi
in
rc
le
pe
provide a general solution where we do not require a specific functional form for
ne
irc
the volume or trading rate. Thus, the next two subsections are particular cases
vi
in
in
rc
ne
irc
in
rc
p
vi
r
231
le
9.3 Percentage of Cumulative Volume
pe
irc
vi
rc
le
pe
ne
9.3.1 Compound Poisson Model of Volume
irc
vi
in
rc
In subsection 9.2.2, we motivated the volume trading rate by Figure 9.3 which
i
r
le
shows the estimate of the volurne rate of trading (per minute) for AAPL on Jan
pe
ne
irc
5, 2011 from 10:00 to 10:30. The estimate is computed by counting the volume
vi
in
rc
traded over 30 and 10 second windows and scaling the counts to one minute.
r
le
pe
As the figure shows, a reasonable first order model is one where traded volume
ne
irc
comes in bursts of activity which persists for a while (seconds for instance) and
vi
in
rc
then decays to zero. In this section we model volume of trades as a marked point
i
r
le
pe
process:
ne
irc
N,
vi
in
rc
½ = I: 11n, (9.36)
r
le
pe
n=l
ne
irc
vi
where Nt is a homogenous Poisson process with intensity .\, and { 171, 172, ... } are
in
rc
i
non-negative i.i.d. random variables, with distribution function F and finite first
r
le
pe
ne
moment, independent of Nt and of the Brownian motion driving the midprice.
irc
vi
In this case, there is no volume rate process µ,t so the value function is a function
in
rc
oft,x,S,V and q.
r
le
pe
ne
With this model for volume, the infinitesimal generator of V acts on the value
irc
vi
in
function as follows:
rc
i
r
le
(9.37)
irc
vi
in
where lE is the expectation operator with respect to the random variable 17 with
rc
le
distribution function F.
pe
ne
irc
In the previous section we derived the general form (9.30) of the optimal
vi
in
rc
strategy, with the only model dependent component stemming from the function
i
r
le
h 1 ( t, µ, V) which is, under the current model assumptions, now a function only
pe
ne
irc
le
0 (9.38)
pe
ne
irc
rc
i
r
le
h1(t,V) =J!o(t)+J!1(t)V.
pe
ne
irc
f!1(T) 0, and
rc
le
irc
vi
in
rc
i
r
le
Since the above must hold for every V, each term in the braces must vanish
pe
ne
irc
We first solve the ODE for f!1(t). As before, we use the integrating factor
r
le
pe
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
232 Targeting Volume
pe
irc
vi
rc
le
pe
ne
Next, we use the explicit expression for the integrating factor in (9.34), integrate
irc
between t and T, and use the boundary condition i\ (T) = 0 to find
vi
in
rc
i
r
le
-2i.pp
R1(t) = + e-1:,(T-t) - (-
pe
(cel:,(T-t)
ne
irc
vi
in
rc
le
pe
ne
irc
To solve for R 0 (t) we proceed as above and write
vi
in
rc
i
r
le
pe
ne
irc
Above we solved a similar ODE, so here the only new term we need to integrate
vi
in
rc
lS
r
1T efz J(h2(u)+½
le
pe
ne
irc
b) du R1(u) dv.
vi
rlt
in
((el;(T-u) + e-l;(T-u)- (- rc
i
r
T
le
2i.pp
=
pe
ne
dv.
irc
�
2;: ((ef,(T-t)- e-f,(T-t) -�(( + l)(T- t) + 1 - z)
vi
in
rc
=
r
le
pe
ne
irc
vi
rc
i
r
le
_ 2i.pm
(ef,(T-l) + e-f,(T-t) - ( - 1)
pe
ne
Ro(t) -
) - cf,(T-t)) (
irc
� (( ef,(T - t
vi
in
le
-
pe
(el;(T-t) _ e-1:,(T-t)
ne
�
irc
m
in
= --;;R1(t) + �
rc
i
e-t;(T-t) _ (ef,(T-t)
r
le
pe
ne
irc
le
pe
ne
irc
vi
in
i
r
le
pe
ne
In this section we adopt the model for trading volume rate developed in sub
irc
section 9.2.2. Recall that the cumulative volume of other market participant's
vi
in
rc
le
pe
t
ne
=l
irc
/J u du, (9.40)
vi
½
in
rc
i
r
le
pe
ne
and we assume that rate of trading /J,t is as in (9.14), which we repeat for con
irc
vi
venience:
in
rc
le
pe
ne
irc
vi
Earlier we derived the general form of the optimal strategy, with the only model
in
rc
dependent component stemming from the function h 1 (t, µ, V) which must satisfy
i
le
ne
irc
in
rc
p
vi
r
233
le
9.3 Percentage of Cumulative Volume
pe
irc
vi
rc
le
pe
ne
(9.27b). With our current modelling assumptions, the infinitesimal generator of
irc
the joint rate and trading volume acts on h 1 (t, µ, V) as follows:
vi
in
rc
i
r
le
pe
ne
irc
vi
in
where the expectation is over the random variable T/ with distribution function
rc
F. Due to the affine nature of this generator and the fact that the terminal
r
le
pe
ne
irc
vi
in
c
(9.41)
i
r
le
pe
ne
with terminal conditions €i(T) = 0 for i = 1, 2, 3. Therefore, (9.27b) reduces to
irc
vi
in
solving a system of coupled ODEs for €i(t)
c
le
r
o = EM 1 + ½ (h2 + ½b) € 1 - 2 cp p,
pe
ne
(9.42a)
irc
0 = Ot€2 + (½ (h2 + ½b) - K) €2 + € 1 ,
vi
in
(9.42b)
rc
i
r
le
pe
O
ne
irc
vi
and recall that h 2 is given by (9.28).
in
rc
To solve for € 1 we once again make use of the integrating factor technique by
le
pe
ne
irc
writing (9.42a) as
vi
in
rc
(9.43)
i
r
le
pe
ne
irc
using (9.33), integrating between t and T, and using the terminal condition
vi
in
€ 1 (T) = 0 to obtain
rc
le
pe
+ ";- -
ne
2cp p
irc
rc
i
r
le
to obtain
r
le
pe
2 cp p
€2(t) = e t< H) (T-t) _ (t<-f:,)(T-t)
ne
irc
( ( e
vi
in
rc
X ( e t<
pe
ne
K-� K+� K
irc
vi
in
Finally, since we have € 2 (t) we leave it to the reader to solve (9.42c) to obtain
c
le
er
€0 (t).
pe
irc
n
vi
in
rc
pe
ne
irc
In the previous two subsections, we analysed two modelling specifications for the
vi
in
c
le
r
pe
possible to derive a general form for the function h 1 in a quite general setting.
ne
irc
rc
i
le
ne
irc
in
rc
p
vi
r
le
234 Targeting Volume
pe
irc
vi
rc
le
pe
ne
subject to the terminal condition h1 (T, µ,V) = 0, and recall that h2 is a deter
irc
vi
ministic function of time given by (9.28). This is a linear PIDE for h1 in which
in
in
rc
r
h 2 + ½b acts as an effective discount rate and 2r.p(SJ1 - pV) is a potential (or
le
pe
ne
irc
source) term. The general solution of such an equation can be represented using
vi
the Feynman-Kac Theorem. Thus we write
in
rc
le
pe
T u
ne
irc
h1(t,µ,V) =2r.plEt,µ, V 1 exp{½ l (h2(s,µ s,Vs)+½b) ds} (SJ1-pVu)du]
[
vi
in
in
rc
r
le
{; u l +(e2i;(T -s)
t
T
pe
=
ne
2r.p lEt,µ, [ exp{ y du} (SJ1-pVu )du
irc
1t l _ (e2i;(T-s)
V
1t
vi
l
in
rc
le
Using (9.34) to compute the integral in the exponent, we can write
pe
ne
irc
T (ei;(T-u ) _ e-i; (T -u )
vi
in
rc
[1t ( (ei;(T-t) _ e-t; (T -t) )
r
le
pe
ne
irc
T
=2r.p 1 g(t,u) (SJ1-plEt,µ, V [Vu ])du ,
vi
in
rc
le
pe
where
ne
irc
(ei;(T-u) -e-i;(T -u)
vi
in
rc
(
- )
r
le
pe
ne
irc
Upon inserting this representation into the optimal strategy we arrive at the
vi
general representation for an agent who targets POCV:
in
rc
le
pe
irc
v; =( )
( ( et; (T -t) _ e-i; (T -t) Q(
vi
in
in
rc
(9.45)
e
r
le
T
1 g(t,u)(SJ1-plE [Vu I Ff, v ])du .
pe
-
ne
irc
vi
in
rc
Moreover, inserting the expression for h1 into the optimal inventory to hold
r
le
pe
ne
(9.35) we obtain
irc
vi
in
in
(et; (T -t ) _ e-i;(T -t)
rc
=
le
( )
ne
irc
(9.46)
e1
vi
t T
in
rc
v
+ g(s,u) (SJ1-plE [Vu I F;'· ]) duds .
r
le
pe
1
ne
irc
To understand the intuition behind this general result we look at the limiting
vi
in
in
rc
case in which the agent wishes full execution of all orders, i.e. in the limit a -+ oo,
r
le
to
vi
in
rc
le
pe
Q t ----+
ne
sinh((T)
irc
e Jtl{
vi
T
sinh(( (T -u))
in
in
rc
+
le
o s sinh(((T-s))
ne
irc
in
rc
p
vi
r
235
le
9.4 Including Impact of Other Traders
pe
irc
vi
rc
le
pe
ne
As the expression shows, the first term is the classical AC strategy, and the
irc
vi
second term corrects for deviations of the strategy from the POCV.
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
So far we have assumed that other traders' volume does not move the midprice,
irc
vi
but that the liquidating agent's trades do. This is somewhat inconsistent. In this
in
i
r
section, we assume that MOs from all market participants, including the agent's,
le
pe
ne
irc
vi
in
= b (µi - ( Vt + µ;:)) dt + a dWt ,
c
dSf
r
le
r
pe
ne
irc
where µ; denote the rate of trading for buy and sell MOs sent by other traders
vi
in
and Vt > 0 is the agent's liquidation rate. If the agent was acquiring shares
rc
i
r
le
then her trading rate would be added, instead of subtracted, to the drift of the
pe
ne
SDE. Moreover, b > 0 represents the permanent impact that trading has on the
irc
vi
in
sr = sr - k vt.
ne
irc
vi
in
rc
i
r
Here, we assume that the agent aims to target the rate of sell trading volume,
le
pe
ne
irc
and we leave the case of targeting cumulative volume to the reader, see Exercise
vi
E.9.3. In this case, her performance criteria is given by
in
rc
le
pe
T
ne
v 2
, S , q, [xT
, µ
vi
in
rc
i
r
le
vEA
r
le
pe
ne
Applying the dynamic programming principle suggests that the value function
irc
vi
rc
i
= (8t + ½a 2 8ss + £ 1-L ) H
r
le
0
pe
ne
irc
(9.47)
rc
le
irc
vi
in
where ,[J.L denotes the infinitesimal generator ofµ. The only difference between
rc
i
r
le
this DPE and the one for the case without impact (see (9.5)), is the term b (µ + -
pe
ne
irc
µ-) 85 H which does not directly affect the optimisation over the agent's trading
vi
in
c
v in feedback form - it will however alter the value function, and hence the
r
le
r
rc
ci
in
s, µ,q) = X + qs + h(t,µ,q)'
i
H(t,x,
le
r
ne
irc
in
rc
p
vi
r
le
236 Targeting Volume
pe
irc
vi
rc
le
pe
ne
where h now depends on both trading rates µ+ andµ-, and the terminal con
irc
dition is h(T, µ, q) = -a q2 . Inserting into the DPE above, we find that h must
vi
in
in
rc
r
le
satisfy
pe
ne
irc
vi
in
rc
2 2 9
( .4 8)
+s�p{ -kv - (oq h+bq) v- ip (v- pµ- ) }.
r
le
pe
ne
irc
Solving for the first order condition provides the optimal speed of trading in
vi
in
in
rc
feedback form as
r
le
pe
ne
-(oq h+bq)+2ippµ-
v* =
irc
(9.49)
vi
2(k+ip)
in
rc
and upon inserting into the DPE we find the non-linear equation which h should
le
pe
ne
irc
satisfy:
vi
2
in
in
= (8t +£ µ ) h+b ( µ+ - µ-) q + 4 (k�'Pl
rc
2 2
0 (oq h+bq- 2ip pµ-) - ip p ( µ -) .
r
le
pe
ne
irc
Comparing this to the case where there is no impact from other traders shown
vi
in
in 9
( .8), repeated here for convenience,
rc
2 2
(oq h+bq- 2ip pµ) - ip p µ ,
ne
( )
irc
vi
in
in
we see that the main difference is that the agent must now account for both
rc
r
le
buy and sell side trading rates, and the additional term b ( µ+ - µ-)q makes the
pe
ne
irc
agent aware of the asset's drift due to net trading in either direction.
vi
in
To solve the non-linear equation for h, we observe once again that the affine
rc
le
nature of the PDE and the terminal condition suggest the ansatz
pe
ne
irc
h(t,µ,q)
in
in
rc
pe
1
ne
irc
On inserting this ansatz, expanding the expression and collecting terms with like
vi
in
le
pe
ne
irc
9
( .50a)
vi
in
in
rc
r
le
pe
(9.50b)
ne
irc
vi
in
rc
(9.50c)
r
le
pe
ne
irc
We see that h2 which satisfies (9.50a), is the same equation as in the case
vi
in
in
rc
where we ignore the impact of other agents, and its solution is given by (9.11),
r
le
pe
-(r.;; +
vi
= 1
-½b.
in
rc
h2(t,µ) a-\b)-
r
le
pe
ne
irc
As before, this is independent of the rate of trading of other agents and cor
vi
in
in
in
rc
p
vi
r
le
9.4 incl1.1di11g Impact of Other Traders 237
pe
irc
vi
rc
le
pe
ne
9.4.1 Probabilistic Representation
irc
vi
in
In the general case, we can once again make use of a Feynman-Kac formula and
rc
i
r
le
write the solution to (9.50b) as
pe
ne
irc
T
[1
vi
in
=IEt,µ ef,' h 2 (u,µu)du {-2 ip p h2(s , µs) µ-;; + b (µt
rc
le
pe
ne
irc
where h2 (t, µt ) := k� 'P ( h2(t, µt ) + ½b). The above expression can be simplified
vi
in
rc
i
somewhat by noticing that
r
le
pe
ne
irc
(T- s ) + (
h 2 (u,µ,,)du
l
= exp {-- 1 (T-s
+_ l_ - ds } =
vi
- s
in
k+ J,t k+'P a-½b ) (T - t) + ( '
rc
'P
r
le
pe
where
ne
irc
k+ip
vi
t =
in
rc
C,
a- 21 b .
i
r
le
pe
ne
irc
Inserting this integral into the expression for h 1 above, and interchanging the
vi
in
le
1T IE(Tt-,µ [t)µ+;]( d + blT (((TT--st)+)+(() IEt,µ [ µ+s - µs-J d
pe
ne
irc
h (t µ) -
t , tp p S S.
vi
t t
in
rc
i
r
le
As the above formula shows, the first term accounts for the one-sided trades pe
ne
irc
that move in the same direction as that of the agent (i.e. sell trades), while
vi
in
the second term accounts for the imbalance in buys and sells. Both terms are
rc
le
integrated over the remaining life of the trading horizon and weight the expected
pe
ne
irc
selling / imbalance trading rate through time. The first term computes the mean
vi
in
expected future selling rate, while the second weighs the earlier trades more
rc
i
r
le
heavily - since those trades have more time in which to impact the midprice.
pe
ne
irc
Recall that the agent's optimal trading speed is given by (9.49) which, in terms
vi
in
of hi, reduces to
rc
le
pe
= - k�
ne
v; -
vi
'P 'P
in
rc
pe
ne
irc
*
= Q{ 'P - JtIE[µ;IFt]ds
vi
+ {µt -
(T - t) +( }
in
p
rc
Vt (T - t) +( k + ip
r
le
irc
__ b_ s s
vi
k + ip +(
in
(T - t)
rc
i
r
le
pe
ne
To understand the functioning of the liquidation strategy we see that the first
irc
vi
two terms are identical to the case which does not account for the impact of other
in
rc
traders, see (9.19) and discussion that follows. The new term in the second line
r
le
pe
ne
of (9.51) acts to correct her trading based on her expectations of the net order
irc
vi
flow from that point in time until the end of the trading horizon. When there
in
rc
ne
irc
in
rc
p
vi
r
le
238 Targeting Volume
pe
irc
vi
rc
le
pe
there is a surplus of buy trades, however, she slows down her trading rate to allow
ne
irc
the midprice to appreciate before liquidating the rest of her order. When there
vi
in
in
rc
is a surplus of sell orders, she speeds up her trades for two reasons: (i) because
r
le
pe
ne
she must match the POV on the sell side; and (ii) the action of other sellers
irc
in the market will push prices downwards, and therefore degrade her profits if
vi
in
rc
she waits. She therefore attempts to liquidate a larger portion of her orders now
r
le
pe
ne
irc
vi
in
in
c
r
le
pe
ne
irc
vi
in
c
le
r
pe
simple closed-form formula for the optimal liquidation speed. "\,Ve assume that
ne
irc
buy and sell trading volumes arrive independently, where each satisfies the SDE
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
where Nt± are independent Poisson processes with intensity \ and { rJf, rJt, ... }
r
le
pe
irc
trading volume, and independent of Nt± and of the Brownian motion Wt driving
vi
in
in
rc
the midprice. In this manner, the model assumes that buy/ sell trading rates are
r
le
pe
two independent jump Ornstein-Uhlenbeck (OU) process.
ne
irc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
vi
in
rc
le
pe
ne
irc
in
rc
± ± + r s e -K (s-u)
µs - e
r
dNu± ·
le
µt Jt T/1+N±
-r; (s-t)
pe
ne
irc
u-
vi
The expression for the optimal trading speed requires only the expected value
in
rc
le
of the trading rate given its current value. For this purpose, we can compute, for
pe
ne
irc
8 > t,
vi
in
in
rc
pe
ne
irc
le
= e-" (s-t)
pe
ne
rc
K K
vi
ci
in
in
Next, substituting this result into the expression for the optimal trading rate
le
r
ne
irc
in
rc
p
vi
r
le
9.5 Utility Maximiser 239
pe
irc
vi
rc
le
pe
:= T - t)
ne
(9.51) and computing the integrals there leads to (with
irc
T
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
9.5 Utility Maximiser
irc
vi
in
rc
irc
wealth but to also target POV. The setup is the same as the one described
vi
in
in Section 9.2 and the agent's preferences are described by exponential utility
rc
i
r
le
U(x) = -e-,x. If the agent ignores the POV objective, her performance criteria
pe
ne
irc
is
vi
in
rc
le
pe
ne
irc
rc
i
of the problem. One naive answer is to simply add in a penalisation as we did
r
le
pe
ne
vi
in
rc
le
J ,
pe
, , ,
ne
irc
where µt is the other agents' (selling) trading rate, 0 < p < 1 is the fraction of
vi
in
rc
the trading rate that the agent targets, and cp � 0 the target penalty parameter.
i
r
le
pe
ne
This approach, however, does not lead to analy tically tractable results. The
irc
main reason is that the exponential utility and the linear penalty are in a sense
vi
in
rc
incompatible, and, here, even the cash process does not factor out of the prob
r
le
pe
ne
rc
pe
ne
irc
=
in
rc
le
pe
irc
vi
rc
i
le
By adopting this approach, when the agent wishes to optimally liquidate shares
ne
irc
in
rc
p
vi
r
le
240 Targeting Volume
pe
irc
vi
rc
le
pe
ne
whilst targeting POV, her performance criteria is
irc
vi
in
in
rc
= lEt 5 ,µ,q [ - e-,(X;f+Q:;,(5:f-aQ:;,))
r
le
Hv (t X' S µ ' q)
pe
ne
' ' l
irc
It (vu-p
vi
in
rc
+ cp, 2
µ u) HV(u, X�, s�, µ u, Q�) du]
r
le
pe
ne
irc
vi
in
rc
r
le
pe
ne
irc
vEA
vi
in
rc
Note that the penalty term has a positive sign in front of the integral. The reason
r
le
is that H itself is negative, so that this term is indeed a penalty contribution.
pe
ne
irc
Deviations from the target POV are scaled by the value function at that time,
vi
in
in
rc
so if there is a lot of value at that point in state space, the agent is averse to
r
le
pe
moving away from POV, while if there is little value at that point in state space,
ne
irc
vi
in
rc
Applying the dynamic programming principle suggests that the value function
r
le
pe
irc
(8t + ½CT 2 055 + £, i") H
vi
in
in
rc
pe
ne
irc
vi
le
tains a supremum at
pe
ne
irc
in
z; (9.52)
rc
2
-k8 xH + 1cpH
r
le
pe
ne
irc
The form of the terminal condition suggests that we use the ansatz
vi
in
'
r
le
pe
ne
h
vi
in
in
0 = - £,I" ( e-,h)
rc
r
le
pe
ne
(bq+ oq -2cpp µ )2
irc
h (9.53)
+ (r ot - 21 CT 2 r 2q2 + r
h - ,cp P 2 µ 2) e-,h ,
vi
4( k + cp)
in
rc
le
pe
irc
h
vi
in
in
rc
r
le
vi
We assume that the rate at which other market participants are selling shares is
in
rc
le
pe
ne
irc
8 µH g(t). In this case, we can view the agent as targeting a predictable trading
vi
in
pattern, which for example, may be taken as the solid blue line in the right panel
in
rc
le
of Figure 9.2.
ne
irc
in
rc
p
9.5 Utility Maximiser 241
vi
r
le
pe
irc
vi
rc
Thus we write (9.53) in the form
le
pe
ne
irc
(8q h+b q-2c.ppµ) 1
0=(8t+ £µ) h+
vi k -c.pp 2µ2 __2 0'2 1q2 . (9.54)
in
4( +c.p)
rc
i
r
le
pe
ne
Note that (9.54) is the same as (9.8) with the extra term -½a 2 1q2 , so we
irc
vi
proceed as above and make the ansatz
in
rc
le
pe
irc
2
vi
in
rc
i
r
le
pe
ne
irc
vi
(h 1 b)
in
rc
le
pe
= L 2
ne
irc
h -2c.ppµ
0= (8t +£ µ ) ikh1 + (h2 + l2 b ) , (9.56b)
vi
in
+c.p
rc
i
1
r
le
pe
ne
0= (8t+£ µ ) ho+ k (h1-2c.ppµ) -c.pp µ, , (9.56c)
irc
4( +c.p)
2
vi
2 2
in
rc
le
pe
ne
Now observe that equation (9.56a) for h2 contains no source terms dependent
irc
vi
on µ and its terminal condition is independent ofµ, hence the solution must also
in
rc
i
be independent of /J,. The equation satisfied by h 2 is of Riccati type and can be
r
le
pe
ne
solved explicitly. We solve for h 2, see the solution of the Riccati ODE (6.25), to
irc
vi
obtain
in
rc
----1 + ( e 2 w (T-t) 1
r
le
k
pe
h2 (t) = J( +c.p) �
1 - ( e 2 w(T-t) - 2b'
ne
irc
vi
in
rc
where
i
r
le
pe
ne
irc
vi
= k and (9.57)
in
w J ! c.p '
rc
le
pe
ne
irc
rc
h1-2c.ppµ
(h2 + 12b )
i
r
le
+ c.p
ne
irc
vi
with terminal condition h 1 (T)=0. To solve this equation we look at the different
in
rc
le
irc
(9.59)
vi
in
rc
i
r
le
pe
vi
h 2 + ½b
in
1'1 - 2c.pp
rc
le
{ +c.p +c.p
pe
)}
ne
irc
Now, since this equation must hold for allµ, the terms in braces must vanish
vi
in
rc
i
le
ne
irc
in
rc
p
vi
242 Targeting Volume
le
r
pe
irc
vi
rc
le
r
individually. Therefore we must solve two uncoupled ODEs:
pe
ne
irc
h2 + ½b
vi = 8t£o - g£ 1 + (9.61)
in
in
O £0,
rc
k
le
r
+cp
- 2cpp
pe
ne
+ £ 1k
irc
0 = 8t£ 1 (h 2 + 21 b) (9.62)
vi
in
+cp
rc
We first solve (9.62) using the integrating factor technique. First we calculate,
le
r
pe
ne
irc
in a similar way to (9.33),
vi
in
in
( /<
rc
l l e2w (T-t)
J i1 ) dt = k½ J l -+ (( e
le
r
h 2(t) +
pe
ne
2w (T-t) t
V
d
irc
k + cp
vi
in
= log [e-w (T -t) _ (ew (T-t)J
rc
le
r
pe
ne
irc
Now we write
vi
in
in
d ( e ki .,
I( h2(t)+½b) dt
£ 1 ) = : e ki ., f(h2(t)+½b)dt (h 2(t) + ½b) ,
2 p
rc
le
r
pe
ne
irc
k cp
and integrate both sides between t and T:
vi
in
rc
le
r
irc
T l + ( e2w (T -u)
vi
in
in
(e-w (T-u) - ( ew (T-u)) -----
rc
= 2cppw
1 1 _ ( e2w (T-u)
du
le
t r
pe
ne
irc
£ 1 (t) 2cpp
ne
=
vi
in
in
rc
r
pe
ne
£o ) £l
vi
in
rc
le
r
irc
2cpp
vi
-w T-
£o(t) = -w ( T-t) _ (ew (T-t) 1 g(u) ((e (T-u) - e ( u) + 1- () du.
in
in
rc
T
w
t
le
r
pe
(9.63)
ne
e
irc
le
r
* =
ne
(9.64)
irc
Vt - l - ( e 2w (T-t) Qt
w +
k + cp µ t k + cp '
vi
in
in
rc
r
pe
ne
irc
In the optimal speed of liquidation we see that the first term is an AC-type
vi
in
term similar to the one derived in (6.27). The other three terms adjust the speed
rc
le
r
irc
Note that when the risk aversion parameter ry-+ 0, the agent's preferences are
vi
in
in
ne
irc
in
rc
p
vi
9.6 Bibliography and Selected Readings 243
r
le
pe
irc
vi
rc
le
pe
ne
the same as the one derived in subsection 9.2.1 for this particular choice of £.P.
irc
It is easy to see that if we set 1 = 0, the system of PIDEs (9.56) is the same as
vi
in
rc
i
the system (9.10) and h1(t) and h2(t) have the same boundary conditions.
r
le
pe
ne
irc
vi
in
rc
le
9.6 Bibliography and Selected Readings
pe
ne
irc
vi
in
rc
i
r
le
McCulloch & Kazakov (2012), Frei & Westray (2013), Gueant & Royer (2014),
pe
ne
irc
Gueant (2014), Mitchell, Bialkowski & Tompaidis (2013), Cartea & Jaimungal
vi
in
(2014a).
rc
le
pe
ne
irc
vi
in
rc
9. 7 Exercises
i
r
le
pe
ne
irc
E.9.1 Assume that the agent's objective is to liquidate 1)1 shares as in Section 9.2, but
vi
in
rc
the strategy also penalises running inventory so that her performance criteria
r
le
pe
ne
is
[
irc
vi
in
rc
i
r
x�
le
pe
ne
irc
T
l - <p l T (Q )
vi
in
rc
le
u
pe
ne
irc
vi
rc
i
r
le
l/
r
le
pe
irc
vi
rc
i
r
le
H(t, S, V, q) = q S
ne
irc
vi
in
and show that the problem reduces to solving the coupled system of PIDEs
rc
le
pe
ne
irc
(9.65a)
vi
in
rc
i
r
le
pe
(9.65b)
ne
irc
vi
in
rc
(9.65c)
r
le
pe
ne
irc
(c) Assuming that ½ satisfies (9.14), find the optimal speed of trading and
vi
in
rc
compare it to (9.17).
i
le
ne
irc
in
rc
p
vi
r
Targeting Volume
le
244
pe
irc
vi
rc
E.9.2 An agent wishes to acquire SJ1 shares by time T. Her performance criteria is
le
pe
ne
irc
vi
in
in
H (t,x,S,Y, q) = Et , x ,S,y, q [X:r + (SJ1 -Q'f )(ST+ a(SJ1 -Q'f ))
rc
r
le
v
pe
ne
irc
vi
+ tp 1 (Q� -pYu) dul
in
rc
2
r
le
pe
ne
irc
and her value function is
vi
in
in
rc
H(t,x,S,y,q) = inf H (t,x,S,y,q) ,
r
le
vEA
pe
ne
v
(9.66)
irc
vi
where Yt is the total volume purchased by other market participants, and the
in
rc
le
pe
ne
irc
dQr = Vt dt ,
vi
in
in
Qa = q,
dSf = bVt dt + a dWt , rc
sg =S ,
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
in
rc
pe
ne
(9.68)
irc
subject to terminal and boundary conditions and where _cy, V is the generator
vi
in
rc
ofy and V.
r
le
pe
ne
irc
in
rc
v* -
pe
ne
=
irc
t k 2 2k '
vi
2
in
where
rc
le
1 + ( e 2 � (T-t) 1
pe
ne
h 2 (t)
irc
-
1- ( e 2 �(T-t) i'
=�
vi
in
in
rc
t
with
r
le
pe
ne
irc
(= and
vi
in
rc
le
pe
ne
in
rc
r
le
pe
ne
irc
vi
E.9.3 Modify the problem ofoptimal liquidation described in Section 9.2 so that the
le
pe
ne
irc
liquidation rate µt takes into account the agent's trade. Derive the optimal
vi
in
in
ne
irc
in
rc
p
vi
245
r
9.7 Exercises
le
pe
irc
vi
rc
le
pe
ne
E.9.4 Assume the setup of Section 9.4 where the trading rates of the agent and other
irc
vi
traders affect the midprice. Solve the optimal liquidation problem where the
in
rc
i
agent targets POCV, that is her performance criteria is
r
le
pe
l
ne
H"(t,x,S,µ,q)
irc
vi
[x� + Q'f(S:f - o:Qf) - cp l ( (IJ1- Q�) - p Vu)
in
rc
T
= IEt,x,S.µ,q du
r
le
2
pe
ne
irc
vi
in
rc
where
i
r
le
;; du
pe
ne
la µ
irc
½ =
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
10 Market Making
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
10.1 Introduction
vi
in
rc
le
In this chapter we model how a market maker (MM) maximises terminal wealth
pe
ne
irc
by trading in and out of positions using limit orders (LOs). The MM provides
vi
in
in
rc
liquidity to the limit order book (LOB) by posting buy and sell LOs and the
r
le
control variable is the depth, which is measured from the midprice, at which
pe
ne
irc
these LOs are posted. To formalise the problem, we list the relevant variables
vi
in
rc
le
pe
ne
irc
• S (St)o<t<T, denotes the midprice, with St = S o + u Wt, u > 0 and
=
vi
in
in
= (Wt)o<t<T is a standard Brownian motion,
rc
W
r
le
• o = ( o;) o<t<T denote the depth at which the agent posts LOs; sell LOs are
±
pe
ne
irc
le
pe
irc
in
rc
• N ii, ± = ± (Nf, )
denote the controlled counting processes for the agent's
r
le
O <t<T
pe
ne
irc
le
irc
• X 6 = (Xf) 0 �T denotes the MM's cash process and satisfies the SDE
vi
in
in
9
rc
r
le
(10.1)
pe
ne
irc
vi
which accounts for the cash increase when a sell LO is lifted by a buy MO
in
rc
and the cash outflow when a buy LO is hit by an incoming sell MO,
r
le
pe
ne
in
rc
(10.2)
le
pe
ne
irc
M , must also jump; but when M , jumps, N , will jump only if the MO is
6± 6 ± 6 ±
r
le
pe
large enough to fill the agent's LO, and N 6 , ± is not a Poisson process. Moreover,
ne
irc
note that the fill rate of LOs can be written as A�, ± = >. ± e-><±li;', which is the
vi
in
in
rc
ne
irc
in
rc
p
vi
r
le
10.2 Market Making 247
pe
irc
vi
rc
le
pe
ne
To simplify notation, in the rest of this chapter we suppress the superscript
irc
vi
6 in the counting process for filled LOs, cash, and inventory. In Section 10.2 we
in
rc
i
discuss market making strategies when the MM does not face adverse selection
r
le
pe
ne
costs, and her strategy takes into account restrictions on the amount of inventory
irc
vi
she is willing to hold during the life of the strategy, as well as how costly it is to
in
rc
r
liquidate outstanding inventory at the terminal date of the strategy. In Section
le
pe
ne
irc
10.3 the agent maximises terminal utility of cash holdings. Finally, in Section
vi
10.4 we introduce various ways in which the MM faces adverse selection costs
in
rc
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
In this section we assume that the MM seeks the strategy ( b;)o -<:s-<:T that max
rc
i
r
imises cash at the terminal date T. We also assume that at time T the MM
le
pe
ne
irc
vi
in
than the midprice to account for liquidity taking fees as well as the MO walking
rc
le
the LOB. Finally, the MM caps her inventory so that it is bounded above by
pe
ne
irc
q_ > 0 and below by g_ < 0, both finite, and also includes a running inventory
vi
in
i
r
le
T
pe
+ Q}(S} - a Q}) - ¢ l
ne
irc
H (t, x, S, q)
6
= lEt,x,q,S [Xr (Qu) 2 du]
vi
in
rc
le
pe
where a 2': 0 represents the fees for taking liquidity (i.e. using an MO) as well
ne
irc
as the impact of the MO walking the LOB, and ¢ 2': 0 is the running inventory
vi
in
rc
i
r
le
pe
ne
6
irc
o ±EA
in
rc
le
irc
from below.
vi
in
i
r
le
+ +
+.\+ sup {e_" o (H(t,x +(S +3 + ), q - 1, S) - H)} ]_ q>-q
r
le
pe
o+ (10.4)
ne
irc
�{
in
rc
i
r
le
pe
ne
vi
= x + q(S - aq).
in
H(T, x, S,q)
rc
(10.5)
r
le
pe
ne
Recall that the set of admissible strategies imposes bounds on qt, so that when
irc
qt = q_ (q) the optimal strategy is to post one-sided LOs which are obtained by
vi
in
rc
solving (10.4) with the term proportional to .\- (.\+ ) absent as enforced by the
le
ne
irc
in
rc
p
vi
Market Making
r
248
le
pe
irc
vi
rc
le
pe
ne
indicator function ]. in the DPE. Alternatively, one can view these boundary
irc
cases as imposing J- = +oo and o + = +oo when q =q and q_ respectively.
vi
in
in
rc
Intuitively, the various terms in the DPE equation represent the arrival of MOs
r
le
pe
ne
that may be filled by LOs together with the diffusion of the asset price through
irc
the term ½0" 2 8ssH, and the effect of penalising deviations of inventories from
vi
in
rc
zero along the entire path of the strategy which is captured by the term ¢q 2 . In
r
le
pe
ne
irc
the second line of the DPE the sup over o + contain the terms due to the arrival
vi
in
in
of a market buy order (which is filled by a limit sell order), and here we see the
rc
r
le
change in the value function H due to the arrival of the MO which fills the LO,
pe
ne
irc
so that cash increases by (S+o+ ) and inventory decreases by one unit. Similarly,
vi
in
in the last line in the DPE the sup over J- contain the analogous terms for the
rc
le
market sell orders which are filled by limit buy orders.
pe
ne
irc
To solve the DPE we use the terminal condition (10.5) to make an ansatz for
vi
H. In particular, we write
in
in
rc
r
le
pe
ne
(10.6)
irc
vi
in
rc
which has a simple interpretation. The first term is the accumulated cash, the
r
le
pe
second term is the book value of the inventory marked-to-market (i.e. the value
ne
irc
of the shares at the current midprice), and the last term is the added value from
vi
in
in
rc
pe
We proceed by substituting the ansatz into (10.4) to obtain
ne
irc
vi
¢q 2
rc
le
o+
pe
(r + h(t,q + 1) -h(t,q))}
ne
+>.- s� {e_"'_ 0_
irc
li q <q,
vi
in
in
rc
(10.7)
r
le
le
pe
(10.8a)
irc
"'
vi
in
in
1
rc
K,-
pe
ne
irc
and the boundary cases are o + ,*(t,q) = +oo and J-,*(t,q) = +oo when q = q
vi
in
rc
and q_ respectively.
r
le
pe
ne
To understand the intuition behind the feedback controls we first note that
irc
the optimal o ± can be decomposed into two components. The first component,
vi
in
in
rc
1 / "' ± , is the optimal strategy for a MM who does not impose any restrictions on
r
le
pe
The second component, the term -h(t,q-1) + h(t,q), controls for inventories
vi
in
rc
through time. As expected, if inventories are long, then the strategy consists in
r
le
pe
ne
irc
posting LOs that increase the probability of limit sell orders being hit. Moreover,
vi
the function h(t,q) also induces mean reversion to an optimal inventory level,
in
in
rc
le
in
rc
p
vi
r
le
10.2 Market Making 249
pe
irc
vi
rc
le
pe
ne
horizon and the strategy approaching T as well as the other parameters of the
irc
vi
model, including ¢.
in
rc
i
Substituting the optimal controls into the DPE we obtain
r
le
pe
a
ne
1 +
irc
vi
+ e-1,\-e-K-(-h(t,q + l) + h(t,q))]. q<q (10.9)
in
rc
-_
r K- ·
le
pe
ne
irc
vi
rc
i
r
le
pe
It is possible to find an analytical solution to the DPE if the fill probabilities of
ne
irc
LOs are the same on both sides of the LOB. In this case, if K. =r,; + = r,;- then
vi
in
rc
write
r
le
pe
ne
irc
K,
vi
in
rc
and stack w(t,q) into a vector
i
r
le
pe
ne
irc
vi
in
rc
Now, let A denote the (q-!I+ 1)-square matrix whose rows are labelled from q
r
le
pe
ne
i = q'
in
-cpr;;q2)
rc
i
r
le
\+ e -1 i=q-1 ,
pe
ne
/\-e-1'
irc
A·i,q-
- { .A (10.10)
, i=q+l,
vi
in
rc
0, otherwise ,
r
le
pe
ne
2
irc
i
r
le
3tw(t) + Aw(t) = 0.
pe
ne
irc
vi
in
I I
The solution of this matrix ODE is straightforward and we finally have,
rc
le
pe
(10.11)
irc
vi
in
.•)
i
r
le
pe
vi
in
rc
le
irc
vi
F igure 10.l shows the behaviour of the optimal depths as a function of time
in
rc
for different inventory levels. In the examples the arrival rate of MOs is A ± =1
i
r
le
pe
-q =3,and¢=10- 5
ne
- 4
vi
in panel (a), and¢= 2 x 10 in panel (b). In the left of pa;el (a) we show the
in
rc
optimal sell postings J + , i.e. upon the arrival of a market buy order the MM is
r
le
pe
ne
willing to sell one unit of the asset at the price St+J + , and in the right of panel
irc
vi
(a) we show the optimal buy postings J + . For example, when the strategy is far
in
rc
away from expiry and inventories are close to the allowed minimum, the optimal
le
ne
irc
in
rc
p
vi
250 Market Making
r
le
pe
irc
vi
rc
le
pe
ne
0.02�------- --�
irc
0.02
vi
in
rc
q=2
i
�0.015
r
� 0.015
le
pe
ne
q=l
irc
..q ..q
-----q= o----"'-l .µ
p. 0.011--- 0.. 0.01
vi
q=l-------72
in
w ©
rc
q r q
le
5' 0.005
pe
ne
� 0.005
m
irc
00 q=3------
vi
in
rc
0 0
i
r
le
o 10 20 30 0 10 20 30
pe
ne
Time (secs) Time (secs)
irc
(a) ¢, = 10-5
vi
in
rc
le
pe
ne
0.02
irc
q=2
vi
in
rc
�0.015 � 0.015
i
q=-1------
r
q= 1
le
pe
ne
� = o---
irc
-----q ..q
.µ q=O
0.. 0.01 0.. 0.01
vi
© q = -1
in
©
q
rc
q
r
� 0.005
>------q = 2
5' 0.005 le
pe
m
ne
00
irc
q=3------ q = -3
vi
in
rc
i
10 20 30 0 10 20 30
r
le
Time (secs)
pe Time (secs)
ne
irc
(b) q, = 2 X 10-4
vi
in
rc
le
pe
Figure 10.1 The optimal depths as a function of time for various inventory levels and
ne
irc
i
r
le
pe
ne
irc
vi
in
rc
sell posting is furthest away from the midprice because only at a very 'high' price
r
le
pe
is the MM willing to decrease her inventories further, and at the same time the
ne
irc
optimal buy posting is very close to the midprice because the strategy would like
vi
in
rc
pe
We also observe that as the strategy approaches T and qt < 0 (qt > 0),
vi
in
rc
the optimal sell (buy) depth J+ ( J-) decreases (increases). To understand the
r
le
pe
ne
intuition behind the optimal strategy note that if the terminal inventory qy < 0
irc
vi
rc
being fractions of a second away from expiry, it is optimal to post nearer the
r
le
pe
ne
midprice to increase the chances of being filled (i.e. selling one more unit of the
irc
vi
asset) because the price is not expected to move too much before expiry and the
in
rc
entire position will be unwound at the midprice - making a profit on the last
r
le
pe
ne
It is also interesting to see that the optimal strategy induces mean reversion
rc
in inventories. For example, if qt = 2 then the sell depth is lower than the buy
i
le
ne
irc
in
rc
p
vi
r
le
10.2 Market Making 251
pe
irc
vi
rc
le
pe
ne
lo+ Buy
irc
25
Sell
vi
in
in
rc
's; 20
r
le
pe
ne
0
irc
<l.l 15
�
vi
0
in
-
rc
$ 10 0
. .
r
le
C1l
pe
0
ne
irc
5 0 0
0
�
0
0
vi
0
0
in
in
0
28�
r
le
-10 -5 0 5 10 -5 0 5 10
pe
Inventory (q) Inventory (q)
ne
irc
vi
in
c
le
q = -i = 10, a= 0.0001, a= o.m, So= 100, and¢= {2 X 10- 3, 10- 3, 5 X 10- 4}.
r
pe
ne
irc
vi
in
in
rc
r
le
depth, 5 + < 5-, so that it is more likely for the strategy to sell, than to buy, one
pe
ne
irc
unit of the asset. This asymmetry in the optimal depths is what induces mean
vi
in
reversion to zero in the inventory. Moreover, in panel (b) the strategy's running
rc
inventory penalty is much higher and it is clear that the higher¢ is, the quicker le
pe
ne
irc
inventories will revert to zero.
vi
in
in
We also see that the strategy 5 d (t, q) induces mean reversion in inventories,
rc
r
le
in the arrival rates of filled orders. Thus, given the pair of optimal strategies
vi
in
rc
le
pe
ne
irc
1
µ(t, q) � lim - -lE [Q s - Q t I Q t - = q]
vi
in
in
s .j. t S - t
rc
(10.12)
r
le
e
irc
vi
in
rc
Note that the drift µ(t, q) depends on time. For instance, it is clear that for the
r
le
pe
same level of inventory the speed will be different depending on how near or far
ne
irc
the strategy is from the terminal date, because at time T the strategy tries to
vi
in
in
rc
pe
ne
Figure 10.2 shows the optimal level of inventory to which the strategy reverts,
irc
where we assume that we are far away from T - t--+ oo in (10.12). The model
vi
in
c
le
er
pe
and we vary the running penalty¢= { 2 � 10-3, 10-3, 5 x 10-4}. Note that for
irc
n
vi
the set of parameters we are using here it suffices to be a few seconds away from
in
in
rc
the terminal date so that the optimal postings are not affected by the proximity
r
le
pe
ne
to T. In the left panel of the figure we plot the fill rate probabilities of both sides
irc
± ± <<
of the LOB which are given by ,\±e-"' 0 ,q),•. Blue circles and blue crosses are
vi
in
c
the fill rate probabilities for the sell side and buy side of the LOB respectively
r
le
r
pe
ne
when¢= 2 x 10-4.
irc
vi
Figure 10.3 shows the inventory and price path for one simulation of the strat
in
in
rc
egy. The model parameters are,\± = 1, i,; ± = 100, q = -<]_ = 10, ¢= 2 x 10-4,
le
ne
irc
in
rc
p
vi
r
le
252 Market Making
pe
irc
vi
rc
le
pe
ne
irc
10
100.14
vi -
in
in
�
rc
r
le
5 � 100.12
�
pe
ne
irc
....>, Cl)
100.1
-�0..
vi
0
.,_,'1
in
rc
le
Cl)
:Q 100.08
::E
pe
�
ne
....... -5
irc
100.06
vi
in
in
rc
-10
r
le
pe
ne
irc
vi
in
rc
Figure 10.3 Inventory and midprice path. Model parameters are: >, ± = 1, 11: ± = 100,
r
le
q = -1_1 = 10, ¢ = 2 x 10- 4, a= 0.0001, (]' = 0.01, So= 100.
pe
ne
irc
vi
in
in
rc
r
a = 0.0001, O' = 0.01, So = 100. In the left panel we see how the inventory
le
pe
ne
irc
is mean reverting to zero and for this particular path we see that although the
vi
in
rc
maximum and minimum amount of inventory that the strategy is allowed to hold
r
le
pe
is 10, it never goes beyond five units of the asset short or long.
ne
irc
The right panel of Figure 10.3 shows a window of the midprice path along
vi
in
in
rc
with MM's buy and sell LOs. Solid circles in the figure show the incoming MO's
r
le
pe
which are filled by the MM's resting LOs (a red circle is a sell MO filled by
ne
irc
the MM's buy LO and a blue circle is a buy MO filled by the MM's sell LO)
vi
in
rc
and grey circles represent MOs that were filled by other market participants.
r
le
pe
The distance between the midprice and the MOs that arrive shows how far the
ne
irc
MOs are walking into the LOB. At the beginning of the window, the agent's
vi
in
in
rc
inventory is zero and we observe that the strategy acquires two units (one at
r
le
pe
ne
185.3s and another at 187.5s) before the first sell order (at 187.8s) is filled and
irc
vi
then closed out an instant later (at 187.9s). After the first filled buy order the
in
rc
strategy remains asymmetric and the agent posts closer to the midprice on the
r
le
pe
ne
sell side of the book, compared to the buy side of the book, to rid herself of her
irc
vi
inventory. At 189s, 190.2s, 190.8s, 191.ls and 191.9s, a sequence of sell orders
in
in
rc
is filled and the agent holds a short position of 2 assets after the last sale at
r
le
pe
ne
191.9s. Her strategy is therefore to post closer to the midprice on the buy side
irc
vi
of the book to increase her chance of unwinding her position. These shifts in her
in
rc
posts, which induce the unwinding of any inventory she acquires (long or short),
le
pe
ne
irc
Now we turn to discussing the financial performance of the strategy. The left
in
in
rc
r
le
panel of Figure 10.4 shows the profit and loss (P &L) of the optimal strategy and
pe
ne
irc
the right panel shows the lifetime inventory for different running penalty param
eters ¢ = { 10- 5, 5 x 10- 5, 10- 3, 10- 2}. We observe that when ¢ increases the
vi
in
rc
le
histogram of P &L shifts to the left because the strategy does not allow inventory
pe
ne
irc
positions to stray away from zero, and hence expected profits decrease. The life
vi
in
in
time inventory histogram shows how much time the strategy holds an inventory
rc
of n. For example, when ¢ = 10- 2 we know that the strategy heavily penalises
le
ne
irc
in
rc
p
vi
10.2 Market Making
r
le
253
pe
irc
vi
rc
le
pe
ne
irc
2500 10
•1>=10-5 4 •1>= 10-5
vi
Def>= 5 x 10- Def>= 5 x 10-•
in
in
rc
2000 •1>= 10-32 8
-1>=10-32
r
le
� =10- � -1>= 10-
pe
ne
i:i </>
irc
1500 6
vi
Q) Q)
in
rc
O'
g' 1000 4
r Q)
le
� �
pe
ne
irc
500 2
vi
in
in
rc
0
r
le
pe
ne
Profit and Loss Lifetime Inventory (Q t )
irc
vi
in
rc
le
Figure 10.4 P&L and Life Inventory of the optimal strategy for 10,000 simulations.
pe
ne
The remaining model parameters are: >. ± = 1, ,-,; ± = 100, q = -q- = 10, a= 0.0001,
irc
vi
in
rc
r
le
pe
ne
irc
deviations of running inventory from zero, so the strategy spends most of the
vi
in
rc
le
pe
smaller, the strategy spends more time at levels away from zero.
ne
irc
vi
in
in
rc
r
le
vi
in
If we assume that the MM does not penalise running inventories, does not pick
rc
le
pe
ne
irc
on the amount of inventory the strategy may accumulate, i.e l_q_l, q---+ oo, then
I =�·I
vi
in
in
the MM's strategy simplifies to
rc
r
le
pe
ne
irc
le
pe
This optimal strategy tells the MM to post in the LOB so that the probability
ne
irc
of the LOs being filled is maximised. To see this we observe that if there are
vi
in
in
no penalties for liquidating terminal inventory, by assuming a = 0 the termi
rc
r
le
pe
nal inventory is unwound at the midprice, and there is no running penalty for
ne
irc
+ q s + h(t).
r
H(t, x, q, S) =
le
(10.14)
pe
X
ne
irc
vi
This is similar to the one proposed above, see (10.6), but here h(t) does not de
in
in
rc
pend on q because the MM does not pose any restrictions on inventory through
r
le
pe
ne
irc
out the life of the strategy and can liquidate terminal inventory at the midprice.
vi
le
pe
(10.15)
irc
vi
in
in
rc
ne
irc
in
rc
p
vi
r
le
254 Market Making
pe
irc
vi
rc
le
pe
ne
irc
Furthermore, we can show that
vi
in
in
(,,\+ + >,-) (T - t).
rc
h(t) = e- 1 K:+ K:-
r
le
pe
ne
irc
vi
This result is simple to interpret. An MM who does not penalise inventories
in
rc
le
and who unwinds terminal inventory at the midprice, will make markets by max
pe
ne
irc
imising the probability of her LOs being filled at every instant in time regardless
vi
in
in
of the inventory position or how close the terminal date is. Therefore, the MM's
rc
r
le
pe
ne
irc
vi
± ±
in
5 ± e-" ,5 . The first order condition of this optimisation problem is
rc
le
pe
ne
(10.16)
irc
vi
in
in
rc
so the optimal depths are as in (10.13).
r
le
pe
ne
irc
vi
Market Making At-The-Touch
in
10.2.2
rc
le
pe
In very liquid markets, most orders do not walk the book and instead tend to
ne
irc
only lift or hit LOs posted at-the-touch. To capture this market feature, in this
vi
in
in
rc
section we investigate the agent's optimal postings at-the-touch, i.e. at the best
r
le
pe
ne
bid and best ofter. Throughout we assume that the spread is constant and equal
irc
to 6.. Next, let fi} E {O, 1} denote whether the agent is posted on the sell side
vi
in
rc
( +) or buy side ( -) of the LOB. In this way, the agent may be posted on both
r
le
pe
ne
sides of the book, only the sell side, only the buy side, or not posted at all. Her
irc
vi
performance criteria is
in
in
rc
r
le
pe
ne
irc
vi
in
rc
irc
dXt£
in
in
2 2
rc
r
le
pe
where Nt±, £ denote the counting process for filled LOs. We also further assume
ne
irc
that, if she is posted in the LOB, when a matching MO arrives her LO is filled
vi
in
rc
with probability one. In this case, Nt± , £ are controlled doubly stochastic Poisson
>, .
r
processes with intensity £t ± Finally, at the terminal date any open inventory
le
pe
ne
irc
position is liquidated using an MO and the price obtained per share is the best
vi
in
in
rc
bid (Qr > 0) or offer ( Qr < 0) and picks up a penalty c.p Q}, with c.p 2 0, which
r
le
pe
ne
includes market impact (walking the LOB) and liquidity taking fees.
irc
vi
As before, the set A of admissible strategies are F-predictable such that the
in
rc
agent is not posted on the buy (sell) side if her inventory is equal to the upper
r
le
pe
ne
in
rc
le
£EA
ne
irc
in
rc
p
vi
10.2 Market Making 255
r
le
pe
irc
vi
rc
le
pe
ne
The Resulting DPE
irc
Applying the DPP, we find the agent's value function H should satisfy the DPE
vi
in
in
rc
r
le
0 =(at+ ½o- 2 8ss )H-<J>q 2
pe
ne
irc
vi
+A + max {(H(t,x
in
rc
r e+E{O,l}
le
pe
+>--
ne
irc
£-E{O,l}
vi
in
in
c
subject to the terminal condition
r
le
pe
ne
irc
vi
in
c
le
The various terms in the DPE carry the following interpretations:
r
pe
ne
irc
the first line in the DPE represents the diffusive component of the midprice
vi
®
in
in
rc
and the running inventory penalisation,
r
le
pe
ne
e the maximisation terms represent the agent's control to post or not on the
irc
vi
sell or buy side of the LOB,
in
rc
the maximisation term in the second line represents the change in value func
r
le
pe
ne
tion, if the agent is posted, due to the arrival of an MO which lifts the
irc
vi
agent's offer,
in
in
rc
r
le
The terminal condition once again suggests the ansatz which splits out the ac
vi
in
rc
cumulated cash, the book value of the shares marked-to-market at the midprice,
r
le
pe
ne
and the added value from optimally making markets throughout the remaining
irc
in
rc
X
pe
ne
irc
and on substituting this ansatz into the above DPE we find that h satisfies
vi
in
rc
= 0th-
r
le
0 cf>q 2
pe
ne
irc
+ ,>. + max {(£ +%- + [h(t, q-£ +)- h(t, q)l)}]_ q>-q
vi
£+E{O,l}
in
in
rc
£-E{O,l}
irc
vi
in
le
pe
h(T, q) = -q (%- + cp q)
ne
irc
vi
in
in
rc
The form of the optimising terms allows us to characterise the optimal postings
r
le
in a compact form. When R. = 0 both terms that are being maximised are zero,
pe
ne
irc
le
f_ + ,*(t q) - ]_
pe
rc
(10.17)
vi
r,*(t q) -
ci
in
in
]_
' - {%- + [h(t,q+l)-h(t,q)J>O}n{q<q}
le
r
ne
irc
in
rc
p
vi
r
le
256 Market Making
pe
irc
vi
rc
le
pe
ne
irc
20
vi
20f----,_
in
rc
sell
i
r
le
10
pe
ne
irc
vi
�
in
0 buy / sell
rc
Q) r
le
pe
ne
irc
-10
-20I,---__,...
vi
in
buy
rc
i
-20 �--- _ _ ___ - -30L--�-- --=========.J
r
le
-o -�3 _ 300
pe
0 100 20 00 0 100 200
ne
irc
vi
in
rc
le
Figure 10.5 The optimal strategy for the agent who posts only at-the-touch.
pe
ne
irc
vi
in
rc
i
r
le
The interpretation of this result is that the agent posts an LO on the appropriate
pe
ne
irc
side of the LOB by ensuring that she only posts if the arrival of an MO, which
vi
in
hit/lifts her LO, produces a change in her value function larger than -�.
rc
le
pe
ne
irc
vi
in
Strategy Features
rc
i
r
le
pe
Next, we illustrate some typical features of the optimal solution to gain some
ne
irc
insight into the optimal strategy. For this purpose we use the following set of
vi
in
rc
model parameters:
r
le
pe
ne
irc
vi
T = 300 sec,
in
300 '
i
r
le
pe
ne
vi
in
rc
Note that the rate of arrival of market orders is chosen so that on average the
r
le
pe
ne
agent's upper/lower inventory bounds are no more than 20% of the market.
irc
vi
Figure 10.5 shows how the agent's optimal posting varies with time and the
in
rc
i
r
running penalty. The left panel explicitly shows that the agent posts only sell LOs
le
pe
ne
whenever her inventory is very high, and only buy LOs whenever her inventory is
irc
vi
very low. In the central region, she posts both buy and sell LOs. In this manner,
in
rc
le
the agent's inventory is constrained to remain within one unit of the green region
pe
ne
irc
- once her inventory escapes she posts only on one side of the book thus pushing
vi
inventory back into the green region. We therefore see that despite the agent
in
rc
i
r
le
allowing herself to hold up to 20 units of the asset, long or short, the running
pe
ne
irc
penalty constrains her strategy. Furthermore, note that as the running penalty
vi
in
increases, the region over which the agent constrains her inventory shrinks, and
rc
le
eventually reaches the point at which she only takes on one single unit of the
pe
ne
irc
Later, in subsection 10.4.2 we see how the agent modifies her strategy to
rc
i
le
in
rc
p
vi
r
le
10.2 Market Making 257
pe
irc
vi
rc
le
pe
ne
10.2.3 Market Making Optimising Volume
irc
vi
in
rc
In the previous sections, when the agent posts an LO, she is assumed to be
i
r
le
pe
placing a single order. This single order can be thought of as the typical order
ne
irc
size of, say, 100 shares. The agent may, however, wish to optimise the posted
vi
in
rc
le
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
vi
in
= (St +%)ct dNt, c -(St - %) c; dNt-, c '
rc
dXf
r
le
pe
ne
irc
where C;- are F-predictable such that
vi
in
rc
i
r
Ct E { 0, 1, 2, ,..., qt - -_q_} and
le
pe
ne
irc
vi
and Nt± , c denote the counting processes for her filled LOs - not accounting for
in
rc
the volume traded (i.e. it only counts whether an MO arrived and filled her
le
pe
ne
irc
posted LO). The restrictions on the volume ensure that the agent never posts a
vi
volume which, if filled, would send her inventory outside of her allowed trading
in
rc
i
r
le
bounds. We further assume that if she is posted in the LOB when a matching
pe
ne
irc
le
this case, Nt± , c are controlled doubly stochastic Poisson processes with intensity
pe
ne
irc
p(C;-) _>_ ± ]e±>o· In this formulation, we have further assumed that if the agent
vi
in
makes a post of a given volume, the entire volume is matched or none at all
rc
i
r
le
is matched. The approach here can be generalised to account for partial fills of
pe
ne
irc
As before, the set A of admissible strategies also restricts her so that the
rc
le
strategy does not post on the buy (sell) side of the LOB if her inventory is equal
pe
ne
irc
to the upper (lower) inventory constraints q (_q_). Her value function is denoted
vi
in
rc
by
i
r
le
pe
CEA
vi
in
rc
le
pe
irc
This analysis is similar to that of the previous section, except now the set of
vi
in
rc
strategies allows the agent to post multiple volumes. In this case, applying the
i
r
le
DPP we find the agent's value function H should satisfy the DPE
pe
ne
irc
2
rc
le
pe
irc
£+E{O,l,...,q-9.}
vi
in
+ _>_- £-E{O,l,
max_ {p(C-)(H(t,x-(S- ]q <q,
i
le
...,q-q}
ne
irc
in
rc
p
vi
258
r
Market Making
le
pe
irc
vi
rc
le
pe
ne
irc
20 20
vi
in
in
rc
7
r
le
6
pe
10 10
ne
irc
vi
in
rc
r 0
le
<J)
pe
3
ne
irc
-10
vi
in
in
rc
r
le
pe
ne
5 10 10
irc
5
Time Time
vi
in
c-
rc
le
pe
ne
irc
Figure 10.6 The optimal volume postings for the agent who posts only at-the-touch.
vi
in
in
rc
r
le
pe
ne
subject to the terminal condition
irc
vi
= x+q (S- (% +cpq))
in
H(T,x,S,q)
rc
le
pe
ne
irc
With the exception that the maxima are computed over the set of allowed vol
vi
in
in
umes and cash jumps accordingly, this non-linear PDE is identical to the one
rc
r
le
derived in the previous section when the agent did not optimise over the vol
pe
ne
ume of the LOs. The terminal condition suggests the usual ansatz H(t, x, S,q) =
irc
vi
x + q S + h(t, q) which splits out the accumulated cash, book value of the inven
in
rc
le
tory marked-to-market using the midprice, and the added value from optimally
pe
ne
irc
in
into the DPE we find that h satisfies
rc
r
le
0 = 0th - </Jq2
pe
ne
irc
max {p(f!+ ) (£ + +
in
q>-
rc
q
f+E{O,l, ...,q -_q)
r
+r
pe
ne
max - q <q )
irc
£-E{O,l,... ,q-q}
vi
in
in
rc
pe
ne
= -q (% +cpq)
irc
h(T,q)
vi
in
rc
le
Strategy Features
pe
ne
irc
Figure 10.6 shows the agent's optimal volume postings at-the-touch using the
vi
in
in
rc
pe
ne
vi
in
le
¢=10- 3.
pe
p(f!)=e-oou, and
ne
irc
vi
in
in
Notice that the posted sell volume increases as inventory increases, while the
rc
le
posted buy volume increases as inventory decreases. Furthermore, there are large
ne
irc
in
rc
p
vi
r
le
10.3 Utility Maximising Market Maker 259
pe
irc
vi
rc
le
pe
ne
irc
vi
8
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
-10 0 10 20 -10 0 10 20
ne
irc
Inventory Inventory
vi
in
rc
Figure 10.7 The optimal volume postings (at t = 0) for the agent who posts only
r
le
pe
at-the-touch. The left panel has ¢ = 10-3 and the right panel shows only £ + .
ne
irc
vi
in
in
rc
r
le
pe
ne
regions where the agent is posted only on one side of the LOB. Figure 10.7 shows
irc
vi
the asymptotic optimal volume postings at the start of trading. The left panel
in
rc
shows both the buy and sell postings when¢= 10- 3, while the right panel shows
r
le
pe
ne
how the postings vary when¢ varies for the sell side of the book. For</> = 10- 3,
irc
vi
the agent stops posting limit sell orders when her inventory is at or below -7
in
in
rc
r
le
and stops posting limit buy orders when her inventory is at or above +7. As the
pe
ne
irc
right panel in Figure 10.7 shows, the critical level below which the agent stops
vi
posting moves towards zero inventory as the inventory penalisation parameter
in
rc
le
¢ increases. With¢= 0.1, the agent will withdraw from the market and simply
pe
ne
irc
in
Interestingly, the agent's posted volume is typically not sufficient to draw her
rc
r
le
inventory back to zero. For example, when</>= 10- 3 and her inventory is 10, she
pe
ne
irc
will post only a sell LO for 7 units, which once filled, will draw her inventory
vi
in
down to 3. At this point, she will post a sell LO for 5 units and a buy LO for 3
rc
le
irc
vi
in
in
rc
r
le
pe
ne
irc
le
pe
ne
irc
In the previous section, the agent was indifferent to uncertainty in the cash value
vi
of her sales and instead maximised expected profit from making markets subject
in
in
rc
r
le
to inventory controls. Some agents, however, may instead wish to penalise un
pe
ne
irc
certainty in their sales directly. Here, we show that if the agent uses exponential
vi
in
le
and a re-scaling of parameters) to the one implied by the running penalty studied
pe
ne
irc
in Section 10.2.
vi
in
in
To this end, suppose the agent sets preferences based on expected utility of ter
rc
le
minal cash with exponential utility u(x) = -e-,x. In this case, her performance
ne
irc
in
rc
p
vi
r
260 Market Making
le
pe
irc
vi
rc
le
pe
ne
criteria is
irc
vi
in
in
G 8 (t, x, S, q) = lEt,x,S,q [-exp {-1 (xi+ Qi (Sr - a Qi))}]
rc
r
le
pe
ne
irc
vi
in
rc
le
iiEA
pe
ne
irc
will satisfy the DPE
vi
in
in
rc
r
le
( Ot + ½o- 2 8ss)G
pe
ne
irc
+ +
+>..+ sup{e-h: r5 [G(t,x+(S+5+ ),S,q-l)-G] ]_ q >.2.}
vi
in
rc
o+
r
le
+>..- sup{e-h:- r5- [G(t,x-(S -5-),S,q+l)-G] ]_ q<cz }
pe
ne
irc
r5-
= 0,
vi
in
in
rc
G(t,x, S, 0) = -e-,x ,
r
le
pe
ne
G(T,x,S, q)
irc
vi
in
rc
le
pe
ne
= -e-,(x+q S+ g(t,q))
irc
G(t,x,S,q)
vi
in
in
rc
pe
ne
irc
+ (o + +9 (t,q-l)-g(t,q))
0 + l- e-,
vi
Otg - ½o- 2 1 q2 +sup >.. + e-h:
in
rc
o+ 1
r
le
(10.18)
pe
+
_ 0 _ 1 _ e-, r5- (t,q+l)-9 (t,q))
ne
(
irc
9
+sup >..- e-h: =0 ,
vi
----------
in
in
o- t
rc
r
le
pe
vi
in
le
pe
ne
From the first order condition, we find that the optimal depths, in feedback
irc
vi
in
rc
r
le
pe
1
ne
8*,+ q) q > q,
vi
t K-
in
(10.19)
rc
1
:y
8*, - = log ( 1+ 1,,1 ) +g(t, q) - g(t, q+l) ,
r
le
q <q.
pe
ne
-
irc
vi
in
in
rc
This form is very similar to, but slightly differs from, the optimal depth in the
r
le
previous section provided in (10.8). The g function may differ from h and the
pe
ne
irc
base line level (1,, ± )-1 is modified to (R; ± )-1 =�log (1+�).This modification
vi
in
rc
can be seen as a risk aversion bias. Indeed, in the limit of zero risk-aversion
r
le
pe
ne
irc
vi
in
in
rc
ne
irc
in
rc
p
vi
r
le
10.4 Market Making with Adverse Selection 261
pe
irc
vi
rc
le
Substituting this feedback form into (10.18), we now find the non-linear ODE
pe
ne
irc
vi
in
rc
-
�+ + �- = 0,
i
K:+
r
le
K:
pe
ne
irc
where
vi
in
rc
le
pe
ne
irc
In the limit of zero risk-aversion�± ,t e- 1 >, ± = 5'± and once again we recover
vi
in
rc
the parameter that appears in (10.9). The above ODE is in fact identical in
i
r
le
pe
ne
irc
vi
in
1'
Ao = e+ A , and K:o = K: ,
rc
le
pe
ne
irc
where the subscript O denotes the parameters to use in the base model from
vi
in
the previous section, we see that h(t,q) and g(t,q) will coincide and the optimal
rc
i
r
le
pe
ne
irc
vi
(10.20)
in
rc
le
pe
In other words, with a re-scaling of model parameters, the optimal strategy for
ne
irc
the utility maximising agent is the same, up to a constant shift, as that of the
vi
in
rc
i
r
le
pe
In addition to the relationship between the optimal strategies, the value func
ne
irc
tions can be written in terms of one another. Since h(t, q) = g(t, q), we have
vi
in
rc
le
'
pe
H(t,x,S,q) = -- log(-G(t,x,S,q)) ,
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
8EA lo (10.21)
r
le
pe
ne
1 8EA
vi
in
rc
i
r
le
This relationship between the value functions is in fact part of a more general
pe
ne
irc
le
pe
ne
irc
vi
in
rc
pe
ne
irc
The market place is populated by traders that come to the market for different
vi
in
rc
reasons and with varying degrees of information. One of the most important
r
le
pe
risks faced by MMs is adverse selection risk. As discussed in Chapter 2 (see for
ne
irc
example Sections 2.2 and 2.3), when trading with informed market participants
vi
in
rc
the MM is exposed to having a sell limit order (LO) filled right before prices
i
le
ne
irc
in
rc
p
vi
r
le
262 Market Making
pe
irc
vi
rc
le
pe
ne
go up, or a buy LO filled before prices go down. In this section we extend the
irc
vi
market making problem developed in Section 10.2, and present two ways in which
in
in
rc
r
midprice dynamics incorporate adverse selection effects. In the first model we
le
pe
ne
irc
assume that the midprice undergoes jumps in the direction of incoming market
vi
orders (MOs). In the second specification the midprice's drift has a short-term
in
rc
le
alpha component which is affected by the arrival of MOs.
pe
ne
irc
vi
in
in
c
r
le
pe
Impact of Market Orders on Midprice
ne
10.4.1
irc
vi
in
c
le
r
pe
ne
irc
(10.22)
vi
in
in
rc
r
le
where M;t- and Mt- are Poisson processes, with intensities .A + and .>-- respec
pe
ne
irc
tively, which count the number of buy ( +) and sell ( -) MOs. Every time an MO
vi
in
rc
arrives, the midprice will undergo a jump of size E ± which are i.i.d. and whose
r
irc
Intuitively, here we can view the dynamics of the midprice as the sum of two
vi
in
in
rc
components. The first component, the Brownian motion on the right-hand side
r
le
pe
ne
of (10.22), captures the changes in the midprice that are due to information flows
irc
that reach all or some market participants who subsequently update their quotes.
vi
in
rc
The other component, the jump process with increments E+ dM;t- - E- dMt-,
r
le
pe
ne
represents the changes in the midprice caused by the arrival of MOs that have a
irc
vi
permanent price impact. MOs may come at times when there is enough liquidity
in
in
rc
pe
ne
or they may arrive at times when liquidity is thin or the orders are sent by traders
irc
vi
with superior information, and these trades have a permanent impact on prices.
in
rc
The impact of trading on the midprice may also be viewed as the action of
le
pe
ne
irc
in
rc
r
le
The rest of the MM's setup is as in Section 10.2, with the only difference
rc
le
that here the midprice follows (10.22). For convenience we repeat the MM's
pe
ne
irc
performance criteria:
vi
in
in
rc
r
le
pe
ne
irc
vi
in
c
le
r
pe
rc
vi
ci
in
in
0
H(t,x,S,q)= sup H (t,x,S,q).
le
J±EA
ne
irc
in
rc
p
vi
r
10.4 Market Making with Adverse Selection 263
le
pe
irc
vi
rc
le
pe
ne
Thus the MM's value function satisfies the DPE
irc
= 8 tH + ½a2 8ssH- ¢q 2
vi
in
rc
i
r
le
pe
+ +
+>.+ sup {e-K ,5 ]_ q>-q lE [H(t,x+ (S+ 5+ ), S+E+ ,q-l)-HJ
ne
irc
s
+
vi
in
rc
+ +
+ (1-e-K s ]_ q >_q_) lE[H(t,x, S+E+ ,q)-HJ}
r (10.23)
le
pe
ne
irc
+>.- sup { e-K-s- ]_ q <q lE[H(t,x-(S- 5-), S-E-,q+ 1) - HJ
vi
s-
in
rc
i
r
le
pe
ne
irc
vi
subject to the terminal condition
in
rc
le
= x + q (S- aq) ,
pe
H(T, x, S, q) (10.24)
ne
irc
vi
in
and where the expectation is over the random variables E ± (not over x, S , or q)
rc
i
r
le
pe
ne
irc
Intuitively, the various terms in the HJB equation have the same interpretation
vi
in
as the case above in Section 10.2, with a difference in how the value function
rc
changes when the midprice jumps upon the arrival of an MO. To see this, note le
pe
ne
irc
that the sup over 5+ contains the terms due to the arrival of a market buy order
vi
in
(which is filled by a limit sell order). The first term represents the expected
rc
i
r
le
change in the value function H due to the arrival of an MO which fills the LO
pe
ne
irc
and the midprice St jumps up by the random amount E+ ; and the second term
vi
in
rc
represents the arrival of an MO which does not reach the LO's price level (but
r
le
still causes a random jump in the midprice). Similarly, the sup over 5- contains
pe
ne
irc
the analogous terms for the market sell orders which are filled by limit buy
vi
in
rc
orders.
i
r
le
pe
s, q) = X + q s + h(t,q)'
vi
in
H(t,x, (10.25)
rc
le
pe
irc
vi
-
i
r
le
�
pe
ne
(10.26)
irc
le
pe
ne
= -aq2
irc
feedback form:
rc
i
r
le
pe
ne
5+ ,*(t,q) q (10.27a)
vi
in
rc
1
5-,*(t,q) = -+E--h(t,q+l)+h(t,q), q/q. (10.27b)
r
le
pe
ne
K,-
irc
vi
rc
to what was discussed above. The main difference is that here MOs impact the
le
ne
irc
in
rc
p
vi
r
264
le
Market Making
pe
irc
vi
rc
le
pe
ne
midprice and this affects the optimal controls in two ways: one is explicitly shown
irc
in (10.27) in the form of s ± , and the other is encoded in the solution of h(t, q).
vi
in
rc
i
It is clear that the MM incorporates the impact of MOs by including the
r
le
pe
ne
expectation of the jump in prices, conditional on an MO arriving, by posting
irc
vi
LOs which are s ± =E[E ± ] further away from the midprice. In this way the MM
in
rc
trader recovers, on average, the losses she incurs due to adverse selection.
r
le
pe
ne
Moreover, note that the effects of the jumps in the midprice also feed into
irc
the solution of h(t, q) because the optimal strategy must take into account the
vi
in
rc
i
r
future arrival of MOs, as these move the prices. Thus, it is important to note
le
pe
ne
irc
that the optimal controls derived here are not the controls as given in (10.8) plus
vi
the recovery of the average losses s ± adverse selection costs. This becomes clear
in
rc
le
when looking at the solution of the DPE which we discuss in the next subsection.
pe
ne
irc
vi
in
rc
Solving the DPE
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
K,
irc
and stack w(t, q) into a vector
vi
in
rc
i
r
le
w(t)=[w(t,q),w(t,q-1),...,w(t,_q:)]'.
pe
ne
irc
vi
Furthermore, let A denote the (q-11+1)-square matrix whose rows are labelled
in
rc
le
pe
ne
irc
i=q,
vi
in
rc
i=q-1 ,
i
r
le
(10.28)
pe
i=q+l,
ne
irc
otherwise ,
vi
in
rc
le
± .
where 5,± =,\ ± e- 1-Kc Then, on substituting h in terms of w in (10.26), we
pe
ne
irc
find that
vi
in
Otw(t) + Aw(t) = 0.
rc
i
r
le
pe
ne
irc
le
pe
ne
irc
·2
where z is a (q - 11 + 1)-dim vector where each component is Zj = e-°'"' 1 ,
vi
in
j =q, ... , 11· Note that this solution is similar to the one derived above in Section
rc
i
r
le
pe
ne
10.2 but here we have the impact of the MOs on the midprice dynamics.
irc
vi
as well as assuming that the rate and impact on midprice of arrival of MOs is
r
le
pe
the same (K: ± =K:, ,\ ± =A, s ± =s), the MM's optimal depths on the buy
ne
irc
vi
side with q shares equals the optimal depth on the sell side with -q shares,
in
rc
J h (t, q) = JP(t,-q).
i
le
ne
irc
in
rc
p
vi
r
le
10.4 Market Making with Adverse Selection 265
pe
irc
vi
rc
le
pe
ne
irc
0.025 0.025
q= -2 q=2
vi
in
in
rc
,.-..__ 0.02 q= -1 ,.-..__
0.02 q=l
r
I
le
� �
pe
q=O q=O
ne
irc
vi
.µ
in
0..
rc
<l) <l)
le
pe
.--< :>,
ne
q= 3 ;j q= -3
irc
� 0.0 05 p::i 0.0 05
vi
in
in
rc
0 0
r
le
0 10 20 30 0 10 20 30
pe
Time (secs) Time (secs)
ne
irc
vi
in
rc
le
Figure 10.8 The optimal depths as a function of time for various inventory levels and
pe
ne
irc
¢ = 0.02, a = 0.0001, CJ = 0.01, So = 100, E = 0.005.
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
In this section we illustrate several aspects of the behaviour of the optimal strat
pe
ne
irc
egy as a function of q, ¢, a, >.± , q, and -q. In Figure 10.8 we show the optimal
vi
in
in
sell and buy depths when T = 30, >.± = 1, K; ± = 100, 7J. = -q_ = 3, ¢ = 0.02,
rc
r
le
a = 0.0001, CT = 0.01, So = 100, and c = 0.005. The figure shows that when
pe
ne
irc
q = 0 the optimal buy and sell depths are the same, but when the inventory is
vi
in
q -j. 0 the optimal depths are asymmetric (sell depth is different from buy depth)
rc
le
and the fill rates are tilted to induce mean reversion in inventories. For instance,
pe
ne
irc
if q= 2 the optimal sell depth is lower than the optimal buy depth so that it is
vi
in
in
rc
more likely for the strategy to sell one unit of the asset than to acquire a unit.
r
le
pe
The top panel in Figure 10.9 illustrates further how the fill rates are tilted to
ne
irc
induce mean reversion to the optimal level of inventory for different levels of the
vi
in
rc
running inventory parameter¢= {0.2, 0.1, 0.05}. The other model parameters
r
le
pe
irc
So = 100. The two bottom panels show that the optimal level of inventory for
vi
in
in
rc
pe
point is located where the inventory drift is zero because this is the level at which
ne
irc
le
pe
ne
depicted by the red circles. For example, if ¢ = 0.05 and the current level of
irc
in
rc
closer to the midprice than the sell LO. In this way it is more likely for inventory
r
le
pe
ne
vi
q= 6 the optimal strategy is to post sell LOs closer to the midprice than the buy
in
rc
LOs so that it is more likely that inventory will be reduced (negative inventory
r
le
pe
ne
drift). The optimal level of inventory is when q= 5 where LOs are symmetrically
irc
vi
posted around the midprice (buy and sell fill rates are the same). If we follow
in
in
rc
the same line of reasoning, we see that for¢= 0.1, depicted by green circles, the
le
ne
irc
in
rc
p
vi
266 Market Making
r
le
pe
irc
vi
rc
le
pe
ne
irc
30
,---.._,
vi /: Sell
in
in
Buy
rc
� 25
Figure 10.9 Long-term inventory level.
r
le
Model parameters are: >-. + = 2, >-. - = 1,
pe
ne
I 20
irc
vi
�15
in
ef> = {0.2, 0.1, 0.05}, a= 0.0001, CT= O.Ql,
+
-
rc
+
0
+
r
le
+ +
o:l 10 + + So= 100.
pe
0
ne
+ + +
-----�--- ---
*
irc
+ +
0
5 0
vi
•**
in
in
�
rc
....... ...................
0
r
le
-10 -5 0 5 10
pe
ne
Inventory (q)
irc
vi
in
,---.._, 30�----�----�
rc
3 20
r
le
I
0
pe
I
ne
irc
0 I
O
vi
O
0 0
in
in
� I 0
10 0 O 8 8 OQ
rc
I 0
·.:: 0 �
I - ---Q ___ ; ___ o ___ �-----
Q
r
le
o 0
pe
•011' O
Q -----------f�-8-t��-gyao
ne
0 0
irc
0
0
g
00
0: 0
:
vi
0
in
I 0
-10
rc
I 0
I 0
r
� I
le
pe
irc
-10 -5 0 5 10 2 3 4 5 6
vi
in
rc
r
le
pe
ne
irc
optimal level of inventory is between 2 and 3 units of the asset; and for ¢ = 0.2,
vi
in
rc
le
pe
of the asset.
ne
irc
in
rc
level of inventory is positive because the intensity of the arrival of buy MOs
r
le
pe
midprice undergoes a jump (the distribution of the jumps up and down is the
r
le
pe
same), but since buy MOs arrive twice as often as sell MOs, the midprice is
ne
irc
in
rc
for the strategy to post LOs so that the fill rates are tilted in favour of holding
r
le
pe
trend.
vi
in
rc
le
pe
ne
irc
in
rc
pe
ne
irc
le
pe
ne
ponent CYt which is a predictable zero-mean reverting process. Here the long
irc
vi
and short-term components are important when devising market making strate
in
in
rc
gies. For example, if the agent is an MM who trades at time scales where she
le
ne
irc
in
rc
p
vi
r
10.4 Market Making with Adverse Selection 267
le
pe
irc
vi
rc
le
pe
ne
does not 'see' the short-term component Ctt, then her strategy will not only be
irc
vi
sub-optimal, but will lose money to better informed traders - traders who are
in
rc
i
better informed will pick-off the LOs posted by the less informed MM. On the
r
le
pe
ne
other hand, if the MM has the ability to observe Ctt then she will ensure that on
irc
vi
average her strategy does not lose money to other traders, and will also use this
in
rc
r
knowledge to execute more speculative trades when Ctt is different from zero as
le
pe
ne
irc
we shall show below.
vi
One can specify the dynamics of the predictable drift Ctt in many ways, de
in
rc
i
r
le
pending on the factors that affect the short-term drift of the midprice. Here
pe
ne
irc
vi
in
driven by order flow. Thus, we model Ctt as a zero-mean-reverting process which
rc
le
jumps by a random amount at the arrival times of MOs. The short-term drift
pe
ne
irc
jumps up when buy MOs arrive and jumps down when sell MOs arrive. As such,
vi
in
Ctt satisfies
rc
i
r
le
pe
= -( Ctt dt + 17 dWt"' + f7+M+
ne
da t dMt - f� Nr dMt- , (10.31)
irc
+ t-
vi
t-
in
rc
where {ft, ft, . . . } are i.i.d. random variables (independent of all processes)
le
pe
ne
irc
representing the size of the sell/buy MO impact on the drift of the midprice.
vi
rc
i
r
le
77 are positive constants, and the MOs arrive at an independent constant rate of
pe
ne
irc
>- ± .
vi
in
Now we pose the market making problem where the MM posts only at-the
rc
le
touch, as we did in Section 10.2.2. However, here the agent's strategy accounts
pe
ne
irc
for the influence of short-term-alpha. To this end, let R; E {O, 1} denote whether
vi
in
she is posted on the sell side ( +) or buy side (-) of the LOB. Her performance
rc
i
r
le
criteria is as usual
pe
ne
irc
vi
in
rc
le
pe
ne
irc
rc
i
r
dXtc
ne
irc
vi
in
where Nt±, c denote the counting processes for her filled LOs. We further assume
rc
le
that, if she is posted in the LOB, when a matching MO arrives her LO is filled
pe
ne
irc
with probability one. In this case, Nt±, c are controlled doubly stochastic Poisson
vi
in
processes with intensity R; >- ± . (In Exercise E.10.2 we ask the reader to generalise
rc
i
r
le
As before, the set .A of admissible strategies are F-predictable such that the
vi
in
rc
agent is not posted on the buy (sell) side if her inventory is equal to the upper
r
le
pe
irc
vi
rc
i
le
£EA
ne
irc
in
rc
p
vi
r
le
268 Market Making
pe
irc
vi
rc
le
pe
ne
The Resulting DPE
irc
Applying the DPP we find that the agent's value function H should satisfy the
vi
in
in
rc
r
DPE
le
pe
ne
irc
vi
= ( Ot +a Bs+ ½o- 2 8ss- ( aBa+ ½TJ 2 0aa)H- cpq2
in
0
rc
le
pe
%e
ne
irc
+>-. + max {]_ q>-q lE[H(t, X +(S + +
) e + ,s,a+E + ,q-e + )-HJ
vi
£+E{O,l}
in
in
c
r
le
pe
ne
irc
vi
in
c
le
r
pe
ne
irc
£-E{0,1}
vi
in
in
rc
r
le
pe
+ (1-r]_ q <q) lE[H(t,x,S,a-E-,q+r)-H]},
ne
irc
vi
in
rc
irc
vi
in
in
rc
pe
ne
irc
Here, the expectations are over the random jump sizes E ± . The various terms in
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
e the first line in the DPE represents the drift and diffusive components of the
r
le
pe
feature,
vi
in
rc
le
111
pe
ne
at-the-touch,
irc
vi
in
in
rc
@ the second line represents the change in value function, if the agent is posted,
r
le
pe
due to the arrival of an MO which lifts the agent's offer and simultaneously
ne
irc
the third line represents the change in the value function when an MO arrives,
r
le
@
pe
ne
irc
but the agent is not posted - in which case only the short-term-alpha jumps,
vi
in
in
rc
e the fourth and fifth lines are for the other side of the book.
r
le
pe
ne
irc
The terminal condition once again suggests the ansatz which splits out the
vi
in
c
accumulated cash, the book value of the shares which are marked-to-market at
r
le
r
pe
ne
the midprice, and the added value from making markets optimally:
rc
vi
ci
in
in
H(t,x,S,a,q) = x + q S + h(t,a,q).
le
r
ne
irc
in
rc
p
vi
r
le
10.4 Market Making with Adverse Selection 269
pe
irc
vi
rc
le
pe
ne
In this context,h depends on time,inventory,and the short-term-alpha. Substi
irc
vi
tuting the ansatz into the above DPE we find that h satisfies
in
in
rc
r
le
+ ½TJ 2 Daa) h + a q - <p q2
pe
0 = ( Gt - ( O:Oa
ne
irc
vi
% + h(t,a+E
in
rc
le
.e E{o,1}
pe
ne
irc
vi
in
in
+->-- max {] q <qlE[r%+h(t,a-C,q+r)-h(t,a-E-,q)]}
r
le
£-E{O,l}
pe
ne
irc
vi
in
c
+->--lE[h(t,a-E-,q)-h(t,a,q)],
r
le
r
pe
ne
irc
subject to the terminal condition
vi
%+
in
in
rc
h(T,a,q) = -q ( (;J q)
r
le
pe
ne
irc
The term a q which appears in the first line of the above equation is responsible
vi
in
rc
irc
since the terminal conditions do not depend on a and there would be no source
vi
in
in
rc
r
le
the arrival of order flow. Finally, the expectation operatorlE is with respect to
vi
in
rc
le
pe
The form of the optimising terms allows us to characterise the optimal postings
ne
irc
in a compact form. When £ = 0 both terms that are being maximised are zero,
vi
in
in
rc
pe
ne
irc
g+ ,*(t q) = ]_
' { %+1E[h(t,ce+c + ,q-l)-h(t,a+E + ,q)J>O }n{ q>'l_} '
vi
in
rc
(10.32)
r
le
pe
r·*(t,q) = ]_
ne
6 _
irc
in
rc
r
le
These postings are the analog of the optimal postings in (10.17) from subsection
pe
ne
irc
10.2.2 where we investigated how the agent trades when posting only at-the
vi
in
touch. The key difference here is that the agent knows that when an MO arrives,
rc
le
a jumps up/down and therefore she compares the expected change in the value
pe
ne
irc
in
rc
r
le
pe
vi
in
For the purpose of focusing solely on the effect of short-term-alpha, we set the
rc
le
rc
(;J
ci
in
in
le
in
rc
p
vi
Market Making
r
le
270
pe
irc
vi
rc
le
pe
ne
irc
20,---------;::::=====
vi
in
in
rc
r
le
sell
pe
ne
Figure 10.10 The optimal postings when
irc
buy
+ accounting for short-term-alpha.
vi
in
rc
r sell
le
pe
ne
buy
irc
vi
in
in
rc
-20
r
le
pe
ne
a
irc
vi
in
(a) Asymptotic Strategy Posts
rc
le
pe
ne
irc
vi
in
in
20
rc
;,.,
r
le
pe
ne
irc
fil> 0
vi
in
q
rc
le
pe
ne
-20 -20
irc
0.02 '-.. 0.02
vi
in
in
rc
o o
r
le
a -0.02 a -0.02 t
pe
ne
irc
le
pe
ne
irc
The choice of .A ± ensures that the agent has a maximum inventory equal to
vi
in
in
rc
20% of the expected number of trades. With these parameters, Figure 10.10
r
le
pe
ne
shows how the optimal strategy behaves as a function of time and short-term
irc
alpha. The agent posts limit buys whenever her inventory is below the surface
vi
in
rc
in the left panel, and she posts limit sells whenever her inventory is above the
r
le
pe
ne
surface in the right panel. There are a number of notable features here.
irc
vi
in
in
(i) Due to the symmetry of rates of arrival of MOs, the surfaces are mirror reflec
rc
r
le
term-alpha, and instead induces her to sell when her inventory is positive and
r
le
irc
in
rc
(iii) The optimal strategies become independent of time far from maturity.
r
le
(iv) Far from maturity, the agent tends to post symmetrically when short-term
pe
ne
irc
alpha and inventory are close to zero. As a increases, she is willing to take on
vi
in
rc
inventory, but keeps posting on both sides, until a becomes quite large, then
r
le
pe
she posts only buy LOs. The opposite holds when a decreases.
ne
irc
vi
in
in
Next, Figure 10.11 shows a sample path of the agent's posts together with the
rc
le
short-term-alpha. In the left panel, the green lines demonstrate when (and at
ne
irc
in
rc
p
vi
271
r
10.5 Bibliography and Selected Readings
le
pe
irc
vi
rc
le
pe
ne
irc
0.015 --�--�-----�
vi
in
in
rc
ci
r
29.98
le
pe
S 0.01
ne
irc
Cl> '-<
u Q) D
vi
·;:: 29.97
in
rc
.µ
'-<
r
le
] 0.005
pe
ne
29.96
irc
if]
vi
in
in
E E
rc
A
29.95 �-��--����--- 0 A
r
le
pe
ne
Time
irc
Time
vi
in
rc
Figure 10.11 Sample path of the optimal strategy. Green lines show when and at what
r
le
pe
ne
price the agent is posted. Solid red circles indicate MOs that arrive and hit/lift the
irc
posted bid/offers. Open red circles indicate MOs that arrive but do not hit/lift the
vi
in
in
rc
agent's posts. Shaded region is the bid-ask spread.
r
le
pe
ne
irc
vi
in
rc
what price) she is posted, and the solid red circles indicate arrival of MOs that
r
le
pe
ne
fill the agent's posts. In this sample path, her postings change a total of five
irc
times and her inventory begins at zero ( Q = 0). In regime A she is posted only
vi
in
in
rc
on the buy side since a is large enough to suggest that purchasing the asset is
r
le
pe
worthwhile. As time evolves and she enters regime B, a decays and she begins
ne
irc
vi
to post symmetrically. A buy MO arrives and lifts her offer (so that Qt = -1),
in
rc
le
pe
regime C. A sell MO eventually arrives and hits her bid (so that Qt = 0) and
ne
irc
in
rc
r
le
small, and her inventory is zero, she posts symmetrically once again. Eventually
pe
a buy MO once again lifts her offer (so that Qt = -1) and induces an upward
ne
irc
vi
jump in a. In regime E she now only posts on the buy side. A sequence of buy
in
rc
le
irc
however, since she has no LO sell posted, her inventory remains one short and
vi
in
in
she remains posted only on the buy side.
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
in
rc
r
le
pe
ne
irc
Ho & Stoll (1981), Avellaneda & Stoikov (2008), Stoikov & Saglam (2009),
vi
Laruelle, Lehalle & Pages (2013), Cartea & Jaimungal (2013), Cartea, Donnelly
in
rc
le
& Jaimungal (2013), Gueant, Lehalle & Fernandez-Tapia (2013), Jaimungal &
pe
ne
irc
Kinzebulatov (2013), Cartea, Jaimungal & Ricci (2014), Kharroubi & Pham
vi
in
in
(2010), Guilbaud & Pham (2013), Bouchard, Dang & Lehalle (2011), Carmona
rc
le
in
rc
p
vi
r
272 Market Making
le
pe
irc
vi
rc
le
pe
10.6 Exercises
ne
irc
vi
in
in
rc
r
le
E.10.l Consider the framework developed in subsection 10.2.2, where the MM posts
pe
ne
irc
only at-the-touch, but assume that when an MO arrives, and the agent is
vi
in
posted on the matching side of the LOB, her order is filled with probability
rc
p < l. Derive the DPE and compute the optimal strategy in feedback form.
r
le
pe
ne
irc
Also, implement the resulting non-linear coupled system of ODEs and show
vi
in
in
how the strategy is altered by the fill probability.
rc
r
le
E.10.2 Consider the framework developed in subsection 10.4.2, where the MM is sub
pe
ne
irc
ject to adverse selection from active traders, but assume that when an MO
vi
in
arrives, and the agent is posted on the matching side of the LOB, her order
rc
le
is filled with probability p < l. Derive the DPE and compute the optimal
pe
ne
irc
strategy in feedback form. Also, implement the resulting non-linear coupled
vi
in
in
system of ODEs and show how the strategy is altered by the fill probability.
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
le
11 Pairs Trading and Statistical
pe
ne
irc
vi
in
rc
Arbitrage Strategies
i
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
i
r
le
pe
ne
irc
11.1 Introduction
vi
in
c
le
r
pe
ne
The success of many trading algorithms depends on the quality of the predictions
irc
vi
of stock price movements. Predictions of the price of a single stock are generally
in
rc
i
r
less accurate than predictions of a portfolio of stocks. A classical strategy which
le
pe
ne
irc
makes the most of the predictability of the joint, rather than the individual,
vi
behaviour of two assets is pairs trading where a portfolio consisting of a linear
in
rc
combination of two assets is traded. At the heart of the strategy is how the two
le
pe
ne
irc
assets co-move - some of these statistical issues were discussed early in Section
vi
in
3.7. As an example, take two assets whose spread, that is the difference between
rc
i
r
le
their prices, exhibits a marked pattern and deviations from it are temporary. pe
ne
irc
Then, pairs trading algorithms profit from betting on the empirical fact that
vi
in
le
pairs trading fall under the class of strategies sometimes labeled as statisti
pe
ne
irc
cal arbitrage (or StatArb for short). They are not true arbitrages (which are
vi
in
strategies that produce returns in excess of the risk-free rate with zero risk), but
rc
i
r
le
rather are strategies which bet off of the typical behaviour of asset prices, and
pe
ne
irc
le
pe
ne
irc
1.015 -- - -2.7�-------- �
-
vi
-
in
rc
� - = -----====H=I � -2.75
1.01
i
i
r
le
pe
Ii-.
ne
irc
� 1.005 § -2.8
vi
in
·.:::
c
0....
r
Sb-2.85
le
er
pe
QJ
irc
n
0.995 ·7 -2.9
vi
0
in
rc
i
r
le
-2.95
pe
0.5 0 0.5
ne
irc
Time Time
vi
in
c
le
r
pe
Figure 11.1 INTC and SMH on November 1, 2013 for the whole day of trading: (left
ne
irc
panel) midprice relative to mean midprice; (right panel) co-integration factor. The
vi
in
rc
dashed line indicates the mean-reverting level, the dash-dotted lines indicate the 2
i
le
in
rc
p
vi
274 Pairs Trading and Statistical Arbitrage Strategies
r
le
pe
irc
vi
rc
le
pe
In Figure 11.1 we show an example with Intel Inc. (INTC) and the Market
ne
irc
Vectors Semiconductor ETF (SMH) for November 1, 2013. The left panel shows
vi
in
in
rc
the midprice paths of INTC and SMH (scaled by the mean midprices), and it
r
le
pe
ne
is clear that the two assets tend to move together and in the same direction.
irc
Thus, a portfolio consisting of long one asset and short the other will exhibit a
vi
in
rc
less volatile and more predictable behaviour than that of the individual assets.
r
le
pe
ne
In this case, since the assets tend to co-move in the same direction, a simple
irc
vi
pairs trading strategy is to buy the portfolio if its value is less than a threshold
in
in
rc
and sell it if its value is greater than the threshold. This strategy will deliver
r
le
pe
ne
profits as long as the value of the portfolio fluctuates about and reverts to the
irc
vi
threshold.
in
rc
le
pe
ne
irc
prices of the two stocks. The right panel of Figure 11.1 shows the path of a
) + B sf MH) where A and Bare estimated
vi
co-integration factor Ct = A s?
NTC
in
in
rc
'
r
le
from the data that day to be A"' 0.95 and B"' -0.63, see Section 3.7. Thus, if
pe
ne
irc
vi
in
value of a portfolio long 0.95 shares in INTC and short 0.63 shares in SMH to
rc
le
hover around the mean of the co-integration factor which is zero. And how can
pe
ne
irc
we profit from the mean-reverting to zero value of this portfolio? The answer is a
vi
in
in
pairs trading strategy which consists in going long the portfolio when it is 'cheap'
rc
r
le
and then closing the position when the portfolio's value increases, or going short
pe
ne
irc
the portfolio when it is 'dear' and closing the position when the portfolio's value
vi
in
decreases.
rc
le
irc
in
Section 11.2 we show naive approaches which place ad hoc bands around the
rc
r
le
position, long or short the portfolio when either band is hit, and then another
vi
in
rc
pair of ad hoc bands to unwind the position. In Section 11.3 we develop more
r
le
pe
sophisticated approaches which determine the optimal bands to enter and close a
ne
irc
position, and in Section 11.4 the drifts of a collection of assets are co-integrated.
vi
in
in
rc
r
le
pe
ne
irc
le
pe
irc
seen in Figure 11.1, is to place bands which are one standard deviation above and
vi
in
in
rc
below the mean-reverting level, which is zero, and buy one unit of the portfolio
r
le
pe
if the lower band is hit or sell one unit of the portfolio if the upper band is
ne
irc
hit. Once the strategy has entered into a position, either long or short, the next
vi
in
rc
step is to close it. To close the position the strategy waits for the value of the
r
le
pe
ne
portfolio to be within a small interval, say 1/10 standard deviation of the mean
irc
vi
reverting level of the co-integration factor, and at that point the agent liquidates
in
in
rc
the position.
le
ne
irc
in
rc
p
vi
r
le
11.2 Ad Hoc Bands 275
pe
irc
vi
rc
le
pe
ne
-2.75�---------�
irc
vi
in
in
rc
Figure 11.2 A sample path of the
r
le
pe
ne
co-integration factor, the trading position,
irc
§ -2.85
and the book value of the trade, using the
vi
in
rc
f;b -2.9
r two standard deviation banded strategy.
le
pe
ne
irc
"-;< -2.95
vi
in
in
rc
-3>------�- ---�
r
le
0 0.5
pe
ne
irc
Time
vi
in
0.3�---------�
rc
le
pe
ne
irc
0.5 0.2
-
<ll
;::l
vi
in
in
-
rc
-
r
le
0 0.1
pe
�
ne
irc
0
0
vi
p::i Ot------'IP
in
-0.5
rc
le
pe
ne
irc
-1
0 0.5 0.5
vi
in
in
Time Time
rc
r
le
pe
ne
irc
vi
Figure 11.2 shows three pictures: a simulated sample path of the co-integration
in
rc
factor, the path of the inventory of the strategy which opens and closes positions
r
le
pe
ne
a few times during the trading horizon, and finally, the accumulated cash and
irc
vi
marked-to-market value of the strategy. The strategy starts by waiting for the
in
in
rc
r
le
path of the co-integration factor to breach one of the outer bands. At around
pe
ne
irc
t � 0.3 the path hits the lower outer band so the agent longs the portfolio in
vi
in
anticipation of its value appreciating. Then for a short period of time the agent
rc
le
holds on to the portfolio whose value fluctuates one-to-one with changes in the
pe
ne
irc
in
rc
r
le
pe
ne
irc
where Xt is the strategy's accumulated cash position, and f3t denotes the units
vi
in
rc
of the portfolio held by the strategy, in this case assuming that f3t E { -1, 0, 1}.
r
le
pe
ne
The next step is to wait until the co-integration factor hits the inner band to
irc
vi
close the position. Here this occurs at around t � 0.4 and the strategy goes back
in
in
rc
to holding zero units of the portfolio and locks in a profit equal to the difference
r
le
pe
ne
between the outer and inner bands. Next, the strategy waits for a little while
irc
vi
and enters into a short position at around t � 0.51 and liquidates at around
in
rc
t � 0.55. Finally, the strategy enters into a long position around t � 0.73 and
le
pe
ne
irc
liquidates at around t � 0.83. In all, for this simulated path, the strategy makes
vi
in
in
In the scenario in Figure 11.2, the agent ends the trading horizon with zero
ne
irc
in
rc
p
vi
276 Pairs Trading and Statistical Arbitrage Strategies
r
le
pe
irc
vi
rc
le
pe
25or 250
ne
-·
irc
vi 2001
Sharpe
2ool
in
in
Sharpe
I
rc
Ratio= 5.64 futtio= 6.18
r
le
.
pe
P 150 P 150
ne
:>, :>, I
irc
U I
vi
in
Q)
[100 [100
rc
;cl ;cl
� �
r
le
pe
ne
50 50
irc
vi
in
in
rc
0 0
0 0.5 0 0.5
r
le
.�
pe
ne
irc
P&L P&L
vi
in
rc
·
(a) band= 0.25 x std.dev.
r
le
pe
250
ne
irc
1
vi
Sharpe Sharpe
in
in
200 200
rc
Ratio= 6.24 Ratio= 2.29
r
le
pe
P 150 P 150
ne
:>,
irc
vi
in
Q) Q)
[100 [100
rc
;cl ;cl
� �
r
le
pe
ne
50 50
irc
vi
in
in
rc
0
0 0.5 0 0.5
r
le
OL_.__c___........
pe
ne
irc
P&L P&L
vi
in
rc
le
pe
ne
irc
Figure 11.3 P&L histograms from 10,000 scenarios using the naive strategy with
vi
in
in
rc
pe
ne
irc
vi
in
rc
inventory. This is not guaranteed by the strategy, and in fact the strategy may
r
le
pe
have entered a long/short position which never reverted back to the inner band
ne
irc
by the end of the trading horizon. This would induce potential losses into the
vi
in
in
rc
strategy. The wider the trigger bands, the more likely it is to end with inventory.
r
le
pe
ne
Also, while wider bands have larger profits when the position closes out, the
irc
con-integration factor makes fewer outer-inner band transitions when the band
vi
in
rc
size increases.
r
le
pe
ne
Figure 11.3 shows the profit and loss (P&L) histogram from generating 10,000
irc
vi
scenarios from the estimated model, computing the co-integration factor and
in
in
rc
placing trades as described above. The figure shows the effect that the band size
r
le
pe
ne
has on the P&L as well as the Sharpe ratio (i.e. the mean P&L divided by the
irc
vi
standard deviation of the P&L). Notice that the Sharpe ratio first increases as
in
rc
the band widens, but then starts decreasing. Also notice that when the band
le
pe
ne
in
examination, all of the distributions are multimodal. The reason is because the
rc
le
profit from closing out a long/short position equals approximately the band size
ne
irc
in
rc
p
vi
11.3 Optimal Band Selection 277
r
le
pe
irc
vi
rc
le
pe
(since you enter into a long/short position once the factor hits the band and close
ne
irc
it out near the mean). Hence, the P&L is concentrated near integer multiples of
vi
in
in
rc
the band size and the weight on a given multiple equals the probability of making
r
le
pe
that many round trip trades during the trading horizon. The reason the P&L is
ne
irc
not concentrated solely on the band is because towards the end of the trading
vi
in
rc
horizon, the co-integration factor may not return to the equilibrium value prior
r
le
pe
ne
to trading end. Hence, the trader must close out a position that might make less
irc
profit than the band size, or in fact may take a loss if the co-integration factor
vi
in
in
rc
moves away from the equilibrium prior to ending the trading horizon.
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
In the previous section, we introduced a very simple but naive strategy for en
in
in
tering and exiting a long/short position in the co-integration portfolio. Here, we
rc
r
le
pe
ne
determine the optimal strategy to enter and exit by posing the problem as an
irc
vi
optimal stopping problem. In this context, the trader will make a single round
in
rc
irc
First, assume that there is a portfolio with A shares in one asset and B shares
vi
in
in
in another asset so that the portfolio dynamics are given by Et, which is the
rc
r
le
le
with Wt a standard Brownian motion. The coefficient "' is the rate of mean
pe
ne
irc
reversion, 0 is the level that the process mean-reverts to, and lT is the volatility
vi
in
in
of the process. To formulate the problem, we first solve for the optimal time at
rc
r
le
which to exit a long position in the portfolio and then use this as the input to
pe
ne
irc
determine when the agent should optimally enter a long position in the portfolio.
vi
in
The agent's performance criteria for exiting the long position is given by
rc
le
pe
t
ne
in
rc
where c is a transaction cost for closing out the portfolio, p > 0 is the agent's
r
le
pe
discount factor (akin to an urgency parameter since increasing p will push the exit
ne
irc
le
pe
ne
irc
H+ (t,s) = supHf)(t,s) .
vi
in
in
rc
r
le
The value function seeks for the optimal stopping time which maximises the
pe
ne
irc
performance criteria, because once the agent is long the portfolio the objective
vi
in
le
Next, the agent's performance criteria for entering the long position is given
pe
ne
irc
by
vi
in
in
rc
le
ne
irc
in
rc
p
vi
278 Pairs Trading and Statistical Arbitrage Strategies
r
le
pe
irc
vi
rc
le
pe
ne
and her corresponding value function is
irc
vi
in
in
rc
G+(t,c)= supG�\t,c) .
r
le
pe
ne
The intuition here is that the agent pays E + c for the portfolio, but receives the
irc
vi
in
exit option which has value H + (E,T).
rc
le
Now,due to the stationary properties of the OU process,the performance
pe
ne
irc
criteria and,therefore,the value functions do not depend on time.In what follows
vi
in
in
we suppress the time dependence. The dynamic programming principle (DPP)
rc
r
le
implies that the value functions H and G should satisfy the coupled system of
pe
ne
irc
vi
in
rc
le
pe
ne
irc
max{(£ - p) G+(c); (H+(c) - E - c) - G+(t,c)} = 0 ,
vi
in
in
rc
where ,C is the infinitesimal generator of the co-integration process,i.e.
r
le
pe
= K, (0-
ne
2
L )E 0,: + ½ Off .
irc
(7
vi
in
rc
irc
vi
The VI for H is very similar to the value of a perpetual call option,and can be
in
in
rc
pe
ne
irc
(£-p)F(c)=O, (1 1.1)
vi
in
rc
le
pe
ne
region (c < c*) and H+(c) = (c-c) in the exercise region E > E*. We then need
irc
vi
in
rc
r
le
vi
to solve for the optimal point E* where the agent closes out the position.
in
1
rc
le
pe
1'._l - If§
ne
irc
1
00 1 2
�(0-e:)u--u
E=
F+() uK e " 2
du,
vi
in
in
rc
0
r
le
00
1'.-1 + lf§ K 1 2
pe
::"2(0-e:)u-'iu
ne
E =
F_ () e " du.
irc
U K
0
vi
in
rc
le
pe
ne
Moreover,it is easy to see (by differentiating under the integral) that F� (E) >
irc
vi
0,F� (E) > 0, F!._ ()E < 0,and F'!. (E) > 0,so that F+ is strictly positive,increasing
in
in
rc
pe
ne
vi
functions.)
in
rc
The value function H must vanish as c --+ -oo (since the time to exiting the
r
le
pe
ne
irc
position will tend to infinity and the discount factor will render such strategies
vi
in
rc
le
ne
irc
in
rc
p
vi
279
r
11.3 Optimal Band Selection
le
pe
irc
vi
rc
==�:
r
le
pe
ne
1.5 r;====,--�------, 1.5 r;====;,;--�-�--�-,
irc
2·5 -p=O.Dl
vi
-p= 0.02
in
-1,,=2
-�:�
rc
-p= 0.04
i
r
p = 0.08
le
pe
-p= 0.16
ne
irc
vi
-�
in
rc
le
0.5
pe
'
ne
irc
'
vi
in
rc
i
r
le
pe
0.2 0.6
c
ne
irc
vi
in
rc
Figure 11.4 The optimal exit trigger levels (given by the black circles) and
r
le
pe
ne
irc
vi
in
rc
i
r
le
for some constant A, i.e, B = 0 otherwise H+ would blow up. Applying the value
pe
ne
irc
vi
in
rc
and
r
le
pe
ne
irc
Taking the ratio of these equations and re-arranging, the optimal level at which
vi
in
rc
to close out the position is the unique solution to the non-linear equation
i
r
le
pe
ne
irc
(11.2)
vi
in
rc
le
and further we have A= ;;(�;). The value function H+ can then be written as
pe
ne
irc
vi
in
rc
i
r
le
pe
ne
irc
Figure 11.4 shows the value function Hin the continuation regions (the solid
vi
in
rc
lines) and exercise regions (the dashed lines) as the mean-reversion rate 1,, and dis
r
le
pe
count rate p vary. We also set 0= 0, /J' = 0.5 and c= 0.01. As the mean-reversion
ne
irc
rate increases, the optimal trigger levels decrease since the co-integration factor
vi
in
rc
pe
rate p increases, the trigger levels decrease, to draw the stopping time nearer
ne
irc
le
pe
ne
irc
rc
Armed with the optimal exit strategy, we can solve for the optimal entry problem.
r
le
pe
ne
This also amounts to solving for the price of a perpetual American-style option,
irc
vi
albeit now with the exercise value of H+(c) - c - c rather than a simple call
in
rc
irc
rather than increasing in c. The reason is simple: suppose that c < 0, i.e. the
vi
co-integration portfolio value is currently less than its long-run level; then as c
in
rc
i
le
increases, if the agent enters into a long position, she will extract less value from
ne
irc
in
rc
p
vi
280 Pairs Trading and Statistical Arbitrage Strategies
r
le
pe
irc
vi
rc
le
pe
ne
2.5
irc
2.5
,--------------;'::._'=._="=_ ===;0s';.5;c,] -p= 0.01
-,c=l -p= 0.02
vi
in
in
-,c=2
rc
-p= 0.04
2 -
-�:J 2
- -: : p = 0.08
r
le
.......... ;: :: :: :i :�:-_--==-p_=_0._16�
pe
ne
:::::������I :.. :--:1-.. ---------J
: :
irc
1.5 1.5
+ +
vi
in
rc
.. -,-,---------J
r l
le
I i"..,
._
•-- I"" ... !... ....
pe
1 r- .. I I I ""._
ne
I -----I I I
irc
0.5 0.5 I I I
vi
in
in
I I
rc
I I
'---- 0
r
le
0 --_-'-'1 ----'-�--0�_5�---�
� 0 -1 0
- .5 0
pe
ne
E
irc
vi
in
rc
Figure 11.5 The optimal entry trigger level (given by the black circles) and
r
le
pe
ne
irc
vi
in
in
it once she exercises at the optimal exit point E*. This value should reduce to
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
for some constant D. The value matching and smooth pasting conditions are
vi
in
in
now
rc
r
le
pe
ne
and
irc
vi
in
le
pe
ne
irc
(11.3)
vi
in
in
rc
Naturally, we anticipate that E* < E*. Putting these results together, the value
r
le
pe
ne
vi
F_(E)
in
G+(c) = F
rc
le
_(E.)
pe
ne
irc
Figure 11.5 shows the value function G + in the continuation regions (the solid
vi
in
in
rc
lines) and exercise regions (the dashed lines) as the mean-reversion rate r;, and
r
le
discount rate p vary. We also set 0 = 0, u = 0.5 and c = 0.01. As the mean
pe
ne
irc
reversion rate increases, the optimal trigger levels increase (and move towards
vi
in
rc
the mean-reversion level) since the co-integration factor is drawn more strongly
r
le
pe
ne
to the mean-reversion level. Similarly, as the discount rate p increases, the trigger
irc
levels increase, to draw the stopping time nearer since future gains are discounted
vi
in
in
rc
more.
r
le
pe
ne
Comparing Figure 11.5 to 11.4, we observe that even with the same param
irc
eters, the optimal entry and exit prices are not symmetric around the mean
vi
in
rc
reversion level. This is at first a somewhat surprising result. However, since the
r
le
pe
ne
entry and exit times are ordered, the discount factor plays a role in biasing the
irc
vi
entry point to occur closer to the mean-reversion level, relative to the exit point.
in
in
rc
For example, with r;, = 4, we see the entry price is about -0.47, while the exit
le
ne
irc
in
rc
p
vi
11.3 Optimal Band Selection 281
r
le
pe
irc
vi
rc
le
pe
price is about 0.51. With "' = 0.5, the asymmetry is even larger as the entry
ne
irc
price is about -0.97 while the exit price is about 1.1.
vi
in
in
rc
r
le
pe
ne
irc
vi
11.3.3 Double-Sided Optimal Entry-Exit
in
rc
le
pe
In the previous sections we studied how an agent would behave if she wishes
ne
irc
to enter into and then exit from a long position in a co-integration portfolio.
vi
in
in
c
This ignores the possibility that the agent may instead wish to enter into a
r
le
pe
short position. Here we incorporate a double-sided strategy which considers the
ne
irc
optimal time in which to enter either a long or short position and then optimally
vi
in
c
le
r
pe
Let the performance criteria for exiting from a long or short position be given
ne
irc
by
vi
in
in
rc
r
le
pe
Hfl(t,c) = lE t ,c: [e-p( T -t) (cT - c)] ,
ne
irc
vi
in
T
rc
le
pe
ne
irc
with the corresponding value functions
vi
in
in
rc
r
le
H+(t,c)= supHf\t,c),
pe
ne
irc
T
vi
T
in
le
T
pe
ne
irc
in
rc
pe
vi
in
-
r
le
pe
ne
irc
Clearly, since this is the value of exiting from a short position, the agent's value
vi
in
in
function must be decreasing in c and must vanish as c ---+ oo. Hence, we must
rc
r
le
have
pe
ne
irc
vi
in
c
le
er
pe
where c"._ is the trigger level at which the agent will close out the position.
irc
n
in
rc
r
le
+ c),
pe
vi
in
c
and taking the ratio of these equations and re-arranging, the optimal level at
r
le
r
pe
which to close out the position is the unique solution to the non-linear equation
ne
irc
vi
in
in
rc
(11.4)
le
ne
irc
in
rc
p
vi
Pairs Trading and Statistical Arbitrage Strategies
r
le
282
pe
irc
vi
rc
le
In all, the value functions H± can be written as
pe
ne
irc
vi
F+ (c:) *
in
rc
H+ (c:) = (c - c) ]_"<"+ +
F+ (c:"._) +
i
r
le
pe
ne
irc
vi
in
( )
rc
0 -
r
le
Next, the agent's performance criteria Q( 7 l(t,c:) for the entry problem can be
pe
ne
irc
written as
vi
in
i
- -
c(-r)(t,c:) = lEtc, [ e p( r+ t) (H+ (T+ ,cr+ ) - C r+ - c) ]_ min(r+,r-)=r+
r
le
pe
ne
irc
vi
in
c
le
r
pe
The corresponding VI is
ne
irc
vi
in
max { (£ - p) G(c) ;
rc
i
r
le
pe
ne
irc
vi
in
rc
Now there will be two trigger points E± * corresponding to entering the long or
r
le
pe
ne
short position. In this case, in the continuation region, the function G will be a
irc
linear combination of both F±, so that
vi
in
rc
i
r
le
- -
rc
The constant coefficients A and B will be determined via value matching and
le
pe
ne
irc
rc
i
r
le
pe
ne
vi
in
le
irc
vi
We can solve for A and B in terms of E,± from the value matching conditions
in
rc
i
( first and third equa!ions):
r
le
pe
ne
irc
A '
in
rc
F+(c.+)F_(E*-) - F+(c._)F_(c.+)
r
le
pe
B-
irc
'
F_(c:.+ )F+ (E,-) -F_(E.-)F+ (E.+ )
vi
in
rc
and substitute these expressions back in to determine E,± as roots of the smooth
r
le
pe
ne
irc
pasting conditions (second and fourth equations). To solve for the trigger points,
vi
it is reasonable to use initial starting points €� + for E,± implied from the one
in
c
le
sided trade results of the last section, i.e €� + "' E. and c�_ "' -E•.
r
pe
ne
rc
In Figure 11.6 we show the resulting value functions for the case when
vi
ci
in
p
le
r
ne
irc
in
rc
p
vi
11.4 Co-integrated Log Prices with Short-Term-Alpha
r
le
283
pe
irc
vi
rc
le
pe
ne
irc
2.2 r---c-------;::::===:::;----n
, -1<=0.5
,\
vi
in
in
==�:§
rc
1'
'
2 \ t;
r
le
-n,=4
,, �J
pe
��
ne
Figure 11.6 The optimal entry trigger
irc
,i, ,_____ ,,
1 .8 "" ' level and corresponding value function for
vi
,, "'' 'I
in
V
t \ \�/I
rc
I\\\ /I
r the double entry-exit problem.
le
16:\'� ':
pe
ne
:1 '(, /I :
irc
�
vi
=:-1::
14 =-"";
in
in
rc
:'�
I .... I I
r
le
pe
ne
E
irc
vi
in
rc
0.5 jT---�---,:c:=====;i
-1<=0.5 -1<=0.5
r
le
-1<=1 2 -1<=1 ,,
pe
-1<=2
ne
0.4 -1<=2
irc
-1<=4 -1<=4
vi
in
in
1 .8
rc
0.3
r
le
pe
ne
irc
0.2
vi
in
rc
0.1
r
1.4
le
pe
ol__,__j____L_-1.1.l,;::,,,,,._______J
ne
irc
-0.5 0 0.5 1 .2 1.4 1.6 1.8 2
vi
in
in
E E
rc
r
le
pe
ne
irc
vi
and we allow the mean-reversion rate"" to vary. There are a few interesting points
in
rc
to notice. First, H+ and H_ behave quite differently. Second, the optimal exit
le
pe
ne
points are not symmetric around 0. Third, the optimal entry points are in fact
irc
vi
equal to the corresponding optimal exit point from the opposite portfolio: e.g.,
in
in
rc
r
le
the optimal entry point for the long portfolio equals the optimal exit point from
pe
ne
irc
the short position. The table below illustrates this point more clearly.
vi
in
rc
le
pe
ne
in
rc
r
le
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
le
pe
ne
irc
in
dependencies between assets, is one where the drifts of a collection of assets are
rc
le
in
rc
p
vi
r
le
284 Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
ne
11.4.1 Model Setup
irc
vi
Suppose that we have a collection of risky assets whose vector of prices Y
in
rc
i
r
le
(Y? , ... , Yt) o::;t::;T satisfy the coupled system of SDEs
pe
ne
irc
vi
in
rc
(11.5)
r
le
pe
ne
irc
vi
in
where
rc
i
r
le
pe
L ai log y; ,
ne
n
irc
O: t = ao + i
vi
in
rc
i=l
r
le
pe
and w = (Wl' ... ' wr) O<t<T is a vector of independent Brownian motions.
ne
irc
vi
Focusing on the diffusion terrn above, it is not difficult to see that the instanta-
in
rc Ft] ,
i
r
le
neous covariance, loosely interpreted as (['. [ d:f , d:,( I between assets 'i and
pe
ne
irc
_j is given by
vi
in
rc
L ClikClkj .
n
r
= le
pe
ne
nij
irc
k=l
vi
in
rc
i
Thus, the matrix a whose elements are CJij is the Cholesky decomposition of the
r
le
pe
ne
vi
We assume that there are no redundant degrees of freedom here, so that a is
in
rc
irc
First, note that when O: t = 0 all assets are simply correlated geometric Brownian
vi
motions with zero drift, and are hence martingales. In general, however, O: t will
in
rc
i
r
le
le
a mean-reverting process. First, note that the log-prices satisfy the SDEs
pe
ne
irc
vi
n
in
i
rc
pe
ne
i=l
irc
vi
le
pe
ne
irc
vi
in
rc
i
r
le
pe
n n n
ne
irc
le
pe
and therefore,
ne
irc
vi
in
rc
ne
irc
in
rc
p
vi
r
le
11.4 Co-integrated log Prices with Short-Term-Alpha 285
pe
irc
vi
rc
le
pe
ne
Here, a' represents the transpose of the column vector a where
irc
vi
in
rc
a= (a1,...,an )',
i
r
le
pe
n
ne
L
irc
=
"' - ak 5k = -/j' a,
vi
in
rc
r k=l
le
pe
��=1 akDkk = l Tr(Af!)
ne
irc
0= 2 /j' a
2 ��=l ak 5k
vi
in
rc
i
r
le
pe
Here, Tr(·) denotes the trace of the matrix in braces (i.e. the sum of its diagonal
ne
irc
vi
in
rc
ensure that the model does indeed describe a mean-reverting process, as opposed
r
le
to a mean-repelling one, we assume that /j' a< 0.
pe
ne
irc
From the SDE above, we can see that a mean-reverts at a rate which depends
vi
in
rc
on the various strengths of the impact that a has on each asset (through /j) as
i
r
le
pe
well as the strength of the log-asset price's contribution to a itself (through a).
ne
irc
The mean-reversion level 0 depends on the ratio of the volatility relative to the
vi
in
rc
le
pe
ne
Another alternative representation of the model stems from inserting the ex
irc
pression for O:t directly into the SDE for log Yt. In this case, we have
vi
in
rc
i
r
le
pe
ne
irc
vi
= log Y k,
in
so that if we let Zt
rc
le
pe
= ( C - B zt)
ne
dt + CT dW t
irc
dZt '
vi
in
rc
i
r
le
with
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
rc
pe
ne
ive model (VAR). Although this representation is in some sense more compact,
irc
we will find in the next section that the short-term-alpha version of the model is a
vi
in
rc
preferable representation for solving the agent's control problem. Note that here,
r
le
pe
ne
B is singular and contains exactly one positive eigenvalue due to the singular
irc
vi
rc
pe
ne
In contrast to our earlier work on price impact models of trading (see Chapters
irc
vi
6 and 7), here we assume there is no impact from trading, and instead optimise
in
...,
rc
1rf)o<t<T denote
le
..,
pe
the dollar value invested in the riskless (1rf) and risky assets (1r;, .
ne
irc
1rf), and
let x = (X;)o�t�T denote the agent's (controlled) wealth process. With this
vi
in
1r
rc
convention, the number of units m} the agent holds in asset k is m} = 1rf /Y/.
i
le
ne
irc
in
rc
p
vi
r
le
286 Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
ne
Hence, the wealth process can be written as
irc
vi
in
n n
rc
� k � kvk
i
X1r
r
t =6� =6m t 1 t '
le
pe
ne
k=O k=O
irc
vi
in
so that
rc
le
pe
ne
t
irc
t
dXt1r � d(, mkt y:k
= L ) - �,
L mt dY:t - 6 rrt y:k
vi
t
in
rc
i
r
le
pe
ne
rr; { 6k O'. t dt + = (n�b) O'. t dt + n�adWt,
irc
D"ki dWti }
vi
in
rc
le
where the second equality follows from the usual self-financing constraint - which
pe
ne
irc
can be interpreted as the change in the wealth process due to the change in each
vi
in
asset's value, assuming the positions are held fixed over a small interval of time.
rc
i
r
le
pe
The third equality is obtained by assuming that the time horizon is short enough
ne
irc
that interest rates are zero (so that dYic0 = 0), but long enough that the geometric
vi
in
rc
le
pe
discount factor and the interested reader is urged to try this out.) The last
ne
irc
equality is a rewrite of the equations using vector /matrix notation.
vi
in
rc
i
r
le
pe
variation and cross-variations of the processes X and y. First, it is easy to see
ne
irc
that
vi
in
rc
le
pe
=
ne
i
d[Y i ' Yj ] t j i j i j
dt'
irc
j t ij
k,l=l k=l
vi
in
rc
i
r
le
where (y� n Y t )ij represents the ijth element of the matrix in the braces. Next,
pe
ne
irc
vi
n n
in
rc
le
pe
i ,j ,k,l=l i ,k,l=l
ne
irc
vi
in
Finally,
rc
i
r
le
pe
n n
ne
irc
vi
in
i ,j ,l=l j ,l=l
rc
le
pe
ne
where (n�n Y t h represents the kth element of the vector in the braces.
irc
vi
in
rc
i
r
le
pe
11.4.2
ne
vi
in
Next, the agent will optimise her dollar value in assets directly, rather than the
rc
rate of trading, and has exponential utility u(x) = -e-,x. Her performance
r
le
pe
ne
irc
criteria is given by
vi
in
rc
i
le
ne
irc
in
rc
p
vi
r
le
11.4 Co-integrated log Prices with Short-Term-Alpha 287
pe
irc
vi
rc
le
pe
x; = x and = y.
ne
Yt
irc
where lEt,x,y[·] represents expectation conditional on The
vi
agent's value function is as usual
in
in
rc
r
le
y) = sup Hrr (t, x, y),
pe
H (t, x,
ne
irc
1TEA
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
Applying the dynamic programming principle leads to the DPE which the
rc
le
value function should satisfy:
pe
ne
irc
+ ab 1'D yH + ½V�YH
vi
8t H
in
in
+ s�p { (7r 8)a8xH + ½ ( ?T�O?T) BxxH + 1r1 D'DxyH } = 0 , rc
r
le
pe
ne
irc
vi
subject to H(T,x,y) = -e-,x, and where a a 0 + a'logy (the log being
in
rc
=
r
le
pe
irc
and the following linear differential operators were introduced to reduce clutter:
vi
in
in
rc
'D yH pe
ne
'D !1 =
"n 1 1 H
vi
i
yy
in
rc
le
pe
ne
irc
Next, let us obtain the optimal investment in feedback form. For this we focus
vi
in
in
rc
on the supremum term and perform a matrix completion of the square. Specifi
r
le
pe
(1r1 8)a8xH
in
M
rc
le
,(frn8xH +n'DxyH)
pe
H {( In ) + 2
ne
}
irc
1.a
2 :rx 7Ti�L7r 7T
axxH
vi
£'Hn- 1 £H
in
in
rc
28xx
H
}
pe
(BxxH)2
ne
irc
vi
in
le
pe
ne
irc
vi
in
in
rc
matrix) so that (n- 1)' = (D')- 1 = n- 1. From the above expression we can
le
pe
ne
irc
le
pe
ne
(11. 7)
irc
vi
in
in
rc
le
From the above matrix completion of the square, we also have the maximum
ne
irc
in
rc
p
vi
r
288
le
Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
term
ne
irc
,C,'Hn- 1 ,e,H
vi
in
rc
M
= -½ 8xxH
i
r
le
pe
ne
irc
so that upon reinsertion into the DPE, we obtain the following non-linear PDE
vi
in
for the value function:
rc
le
pe
ne
irc
( 11.8)
vi
in
i
r
le
pe
ne
irc
vi
11.4.3 Solving the DPE
in
c
le
r
pe
In the classical Merton problem, where the asset prices are geometric Brownian
ne
irc
x
motions, the value function for exponential utility has the form -e-,( +h(t)),
vi
in
rc
where h is a deterministic function of time. Here, due to the presence of the
i
r
le
pe
co-integration factor we expect instead that the value function depends also on
ne
irc
a combination of the price state variables which equals the co-integration factor.
vi
in
rc
le
pe
ne
irc
H(t, x, y) = - exp{-, (x + h(t, ao) + L�=l a i logy )}
i
vi
in
rc
i
for some function h(t,a), with a = a0 + L�=l a i logy i , and subject to the
r
le
pe
ne
irc
simply on h, specifically
rc
le
pe
ne
irc
vi
in
rc
i
so that
r
le
pe
ne
irc
y
r
le
pe
irc
vi
in
rc
i
Hence, for .7 # k,
r
le
pe
ne
irc
vi
in
c
le
er
pe
irc
n
vi
in
rc
while for _j = k,
i
r
le
pe
ne
ay.·.1 y ,.e-,h(t, ex )
irc
vi
-'"V (-�
in
c
le
= ))
r
pe
(y k)2 (y k)2
ne
I ex
irc
a
(-8exh(t,a)+ a k (8exexh(t,a) - 1 (8exh(t,a)) )) e-,h(t, ) .
vi
in
= -, (y :)2
2
rc
ex
i
le
ne
irc
in
rc
p
vi
r
le
11.4 Co-integrated Log Prices with Short-Term-Alpha 289
pe
irc
vi
rc
le
pe
ne
Putting these two results together we can write
irc
vi
in
in
aka·
8yjyke-"fh(t,a) = - 1'k7 (8aa h(t,a)- 1'(8a h(t,a))2 ) e-"fh(t,a)
rc
r
le
y y
pe
ne
+ Uj k1' akk 2 ua
irc
, !Cl
h(t,a) e-"fh(t ' a) ,
vi
(y )
in
rc
r
where Oj k is the Kronecker delta which equals 1 if j = k and O otherwise.
le
pe
ne
irc
Armed with these results, the various linear differential operators that appear
vi
in
in
rc
in the non-linear PDE (11.8) can be written as follows:
r
le
pe
'DyH = (-1' H) a8a h ,
ne
irc
vi
= ( -'")' H) L�j=l D,ij aiaj (Oaa h - 1'(Bah) 2 ) + (1' H) L]=l aj Djj Bah
in
rc
'D�Y
r
le
= -(1' H) (a'Oa) (Baah - 1'(8a h) 2 ) + (1' H)Tr(AO) Bah ,
pe
ne
irc
vi
in
in
rc
and recall that Tr(·) denotes the trace of the matrix (i.e. the sum along its
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
in
rc
pe
ne
irc
le
pe
n-
ne
1
((-1' H)oa + (1' H) Oa 8ah ) ((-1' H) 1fo + (1'2 H)Oa8ah )
2 1
irc
- 21
vi
in
in
1'2 H
rc
r
le
pe
At this point, there are three important simplifications. First, cancelling -'")' H
ne
irc
le
0 =8t h + (o'a)aBah
pe
ne
irc
in
rc
a a
pe
2'")'
ne
irc
vi
irc
in
)
rc
r
le
so that upon substituting into the previous expression there are two important
pe
ne
irc
cancellations:
vi
in
rc
(i) the non-linear terms containing (8a h) 2 from the expansion above and the
r
le
pe
ne
irc
1
(ii) the terms 0 a aBa h from the first line in (11.9) and the above expansion also
in
in
rc
le
cancel.
ne
irc
in
rc
p
vi
r
290
le
Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
ne
Putting these observations together we then find that h satisfies a very simple
irc
vi
linear PDE:
in
in
rc
r
le
pe
1 TrAO ,
1 (af!a)a <>' fM 2
ne
8t h- 2 ( )8c,h+2 c,c,h+--a =0, (11.10)
irc
2')'
vi
in
rc
subject to h(T, a) = 0.
r
le
pe
ne
irc
Returning to the optimal investment (11.7) in the assets, the ansatz for the
vi
in
rc
r
le
pe
-,' H (n- 1 8) a +('y 2 H) a8c,h
ne
=
irc
7r*
vi
1' 2 H
in
rc
le
pe
ne
irc
')'
f (n- 8) a - a ac,h.
vi
= 1
in
in
(11.11)
rc
r
le
pe
Let us recall that the optimal investment in the classical Merton problem is
ne
irc
fn- 1
(v - r) where r is the risk-free rate and v is (in the classical Merton
vi
in
rc
problem) the drift of the GBMs that drives the asset prices. The first term of the
r
le
pe
above expression is quite similar, since here r = 0, and the drift of the assets are
ne
irc
<> a t - here, however, the drift is stochastic and hence the Merton solution cannot
vi
in
in
rc
be applied directly. The optimal investment scales with the co-integration factor.
r
le
pe
ne
Moreover, the optimal investment is perturbed from the Merton solution by the
irc
vi
second term. In the corning sections we will see precisely what this contribution
in
rc
le
pe
ne
First, from (11.10), we can see that the solution to h must be quadratic in a.
irc
vi
in
rc
for h(t, a) and also characterise the value function in terms of a risk-neutral
le
pe
ne
irc
probability measure which makes the quadratic dependence explicit. Given that
vi
h is quadratic in a, we also see that the optimal dollar invested in each asset 1r*
in
rc
le
will be linear in a. Thus, the agent reacts to the co-integration factor in at most
pe
ne
irc
a linear fashion, but the size of the investment will vary with time.
vi
in
in
rc
r
le
A Probabilistic Interpretation
pe
ne
irc
le
market price of risk At, which induces a new measure JP'* through the Radon
pe
ne
irc
Nikodyrn derivative
vi
in
in
rc
dlP'* -
exp { -2 r T 11 A s 112 ds - Jo
r
r T A 's dW s .
le
i Jo
pe
dlP' }
ne
irc
vi
w; = - Ji A s ds + Wt
r
le
pe
ne
irc
vi
are independent JP'* -Brownian motions. Let us choose A t such that the drift of
in
in
rc
the traded assets Yt are martingales, i.e. let us find the measure transformation
le
ne
irc
in
rc
p
vi
r
le
11.4 Co-integrated log Prices with Short-Term-Alpha 291
pe
irc
vi
rc
le
pe
ne
which produces the risk-neutral measure. To this end, rewrite the SDE as
irc
vi
in
in
= (}k Yick O: t dt + L7= l (Jk i Yick dWi
rc
dY/
r
le
= ( Ok O:t + L;= l (JkiAD Yick dt + L:'= 1 (Jki Yick dW/ i ·
pe
ne
irc
vi
in
The martingale condition requires that
rc
le
L
pe
ne
= -15 at .
irc
<Jki A� = -ok at , k = l, . . . , n , {==} rr A t
vi
in
in
i= l
rc
r
le
pe
ne
irc
vi
in
(11.12)
rc
le
pe
At this point, we have found the probability measure JP'* which renders the
ne
irc
traded assets martingales. That is, we have found the risk-neutral measure. Next,
vi
in
in
we can ask what the dynamics of the co-integration factor are in terms of the
rc
r
le
pe
ne
risk-neutral Brownian motions. Hence, from (11.6) we have
irc
vi
= (-½ Tr(A 0) + (a' J)at) dt + a'adW t
in
rc
dat
r
irc
(-½ Tr(A 0) + (a' J)at + a' a At) dt + a'a dW;,
vi
in
in
rc
r
le
so that
pe
ne
irc
le
irc
in
rc
measure.
r
le
Let us now return to the PDE (11.10). It can be re-written in the form
pe
ne
irc
c5' no
vi
in
le
21
pe
ne
irc
in
therefore, applying a Feynman-Kac formula we see that h(t, a) can be expressed
rc
r
le
vi
2')' J,T
t a s ds] (11.14)
rc
,
r
le
pe
ne
irc
in
for h back into the value function we then have the following relationship:
rc
r
le
pe
ne
vi
1rEA
in
(11.15)
[it a; ds])
rc
le
pe
ne
irc
vi
in
rc
ne
irc
in
rc
p
vi
r
le
292 Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
ne
increases with volatility (through 0) as well as through the strength that o: has
irc
on each asset (through t:5).
vi
in
in
rc
r
le
pe
Explicit Construction of the O p timal Investment Strategy
ne
irc
vi
in
rc
le
It a; ds]
pe
ne
irc
h(t, o:) = JE;,a [ '\�"
vi
in
in
lE* [It (
rc
2
r
le
= 8 8
½ Tr(AO)(s-t) + va'Oa (B; - B;)) ds]
pe
��
ne
0: -
irc
vi
in
where we have introduced the process B; = �..-.. a' a Wt which is a standard
rc
vaua
r
le
IP'* -Brownian motion. Hence,
pe
ne
irc
h(t, o:) = [It { (o:-½Tr(AO)(s - t)) 2
vi
8 8
lE*
in
in
��
rc
r
le
pe
+2 (o:-½Tr(AO)(s-t))va'f!a(B;-B;)
ne
irc
vi
in
rc
= 8 8
�� {- 3 Tr(A !1) ½ Tr(A fl) T) le 3
o:3] + ½ (a' Oa) T
pe
2
[ ( 0: } ,
ne
- -
irc
where T = T-t. The fourth equality follows by using Fubini to interchange the
vi
in
in
rc
r
integral and expectation, in which case the second term in the third equation
le
pe
ne
[ B; -
irc
vanishes identically, and in the third term of the third equation we use JE* (
vi
B;) 2 ] = (s-t).
in
rc
In all, we see that h(t, o:) is quadratic in o:. Consequently, the optimal invest
le
pe
ne
irc
in
rc
1 2
a} 2
r
le
7r* T) - 0: ]
pe
ne
1 2 2
vi
in
rc
le
so that
pe
ne
irc
(11.16)
vi
in
in
rc
r
le
As a reminder, the first term is what you would expect from the classical Merton
pe
ne
irc
problem since t5 a are the drifts of the assets. The second term proportional
vi
in
rc
le
pe
shows, the perturbation around the 'Merton' portfolio decays as the terminal
ne
irc
date approaches. That is, the agent ignores the short-term-alpha effect when
vi
in
in
rc
pe
ne
irc
vi
le
pe
In this section we showcase how the strategy behaves in a three-asset case. For
ne
irc
in
rc
ne
irc
in
rc
p
vi
r
11.4 Co-integrated Log Prices with Short-Term-Alpha 293
le
pe
irc
vi
rc
le
pe
ne
irc
12.5,--------;,=======
I-Yi' -Yi2 -i,,;3 i ...0
vi
in
in
rc
r
le
pe
ne
irc
i:1
0
vi
in
·�
rc
b'.o-0.005
r
le
pe
Q)
ne
irc
>--;< -0.01
vi
0
in
in
rc
r
le
-0.015
pe
0.5 0 0.5
ne
Time Time
irc
vi
in
20�---------- 40�-- - -- ---
rc
le
pe
ne
� 15
irc
20
vi
in
in
i:1
rc
� 10 0
r
le
:-B 0
pe
ne
C/J
0
irc
P-.
vi
in
-20
rc
<I; 0
r
le
pe
ne
irc
_5c__-- - �
-----�
0 0.5 0.5
vi
in
in
Time Time
rc
r
le
pe
ne
irc
Figure 11.7 A single sample path of the co-integrated asset prices and the resulting
vi
in
optimal strategy.
rc
le
pe
ne
irc
and
vi
in
in
rc
pe
=
ne
vi
le
The volatilities of the three assets can be read off of the diagonal of O to be
pe
ne
irc
in
rc
pe
ne
p
vi
in
le
pe
irc
vi
= = 12.00 , = 11.00 .
in
in
r
le
pe
ne
The particular choice of the co-integration vector a implies that only the first
irc
vi
and third assets feed into the co-integration factor. Yet, the strength term d
in
rc
implies that only the first and second asset's drift are affected by that factor.
r
le
pe
ne
In Figure 11.7 we show a sample path of the asset prices, co-integration fac
irc
vi
tor, optimal strategy, and agent's wealth process. In Figure 11.8 we show the
in
in
rc
ne
irc
in
rc
p
vi
r
le
294 Pairs Trading and Statistical Arbitrage Strategies
pe
irc
vi
rc
le
pe
ne
irc
300
vi
Sharpe
in
in
rc
R..-1J,io = 3.45
250
r
le
pe
:>o
ne
irc
21200
Figure 11.8 Histogram of the P&L of the
vi
5< 150
Q)
in
optimal pairs trading strategy.
rc
Q)
r
le
pe
� 100
ne
irc
50
vi
in
in
rc
0
r
le
0 10 20 30 40
pe
ne
irc
P&L
vi
in
rc
le
11.5 Bibliography and Selected Readings
pe
ne
irc
vi
in
in
rc
Elliott, Van Der Hoek & Malcolm (2005), Tourin & Yan (2013), Leung & Li
r
le
pe
ne
(2014), Leung & Ludkovski (2011).
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
le
ne
irc
in
rc
p
vi
r
le
pe
irc
vi
rc
12 Order Imbalance
r
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
vi
in
rc
le
pe
ne
irc
vi
in
in
rc
r
le
pe
ne
irc
12.1 Introduction
vi
in
rc
le
pe
ne
In many of the previous chapters, the agent made trading decisions based on
irc
three key ingredients: (i) the midprice, (ii) the arrival of incoming market orders
vi
in
in
rc
(MOs), and (iii) the agent's own inventory. In some cases, these state variables
r
le
pe
ne
were supplemented by observables such as order flow (see, e.g., Section 7.3 and
irc
vi
Chapter 9), short-term-alpha in 10.4.2, and co-integration of prices in Chapter
in
rc
11, among others. In this chapter, we investigate the role that another important
r
le
pe
ne
state variable plays: the quoted volume order imbalance (or simply order imbal
irc
vi
ance). This is a measure of the buy versus sell pressure on an asset and, as we
in
in
rc
r
le
will see, it contains predictive power on both the arrival rates of MOs, and the
pe
ne
irc
le
irc
and show using NASDAQ data how it typically evolves at an intraday level. The
vi
in
in
section also introduces three Markov Chain models for order imbalance, arrival
rc
r
le
of MOs and price jumps, and develops maximum likelihood estimators of the
pe
ne
irc
model parameters. Section 12.3 provides a brief discussion of the daily features
vi
in
exhibited by order imbalance using functional data analysis. Finally, Section 12.4
rc
le
provides an analysis of the optimal liquidation problem, using limit orders (LOs)
pe
ne
irc
in
rc
r
le
pe
ne
irc
le
pe
We define limit order imbalance Pt at time t as the ratio of the quoted volume
ne
irc
vi
in
rc
r
le
V/� Vt
'
pe
ne
Pt = V:b + v:a
irc
t t
vi
in
rc
where V/ denotes the volume of LOs posted on the bid side of the LOB and v;,a
r
le
pe
ne
irc
denotes the volume of LOs posted on the ask side of the LOB. For simplicity,
vi
in
rc
le
may be computed by looking only at-the-touch, the best n-levels of the LOB,
ne
irc
in
rc
p
vi
296 Order Imbalance
r
le
pe
irc
vi
rc
le
pe
ne
irc
vi
in
in
rc
0.5 Figure 12.1 Order imbalance for ORCL on
r
le
u
(l)
pe
ne
Nov 1, 2013. In the bottom panels, blue
irc
@
cil 0 (red) dots show times and imbalance for
vi
in
"s
rc
le
>-<
pe
-0.5
ne
irc
vi
in
in
rc
-1��-��---��-�
10:00 12:00 14:00 16:00
r
le
pe
ne
Time
irc
vi
in
rc
le
��---jr_----1
pe
ne
0.5 0.5
- -- ¥F
irc
u u
(l) (l)
vi
in
in
@ @
rc
cil ciJ 0
r
le
"s "s
pe
ne
irc
>-<
-0.5 -0.5
vi
in
rc
le
pe
ne
irc
16:00 10:01 10:02 16:15 10:16 10:17
vi
Time Time
in
in
rc
r
le
pe
ne
irc
vi
in
rc
or volume that is posted within n ticks of the midprice. All of these are viable
r
le
irc
Some studies suggest that the best trade-off between predictive power versus
vi
in
in
rc
model complexity is strongest using only the touch. For simplicity we use only
r
le
this information for our estimations, although nothing in the model dictates this
pe
ne
irc
restriction.
vi
in
rc
Figure 12.1 shows order imbalance for Oracle Corporation (ORCL) computed
r
le
pe
from the Nov 1, 2013 event data (NASDAQ exchange) sampled every millisecond
ne
irc
and averaged over lOOms, and as mentioned above, using volume posted only at
vi
in
in
rc
the-touch. The bottom left and right panels show the imbalance for two-minute
r
le
pe
ne
chosen to be equally spaced along the points Pt E {-1, -0.6, -0.2, 0.2, 0.6, l}.
vi
in
rc
The top panel shows the order imbalance for the entire day and illustrates the
r
le
pe
ne
is placed into bins, the fluctuation rates are somewhat mitigated. Figure 12.2
in
in
rc
shows some properties of MO arrivals. The left panel shows the percentage of
r
le
pe
ne
vi
- so that, e.g., when buy MOs arrive, 40.1 percent of the time order imbalance
in
rc
is in regime 4. The right panel shows the arrival rate (per second) of MOs by
r
le
pe
ne
irc
normalising the number of MOs that arrive in a regime according to the time
vi
that order imbalance spends in that regime. It appears that the arrival of buy
in
in
rc
le
MOs is biased towards times when order imbalance is high, and similarly sell
ne
irc
in
rc
p
vi
12.2 lntraday Features 297
r
le
pe
irc
vi
rc
le
pe
ne
irc
•buy