Sei sulla pagina 1di 9

1.

0 Introduction
In this paper, we will examine the article A stochastic model for order book dynamics by
Rama Cont,Sasha Stoikov & Rishi Talreja (henceforth referred to as CST model),February 24,
2010 and attempt to replicate the model that is suggested. The CST model is part of a larger class
of Zero-Intelligence (ZI) models and extends the basic premise of these ZI models by assuming a
power-law distribution for limit order sizes while at the same time recognizing the markovian
nature of the limit Order Books and utilizes this framework to calculate conditional probabilities.

2.0 Description of Hypothesis

3.0 Literature Review


There are two main approaches to order-book modeling:

-Agent-based approach: traders condition trades based on current state of order-book and
consider strategic interactions among another trader.

-Zero-Intelligence approach: stochastic models that assume arrival rates of


incoming/cancellations follow some stochastic process.

Seppi, Parlour, Foucault, & Rosu consider strategic trader models where traders condition their
trade based on the book. These models are however hard to estimate and use in applications.

-need to expand on this section. . . .


4.0 CST Model
Statistical model that helps analyze CDA under assumption of Poisson order flows. Makes
predictions about price volatility, depth, bid/ask spread, price Impact function and probability of
filling orders.

The model

LBOs are placed with uniform probability in range , $ and LSOs are placed
in [$ , )
Limit Orders can be placed inside spread
Market Orders arrive at chunks of shares at rate of per unit time
Limit Orders arrive at chunks of shares, a distance of L ticks (L 1) from opposite best
quote at rate of - () = 23 shares per unit price, per unit time.
Cancellations existing limit orders is proportional to number of shares at that level. If
number of shares at a price level is x, then cancellation rate is per unit time

Above events occur at independent exponential times.


Assume = 1. Hence, at any given time, only 1 share can arrive or leave.

Market Dimensional Analysis

Using dimension analysis, we can guess basic properties of the limit Order Book using our
simple model above:

Parameter Description Dimensions

Limit Order Rate


Market Order Rate


Cancellation Rate 1

Tick Size

Characteristic Order Size shares

There are three order-flow parameters and 3 fundamental dimensions (shares,price and
time)
Discrete parameters are tick size and
Ignore the Discrete parameters and invert the above table to solve for 3 fundamental
dimensions:

Dimensions Parameter Combinations


Shares

T 1


Ticks

Note, dimensions of inversion table is called characteristic dimensions since its


characteristic of dimen- sional analysis, i.e, shares = characteristic shares:= Nc,
characteristic time:= tc, characterisstic price interval or ticks:= pc.

Non-Dimensional Parameters

Since is the lot size, measured in shares, non-dimensional scale parameter based on order size
is constructed by dividing ordersize by characteristic shares, i.e:
C FGC
1) = =
DE H

represents chunkiness of orders stored in the LOB. If 0, price diffusion cannot


occur since there are no shares at that level. Its unrealistic assumption & poor
approximation to market. This is because if we assume a fixed depth and 0, this
happens if market orders arrive too fast and suppose cancellations tend to 0, then # of
individual orders would be infinite. A contradiction!
N
Note, in non-dimensional terms, # of shares can be expressed as , and using 1), we get:
DE

NO
2)
C

If = 0, which implies = 0, then there is no decay of orders and depending on or , either


depth will accumulate without bound or spread will become infinite. As long as > 0, i.e as
long as we allow cancellations to occur,this is not a problem.

Now, we will use dimensional scaling relationships to determine various properties of the market
which does depend on order flow rates

Spread

Inside spread, LOs are removed due to incoming market orders or cancellation. In a steady state
situation, total arrival rate of limit orders is 2 which must balance arrival rate of market
orders and limit orders leaving due to cancellation 2 + . Hence we must have 2 =
2 + and solving for s, we find:
HUGV
3) ~
W

inside spread, when = 0, we see this reduces to the characteristic price interval which is
exact.

Variance & Volatility

XYZ[ \ H\
Variance has dimensions of . According to dimensional analysis, this implies , i.e
X W\

H\
4) F ~
W\

Hence, volatility must scale as. . .


H
5) ~
W

Asymptotic Depth

, i.e

We see that asymptotic depth has dimensions of shares/tick, hence, using above inversion table we see: 5)
d*=.

*Intuitively, deep in the books, LOs mostly are cancelled. Execution due to incoming market Orders is
low. Hence total arrival rate of LO is dt and departure rate of LOs being cancelled is ddt, where d is
number of shares at that price level. For these to balance, we must have dt = ddt, or solving for d, we
get. . .

d=
Slope of Order Book

This is the depth profile near mid-point. Its an important determinant of liquidity since it effects price
response when MO arrives. This has dimensions, shares , i.e derivative wrt price of the book density.
Now,

2
price2Nc 2 . Hence, slope scales as...

Hence we see, the slope is roughly asymptotic depth to spread ratio

Market Impact

