+ All Categories
Home > Documents > A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

Date post: 04-Apr-2018
Category:
Upload: kofi-appiah-danquah
View: 221 times
Download: 0 times
Share this document with a friend

of 31

Transcript
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    1/31

    What is the limit order book Model framework First-passage times Sample computations

    A generalized birth-death stochastic modelfor high-frequency order book dynamics

    Alec Kercheval and He Huang

    Department of MathematicsFlorida State University

    July 31, 2011 Stevens Institute of Technology

    http://goforward/http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    2/31

    What is the limit order book Model framework First-passage times Sample computations

    Papers

    H. Huang and A. Kercheval, A generalized birth-death

    stochastic model for high-frequency order book dynamics.2011, www.math.fsu.edu/~kercheva/papers/

    R. Cont, S. Stoikov, R. Talreja, A stochastic model for

    order book dynamics. Operations Research, 2010, 58,

    549563.

    http://www.math.fsu.edu/~kercheva/papers/http://www.math.fsu.edu/~kercheva/papers/http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    3/31

    What is the limit order book Model framework First-passage times Sample computations

    Outline

    What is the limit order book

    Model framework

    Assumptions

    Continuous time Markov chains

    First-passage times

    Generalized birth-death processes

    The truncated process

    Sample computations

    Mid-price up move is first

    Execution probability

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    4/31

    What is the limit order book Model framework First-passage times Sample computations

    Trading in an order-driven market

    Three kinds of actions:

    limit order to buy (bids) or sell (asks) a specified number of

    shares at a specified price

    market order to buy or sell a specified number of shares at

    best price

    cancel a previously placed limit order that has not yet been

    executed

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    5/31

    What is the limit order book Model framework First-passage times Sample computations

    Limit Order Book

    A(j+1)

    A(j)

    B(i)

    B(i-1)

    pA

    pB

    A(j)=#limit

    sellorders

    (asks)atpricej

    B(i)=#limit

    buyorders

    (bids)atpricei

    pA=bestaskpB=bestbid

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    6/31

    What is the limit order book Model framework First-passage times Sample computations

    Sample Level II data

    Table: A sample of quotes taken from raw data VOD.L. Thetime-stamp is measured in seconds from midnight, the type B refersto bids, and the level is the number of ticks from best bid (countingfrom 1 = best bid). Rows appear when an event occurs.

    time-stamp type level price quantity

    39301.481 B 4 134.9 203651

    39301.722 B 1 135.05 10000

    39302.891 B 4 134.9 193651

    39302.891 B 2 135 192869

    39305.192 B 1 135.05 9680

    39308.359 B 4 134.9 186151

    S

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    7/31

    What is the limit order book Model framework First-passage times Sample computations

    Sample Questions

    Given an observed state of the order book, what is the

    probability that the next move of the mid-price is upward? What is the probability that a proposed limit order placed at

    best ask will be executed before the mid-price moves

    downward?

    Wh t i th li it d b k M d l f k Fi t ti S l t ti

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    8/31

    What is the limit order book Model framework First-passage times Sample computations

    Model set-up

    finite price grid = {1,2,3, . . . ,n}, allowed prices inmultiples of a tick

    Z+ = {0,1,2, 3, . . . } = possible numbers of limit orders in

    multiples of Sm shares, Sm = avg size of market order Ask process and Bid process, continuous time Z+-valued

    Markov

    A(t) = (A1(t), . . . , An(t)) B(t) = (B1(t), . . . ,Bn(t))

    Ak(t) Bk(t) = 0 all k, t.

    pA(t) = best ask, pB(t) = best bid price at time t

    What is the limit order book Model framework First passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    9/31

    What is the limit order book Model framework First-passage times Sample computations

    Model assumptions

    market orders and cancellations are constant size Sm.

    market buy and sell orders arrive at independent,

    exponentially distributed times with rate .

    cancellations at a distance j ticks from the same-side best

    quote arrive at independent, exponentially distributed timeswith rate proportional to the number of outstanding shares:

    for kSm shares, the cancellation rate is kj, j, k 0.

    limit orders of size k = 1,2, . . . ,M (in multiples of Sm)

    arrive at independent, exponentially distributed times withrate

    (k)j , where j 1 is tick distance from opposite side

    best quote.

    parameters Sm, , j, and (k)j estimated from market data

    What is the limit order book Model framework First passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    10/31

    What is the limit order book Model framework First-passage times Sample computations

    Continuous time Markov chains on (Z+)n

    Ai(t) Ai(t) + k at rate (k)ipB(t)

    for i> pB(t), k 0

    Ai(t) Ai(t) 1 at rate Ai(t)ipA(t) for i pA(t)Ai(t) Ai(t) 1 at rate for i = pA(t) > 0

    Bi(t) Bi(t) + k at rate (k)pA(t)i

    for i< pA(t), k 0

    Bi(t) Bi(t) 1 at rate Bi(t)pB(t)i for i pB(t)Bi(t) Bi(t) 1 at rate for i = pB(t) < n+ 1

    Goal: compute relevant conditional probabilities withoutthe need for monte carlo simulation

    What is the limit order book Model framework First-passage times Sample computations

    http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    11/31

    What is the limit order book Model framework First-passage times Sample computations

    Continuous time Markov chains on (Z+)n

    Ai(t) Ai(t) + k at rate (k)ipB(t)

    for i> pB(t), k 0

    Ai(t) Ai(t) 1 at rate Ai(t)ipA(t) for i pA(t)Ai(t) Ai(t) 1 at rate for i = pA(t) > 0

    Bi(t) Bi(t) + k at rate (k)pA(t)i

    for i< pA(t), k 0

    Bi(t) Bi(t) 1 at rate Bi(t)pB(t)i for i pB(t)Bi(t) Bi(t) 1 at rate for i = pB(t) < n+ 1

    Goal: compute relevant conditional probabilities withoutthe need for monte carlo simulation

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    12/31

    What is the limit order book Model framework First passage times Sample computations

    First-passage times of generalized birth-death

    processes

    Let M = 2.Consider X(t), a Z+-valued Markov process.

    X(t) has birth rates (1) and (2) of sizes 1,2, respectively

    X has death rates i of size 1 at state i 1.

    b = first-passage time to state zero given starting state isb Z+.

    we want to compute the probability density function fb,0(t)of b.

    What is the limit order book Model framework First-passage times Sample computations

    http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    13/31

    What is the limit order book Model framework First passage times Sample computations

    pdf of first passage time from state 10 to 0

    0

    0.005

    0.01

    0.015

    0.02

    0.025

    0.03

    0 20 40 60 80 100 120 140 160 180 200

    probability

    density

    t

    probability density function of the first passage time from state 10 to 0

    pdf

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    14/31

    p g p p

    First-passage time to zero

    Idea: From state i 2, to reach state i 2 the process mustfirst reach state i 1.

    Sob = b,b1 + b1,b2 + + 1,0

    where i,i1 denotes the first-passage time from state i to statei 1, for i = 1,2, . . . b.

    What is the limit order book Model framework First-passage times Sample computations

    http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    15/31

    p g p p

    First passage from i to i 1

    Let gi(t) be the pdf of i,i1, fb,0(t) the pdf of b.

    Then fb,0(t) = gb(t) gb1(t) g1(t), so

    fb,0

    (s) =b

    i=1

    gi(s)

    where f denotes the Laplace transform

    f(s) =

    0 e

    sx

    f(x)dx

    New goal: compute gi(s), and then obtain fb,0 via Inverse

    Laplace Transform of fb,0

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    16/31

    Recursive formulas

    Let vi = (1) + (2) + i

    the dwell time at state i has density vie

    vit

    the next transition is to state i + 1 with probability (1)/vi

    to state i + 2 with probability (2)/vi

    to state i 1 with probability i/vi

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    17/31

    Recursive formulas

    gi(t) =ivi

    vievit +

    (1)

    vivievit gi+1(t) gi(t)

    +

    (2)

    vi vie

    vit

    gi+2(t) gi+1(t) gi(t)

    hence

    gi(s) =i

    vi + s

    +(1)

    vi + s

    gi+1(s)gi(s) +(2)

    vi + s

    gi+2(t)gi+1(s)gi(s)

    i.e.

    gi(s) =i

    vi + s (1)gi+1(s) (2)gi+2(s)gi+1(s)

    What is the limit order book Model framework First-passage times Sample computations

    http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    18/31

    Recursive formulas

    gi(t) =ivi

    vievit +

    (1)

    vivievit gi+1(t) gi(t)

    +

    (2)

    vi vie

    vit

    gi+2(t) gi+1(t) gi(t)

    hence

    gi(s) =i

    vi + s

    +(1)

    vi + s

    gi+1(s)gi(s) +(2)

    vi + s

    gi+2(t)gi+1(s)gi(s)

    i.e.

    gi(s) =i

    vi + s (1)gi+1(s) (2)gi+2(s)gi+1(s)

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    19/31

    The truncated process X()

    For Z+, define X() with state space {0,1, 2, . . . , } to be Xtruncated at : X has

    birth rates (1) of size 1 and (

    2) of size 2 at states

    i 2

    birth rate (1) + (2) of size 1 at state 1

    death rates i of size 1 at states i 1.

    Trajectories below 2 are the same for X and X()

    .

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    20/31

    Truncated first passage times

    Let g()i (s) be the Laplace transform of the first-passage time

    ()i,i1 of X

    () from state i to i 1.

    g()

    (s) =

    s+

    g()1(s) =

    1

    s+ (1) + (2) + 1 ((1) + (2))g() (s)

    g()i (s) = i

    s+ (1) + (2) + i (1)g()i+1(s)

    (2)g()i+2(s)g

    ()i+1(s)

    for i = 2, 3, . . . , 1

    What is the limit order book Model framework First-passage times Sample computations

    http://goforward/http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    21/31

    Truncated first passage times

    Let g()i (s) be the Laplace transform of the first-passage time

    ()i,i1 of X

    () from state i to i 1.

    g()

    (s) =

    s+

    g()1(s) =

    1

    s+ (1) + (2) + 1 ((1) + (2))g() (s)

    g()i (s) = i

    s+ (1) + (2) + i (1)g()i+1(s)

    (2)g()i+2(s)g

    ()i+1(s)

    for i = 2, 3, . . . , 1

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    22/31

    Convergence of truncated process

    Proposition

    For each state i, the first passage time(

    )i,i1 converges inprobability toi,i1 as .

    Therefore g()i (s) converges togi(s), for all s with[s] > 0,

    as .

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    23/31

    Convergence of truncated process

    Numerical experiments show the convergence is very rapid as

    : = 30 is already large enough to make the firstpassage times from i = 10 of X() and X indistinguishable to 7

    digits with our parameters = 3.16

    (0) = 0.71

    (1)0 = 7.46

    (2)0 = 0.80

    What is the limit order book Model framework First-passage times Sample computations

    http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    24/31

    Example: P(mid-price moves up before down)

    Assume at t = 0:

    There are aorders at best ask pA(0); a = the first time allorders at price pA(0) disappear

    There are b orders at best bid pB(0); b = the first time allorders at price pB(0) disappear

    Bid-Ask spread is S ticks

    iA is the first time an ask arrives i ticks away from best bid

    iB is the first time a bid arrives i ticks away from best ask,i = 1, . . . ,S 1.

    What is the limit order book Model framework First-passage times Sample computations

    http://goforward/http://find/http://goback/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    25/31

    Direction of the next price move

    Let B = 1B

    S1B , arrival time of first bid between

    pA(0) and pB(0)

    Let A = 1A

    S1A , arrival time of first ask between

    pA(0) and pB(0)

    Both A and B are exponential with rate

    S =S

    i=1

    ((1)i +

    (2)i )

    aB = a B and bA = b A

    we want P[aB bA < 0]

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    26/31

    pdf of aB

    aB = a B

    Let fa, faB be the pdf of a, aB, resp. Then

    faB(s) = fa(S + s) +

    SS + s

    (1 fa(S + s))

    Similarly

    fbA (s) = fb(S + s) +S

    S + s(1 fb(S + s)).

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    27/31

    pdf of aB

    aB = a B

    Let fa, faB be the pdf of a, aB, resp. Then

    faB(s) = fa(S + s) +

    SS + s(

    1 fa(S + s))

    Similarly

    fbA (s) = fb(S + s) +S

    S + s(1 fb(S + s)).

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    28/31

    Probability that next move is up

    After computing inverse Laplace transforms,

    P[aB bA < 0] =

    0

    0

    faB(u)fbA (u z)dudz

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    29/31

    Sample outcomes

    Table: Probability that mid-price increases at its next move,

    = 3.16, (0) = 0.71, (1)0 = 7.46,

    (2)0 = 0.80,Sm = 8127. Column

    labels indicate the number of initial shares (in multiples of Sm) at best

    bid, row labels indicate the number of initial shares at best ask.

    b = 1 2 3 4

    a= 1 0.50 0.64 0.69 0.72

    2 0.35 0.50 0.55 0.59

    3 0.30 0.43 0.50 0.534 0.28 0.40 0.47 0.50

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    30/31

    Prob. of executing an ask before price moves down

    Table: Probability of executing an ask order at current best ask beforethe mid-price moves downward, S = 1, when the order size is 1Sm.

    b = 1 2 3 4

    a= 1 0.59 0.83 0.92 0.96

    2 0.56 0.79 0.89 0.94

    3 0.54 0.77 0.87 0.93

    4 0.52 0.75 0.86 0.92

    Table: Same, when the order size is 2Sm.

    b = 1 2 3 4

    a= 1 0.55 0.78 0.88 0.94

    2 0.53 0.76 0.86 0.92

    3 0.52 0.74 0.85 0.91

    4 0.51 0.73 0.84 0.90

    What is the limit order book Model framework First-passage times Sample computations

    http://find/
  • 7/30/2019 A Generalized Birth-Death Stochastic Model 4HF Order Dynamics

    31/31

    Papers

    H. Huang and A. Kercheval, A generalized birth-death

    stochastic model for high-frequency order book dynamics.

    2011, www.math.fsu.edu/~kercheva/papers/

    R. Cont, S. Stoikov, R. Talreja, A stochastic model for

    order book dynamics. Operations Research, 2010, 58,

    549563.

    http://www.math.fsu.edu/~kercheva/papers/http://www.math.fsu.edu/~kercheva/papers/http://find/

Recommended