0% found this document useful (0 votes)
63 views9 pages

Mid-Price Prediction in A Limit Order Book: Deepan Palguna and Ilya Pollak

This document proposes and evaluates several nonparametric predictors of mid-price movement in a limit order book based on order book features. It introduces predictors based on a state vector describing the order book configuration and features calculated from order book data. The predictors forecast mid-price changes over a time horizon. The document evaluates the predictors by incorporating them into an order execution strategy in simulations, finding some features provide statistically significant gains over strategies without price forecasting.

Uploaded by

ingaleharshal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views9 pages

Mid-Price Prediction in A Limit Order Book: Deepan Palguna and Ilya Pollak

This document proposes and evaluates several nonparametric predictors of mid-price movement in a limit order book based on order book features. It introduces predictors based on a state vector describing the order book configuration and features calculated from order book data. The predictors forecast mid-price changes over a time horizon. The document evaluates the predictors by incorporating them into an order execution strategy in simulations, finding some features provide statistically significant gains over strategies without price forecasting.

Uploaded by

ingaleharshal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

1

Mid-Price Prediction in a Limit Order Book


Deepan Palguna and Ilya Pollak

Abstract—We propose several nonparametric predictors of the 2010 [15], [11]) and take timely measures to prevent
mid-price in a limit order book, based on different features such events or to dampen their effects.
constructed from the order book data observed contempora-
neously and in the recent past. We evaluate our predictors in
The importance of order book forecasting has motivated
the context of an order execution task by constructing order academic research in modeling the order book dynamics,
execution strategies that incorporate these predictors. In our developing prediction algorithms, and empirically studying the
evaluations, we use a large dataset of historical order placements, behavior of order books [6].
cancellations, and trades over a five-month period in 2013- In the problem of optimal trade execution, order book
2014 for liquid stocks traded on NASDAQ. We show that some
dynamics is a critical element for studying the price impact of
of the features achieve statistically significant improvements
compared to some standard strategies that do not incorporate order sizes. Much previous work on optimal execution relies
price forecasting. For the two features that achieve the best on macro-level modeling of the price impact of a trade [4],
performance, the trading cost improvement is on the order of [2], [13]. The execution algorithms proposed in this literature
one basis point, which can be economically very significant for do not model the state or the dynamics of the order book, and
asset managers with large portfolio turnovers and for brokers
hence produce trading decisions that do not take into account
with considerable trading volumes.
the order book information.
A number of more recent papers on optimal execution
methods do take the order book information into account.
I. I NTRODUCTION
In [19], [1], [24], it is assumed that the order book has an
Many securities markets are organized as double auctions underlying simple shape to which it returns in the absence of
where each incoming limit order—i.e., an order to buy or sell large orders, a property called resilience. While the assumption
at a specific price—is stored in a data structure called the of order book resilience has some grounding in empirical
limit order book. The order flow is visible to every market observations [16], [5], the assumption of a single steady-state
participant in real time, with a delay determined by the speed shape is not supported by empirical studies and appears to be
of the data connection between the entity maintaining the too strong and too simplistic to enable accurate modeling of
orders and the market participant.1 A trade happens whenever price and size dynamics in practice. Order book information in
a marketable order arrives—i.e., an order to buy or sell at the form of order book imbalance is used in [26] to solve an
the best currently available price. To construct a trade, the optimal stopping problem for deciding the time to liquidate
incoming marketable order is matched with the best possible a single share. In [18], the authors take a reinforcement
entry (or, if necessary, multiple entries) of the opposite side learning approach to the problem of optimal order execution
of the order book. and compare their approach to a simple submit and leave
Accurately forecasting the dynamics of the order book is strategy.
crucial in a variety of application scenarios, for example: Other recent contributions model order arrivals as marked
(1) A broker charged with executing a trade. The broker’s point processes [12], [25], [9], [8]. These models are used
ability to forecast the behavior of the order book would to estimate the price impact of trades to help in making
help him optimize the trade execution schedule—i.e., order placement decisions. Such marked point process models
decide how to partition the total number of units to be have also been used to formulate optimal order execution and
traded into small amounts, how to time each small order, market making strategies, which have been explored in [3],
and how aggressively to trade it [19], [1], [24]. [14]. Due to the high dimensionality of limit order books, these
(2) An asset manager contemplating a portfolio rebalanc- methods necessitate reliable estimation of many parameters,
ing. A predictor of the order book dynamics would help which can be a challenge to perform.
forecast the cost incurred through the price impact of the In the present paper, we propose nonparametric approaches
trades required to perform the rebalancing [25], [23], [7]. to short-term forecasting of the mid-price change (i.e., the
(3) An exchange or a regulator charged with maintaining or- change in the average of the best offer and the best bid prices).
derly markets. Order book forecasting tools would help We introduce a state describing the configuration of the order
exchanges and regulators quickly detect the possibility book at each time, similar to the state used in [9]. We construct
of abnormal events (such as the Flash Crash of May 6, four state-dependent features which get updated during the
course of a trading day, as new order flow information arrives.
Authors are with the School of Electrical and Computer Engineering, Based on the feature values, we predict whether the mid-price
Purdue University, West Lafayette, Indiana 47907-2035. Contact e-mail: would increase, decrease or remain the same δ seconds into
dpalguna@purdue.edu. Earlier versions of this paper have been published the future. We also propose simpler price predictors, based
in [20] [21] and [22].
1 We do not consider here hidden or partially hidden orders which are on the contemporaneous share imbalance and the order flow
allowed by some markets. imbalance.

Electronic copy available at: http://ssrn.com/abstract=2544361


2

Bid to buy 5000 200 Offer to sell 100


In order to evaluate our predictors, we incorporate them shares at shares at $11.77
$11.73 per 500 1000 per share
into an order execution strategy. Through simulations on a set share
5000 3000 100 100
of liquid US stocks from NASDAQ’s ITCH dataset, we show
that several of our predictors result in statistically significant
average gains as compared to strategies whose execution Bid Side 11.73 11.74 11.76 11.77 Ask Side
schedules do not depend on the observations of the order book.
One of the three state-based features and the share imbalance A market order to sell
1000 shares
achieve the highest performance gains, followed by the order
flow imbalance whose performance gain is also statistically
significant. The remaining three state-based features do not
200
produce statistically significant performance improvements.
500 1000
We start our exposition in Section II by introducing some
5000 2000 100 100
terminology. Section III describes our prediction algorithm
using a three-dimensional state vector and four state-based
features. In Section IV, we describe the predictors that use Bid Side 11.73 11.74 11.76 11.77 Ask Side
the instantaneous share imbalance and order flow imbalance.
Fig. 1. Incoming market order
Section V presents our evaluation method that uses order
execution to test the effectiveness of our predictors. In Sec- 200
tion VI, we describe the execution strategy derived in [19], 500 1000
which assumes very simple order book dynamics. We use this 5000 3000 100 100
strategy as one of our benchmarks in Section VII, where we
present experimental results using real order book data from
Bid Side 11.73 11.74 11.76 11.77 Ask Side
NASDAQ’s ITCH data.

Limit order to buy 600


II. T ERMINOLOGY shares at $11.74

A limit order is an order to buy or sell a desired number


of units of an asset at a desired price. The order book at any
600 200
time t is the collection of all outstanding limit orders at all
500 1000
prices at that time. The highest price among all the buy limit
5000 3000 100 100
orders at time t is called the best bid price (Vb (t)) at time t.
The lowest price among all the sell limit orders at time t is
called the best ask price (Va (t)) or best offer price at time t. Bid Side 11.73 11.74 11.76 11.77 Ask Side
The difference between the best ask and the best bid prices is
Fig. 2. Incoming limit order
called the bid-ask spread. The average of the best ask and the
best bid is called the mid-price, denoted using V (t).
A marketable order is an order to buy or sell a desired
j k
S2 (t) = Number of shares at the
100
best ask price at time t
;
number of units of an asset at the best currently available
price. When a buy marketable order comes in, it gets executed S3 (t) = the bid-ask spread (in cents) at time t.
against the current limit orders at the best ask price. If there These states are similar to those used in [9]; however, in [9] it
are not enough units offered by the sellers at the best ask is assumed that all orders have equal sizes whereas we do not
price to fill the entire marketable order, the remainder of the make this assumption and use shares instead of orders. The
marketable order gets executed at the next best price, etc., mid-price change between time t and time t + δ is denoted as
until the entire marketable order is executed. In the same way, D(t, δ) = V (t + δ) − V (t).
incoming sell marketable orders get executed against the bid
side of the order book. We call all those orders that result in In our data set, every price is an integer number of cents.
an execution and take liquidity market orders. Therefore, the mid-prices and their changes are integer mul-
We assume that only three kinds of events can change tiples of 0.5 cents. We assume that the price changes D(t, δ)
the configuration of an order book: limit orders, limit order are temporally stationary over our estimation windows (up to
cancellations, and market orders. Figs. 1 and 2 illustrate the one trading day), in particular, that the marginal distribution
order book and its changes in response to incoming orders. of D(t, δ) does not depend on t and that the conditional
distribution of D(t, δ) given the state S(t) does not depend
III. F EATURE - BASED PREDICTION on t. We use τ (t) to denote the earliest time after t at which
the mid-price is different from V (t).
A. Description of three-dimensional states
We describe the state of the order book at time t with a B. Features
three-dimensional vector S(t) whose entries are:
j k For any state s and any time interval δ, we define four
S1 (t) = Number of shares at the
100
best bid price at time t
; conditional features:

Electronic copy available at: http://ssrn.com/abstract=2544361


3

• The conditional probability of non-zero mid-price change, between S and R if S1 − S2 and R1 − R2 have the same
sign. Otherwise, we define the distance between S and R to
P[D(t, δ) 6= 0|S(t) = s] (1)
be infinite:
The conditional expectation of the mid-price change
(

dE (S, R) if sgn(S1 − S2 ) = sgn(R1 − R2 ),
d(S, R) =
E[D(t, δ)|S(t) = s] (2) ∞ otherwise,
• The conditional expectation of mid-price change at the where dE is the Euclidean distance between the states and
time of first mid-price change sgn(0) = 0.
E[D(t, τ (t))|S(t) = s] (3)
D. Prediction of the mid-price change
• The conditional expectation of the time to first change
We propose to predict mid-price changes in two steps – the
E[τ (t)|S(t) = s] (4) first one for predicting whether the mid-price will change a
fixed amount of time (δ) into the future, and the second one
to predict whether the mid-price change would be positive
C. Estimating conditional features from data
or negative. At time t, we compute the state S(t). We then
We assume ergodicity and empirically estimate these fea- estimate the four conditional features of Eqs. (1,2,3,4) for
tures as temporal averages. Our temporal discretization step is S(t) and its K nearest neighbours using the distance function
∆t = 1ms. We compute all our empirical estimates within a defined in Eq. (III-C). The computation of these features is
single trading day, and set t = 0 at the beginning of the trading over the interval [0, t], as described earlier. The features used
day. We assume that δ in Eqs. (1,2) contains an integer number for prediction are the simple average of the features of the K
of discretization steps. Let s be a particular state. At any time nearest neighbours of the current state.
t—which is an integer multiple of ∆t—during the trading day, In the first step of prediction, we solve a binary hypothesis
we define testing problem where the null hypothesis is that the mid-
#{S(n)=s} [0, t] price change is zero and the alternative hypothesis is that
the mid-price change is non-zero. For this step, which we
to be the number of occurrences of the event S(n) = s among
call the change detection step, we propose two rules. The
the times n = 0, ∆t, 2∆t, . . . , t − δ. We similarly define
first one selects the alternative hypothesis of a non-zero mid-
#{S(n)=s and D(n,δ)6=0} [0, t]
price change if the estimated conditional mid-price change
probability in Eq. (1) is above a threshold θ. Otherwise, the
to be the number of occurrences of both {S(n) = s} and algorithm selects the null hypothesis of zero mid-price change.
{D(n, δ) 6= 0} among the times n = 0, ∆t, 2∆t, . . . , t − δ. The second algorithm selects the alternative hypothesis if the
We estimate the conditional probability in Eq. (1) as the ratio estimated conditional time to first mid-price change in Eq. (4)
#{S(n)=s and D(n,δ)6=0} [0, t] is lesser than δ and selects the null hypothesis otherwise.
#{S(n)=s} [0, t] For the second step, called the sign prediction step, we
propose two rules. The first rule is to predict an upward
We estimate the conditional expectation in Eq. (2) as movement in mid-price if the feature defined in Eq. (2)
is positive and predict a downward movement in mid-price
X
D(n, δ)
n:S(n)=s
otherwise. The second rule is to predict an upward movement
, in mid-price if the feature defined in Eq. (3) is positive and
#{S(n)=s} [0, t]
predict a downward movement otherwise.
where the summation in the numerator is performed over all We combine the two predictors in each step based on the
the times n = 0, ∆t, 2∆t, . . . , t − δ when event S(n) = s error rates conditioned on the state. For each change detection
occurs. The conditional expectations in Eq. (3,4) are similarly rule, we measure change detection error rate and for each
estimated as sign prediction rule, we measure sign prediction error rate, all
X
D(n, τ (n))
X
τ (n) conditioned on the state. A change detection error is the event
where a change is predicted and no change is actually observed
n:S(n)=s n:S(n)=s
and respectively. or the event where no change is predicted but change is
#{S(n)=s} [0, t] #{S(n)=s} [0, t]
actually observed. The change detection error rate is measured
Using the three-dimensional state can result in there being as the ratio of the number of change detection errors to the
too many states for features conditioned on each state to total number of steps when a prediction is made. Similarly,
be estimated reliably. Therefore, at the time of prediction, a sign prediction error is the event where an upward change
we perform simple averaging of the features of K nearest is predicted and the mid-price actually moves downward or
neighbours of the current state [17] and use the average the event where a downward change is predicted and the mid-
features for prediction. To find the nearest neighbours, we price actually moves upward. The sign prediction error rate
define the proximity of states using the following distance is measured as the ratio of the number of sign prediction
function. For state S = {S1 , S2 , S3 } and R = {R1 , R2 , R3 } errors to the total number of times a change is predicted.
we define the distance between be the Euclidean distance The conditional error rates corresponding to the four rules,
4

conditioned on each state are measured over the time steps This can be done for both buying and selling. We describe
n = 0, ∆t, 2∆t, . . . , t − δ. If at time t the predictions of the it here for buying. We assume that trades are constrained
two rules disagree at any of the two stages, then we pick the to happen at time steps t0 , t1 , · · · , tN , which are equally
prediction of the one with the lower conditional error rate. spaced δ seconds apart. Our benchmark is a uniform execution
Therefore, the final prediction algorithm first predicts strategy2 which uses market orders of size X0 /(N +1) at times
whether a change is going to occur or not based on the two t = t0 , t1 , · · · , t N .
change detection rules and their corresponding conditional We propose a modification to uniform execution that makes
error rates. If a change is predicted at this stage, the algorithm use of our predictors. Specifically, if at time ti we believe that
goes to the sign prediction stage and predicts whether the the price will go up soon, we buy more than suggested by the
change would be positive or negative in a similar fashion. uniform strategy. If at time ti we believe that the price will
Otherwise, the algorithm predicts no change and stops. As go down in the near future, we buy less than suggested by the
mentioned earlier, the features and the error rates used for the uniform strategy. We simply follow the uniform strategy if no
final prediction are averaged over K nearest neighbours. change is predicted. We use parameter π ∈ [0, 1] to indicate by
how much we accelerate or decelerate buying in response to
IV. P REDICTION WITH SHARE IMBALANCE AND ORDER our predictions. The value π = 1 means a 100% increase in the
FLOW IMBALANCE number of shares in response to an upward change prediction
A. Prediction with share imbalance and a 100% reduction in the number of shares in response to a
downward change prediction. The value π = 0 corresponds to
The share imbalance SI(t) at time t is defined as the uniform strategy. For the case of selling, the action that is
#shares at the best bid (t) opposite to the action while buying would be followed when
SI(t) = (5) mid-price change is predicted, and uniform execution would
#shares at the best bid (t) + #shares at the best ask (t)
be followed when no change is predicted.
We use a two-step prediction algorithm, where the change
It is possible for this strategy to postpone the entire exe-
detection step predicts that the mid-price will change at time
cution to the last instant (tN ). This could result in adverse
t + δ if
execution costs as a result of our large order getting crossed
SI(t) 6= 1/2.
at deeper levels of the book. In order to avoid large orders
If the change detection step predicts a change, then we predict getting executed at the end, we perform uniform execution
the sign of mid-price change as follows: towards the end of the algorithm. In most cases, there are more
( than 100 shares at the best quote. Hence, we make sure that
up if SI(t) > 1/2 we perform uniform execution starting from the time instant
Sign prediction at t = (6)
down if SI(t) < 1/2 when delaying execution by one more step would result in
executing more than 100 shares at any future step. We show
the exact procedure for buying using the pseudocode in Fig. 3.
B. Prediction with order flow imbalance For the sake of clarity in the pseudocode, we do not show the
steps when the order book is updated.
The order flow imbalance feature, OFI(t), defined in [7]
incorporates temporal information into the characterization of
supply-demand imbalance. At time Ti , the bid price, ask price, VI. C OMPARISON WITH THE O BIZHAEVA -WANG
number of shares at the best bid and number of shares at the STRATEGY
best ask are denoted using Vb (Ti ), Va (Ti ), qb (Ti ) and qa (Ti ), In this section, we describe an optimal order execution
respectively. We let Ti+1 be the first time instant after Ti strategy that operates on very simple assumptions for order
when one of these quantities changes, signifying a change in book dynamics. Following the conventions and notations in
the supply-demand imbalance. This is quantified using ei+1 Obizhaeva and Wang’s paper [19], the objective of the problem
defined in Eq. (7). We define the order flow imbalance at time in its discrete-time version, is to buy X0 shares using market
t as the sum of ei as measured at the time of the past E such orders over N + 1 discrete time steps given by t0 , t1 , · · · ,
events, where E is a user-defined parameter. tN. For a risk-neutral
 trader, the objective is to minimize
The change detection step predicts that the mid-price will N
P N
P
change at time t + δ if E P̄n xn , subject to the constraint xn = X0 . In
n=0 n=0
the preceding equations, xn and P̄n are the number of shares
|OFI(t)| > 0.
purchased at the nth time step and the average execution cost
If the change detection step predicts a change, then we predict at that step respectively. Since the objective is to buy using
the sign of mid-price change as the sign of the flow imbalance. market orders, it is sufficient to consider only the ask side of
the book. The assumptions of the model are as follows:
V. E VALUATING PREDICTORS USING ORDER EXECUTION • The market participants are assumed to be comprised of
ALGORITHMS one large trader and many small traders.
In order to test the effectiveness of our predictors, we 2 In the literature, such strategies are sometimes called TWAP, for time-
incorporate them into an order execution problem whose goal weighted average price. This is because the average price paid by this strategy
is to execute X0 shares within the time interval [t0 , tN ]. is approximately equal to the average price of the security during [t0 , tN ].
5

ei+1 = I{Vb (Ti+1 )≥Vb (Ti )} qb (Ti+1 ) − I{Vb (Ti+1 )≤Vb (Ti )} qb (Ti ) − I{Va (Ti+1 )≤Va (Ti )} qa (Ti+1 ) + I{Va (Ti+1 )≥Va (Ti )} qa (Ti ) (7)

function E XECUTE B UYO RDER I MBALANCE(X0, N, δ, t0 , π) summing together the two price impacts as
i←0 n(t) n(t)
while i ≤ N do
X X
At = Ft + s/2 + λ xti + xti κe−ρ(t−ti )
t ← ti
qb (t) i=0 i=0
SI(t) ← qb (t)+q a (t)
if i 6= N then If a trade of size x is executed at time t, the block order book
Xti
if N−i < 100 then assumption means that the ask price at t+ obeys the following
if SI(t) 6= 1/2 then equation
% Predict that change will happen At+
if SI(t) > 1/2 then
Z
% Predict upward movement qdP = x
Execute min{ (1+π)X
N+1
0
, Xti } At
else
% Predict downward movement From this equation, it can be inferred that the ask price imme-
Execute min{ (1−π)X
N+1
0
, Xti } diately after the trade is At + x/q, and the average execution
end if price is At + x/(2q). Following [19], we fix λ = 1/(2q),
else which means that if there are no more large trades, the ask
X0
Execute min{ N+1 , Xti }
end if price would converge to At +x/(2q). Comparing At +x/q with
else the equation At+ = At + λx + κx, we get that κ = 1/q − λ.
Execute min{100, Xti } For the block shaped order book, this translates to κ = 1/(2q).
end if The optimal number of shares at each time step can now be
else found using dynamic programming. Denoting the total number
Execute XN
end if of shares that are unexecuted at time step tn using Xtn and
i←i+1 assuming that any two time steps ti and t(i−1) are spaced δ
end while seconds apart, the solution is given by the recursive formula
end function shown in Eq. (8) and stated as Proposition 1 in [19]. In Eq. (8),
Dtn is the deviation of the ask price from its steady state
value, which is equal to the sum of all temporary impacts i.e,
n(t)
xti κe−ρ(t−ti ) . The coefficients αn+1 , βn+1 , γn+1
P
Fig. 3. Buying with price prediction based on the share imbalance, and Dtn =
ensuring that not more than 100 shares get executed at any time step. i=0
Pseudocode assumes that at each ti , the order book is up to date. and ǫn+1 are calculated as shown in Eq. (9). The boundary
conditions for Eq. (9) are αN = 1/(2q) − λ, βN = 1, and
γN = 0.

A. Estimating model parameters


• In the absence of the large trader, the ask side of the
order book is assumed to have a steady state shape with Under the block order book assumption, this model only has
q × dP shares over any price interval [P, P + dP ). two parameters. The first one is the density q of limit orders in
• In the absence of the large trader, the security has a the ask side and the second one is the temporary price impact
fundamental price Ft , which follows a Brownian motion, parameter ρ. As an estimate of the density parameter, we use
and the steady state bid-ask spread is equal to s. the sample average of the number of shares, averaged over
• The mid-price of the security, Vt , would follow the same each price on the appropriate side of the order book and over
dynamics, and the ask price would follow the dynamics time instants separated by 1 second.
of Vt + s/2 if it were not for the large trader who impacts The purpose of the resiliency parameter is to quantify the
their dynamics. rate at which the order book reverts back to nominal levels
• The large trader submits market orders and any buy after it encounters a shock. There have been many attempts
market order of size x is assumed to have a permanent in the literature to investigate and quantify resiliency. In [10],
price impact equal to λx. the authors take a nonparametric approach to characterizing
• Additionally, it also has a temporary price impact that resiliency. While [5] studies the nature of the order book
decays exponentially with time. For a trade of size x, event immediately after a shock, the authors in [10] study
placed at time ti < t, the temporary impact at time t is the evolution of the order book over many events around
equal to xκe−ρ(t−ti ) . aggressive orders. The authors observe that bid-ask spreads are
very low just before an aggressive order, consistent with [5].
After the aggressive order, the spreads revert back to levels that
If the number of trades during the interval [0, t) is denoted are close to the time average. However, estimating resiliency
using n(t), then the ask price at time t can be calculated by as described in the model is an open problem and beyond the
6

1
xn = − ǫn+1 [Dtn (1 − βn+1 e−ρδ + 2κγn+1 e−ρδ ) − Xtn (λ + 2αn+1 − βn+1 κe−ρδ )] (8)
2
1
αn = αn+1 − ǫn+1 (λ + 2αn+1 − βn+1 κe−ρδ )2
4
−ρδ 1
βn = βn+1 e + δn+1 (1 − βn+1 e−ρδ + 2κγn+1 e−ρδ )(λ + 2αn+1 − βn+1 κe−ρδ )
2
1
γn = γn+1 e−ρδ − δn+1 (1 − βn+1 e−ρδ + 2κγn+1 e−ρδ )
4
ǫn+1 = [1/(2q) + αn+1 − βn+1 κe−ρδ + γn+1 κ2 e−2ρδ ]−1 (9)

scope of our paper. Based on the behaviour of the algorithm, The stock universe consists of Q = 50 liquid3 stocks as
we can identify two extreme cases between which all other measured over the period September 1 to September 30, 2013.
cases would fall. We consider these cases for the purpose of We perform simulations on each trading day in the 5-month
our experiments in order to circumvent the estimation of ρ. period of October 1, 2013 to February 28, 2014. Feature
The first case is when ρ → ∞. When ρ is very large, our estimation starts at 9:30am, and we simulate the execution
experiments show that the strategy becomes indistinguishable of X0 shares between 2:30pm and 3:30pm on each day. In
from uniform execution. The second case is when ρ → 0. In a real application scenario, a client would send an order to
this case, the strategy behaves very differently from uniform a broker and specify X0 . Therefore, the broker who runs the
execution. It executes half the shares at the first instant (t0 ) execution algorithm would not have any control over X0 . We
and the other half at the very last instant (tN ). note that we would get similar simulated execution costs per
share for a wide range of X0 since we do not modify the order
book when our simulated orders are executed.
VII. P ERFORMANCE AND COMPARISON OF PREDICTION In order to find out whether our results are statistically
ALGORITHMS significant, we compute the standard errors, η̂, for the average
relative improvement of our strategy’s execution cost. Specifi-
We use NASDAQ’s ITCH data from October 2013 to
cally, suppose that we simulate both the uniform strategy and
February 2014. This data set provides the complete order
our execution strategy with some fixed values of the param-
series from which limit order books can be constructed for all
eters, on D days and Q stocks. Our strategy would produce
securities traded on NASDAQ. For order execution strategies
the following execution cost improvements relative to uniform
that buy X0 shares, we use the following quantity to measure
execution [calculated through Eqs. (10,11)]: R1 , R2 , · · · , RM
the execution cost improvement of strategy A relative to
where M ≡ DQ is the number of samples from D days with
strategy B:
Q stocks on each day. We estimate the mean relative cost
Cost of strategy B − Cost of strategy A improvement and the standard deviation of relative cost im-
R= (10)
Cost of strategy B provement using the sample mean µ̂ and the sample standard
For the case of selling, we use deviation σ̂, respectively. We assume that R1 , R2 , · · · , RM
are uncorrelated across stocks and have a common standard
Cost of strategy A − Cost of strategy B deviation. Then the standard error (i.e., the standard deviation
R= (11)
Cost of strategy B of the sample mean) can be estimated as √σ̂M .
Positive values of this quantity correspond to strategy A
outperforming the strategy B. B. Experiments with conditional features
In our experiments we observe that the expected mid-price
A. Order execution experiment setup change at the time of the first mid-price change, conditional on
the three-dimensional state, is the only sign prediction feature
One important issue in simulating execution strategies is among those in Eqs. (1-4) that gives statistically significant
that it is not possible to replicate market impact with historical improvements compared to the uniform execution strategy.
data. This is because future data points, which are made up We describe the results for the case when we always predict
of public orders, cannot respond to simulated orders. In our mid-price change and use the feature described in Eq. (3)
experiments with market orders, we execute a market order for predicting the sign of mid-price change. We average this
at time t as if it will get executed when the order book is in feature over K = 20 nearest neighbours and let π = 1. We
its historical configuration at time t. But we do not modify show the results in Table I. The mean improvements compared
the order book since it is extremely hard to simulate market to the uniform execution strategy are shown in basis points4
impact. In other words, although simulated trades consume
3 Liquidity in our work is defined as the average daily volume of shares
liquidity and large simulated trades can walk up the book, we
simply simulate the process and do not modify the book. If an traded, averaged over September 1 to September 30, 2013. We pick 50 stocks
with the highest average daily trading volume over this interval.
execution strategy prescribes a non-integer amount of shares 4 One basis point is 0.01%, i.e., 0.0001, abbreviated “bp” in singular and
at any stage, then we round it to the nearest integer. “bps” in plural.
7

TABLE I TABLE III


S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS
OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 3600 OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 3600
SHARES USING THE FEATURE OF E Q . (3) WITH δ = 1 SECOND SHARES USING OFI WITH δ = 1 SECOND AND E = 10 CHANGE EVENTS

Buying Selling Buying Selling


Mean improvement (µ̂) × 104 1.128 0.839 Mean improvement (µ̂) × 104 0.2727 0.2342
Sample standard deviation (σ̂) × 104 15.86 15.77 Sample standard deviation (σ̂) × 104 0.1952 0.1856
Standard error (η̂ = √σ̂M ) × 104 0.222 0.221 Standard error (η̂ = √σ̂M ) × 104 0.0273 0.0259
µ̂ µ̂
η̂ 5.077 3.798 η̂ 9.978 9.0114

TABLE II TABLE IV
S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS
OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 3600 OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 10800
SHARES USING SI WITH δ = 1 SECOND SHARES WITH δ = 1 SECOND USING BOTH SI AND OFI, AND E = 10

Buying Selling Buying Selling


Mean improvement (µ̂) × 104 1.117 0.8425 Mean improvement (µ̂) × 104 0.8177 0.6781
Sample standard deviation (σ̂) × 104 8.247 8.298 Sample standard deviation (σ̂) × 104 5.725 5.621
Standard error (η̂ = √σ̂M ) × 104 0.1155 0.1162 Standard error (η̂ = √σ̂M ) × 104 0.0802 0.0787
µ̂ µ̂
η̂ 9.671 7.254 η̂ 10.20 8.615

in the first row. For both buying and selling, the improvement classify it as a “strong down” prediction. This is summarized
is around 1bp. The t-statistics presented in the last row of the in Eq. (12).
table suggest that these mean improvements are statistically If we are buying 10800 shares in one hour with δ = 1
significant. We next compare these results with the results second, then we would buy 3 shares per second if the price
obtained by using predictors based on the share imbalance is always predicted to be flat. If the prediction is a strong
and order flow imbalance as explained in Section IV-A. up, weak up, strong down or weak down, we buy 6 shares,
4 shares, 2 shares or 0 shares respectively. Our strategy for
C. Experiments with share imbalance and order flow imbal- selling is defined similarly. Table IV shows the results for this
ance strategy. For comparison, Table V shows the results for trading
10800 shares in one hour using the SI only. When buying, this
Table II shows the mean and standard error of the improve-
strategy buys 6, 3, and 0 shares when the prediction is up, flat,
ments over the execution strategy for buying and selling 3600
and down, respectively. While using the two features together
shares using the share imbalance feature. The mean improve-
still produces statistically significant improvements compared
ments are similar to those in Table I: they are significantly
to the uniform execution strategy, the improvements do not
positive and around 1 basis point.
outperform using the share imbalance alone.
Table III shows the mean improvements for buying and sell-
In Tables VI and VII we show the performance of the
ing with the order flow imbalance where the OFI is obtained
execution algorithm with perfect knowledge of the direction
by summing over E = 10 changes in the first level of the
of price movement δ seconds into the future. The tables
order book. This strategy also shows positive and significant
show the improvements relative to the uniform execution
improvements as compared to the uniform execution, but the
mean improvements are only around 0.2-0.3bps.
TABLE V
S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS
D. Combining share imbalance and order flow imbalance OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 10800
SHARES WITH δ = 1 SECOND , USING SHARE IMBALANCE ONLY
We now investigate whether combining the SI and OFI
leads to improved performance. The basic idea is to assign Buying Selling
a higher confidence to the prediction if the two features agree. Mean improvement (µ̂) × 104 1.0977 0.8387
Specifically, if the SI predicts that the price will go up and Sample standard deviation (σ̂) × 104 8.1827 8.2475
the OFI predicts that it will not, we classify it as a “weak up” Standard error (η̂ = √σ̂M ) × 104 0.1146 0.1549
prediction. If the SI predicts that the price will go down and the µ̂
OFI predicts that it will not, we classify it as a “weak down” η̂ 9.5801 7.2629
prediction. If both the SI and OFI predict up, we classify it as
a “strong up” prediction; and if they both predict “down”, we
8




strong up if SI(t) > 1/2 and OFI(t) > 0
if SI(t) > 1/2 OFI(t) ≤ 0

weak up and


Prediction at t = strong down if SI(t) < 1/2 and OFI(t) < 0 (12)

weak down if SI(t) < 1/2 and OFI(t) ≥ 0





flat otherwise

TABLE VIII
S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS execution strategy. This can be economically very significant
OF RELATIVE EXECUTION COST IMPROVEMENTS FOR EXECUTING 10800 for asset managers with large portfolio turnovers and for
SHARES WITH USING THE O BIZHAEVA -WANG STRATEGY, δ = 1 SECOND ,
brokers with considerable trading volumes.
ρ = 10−6

Buying Selling R EFERENCES


Mean improvement (µ̂) × 104 0.7284 -2.881 [1] A. Alfonsi, A. Fruth, and A. Schied. Optimal execution strategies in
Sample standard deviation (σ̂) × 104 14.235 14.238 limit order books with general shape functions. Quantitative Finance,
Standard error (η̂ = √σ̂M ) × 104 0.1993 0.1993 10(2):143–157, June 2010.
µ̂ [2] R. Almgren and N. Chriss. Optimal execution of portfolio transactions.
η̂ 3.654 -14.45 Journal of Risk, 3(2):5–40, 2001.
[3] E. Bayraktar and M. Ludkovski. Liquidation in limit order books with
controlled intensity. January 2012. Working paper, available at arXiv:
http://arxiv.org/abs/1105.0247.
[4] D. Bertsimas and A. W. Lo. Optimal control of execution costs. Journal
of Financial Markets, 1:1–50, 1998.
[5] B. Biais, P. Hillion, and C. Spatt. An empirical analysis of the limit
strategy for δ = 1, 2, 10 and 30 seconds. With larger δ, order book and the order flow in the Paris Bourse. Journal of Finance,
the mean improvement increases since the algorithm is able 50(5):1655–1689, December 1995.
to forecast longer into the future. However, note that these [6] R. Cont. Statistical modeling of high frequency financial data: Facts,
models and challenges. IEEE Signal Processing Magazine, 28(5):16–25,
perfect-foresight experiments outperform our predictors only September 2011.
when they are able to predict perfectly for tens of seconds into [7] R. Cont, A. Kukanov, and S. Stoikov. The price impact of order book
the future. events. Journal of Financial Econometrics, 2013.
[8] R. Cont and A. Larrard. Price dynamics in a markovian limit or-
der market. February 2012. Working paper, available at SSRN:
E. Experiments with the Obizhaeva-Wang strategy http://ssrn.com/abstract=1735338.
[9] R. Cont, S. Stoikov, and R. Talreja. A stochastic model for order book
As discussed in Section VI, we consider two instances of the dynamics. Operations Research, 58(3):549–563, May–June 2010.
Obizhaeva-Wang strategy, resulting from two extreme settings [10] H. Degryse, F. Jong, M. Ravenswaaij, and G. Wuyts. Aggressive orders
and the resiliency of a limit order market. Review of Finance, 9(2):201–
of the temporary impact decay parameter ρ. If ρ → ∞, then 242, 2005.
the strategy is identical to uniform execution, and therefore [11] D. Easley, M. M. L. de Prado, and M. O’Hara. The microstructure of
the average improvements for both buying and selling are the ’flash crash’: Flow toxicity, liquidity crashes and the probability of
informed trading. The Journal of Portfolio Management, 37(2):118–128,
identically equal to zero. If ρ → 0, then the strategy executes Winter 2011.
half the shares at t0 and half at tN . We observe in Table VIII [12] R. F. Engle. The econometrics of ultra-high frequency data. Economet-
that the mean improvement averaged over buying and selling rica, 68(1):1–22, January 2000.
[13] R. C. Grinold and R. N. Kahn. Active Portfolio Management: A
is negative. Quantitative Approach for Providing Superior Returns and Controlling
Risk. McGraw-Hill, 2nd edition edition, 2000.
VIII. C ONCLUSIONS [14] F. Guilbaud and H. Pham. Optimal high-frequency trading with limit
and market orders. Quantitative Finance, pages 1–16, August 2012.
We have proposed several nonparametric methods to predict [15] A. A. Kirilenko, A. S. Kyle, M. Samadi, and T. Tuzun. The flash crash:
The impact of high frequency trading on an electronic market. Working
short-term mid-price changes in limit order books. One of paper, available at SSRN: http://ssrn.com/abstract=1686004, May 26,
the predictors relies on features conditioned on the state 2011.
of the order book. These features are estimated during the [16] J. Large. Measuring the resiliency of an electronic limit order book.
trading day using mild assumptions about their behaviour. We Journal of Financial Markets, 10(1):1–25, February 2007.
[17] D. M. Mount and S. Arya. Approximate K nearest neighbors.
also evaluate predictors based on the contemporaneous share http://www.cs.umd.edu/∼ mount/ANN/.
imbalance and order flow imbalance. In order to evaluate our [18] Y. Nevmyvaka, Y. Feng, and M. Kearns. Reinforcement learning for
predictors, we incorporate them into an order execution strat- optimized trade execution. 2006.
[19] A. Obizhaeva and J. Wang. Optimal trading strategy and supply/demand
egy. As benchmarks, we use two execution strategies found in dynamics. Journal of Financial Markets, 16:1–32, 2013.
the literature whose trading schedules are independent of the [20] D. Palguna. and I. Pollak. Non-parametric prediction of the mid-
observations of the order book. Through experiments on 50 price dynamics in a limit order book. In 2012 IEEE Statistical Signal
Processing Workshop (SSP), pages 896–899, Aug 2012.
liquid stocks over NASDAQ’s order book data from October [21] D. Palguna. and I. Pollak. Non-parametric prediction of the mid-price
2013 to February 2014, we find that our predictors result dynamics in a limit order book. In 2013 IEEE Information Theory
in statistically significant improvements over the benchmarks. Workshop (ITW), pages 1–5, Sept 2013.
[22] D. Palguna. and I. Pollak. Non-parametric prediction of the mid-price
Two of our strategies produce a statistically significant trading dynamics in a limit order book. In 2013 IEEE Global Conference on
cost improvement of about 1bp compared to the uniform Signal and Information Processing (GlobalSIP), Dec 2013.
9

TABLE VI
S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS OF RELATIVE EXECUTION COST IMPROVEMENTS FOR BUYING 3600 SHARES
WITH DIFFERENT δ VALUES IN SECONDS AND WITH PERFECT PREDICTION

Buy (δ = 1) Buy (δ = 2) Buy (δ = 10) Buy (δ = 30)


Mean improvement (µ̂) × 104 0.1092 0.2051 0.7830 1.8219
Sample standard deviation (σ̂) × 104 0.2114 0.3729 1.145 2.484
Standard error (η̂ = √σ̂M ) × 104 0.00296 0.00522 0.0160 0.0347
µ̂
η̂ 36.908 39.272 48.835 52.35

TABLE VII
S AMPLE MEAN , SAMPLE STANDARD DEVIATION , AND STANDARD ERRORS OF RELATIVE EXECUTION COST IMPROVEMENTS FOR SELLING 3600 SHARES
WITH DIFFERENT δ VALUES IN SECONDS AND WITH PERFECT PREDICTION

Sell (δ = 1) Sell (δ = 2) Sell (δ = 10) Sell (δ = 30)


Mean improvement (µ̂) × 104 0.1017 0.1915 0.7643 1.799
Sample standard deviation (σ̂) × 104 0.2991 0.3683 1.582 2.433
Standard error (η̂ = √σ̂M ) × 104 0.00299 0.00516 0.0113 0.0307
µ̂
η̂ 33.985 37.144 48.330 52.81

[23] M. Potters and J.-P. Bouchaud. More statistical properties of order books
and price impact. Physica A, 324(1–2):133–140, June 2003.
[24] S. Predoiu, G. Shaikhet, and S. Shreve. Optimal execution in a general
one-sided limit order book. SIAM Journal on Financial Mathematics,
2:183–212, March 2011.
[25] E. Smith, J. D. Farmer, L. Gillemot, and S. Krishnamurthy. Statis-
tical theory of the continuous double auction. Quantitative Finance,
3(6):481–514, 2003.
[26] S. Stoikov and R. Waeber. Optimal asset liquidation using limit order
book information. September 2012. Working paper, available at SSRN:
http://ssrn.com/abstract=2113827.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy