Trading Frictions in High Frequency MarketsTrading Frictions in High Frequency Markets R. Carmona...

76
Trading Frictions in High Frequency Markets R. Carmona Bendheim Center for Finance ORFE, Princeton University joint work with Kevin Webster (Deutsche Bank Ann Arbor October 15, 2014

Transcript of Trading Frictions in High Frequency MarketsTrading Frictions in High Frequency Markets R. Carmona...

  • Trading Frictions in High FrequencyMarkets

    R. Carmona

    Bendheim Center for FinanceORFE, Princeton University

    joint work with Kevin Webster (Deutsche Bank

    Ann Arbor

    October 15, 2014

  • Standard Assumptions in Mathematical Finance

    Black-Scholes theory

    I Price given by a single number (law of one price)I Infinite liquidity

    I one can buy or sell any quantity at this priceI with NO IMPACT on the asset price

    I First fixes to account for liquidity frictionsI Introduction of Transaction CostsI Add Liquidity constraints ∼ transaction costs

    Not satisfactory for

    I Large trades (over short periods)

    I High Frequency Trading (HFT)

    Need Market Microstructure

    I e.g. understand how are buy and sell orders executed?

  • The Limit Order Book (LOB) in Pictures

    13.8 13.9 14.0 14.1 14.2 14.3

    0e+0

    02e

    +04

    4e+0

    46e

    +04

    8e+0

    41e

    +05

    DELL NASDAQ Order Book, May 18, 2013

    Price

    Volum

    e

    Time = 11 hr 42 mn

    Figure : DELL Limit Order Book on May 18, 2013

  • LOB Dynamics in Pictures

    90 95 100 105 110 115

    02

    46

    810

    12

    Typical Limit Order Book

    Price

    Volume

    90 95 100 105 110 1150

    24

    68

    1012

    LOB after the arrival of a Buy Limit Order

    Price

    Volume

    Figure : Limit Order Book before (left) and after (right) the arrival of alimit buy order at price level p < Bt : O(t) ↪→ O(t)p+v

  • LOB Dynamics in Pictures

    90 95 100 105 110 115

    02

    46

    810

    12

    Typical Limit Order Book

    Price

    Volume

    90 95 100 105 110 1150

    24

    68

    1012

    LOB after the arrival of a Buy Limit Order

    Price

    Volume

    Figure : Limit Order Book before (left) and after (right) the arrival of alimit buy order at price level Bt < p < At : O(t) ↪→ O(t)p+v

  • LOB Dynamics in Pictures

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the arrival of a Sell Limit Order

    Price

    Volume

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the arrival of a Sell Limit Order

    Price

    Volume

    Figure : Limit Order Book after the arrival of a limit sell order at pricelevel p = At (left) and of a limit sell order at price level Bt < p < At(right) whose effect is to lower the best ask At

  • LOB Dynamics in Pictures

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the arrival of a Buy Market Order

    Price

    Volume

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the arrival of a Buy Market Order

    Price

    Volume

    Figure : Limit Order Book after the arrival of a market buy order withvolume smaller than what was in the book at the best ask (left)O(t) ↪→ O(t)At−v , and after the arrival of a market buy order withvolume equal to what was in the book at the best ask, lowering At .

  • Cancellations

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the Cancellation of a Buy Limit Order

    Price

    Volume

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB after the Cancellation of a Sell Limit Order

    Price

    Volume

    Figure : Cancellation of an outstanding limit buy order at price levelp < Bt (left) and cancellation of an outstanding limit sell order at pricelevel p > At (right).

  • Large Fills

    13.85 13.90 13.95 14.00 14.05 14.10

    010000

    20000

    30000

    40000

    50000

    60000

    DELL NASDAQ Order Book, May 18, 2013

    Price

    Volume

    Time = 15 hr 5 mn Mid-Price = 13.98

    13.85 13.90 13.95 14.00 14.05 14.100

    10000

    20000

    30000

    40000

    50000

    60000

    DELL NASDAQ Order Book, May 18, 2013

    Price

    Volume

    Time = 15 hr 5 mn Mid-Price = 13.995

    Figure : Illustration of the market impact of a large fill.

  • Market Impact of Large Fills

    I Current mid-pricepmid = (pBid + pAsk )/2 = 13.98

    I Fill size N = 76015 (e.g. buy)

    I n1 shares available at best bidp1, n2 shares at price p2 > p1,· · ·

    I nk shares at price pk > pk−1N = n1 + n2 + n3 + · · · + nk

    I Transaction cost

    n1p1+n2p2+· · ·+nkpk = 1064578

    I Effective price

    peff =1

    N(n1p1 + n2p2 + · · · + nkpk )

    = 14.00484

    I New mid-price pmid = 13.995

    13.85 13.90 13.95 14.00 14.05 14.10

    010000

    20000

    30000

    40000

    50000

    60000

    DELL NASDAQ Order Book, May 18, 2013

    Price

    Volume

    Time = 15 hr 5 mn Mid-Price = 13.98

    13.85 13.90 13.95 14.00 14.05 14.10

    010000

    20000

    30000

    40000

    50000

    60000

    DELL NASDAQ Order Book, May 18, 2013

    Price

    Volume

    Time = 15 hr 5 mn Mid-Price = 13.995

  • Not in this talk: Priorities and Hidden Orders

    90 95 100 105 110 115

    02

    46

    810

    12

    LOB with Different Bid Priorities

    Price

    Volume

    90 95 100 105 110 115

    -50

    510

    LOB with Hidden Liquidity

    Price

    Volume

    Figure : Illustration (left) of one priority mechanism (if a sell marketorder comes in, the top part of the best bid bar will be executed, then themiddle part, . . .) and of the possible presence of hidden liquidity (right).

  • What happened on July 19, 2012?

    0 100000 200000

    19

    31

    96

    IBM nb of trades

    IBM

    _M

    id

    Figure : Mid-price of IBM throughout the day on July 19, 2014.

  • SCREAMING for

    FORENSIC ANALYSIS

  • Some Remarks (relevant to the talk)

    I “There is no question that the goal of many HFT strategies isto profit from LFTs’ mistakes. [...] Part of HFT’ success isdue to the reluctance of LFT to adopt (or even torecognize) their paradigm.” Maureen O’ Hara

    I HFT is not going away

    I Speed is important, but not the fundamental differencebetween HFT and LFT.

    I Microstructure matters! It drives trades and prices, notfundamentals.

    I Key ’tool’ differentiating HFT from LFT: event-based clockvs calendar clock.

    I Academia, and some LFTs, should learn from incorporatingthe HFT paradigm.

  • Ambitious (Pretentious?) Research Program

    1. Understand, at the microscopic level, structuralrelationships and strategies that HFTs exploit.

    2. Identify which microscopic features matter at themacroscopic level, and provide models on that scale.

    3. Use these models to update LFT models and providemonitoring tools: transaction cost analysis, measure oftoxicity of order flow...

  • Today’s Talk: Search for Structural Relationships

    From LOB Models to Low Frequency Models

    I Understand transition from discrete to continuous models

    I Incorporate market microstructure into low-frequency models.

    I Differentiate between liquidity takers and providers

    I Identify self-financing conditions

    Searching for Answers in the Data

    I Nasdaq ITCH data includes all limit and market orders.

    I Perfect reconstruction of visible limit order book.

    I Example: KO (Coca Cola) on 18/04/13.

  • Today’s Talk: Search for Structural Relationships

    From LOB Models to Low Frequency Models

    I Understand transition from discrete to continuous models

    I Incorporate market microstructure into low-frequency models.

    I Differentiate between liquidity takers and providers

    I Identify self-financing conditions

    Searching for Answers in the Data

    I Nasdaq ITCH data includes all limit and market orders.

    I Perfect reconstruction of visible limit order book.

    I Example: KO (Coca Cola) on 18/04/13.

  • Midprice

    Conventions

    I Trade clock, n = 1, ...N corresponds to the timest1 < ... < tN at which trades occur

    I Notation: ∆nx = xn+1 − xn.I pn: mid-price just before the trade at time tn (i.e. ptn−)

  • Bid-Ask Spread

    Convention, Notation, Assumption

    I All executions (100%) happen at the best bid or best askexecution = trade ? answer requires reconstruction of large orders !

    I sn: bid-ask spread just before the trade.

    I sn ≈ |∆np|.

  • Aggregate inventory

    Conventions and comments

    I Inventory of the aggregate liquidity provider

    I Ln: Inventory just before the trade.

    I ∆nL < 0 means that a market order bought at the ask.

  • Price Impact

    Empirical Fact

    I ∆nL∆np ≤ 0 holds 99.1% of the time.I Prices move in favor of market orders (adverse selection)

  • Statistical Test of the Hypothesis

    Assume mid-price p and inventory L are Itô processes{dpt = µtdt + σtdWt

    dLt = btdt + ltdW′t

    with d [W ,W ′]t = ρtdt. Let pN and LN be discrete samplings

    pNn = pn/N and LNn = Ln/N

    Define{CNt =

    ∑bNtc−1n=1 ∆np

    N ∆nLN

    V Nt = N∑bNtc−2

    n=1

    ((∆np

    N ∆n+1LN)2

    + ∆npN ∆nL

    N ∆n+1pN ∆n+1L

    N)

    Then

    L

    (CNt − [p, L]t√

    N−1|V Nt |

    )→ N(0, 1)

    Confidence intervals for [W ,W ′]t and test of H0 : ∃t ∈ [0, 1], ρt > 0

  • Tests Results

    Stock proba reject nb wrong trades total nb trades percent false

    MSFT 0.7868301 19 27540 0.06899056KO 0.9876695 72 20362 0.3535998BA 0.9999383 222 4824 4.60199GPS 0.9999044 97 7378 1.314719GE 0.9991448 4 12969 0.03084278CS 0.8971721 132 3621 3.645402CPB 0.9421457 129 3578 3.605366BCS 0.9625842 43 1613 2.66584JNJ 0.9550316 152 16114 0.9432791UPS 0.9983282 237 5608 4.226106CLX 0.9563385 118 1381 8.544533T 0.9996831 27 13287 0.2032061DELL 0.9893074 1 3742 0.02672368XOM 0.9998707 340 20714 1.641402CAT 0.9814122 397 13456 2.950357COF 0.8973841 131 6103 2.146485AAPL 0.9999987 2347 46710 5.02462PG 0.9998587 189 18616 1.015256GOOG 0.9929220 609 8595 7.085515HSY 0.9615380 177 1807 9.795241WFC 0.9129410 13 17672 0.0735627DTV 0.6174753 117 9334 1.253482BBY 0.9999374 85 7181 1.183679MT 0.8870935 18 2273 0.791905GM 0.9774693 19 5963 0.3186316CL 0.9833529 187 3006 6.220892MA 0.9996761 113 1435 7.874564KSU 0.9945635 118 1756 6.719818GIS 0.9735843 68 3624 1.87638

  • Constant Correlation (99% conf. int.)

    Stock correlation conf int LB conf int UB

    MSFT -0.07092524 -0.08635133 -0.055465144KO -0.17980857 -0.19721907 -0.162284686BA -0.24564343 -0.28017226 -0.210479802GPS -0.20956508 -0.23805431 -0.180715538GE -0.10889870 -0.13119283 -0.086494473CS -0.26149646 -0.30092609 -0.221174300CPB -0.30102519 -0.33967660 -0.261358758BCS -0.12981970 -0.19232648 -0.066263777JNJ -0.28789591 -0.30639672 -0.269177673UPS -0.31015068 -0.34090637 -0.278731788CLX -0.08433734 -0.15272316 -0.015147704T -0.17896560 -0.20050877 -0.157249443DELL -0.04412542 -0.08606558 -0.002029145XOM -0.24353023 -0.26029237 -0.226621346CAT -0.27501096 -0.29541130 -0.254359932COF -0.35245848 -0.38099946 -0.323246409AAPL -0.17270704 -0.18424586 -0.161120624PG -0.24705819 -0.26470169 -0.229249351GOOG -0.23689058 -0.26294176 -0.210494224HSY -0.38699253 -0.43731292 -0.334256416WFC -0.13639039 -0.15535551 -0.117324764DTV -0.16045534 -0.18631773 -0.134370753BBY -0.22586854 -0.25451487 -0.196826185MT -0.20132473 -0.25258903 -0.148933300GM -0.23327661 -0.26457097 -0.201491456CL -0.27786344 -0.32064850 -0.233946821MA -0.32520881 -0.38467018 -0.263059565KSU -0.41253170 -0.46225846 -0.360218465GIS -0.21370970 -0.25416570 -0.172507145

  • (Integrated) Quadratic Covariations

  • Cash Account

    Convention and Comment

    I Kn: cash holdings just before the trade.

    I Self-financing by construction: changes in cash are theamounts exchanged during trades. No more, no less

  • Wealth Definition

    Xn = Lnpn + Kn

    Accounting rule: wealth is the value of the inventory marked tothe mid-price plus the cash holdings.

  • Self-financing equations

    Possible wealth dynamics

    ∆nX = Ln∆np (1)

    ∆nX = Ln∆np +sn2|∆nL| (2)

    ∆nX = Ln∆np +sn2|∆nL|+ ∆np∆nL (3)

    Corresponding relationships for self-financing cash

    ∆nK = −pn+1∆nL (1)

    ∆nK = −pn+1∆nL +sn2|∆nL| (2)

    ∆nK = −pn∆nL +sn2|∆nL| (3)

  • Self-financing equations

    Possible wealth dynamics

    ∆nX = Ln∆np (1)

    ∆nX = Ln∆np +sn2|∆nL| (2)

    ∆nX = Ln∆np +sn2|∆nL|+ ∆np∆nL (3)

    Corresponding relationships for self-financing cash

    ∆nK = −pn+1∆nL (1)

    ∆nK = −pn+1∆nL +sn2|∆nL| (2)

    ∆nK = −pn∆nL +sn2|∆nL| (3)

  • Which one is Right? (Best Bid / Ask executions)

    1. trader triggers a buy with a market order;

    2. trader triggers a sell with a market order;

    3. trader has his buy limit order executed;

    4. trader has his sell limit order executed;

    5. trader is not part of the current trade.

    In case 1, the trader buys at the ask (Ln+1 − Ln > 0)

    Kn+1 − Kn = − (pn + sn/2) (Ln+1 − Ln)

    In case 2, the trader sells at the bid (Ln+1 − Ln < 0)

    Kn+1 − Kn = − (pn − sn/2) (Ln+1 − Ln)

    In case 3, the trader buys at the bid (Ln+1 − Ln > 0)

    Kn+1 − Kn = − (pn − sn/2) (Ln+1 − Ln)

    In case 4, the trader sells at the ask (Ln+1 − Ln < 0)

    Kn+1 − Kn = − (pn + sn/2) (Ln+1 − Ln)

    Finally, in case 5, Kn+1 = Kn and Ln+1 = Ln.

  • Net Result

    These five cases can be summarized in

    ∆nK = −pn∆nL±sn2|∆nL|

    where ”±” meansI ”+” when trading with limit orders

    I ”−” when trading with market orders.Using the definition Xn = Lnpn + Kn. of the wealth we get

    ∆nX = Ln∆np ±sn2|∆nL|+ ∆nL∆np

  • Comparing the three self-financing equations

    Comments

    I True wealth coincides with (3).I Difference between (1) and (2) (transaction costs) is large.I Difference between (2) and (3) (price impact) cannot be neglected

  • Did We Miss Something?

    Nature of NASDAQ Messaging

    I All messages point to a trades at Best-Bid or Best-Ask

    I Could this be the result of large order splitting?

    I Easy to develop simple algorithms reconstructingparent orders from child orders

    SAME RESULT!

    More General LOB Models

    I Typically a LOB is the superposition of two histograms

  • Order Book Shape Function

  • Order Book Shape Function

  • Transaction Cost Function

    Legendre transform of γ:

    c(l) = supu

    (ul − γ(u)) .

    c is convex and satisfies c(0) = 0.Cash

    ∆K = −p∆L + c (−∆L) ,

    Wealth

    ∆X = L∆p + c(−∆L) + ∆p∆L.

  • The continuous limit

    What are the issues?

    I 3 self-financing wealth conditions to choose from;

    I Adverse Selection constraint;

    I Choice of assumptions on p and L: jumps? finite variation?

    I Bid-ask spread: fixed? Vanishing?

    Informally

    I Want (3) to include transaction costs and price impact

    I pNn = pbn/Nc and LNn = Lbn/Nc from pt and Lt continuous Itô

    processes sampled at 1/N, 2/N, ..., 1 (trade clock)

    I So ∆npN = O(1/

    √N) and ∆nL

    N = O(1/√N) as N →∞

    I We will also wantsNn = O(1/

    √N)

  • The continuous limit

    What are the issues?

    I 3 self-financing wealth conditions to choose from;

    I Adverse Selection constraint;

    I Choice of assumptions on p and L: jumps? finite variation?

    I Bid-ask spread: fixed? Vanishing?

    Informally

    I Want (3) to include transaction costs and price impact

    I pNn = pbn/Nc and LNn = Lbn/Nc from pt and Lt continuous Itô

    processes sampled at 1/N, 2/N, ..., 1 (trade clock)

    I So ∆npN = O(1/

    √N) and ∆nL

    N = O(1/√N) as N →∞

    I We will also wantsNn = O(1/

    √N)

  • Continuous setup

    Continuous dataAssume {

    dpt = µtdt + σtdWt

    dLt = btdt + `tdW′t

    for some µt , bt , σt > 0, `t > 0, adapted, and

    [W ,W ′]t =

    ∫ t0ρsds for some ρt ∈ [−1, 1]

    and assume st is continuous and adapted

    Discretization choice

    pNn = pbn/Nc; LNn = Lbn/Nc

    and

    sNn =1√Nsbn/Nc

  • Continuous setup

    Continuous dataAssume {

    dpt = µtdt + σtdWt

    dLt = btdt + `tdW′t

    for some µt , bt , σt > 0, `t > 0, adapted, and

    [W ,W ′]t =

    ∫ t0ρsds for some ρt ∈ [−1, 1]

    and assume st is continuous and adapted

    Discretization choice

    pNn = pbn/Nc; LNn = Lbn/Nc

    and

    sNn =1√Nsbn/Nc

  • Proposed discrete equations

    Wealth dynamics

    ∆nXN = LNn ∆np

    N +sbn/Nc

    2√N|∆nLN |+ ∆npN∆nLN

    Price impact constraint

    ∆npN∆nL

    N ≤ 0

    If we want the discretization to mimic the micro structure of a LOB

  • Back to the diffusion limitXt = limN→∞ X

    NbNtc in u.c.p. satisfies:

    Wealth dynamics

    dXt = Ltdpt +st`t√

    2πdt + d [L, p]t

    for the Best-Bid / Best-Ask order book model, and in the general case

    dXt = Ltdpt + Φlt (ct)dt + d [L, p]t

    with

    Φσ(F ) =

    ∫F (y)φσ2(y)dy

    Price impact constraintA necessary condition for an inventory obtained by limit orders is:

    d [L, p]t ≤ 0

  • Applications: I. Option Hedging in Complete ModelExogenous model for midprice pt

    dpt = µ(pt)dt + σ(pt)dWt , (4)

    Assume γt continuous and Markovian (in price level p)

    γt(α) = γ(pt , α).

    Admissible inventory ANY F-adapted Itô process

    Lt = L0 +

    ∫ t0budu +

    ∫ t0ludWu (5)

    lt is signed.

    I lt < 0 when trading with limit orders

    I lt ≥ 0 when trading with market orders.

    Defineg(p, l) = sign(l)Φl (c(p, ·)) (6)

  • Applications: I. Hedging

    I K0 trader’s initial cash endowment

    I Hedging portfolio value (self - financing condition)

    Xt = L0p0+K0+

    ∫ t0

    Ludpu+

    ∫ t0

    (σ(pu)lu − g(pu, lu)) du+r∫ t0

    (Xu−puLu)du

    I f ∈ C 0 payoff function of a European option with maturity T

    DefinitionAn initial cash endowment K0 and an inventory process Lt replicate theEuropean payoff f (pT ) at maturity T if

    XT = f (pT ) and X0 = K0 + p0L0. (7)

    NB: When quoting a price for the option, the trader needs to quote an

    initial delta asked of the buyer of the option !

  • ResultIf f ∈ C 0, T > 0 and v ∈ C 1,3 satisfies:

    ∂v

    ∂t(t, p)+g

    (p, σ(p)

    ∂2v

    ∂p2(t, p)

    )−σ

    2(p)

    2

    ∂2v

    ∂p2(t, p)+rp

    ∂v

    ∂p(t, p) = rv(t, p)

    with terminal condition v(T , p) = f (p), then

    Lt =∂v

    ∂p(t, pt), and K0 = v(0, p0)−

    ∂v

    ∂p(0, p0)p0

    replicate the payoff f (pT ) at maturity T , its volatility is given by

    lt = σ(pt)∂2v

    ∂p2(t, pt),

    and the replication price of the option is X0 = v(0, p0).

    I Positive gamma options can only be hedged with marketorders

    I Negative gamma options can only be hedged with limit orders.

  • Case of Best-Bid / Best-Ask LOB

    Model assumptionsPrice model:

    dpt = µ(t, pt)dt + σ(t, pt)dWt

    Inventory model:dLt = btdt − `tdWt

    Spread model: (empirical studies)

    st =√

    2πλσt , with λ > 1/2

    No dividend or interest rate.

    NB: λ = 1 implies dXt = Ltdpt (frictionless case)

    Objective

    Given the model for p and s, find L such that X hedges aEuropean option with payoff f (pT ).

  • Case of Best-Bid / Best-Ask LOB

    Model assumptionsPrice model:

    dpt = µ(t, pt)dt + σ(t, pt)dWt

    Inventory model:dLt = btdt − `tdWt

    Spread model: (empirical studies)

    st =√

    2πλσt , with λ > 1/2

    No dividend or interest rate.

    NB: λ = 1 implies dXt = Ltdpt (frictionless case)

    Objective

    Given the model for p and s, find L such that X hedges aEuropean option with payoff f (pT ).

  • Replication argument

    Markovian setup, so price of the option given by function v(t, p).Itô’s formula:

    d(Xt − v(t, pt)) = (Lt −∆t) dpt − (Θt +1

    2Γtσ

    2(t, pt))dt

    +st√2π`tdt + d [p, L]t

    Matching Itô decompositions

    Lt = ∆t

    which also implies−`t = Γtσ(t, pt)

  • Replication argument

    Markovian setup, so price of the option given by function v(t, p).Itô’s formula:

    d(Xt − v(t, pt)) = (Lt −∆t) dpt − (Θt +1

    2Γtσ

    2(t, pt))dt

    +st√2π`tdt + d [p, L]t

    Matching Itô decompositions

    Lt = ∆t

    which also implies−`t = Γtσ(t, pt)

  • Final Solution

    Delta hedging {Lt = ∆t

    `t = −Γtσ(t, pt)

    Only negative Gamma options can be replicated via limit orders!

    Pricing PDE

    ∂tv(t, p) +

    (λ− 1

    2

    )σ2(t, p)∂2pv(t, p) = 0

    local volatility multiplied by a factor of√

    2λ− 1

  • Final Solution

    Delta hedging {Lt = ∆t

    `t = −Γtσ(t, pt)

    Only negative Gamma options can be replicated via limit orders!

    Pricing PDE

    ∂tv(t, p) +

    (λ− 1

    2

    )σ2(t, p)∂2pv(t, p) = 0

    local volatility multiplied by a factor of√

    2λ− 1

  • Applications. II Market making

    Setting

    Still, aggregate market maker.

    I Price pt exogenously given

    I Sole control: bid-ask spread st .

    I Affects inventory Lt .

    I Price impact included through correlation between inventoryand price.

  • Objectives

    Mathematical ProblemSolve the optimal control problem of a risk-neutralrepresentative market maker.

    Model Insights

    I What macro-quantities the market maker is long.

    I What factors affect the optimal bid-ask spread.

  • Microscopic model

    Modified Almgren & Chriss model

    ∆nL = −λn+1∆np

    Modified Avellaneda & Stoikov model

    E[λn+1| Fn] = ρn(sn)fn(sn)

    E[λ2n+1∣∣Fn] = fn(sn)2

  • Macroscopic model

    Inventory

    Recall, pt given exogenously,

    dLt = −ρt(st)ft(st)dpt + ft(st)√

    1− ρ2t (st)σtdW⊥t

    First term is standard linear price impact. Second term is thenon-toxic order flow (in the terminology of O’ Hara et.al).

    Objective function

    EXT(risk neutral market maker)

  • Solution

    (Pontryagin) stochastic maximum principle

    Solution can be reduced via martingale methods to finding themaximum of the function:

    Ft : s 7→s√

    2πσtft(s)− αtρt(s)ft(s)

    where

    αt = E [pT − pt | Ft ]µtσ2t

    +Ztσt

    with Zt the volatility of E [pT | Ft ].

  • Extra assumption

    Homogeinization

    Assume ft and ρt to be of the form

    ρt(s) = ρ(t/σt); ft(s) = f (st/σt)

    Consequence

    Optimal spread:s∗t = σtm(αt)

    P&L:

    EXT = E[∫ T

    0M(αt)σ

    2t dt

    ]for some functions m and M. M is always decreasing. m isincreasing under certain uniqueness assumptions.

  • Special case 1: martingale market

    Price modelIf

    dpt = σtdWt

    thenαt = 1

    Consequence

    Benchmark case. linear relationship between spread andvolatility.Market maker is long volatility as long as he is profitable(M(1) > 0).

  • Special case 2: momentum market

    Price model

    dpt = µptdt + σptdWt

    GBM (Samuelson) with µ > 0, then

    αt =µ

    σ2

    (eµ(T−t) − 1

    )+ eµ(T−t)

    Consequence

    αt > 1, αt is a deterministic, decreasing function of t.The market maker quotes larger spreads, expects less profit andcaptures less volume in the ’momentum’ Black-Scholes model.

  • Special case 3: mean-reverting market

    Price model

    dpt = −ρ(pt − p0)dt + σdWtmean reverting OU with ρ > 0, then

    αt = −ρ

    σ2(pt − p0)2

    (e−ρ(T−t) − 1

    )+ e−ρ(T−t)

    Consequence

    αt < 1 iff (pt − p0)2 < σ2

    ρUnless the price is significantly away from its long-term trend, themarket maker quotes smaller spreads, expects more profit andcaptures more volume in the ’mean reverting’ Ornstein-Uhlenbeckmodel.

  • Summary of the three testbed cases

    Martingale market

    st/σt is a constant. Market maker is on average long theintegrated volatility.

    Momentum marketst/σt is an increasing function of T − t. Profits are smaller andspreads larger than in the martingale market.

    Mean-reverting market

    st/σt is an increasing function of (pt − p0)2. Profits are typicallylarger and spreads typically smaller than in the martingale case.

  • Toxicity index

    MotivationO’Hara defines a toxicity index as a measure of the adverseselection limit orders are subject to. Useful for:

    I Deciding whether to use limit or market orders.

    I Market making.

    I Understanding flash crashes.

    Different interpretations

    O’Hara’s toxicity index is based on an informed trader model andonly looks at trade volumes. We propose within our price impactframework, an index which takes into account both trade volumesand price changes.

  • Two forms of Toxicity

    Instantaneous toxicity

    ρt = −corr(∆p,∆L)tis an estimate of the instantaneous correlation between price and

    inventory variations. It represents the proportion of incomingmarket orders that move the price.

    Integrated toxicity

    r = −2∑

    ∆np∆nL∑sn|∆nL|

    measures the ratio between the money lost to price impact, andthe money collected through spread. De facto, Market Makershold an option on this ratio.

  • Stock correlation r toxicityAAPL -0.17270704 0.19904208GOOG -0.23689058 0.32856196BRCM -0.19237560 0.29776003CELG -0.26835355 0.48287317CTSH -0.33887494 0.51758560CSCO -0.08393210 0.09300757BIIB -0.27832205 0.40193651AMZN -0.23614694 0.30494250GPS -0.20956508 0.48908889SFG -0.24173454 0.57253111INTC -0.05301259 0.05574866GE -0.10889870 0.11888714JKHY -0.33407745 0.56987813PFE -0.15849674 0.15958849CBT -0.34887086 0.74490980AGN -0.35890531 0.78020785CB -0.38667565 0.58090719AA -0.08046277 0.08406282FPO -0.49598056 1.14964119

  • General Case

    Empirical / Econometric Data Analysis

    I Reasonable procedure to reconstruct large orders fromNASADQ ITCH messages

    I Self-financing condition needs to be modified

    I Adverse selection constraint even ”more true !”

  • General LOB Model

    Theoretical / Mathematical Analysis

    I At each time t, order book given by two positive measures(bids & ask distributions, say bt & at)

    I Equivalently, by the mid-price pt and a shape function γts.t. γ′′t = bt + at , γt(0) = γ

    ′t(0) = 0

    I Equivalently, by the mid-price pt and a transaction costfunction ct Legendre transform of γt

    I Previous case: bt = δpt−st/2, at = δpt+st/2, ct(`) =st2 |`|

  • Low Frequency Model

    Input Data

    I Diffusion processes for pt and LtI A continuous process γt with values in a space of convex

    functions, γt(0) = γ′t(0) = 0

    I Its Legendre transform ` ↪→ ct(`)

  • Sef-financing Equation

    I Discretization & Microstructure AnalysisI For each integer N, pNn = pn/N and L

    Nn = Ln/N

    I Discretize and rescale the order book γNn (x) =1N γn/N

    (√Nx)

    I Then cNn (`) =1N cn/N (

    √N`)

    I Define trade clock wealth (thru s.f.e.)∆nX

    N = LNn ∆npN + 1N cn/N (−

    √N∆nL

    N ) + ∆npN ∆nL

    N

    I Macrostructure Analysis via Limit N →∞I Self-financing equation

    dXt = Ltdpt + Φlt (ct)dt + d [L, p]t

    with

    Φσ(F ) =

    ∫F (y)φσ2(y)dy .

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

  • Conclusions (for now)

    I Standard self-financing equations miss certain features ofhigh-frequency microstructure.

    I We propose an equation which takes into account:

    I transaction costsI price impactI differentiates between limit orders and market orders

    I Same level of complexity

    I Similar equation for market orders

    I Fits data very well(tested on a pool of 120 stocks selected for an ECB study of HFT).

    I Generalizes to a full LOB

    I Needs more attention

    I Relate ρt ≤ 0 to the queuing systems in LOBsI Which limit order strategies produce a given inventory Lt?I ............................

    Limiting argument