provides measure of liquidity for executing market orders. For a given number of shares n, we want to see

how much impact buying/selling will have on price. Price has dimensions of ticks. This has parameter

combination

4.1 Quantity at given Price Level as a Birth-Death Process

WLOG, lets focus on the ask as the bid side is symmetric. Let $_ represent the number of orders at ask
at a particular price level at time t. Over time [, + ], only one event can take place. Hence $_ makes
a transition:

_ W
$Ua $_ + 1 if limit Order occurs w/ =
FHUFWUGVde UGVdf

_ HUGV e
$Ua $_ 1 if market or Cancel occurs w/ P(death) =
FHUFWUGVde UGVdf

Hence, $ is a Birth-Death Process which is a CTMC with state space 0,1,2 where transition from
state (there are orders at time t) can go to state = + 1 = 1

Hence for any price level, quantities in limit order book behave like this:
a
Quantity remains in state i for a period of time exponentially distributed w/mean
FHUFWUGYUGVdf

It then jumps to another state. This state, is state j. Hence, if we are in state i, probability of going
to j = i+1 occurs if birth occurs before death. This is same as exponential random variable with
birth rate occurs before independent exponential random variable with death rate or
W
cancellation occurring. This is same as
FHUFWUGYUGVdf
a
It then stays at this state j for a period of time exponentially distributed with mean
FHUFWUGjUGVdf

and so on

5.0 Laplace Transformation


We want to predict short term dynamics of 3 quantities of interest which is useful for traders. The three
probabilities of interest are

a) Probability of mid-price increase


b) Probability of executing my order before mid-price moves (spread = 1)
c) Probability of executing both my orders before mid-price moves (spread = 1)

These quantities can be obtained by computing the Inverse Laplace Transform of the probability
distribution. Later, Monte-Carlo simulations of these probabilities are computed to verify the accuracy of
the model

Birth Death Process

Consider a birth-death process with birth rate and death rate Y = + Y at state , 1. Let l denote
the first passage time of this process to state 0 given it starts at state b. The first passage time can be
written as:

l = l,l2a + l2a,l2F + . . + a,n

where Y,Y2a is first passage time of this process from state to 1. Let l be laplace transform of l
and Y,Y2a be laplace transform of Y,Y2a . Now for = 1, , , since above first passage times are
independent, we have:
l

l () = Y,Y2a ()
Ypa

2q$
To compute single laplace transforms, recall that = 2
(). When f is a pdf of a rv X, we
2qs
can also rewrite this as: = ( ). Hence:

Y,Y2a = ( 2qtu,uvw )

Now, given we are in state i, two events can happen next. Either a birth occurs first before death, W < y
in which case we go to state i+1 and need to calculate remaining time to go to state i-1, or a death occurs
before birth y < W in which case we go to state i-1 directly from state i. Hence:
Y,Y2a = W + YUa,Y2a min W , yu = W
Y,Y2a = yu min W , yu = yu

Hence we see

2qtu,uvw = 2q X} Utu~w,u
X} X + ( 2qX X X} )
u u

The first expectation can be rewritten as

2q X} Utu~w,u
X} X = 2 X} Utu~w,u Utu,uvw
X} X
u u


= 2 X}
X} X u YUa,Y Y,Y2a = Y,Y2a
+ + Y YUa,Y

since the join density X} ,X = 2W$ Y 2yu $ is independent.


u

Similarly, the second expression is given by

Y
2qXu X X} =
u + Y +

Combining above results, we see

Y
Y,Y2a = YUa,Y Y,Y2a +
+ + Y + Y +

Rewriting above we get

YUa,Y Y
Y,Y2a 1 =
+ + Y + Y +

Solving for Y,Y2a (), we obtain:

Y
Y,Y2a =
+ + Y + YUa,Y

Iterating the above expression, we get the continued fraction of the form:

1 [
Y,Y2a = p
+ [ +

l
Now, since l = Ypa Y,Y2a , we get using above, laplace transform from state b to state 0:

l l
1 [
l = p
+ [ +
Ypa
Probability of Mid-Price Increase (spread = 1)

The mid-price increases when the quantity at the ask goes to 0 before quantity at bid goes to 0.
Let be first time A goes to 0 and be first time B goes to 0. We need ( < ).

Let = and define X : = as CDF of T.

Now, LT of pdf g of rv T is given by X and this is

X = 2qX = 2q X 2X
=

2q$
Let $ = n
be LT of G. Using integration by parts = where

1
= 2q$ , = , = 2q$ , =

Solving above we see



2q$ 1 2q$
2q$ = | = 0, | + =
n n

Hence


$ =

Hence, taking inverse laplace transform of above equation will recover X ().

We can then calculate X 0 = < 0 = ( < )

Probability that my Order at the bid is executed before mid price moves


7.0 Plot of Average Book Shape
The plot below the average Book Shape in the CST model in 10^4,10^5 an 10^6 events

Potrebbero piacerti anche