algorithmic trading and the market price of …algorithmic trading strategies order placement...

56
Algorithmic Trading and the Market Price of Liquidity Risk QUANTITATIVE FINANCE S UMMER CAMP 2016 Christopher Ting http://mysmu.edu.sg/faculty/christophert/ Lee Kong Chian School of Business Singapore Management University August 11, 2016 Christopher Ting August 11, 2016 1 / 56

Upload: others

Post on 31-Jul-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Tradingand the

Market Price of Liquidity RiskQUANTITATIVE FINANCE

SUMMER CAMP 2016

Christopher Tinghttp://mysmu.edu.sg/faculty/christophert/

Lee Kong Chian School of BusinessSingapore Management University

August 11, 2016

August 11, 2016

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 1 / 56

Page 2: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Flow of Talk

Table of Contents

1 Introduction

2 Algorithmic Trading

3 Optimal Execution

4 Classical Market Microstructure

5 Model of Order Flow

6 A Special Case

7 Liquidity Risk Index: LIX

8 Conclusions

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 2 / 56

Page 3: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Client-Broker-Market Interaction

In the Past: High-Touch Brokers

Client

Broker

Market

tele

phon

e order tothe

floor Client

Broker

Markette

leph

one

confirmation

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 3 / 56

Page 4: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Definition of AT

Algorithmic Trading (AT)

DefinitionThe use of programs (algorithms) and computers (automation) togenerate and submit orders in electronic markets.

Origin: U.S. institutional investors in late 1990s needed the toolsto deal with major changes:

electronic markets: electronic communications networksalternative trading systems, dark poolsdecimalization (reduction) of tick sizereduction of commissions and exchange fees

Today, brokers compete actively for the commission poolassociated with algorithmic trading around the globe.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 4 / 56

Page 5: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Definition of AT

Characteristics of Algorithmic Trading (AT)

Non-discretionaryPurely procedural or mechanicalEmotionless

AlgorithmicTrading rulesArtificial intelligence, machine learning, cyborg

Data drivenTick-by-tick trades and quotes, news, fundamentals etc.Live, real-time feeds absolutely necessary

AutomaticAutomation: major investment in high-tech IT infrastructure (ultrahigh-frequency, low latency, direct market access, co-location)If the algorithm is not speed-sensitive, automation is not absolutelynecessary.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 5 / 56

Page 6: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Electronic Markets

Low-Touch Electronic Market

Client

Broker

Market

tele

phon

e/in

tern

et

algoexecution

Client

Broker

Markette

leph

one/

inte

rnet

confirmation

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 6 / 56

Page 7: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Electronic Markets

Electronic Market with API Gateway

Client

Broker

Market

Alg

oor

ders

thru

API

Gat

eway

algoexecution Client

Broker

Marketle

ased

line/

inte

rnet

confirmation

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 7 / 56

Page 8: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Electronic Markets

Direct Market Access (DMA) and Co-loc

Client

Broker

Market

quer

yan

dre

spon

se

queryand

responsealgo orders

No touchCo-location: the tradingalgo sits in a server nextto and connected to theexchange’s matchingengineLow latency

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 8 / 56

Page 9: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction An Example of DMA and Co-Loc

ArrownetSource: JPX

Source: JPXChristopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 9 / 56

Page 10: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Market Fragmentation

Market Fragmentation: Case Study of Japan

ExchangesJPX Group

First SectionSecond SectionJasdaqMothers

Nagoya Stock ExchangeSapporo Securities ExchangeFukuoka Stock Exchange

Proprietary trading system (PTS)Chi-X JapanSBI Japannext

Exchanges versus PTS: More than one venue to transact the samestock.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 10 / 56

Page 11: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Introduction Market Trend

Adoption of AT in Asia

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 11 / 56

Page 12: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Building Blocks of AT

Three Building Blocks of AT

Algorithmic Trading Strategies

Order Placement Strategies

Order Routing Strategies

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 12 / 56

Page 13: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Alpha Generation and Brokerage (Agency) Execution

Two Major Categories of AT Strategies

Alpha Generation, Buy Side

Location arbitrageTriangular arbitrageStatistical arbitrage

MomentumMean reversion

Market making

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 13 / 56

Page 14: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Alpha Generation and Brokerage (Agency) Execution

Two Major Categories of AT Strategies (cont’d)

Brokerage Execution, Sell Side

Services rendered by sell side to and for the buy sideTime-weighted average price (TWAP)Volume-weighted average price (VWAP)Percentage of volume (POV)The Almgren-Chriss algorithmLiquidity-seeking

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 14 / 56

Page 15: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Institutional Brokerage Execution

Institutional Brokerage Execution

Since the 2008 financial crisis, “alpha” generation is stronglycurtailed for major investment banks.

Nevertheless, institutional clients need to trade large amounts ofstocks, larger than what the market can absorb without impactingthe price.

To prevent slippage, a large (parent) order must be sliced intomany smaller child orders.

What is the algorithm to bring about an optimal solution?

Providing trade execution services for institutional clients is a BIGbusiness these days.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 15 / 56

Page 16: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Institutional Brokerage Execution

First-Generation AT for Brokerage Execution

TWAP: Equal amount of shares or contracts in each time interval.

But market’s trading volume typically exhibits a U-shape patternfrom opening to closing.

VWAP: Divide the trading session into 5- to 15-minute interval.Predict intra-day trading volume and price range for each intervalby some analytics. In each time-interval, execute an amountproportional to the predicted volume for that interval.

POV: Target a defined fraction of the actual volume for each timeinterval. The intention is to keep the trading activity in line withtotal volume. Trade at a constant percentage participation rate.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 16 / 56

Page 17: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading Institutional Brokerage Execution

Volume Weighted Average Price

Let pi, vi, i = 1, 2, . . .n be the prices and volumes, respectively forwhich n child orders are filled.Total volume traded is

v =

n∑i=1

vi.

With wi = vi/v being the weight, The VWAP price is, by definition,

Pvwap :=

n∑i=1

wipi =

n∑i=1

vi

vpi =

∑ni=1 pivi

v=

Dollar VolumeVolume

VWAP is the break-even price.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 17 / 56

Page 18: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading VWAP Algorithmic Trading

Objective Function and Approximation

Objective of the algorithm is to minimize the expected error (see[Konishi, 2002]):

minv(t)

E((

VWAP − vwap)2)

Definition: Percentage of remaining volume

X(t) :=M(T)−M(t)

M(T); x(t) :=

v(T)− v(t)v(T)

Change of objective to

minx(t)

E

((∫ T

0

(X(t)− x(t)

)dP(t)

)2)

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 18 / 56

Page 19: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Algorithmic Trading VWAP Algorithmic Trading

A Solution

[Konishi, 2002] shows that an optimal schedule is

x∗(t) = E(X(t)

)± 1

2v(T).

The optimal schedule is to overshoot E(X(t)

)by ±1/(2v(T)),

which is a small amount if the number of shares to trade is large.

It is crucial to forecast the mean X(t) at each time period t, whichis the proxy for E

(X(t)

).

Therefore, you need to forecast the total volume M(T) of themarket, and the dynamics of the market volume M(t)!

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 19 / 56

Page 20: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Framework of [Almgren and Chriss, 2000]

Second-Generation AT for Brokerage Execution

[Almgren and Chriss, 2000]’s mathematical modelling

Consider liquidating X shares. Let the number of shares yet to beliquidated be xt, t = 0, 1, . . . ,T. So

x0 = X, xT = 0,

andxs ≤ xt if s > t.

Accordingly, −(xt+ε − xt

)is the number of stocks sold in the time

interval (t + ε, t). Hence

xt+ε − xt −→ dxt, as ε→ 0.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 20 / 56

Page 21: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Framework of [Almgren and Chriss, 2000]

Almgren-Chriss’ Assumptions

The price St is a drift-less (arithmetic) Brownian motion Bt:

dSt = σ dBt

with constant (intra-day) volatility σ.

The price at which a sale takes place is not St but Pt given by

Pt = St + η vt,

where the rate of trading is

vt ≡ xt :=dxt

dt,

i.e., xt is a (deterministically) differentiable function of t.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 21 / 56

Page 22: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Main Idea of [Almgren and Chriss, 2000]

Trading Risk

Trading risk is captured by

V := V(∫ T

0xt dSt

)= σ2

∫ T

0x2

t dt.

Main idea of [Almgren and Chriss, 2000] is to minimize the meanand variance with λ being the Lagrange multiplier:

A := E(∫ T

0Pt vt dt

)+ λV

(∫ T

0xt dSt

)= K + λσ2

∫ T

0x2

t dt

=

∫ T

0

(dxt

dt

)2

+ λσ2x2t

]dt

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 22 / 56

Page 23: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Analytical Solution for Optimal Execution

Analytical Solution

The Euler-Lagrange equation (principle of least action) is

ddt∂L∂xt− ∂L∂xt

= 0.

For the [Almgren and Chriss, 2000] Lagrangian, i.e.,L = ηx2

t −(− λσ2x2

t), it is

2ηxt − 2λσ2xt = 0,

i.e., xt = κ2xt, where

κ2 =λσ2

η

The solution that satisfies the boundary conditions is

x?t = Xsinh

(κ(T − t)

)sinh(κT)

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 23 / 56

Page 24: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Analytical Solution for Optimal Execution

Optimal Schedule for Different Urgency κ

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 24 / 56

Page 25: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Third-Generation AT

Third-Generation: Liquidity-Seeking AT

Multi-period optimization of trade scheduling

Access to all available liquidity, both dark and lit

Inclusion of order placement and order routing algorithms

Urgency specificationLow: dark, passiveMedium: combination of dark and opportunistic participationHigh urgency: high participation rate

Optimization of probability of fill (execution certainty),invisibility (stealth), price improvement (passiveness) trading cost(implementation shortfall), and price certainty (risk) subject toclient’s specification of urgency.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 25 / 56

Page 26: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution BEAT Systems

BEAT Systems and Business

BrokerageExecution

AlgorithmicTrading

J.P. MorganAqua

KCGCatch

UBSNEO

Credit SuisseAES

GSSONAR

ITGSmart Limit

NomuraSmartSeek

Deutsche BankSuperX

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 26 / 56

Page 27: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Dark Liquidity

Lit and Unlit Orders

In the past, “upstairs” markets and crossing networks allowedinstitutional block trades to execute.

Dark pools are the results of technological advancement, intensecompetition, and new regulatory requirements.

Most brokers support iceberg orders for lit exchanges, resulting indark liquidity.

Is there a smart way to ping for dark liquidity?

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 27 / 56

Page 28: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Back to the Real World

ITG’s Classification of Algo Trading Strategies

Close: Trading at the close

Dark: Dark pool and unlit orders

Scheduled: TWAP, VWAP, POV (Participation)

Implementation Shortfall (IS): Inspired by and generalization of[Almgren and Chriss, 2000]

Liquidity-Seeking

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 28 / 56

Page 29: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Back to the Real World

Preferred BEAT of 20 Buy-Side Desks

[Domowitz and Yegerman, 2011] Sample Period: Q4 2009 to Q4 2010 Q4

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 29 / 56

Page 30: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Back to the Real World

Order Placement Strategies[Domowitz and Yegerman, 2011] Sample Period: Q4 2009 to Q4 2010 Q4

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 30 / 56

Page 31: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Back to the Real World

Order Placement Strategies (cont’d)

Demand for liquidity: percentage of median daily volume (MDV)for the parent order

1 Less than (LT) 0.5% of MDV2 0.5% to 1% of MDV3 1% to 5% (and rarely above) of MDV

During the “quiet” period (Q4 2009 to Q4 2010 Q4),Almgren-Chriss’ Implementation Shortfall (IS) strategy was mostpopular.

81% of orders were executed by IS

VWAP is still dominantly used (58% of orders) by some tradingdesks.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 31 / 56

Page 32: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Back to the Real World

Trading Strategy Costs By Demand For Liquidity

[Domowitz and Yegerman, 2011] Sample Period: Q4 2009 to Q4 2010 Q4

Close Dark IS Liquidity-Seeking Scheduled

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 32 / 56

Page 33: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Optimal Execution Summary

Summary

BEAT is a big business and R&D of algorithmic trading systemswill continue.

Generalization to account for stochastic liquidity and volatility(see [Almgren, 2012])

Permeation of BEAT systems to FX, futures and options, and fixedincome securities

Asia-Pacific markets still have a lot of room to grow the BEATbusiness.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 33 / 56

Page 34: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Roll’s Model of Bid-Ask Spread

Unobservable Price versus Transaction Price

Earlier in Slide 21, we have seen

Pt = St + η vt

A model by [Roll, 1984] of bid-ask spread C from price change∆Pt := Pt − Pt−1:

Pt = St +C2

Qt + εt,

where Qt is either +1 (trade @ the ask price), or −1 (trade @ thebid price), or 0 (trade @ the midpoint).

C = 2√−Cov

[∆Pt , ∆Pt−1

].

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 34 / 56

Page 35: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Reformulation of Roll’s Model

OLS Approach [Ting, 2014]

Tick-by-tick change of price ∆Pti regressed on change in tradesign ∆Qti and on trade duration ∆ti:

∆Pti = c0 +C2∆Qti + b∆ti + εti

12−10−01 12−10−19 12−11−12 12−12−04 12−12−26 13−01−17 13−02−07 13−03−04 13−03−25 13−04−16 13−05−080

5

10

15

20

25

30

35

40

SG

D p

er C

ontr

act

Flash Crash

OLS EstimateRoll’s Estimate

Missing Roll’s Estimate

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 35 / 56

Page 36: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Signed Volume Vt is Important!

Structural Models: A Synthesis

Unobservable Price Transaction Price Price Change DynamicsSt = Pt = ∆Pt =

Roll RW, i.e., St−1 + εt St +C2

xtC2∆Qt + εt

Huang & Stoll RW +αC2

Qt−1 Midquote +C2

QtC2∆Qt + (α+ β)

C2

Qt−1 + εt

Madhavan et al. RW + θ(Qt − ρQt−1

)St + φQt (θ + φ)∆Qt

+ θ(1− ρ)Qt−1 + εt

Glosten & Harris RW + a0Qt + a1Vt St + b0Qt + b1Vt (a0 + b0)∆Qt + a0Qt−1

+(a1 + b1)∆Vt + a1Vt−1 + εt

Tee & Ting (2015) RW + θ1(Qt − ρ1Qt−1

)St + φ1 Qt + φ2 vt

(θ1 + φ1

)∆Qt

+ θ2(Vt − ρ2Vt−1

)+ θ1(1− ρ1)Qt−1

+ (θ2 + φ2)∆Vt

+ θ2(1− ρ2)Vt−1 + εt

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 36 / 56

Page 37: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Signed Volume Vt is Important!

0.5

1.0

1.5

2.0

2.5

3.0dx

Contract = TP

romhgh

−0.2

0.0

0.2

0.4

0.6

0.8

1.0

x

−0.02−0.01

0.000.010.020.030.040.050.060.07

dv

Jul 2012

Oct 2012

Jan 2013

Apr 2013

Jul 2013

Oct 2013

Jan 2014

Apr 2014

Jul 2014

Oct 2014−0.02

0.00

0.02

0.04

0.06

0.08

0.10

v

0.51.01.52.02.53.03.54.04.55.0 Contract = NK

−0.10.00.10.20.30.40.50.60.70.8

−0.02−0.01

0.000.010.020.030.040.050.06

Jul 2012

Oct 2012

Jan 2013

Apr 2013

Jul 2013

Oct 2013

Jan 2014

Apr 2014

Jul 2014

Oct 20140.00

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.81.01.21.41.61.82.02.22.42.6 Contract = NO

−0.050.000.050.100.150.200.250.300.35

−0.006

−0.004

−0.002

0.000

0.002

0.004

0.006

Jul 2012

Oct 2012

Jan 2013

Apr 2013

Jul 2013

Oct 2013

Jan 2014

Apr 2014

Jul 2014

Oct 20140.000

0.005

0.010

0.015

0.020

0.025

0.030

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 37 / 56

Page 38: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Signed Volume Vt is Important!

Relative Joint Price Impact by Hour

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 241+

1d2+

1d

0.00

0.05

0.10

0.15

0.20

0.25

0.30

T T+1

RJPI: dx → dx,x,dv,v

TPNKNO

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 38 / 56

Page 39: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Classical Market Microstructure Why Order Flow?

Order Flow and Price Change

According to [Kyle, 1985], the transaction price P depends on theorder flow

buy order X+

sell order X−

[Evans and Lyons, 2002] show that order flow X := X+ − X− is asuperior candidate for modelling the variation in foreignexchange rate compared to arguments along the lines ofmacroeconomics.

Over a period of time t, (e.g. 1 minute, duration of 100 trades, etc),a positive (negative) order flow Xt indicates more (less) buyersthan sellers.

What is the market price of liquidity risk for demandingimmediate execution?

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 39 / 56

Page 40: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Model of Order Flow A Postulate

Order Flow Dynamics

Joint Work with Kijima

Stochastic differential equation for the order flow Xt is assumed tobe a stationary (mean reverting) process:

dXt = c(m− Xt)dt + η dwt, (1)

wherewt is the standard Brownian motion.m is the long-run average.c is the speed of mean-reversion.η is the volatility of order flow.

The parameters m, c, and η are assumed to be constants.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 40 / 56

Page 41: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Model of Order Flow True Price versus Market Transaction Price

Price Impact

In financial economics, the “true price” St is not directlyobservable.

Let φ(X) be the price impact when the order flow is Xt that relatesthe trade price Pt to the true price St.

Assumption 1: True Price, Trade Price, and Price ImpactFor a certain function f (X),

φ(X) = ef (X) ⇐⇒ f (X) = logφ(X)

andPt = St φ(Xt) ⇐⇒ St = Pt e−f (Xt). (2)

This formalism is similar to [Çetin et al., 2004] and[Huang and Ting, 2008], among others.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 41 / 56

Page 42: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Model of Order Flow True Price versus Market Transaction Price

Price Impact (cont’d)

Assumption 2: Zero Order Flow Condition

φ(0) = 1 ⇐⇒ f (0) = 0.

Assumption 3: Trade Price DynamicsPt be the time t trade price and

dPt

Pt= µ(Xt)dt + σ(Xt)dzt, (3)

where µ(x) and σ(x) are some smooth functions of order flow x,and where wt and zt are standard Brownian motions withcorrelation ρ

dwtdzt = ρdt.

The trade price Pt as well as the order flow Xt are both observablein the market.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 42 / 56

Page 43: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Model of Order Flow Two RIsks and Their Market Prices

Market Prices of Risks

Let λzt = λz(Xt) and λw

t = λw(Xt) denote the market prices of risksassociated with zt and wt, respectively.

Definedzt = dzt + λz

t dt, dwt = dwt + λwt dt.

Let Q be a probability measure that makes the processes zt and wtstandard Brownian motions.

True price process becomes

dSt

St=(µS(Xt)− σ(Xt)λz(Xt) + η f ′(Xt)λw(Xt)

)dt

+σ(Xt)dzt − η f ′(Xt)dwt (4)

under Q.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 43 / 56

Page 44: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Model of Order Flow Two RIsks and Their Market Prices

The Market Price of Liquidity Risk

For some positive function ξ(x) > 0, the market price of liquidityrisk is written as

λw(x) = ξ(x)− η f ′(x). (5)

Let g(x) = f ′(x). The ODE then becomes

{c(m− x) + ρησ(x)− ηξ(x)

}g(x) +

12η2{g′(x) + g2(x)

}= 0. (6)

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 44 / 56

Page 45: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

A Special Case Seeking an Explicit Price Impact Function f(x)

A Special Case

Let c = 0 and σ(x) = σ, a constant.

For the market price of risk, suppose it is a constant of x, i.e., theSharpe ratio:

λz(x) =µ− rσ

.

Moreover, for the market price of liquidity risk,

λw(x) = −η f ′(x).

i.e., ξ(x) = 0.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 45 / 56

Page 46: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

A Special Case Seeking an Explicit Price Impact Function f(x)

A Special Case (cont’d)

Let µ(x) = µ− r. Then

r + ρση f ′(x) +12η2[f ′′(x) + (f ′(x))2

]= 0 (7)

Consequently, under the same Q, the true price process becomes

dSt

St= r dt + σ dzt + λw(x)dwt, (8)

The ODE (7) admits a closed-form solution:

f (x) =bη

x + log

(1− A exp

(− βx/η

)1− A

). (9)

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 46 / 56

Page 47: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

A Special Case Concave Function of x

Numerical Example of f (x)r = 0, σ = 0.017, η = 10, and ρ = 0.16

x

-500 -400 -300 -200 -100 0 100 200 300 400 500

f(x)

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

A = 0.6

A = 0.2

A = 0.4

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 47 / 56

Page 48: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

A Special Case Important Concept

Market Price of Liquidity Risk

In this special case

λw(x) = −η f ′(x) = −

(b +

βAe−βη

x

1− Ae−βη

x

)(10)

If b ≈ 0, then the nonlinear term is dominant.

Market price of liquidity is NEGATIVE. Why?

(Market) order flow x demands liquidity and therefore must paythe price for enjoying the liquidity created by liquidity providers(e.g. traders who submit limit orders to trade).

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 48 / 56

Page 49: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Liquidity Risk Index: LIX Liquidity Risk Index: LIX

Liquidity Risk Index: LIX

Suppose x = 0, i.e., no trade. Then the “Implied bid-ask spread”to be paid by liquidity consumers can be defined as

LIX := 2η f ′(0) = 2(

b +βA

1− A

).

LIX is higher if b, A, and β are larger, intuitive indeed.

“Term structure” of LIX: Time interval to compute the order flowWall clock: 1 minute, 2 minutes, 3 minutes, . . ., 10 minutesBusiness clock: 10 trades, 20 trades, 30 trades, . . ., 100 trades

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 49 / 56

Page 50: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Liquidity Risk Index: LIX Liquidity Risk Index: LIX

On-Shore and Off-Shore Nikkei 225 Index Futures

On-Shore JPX (> 16.5 ms from SGX)

Big Nikkei (NK) at Osaka: tick size 10 points, multiplier U1,000

Mini Nikkei (NO) at Osaka: tick size 5 points, multiplier U100

Off-Shore SGX, CME (> 50 ms from SGX)

Regular Niikei (NI) at SGX: tick size 5 points, multiplier U500

Regular Nikkei (NX) at CME: tick size 5 points, multiplier U500

NI and NX are mutually fungible.

Quanto Nikkei (NH) at CME: tick size 5 points, multiplier $5

Excellent test bed for studying market fragmentation, orderplacement, order routing, LIX, etc

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 50 / 56

Page 51: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Liquidity Risk Index: LIX Liquidity Risk Index: LIX

EU Referendum Vote Counting −→ Brexit

June 24, 2016Ticker TV TOF σ η ρ b0 b A β SSE R2 LIX

10−3 bps 10−3 10−3 10−6 % bps

NH 54,986 -894 2.25 53.20 0.26 -2.31 -6.70 0.8567 1.18 4.87 2.93 6.51NX 29,510 -2,433 2.17 20.61 0.38 -2.12 0.52 0.0013 1.15 4.30 7.96 10.31NI 201,796 -4,625 2.21 158.98 0.64 -2.30 -6.52 0.7223 2.80 3.89 19.39 15.19

NK 174,567 -7,523 2.32 155.63 0.69 -2.33 0.91 0.0005 0.16 4.03 24.51 18.27NO 1,530,375 -53,492 2.35 956.44 0.72 -2.36 -1.10 0.3750 3.65 3.79 30.45 21.85NO5 306,075 -10,698 2.35 191.29 0.72 -2.36 0.49 0.0302 19.3 3.79 30.45 21.79

Volatility of log return is σ.Estimation of b0, b,A, and β by constrained nonlinear least squaresLIX is fairly invariant with different combinations of b,A, and β.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 51 / 56

Page 52: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Liquidity Risk Index: LIX Liquidity Risk Index: LIX

Time Series of LIX (Nov 5, 2014 to Dec 10, 2015)

Jan 20

15

Mar 2015

May 2

015

Jul 20

15

Sep 2

015

Nov 2

015

0

2

4

6

8

10

12

14

16

18

bps

NI NO

NK

NX

NHNH

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 52 / 56

Page 53: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Liquidity Risk Index: LIX Liquidity Risk Index: LIX

Descriptive Statistics for LIX (Nov 5, 2014 to Dec 10, 2015)

NH NX NI NK NO

mean 2.11 2.47 2.98 3.51 3.63std dev 1.14 1.41 1.73 2.06 2.02

1st 0.67 0.72 1.15 1.09 1.455th 0.86 1.03 1.39 1.50 1.73

10th 1.07 1.22 1.58 1.78 1.9325th 1.38 1.67 1.89 2.25 2.3350th 1.87 2.13 2.49 2.98 2.9975th 2.49 2.94 3.49 4.15 4.2790th 3.31 3.97 4.73 5.56 5.8495th 3.99 4.94 6.04 6.60 6.7699th 6.42 7.15 9.59 11.80 11.13

correlationwith 28.6% 34.2% 43.3% 78.3% 51.4%

volatilityChristopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 53 / 56

Page 54: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

Conclusions LIX is Useful

Conclusions

Price impact function is a concave function of order flow.

Market price of risk is negative for liquidity consumers.

LIX is a useful tool to reflect not only the market price ofliquidity risk but also possibly volatility.

Market depth: larger β implies lower depth

Urgency: larger A implies traders are more anxious when theytrade

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 54 / 56

Page 55: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

References Thank You for Your Attention!

References

I Almgren, R. (2012).Optimal trading with stochastic liquidity and volatility.SIAM Journal of Financial Mathematics, 3:163–181.

I Almgren, R. and Chriss, N. (2000).Optimal execution of portfolio transactions.Journal of Risk, 3(2):5–39.

I Çetin, U., Jarrow, R. A., and Protter, P. (2004).Liquidity risk and arbitrage pricing theory.Finance and Stochastics, 8(3):311–341.

I Domowitz, I. and Yegerman, H. (2011).Algorithmic trading usage patterns and their costs.ITG Analytics Incubator.

I Evans, M. D. D. and Lyons, R. K. (2002).Order flow and exchange rate dynamics.Journal of Political Economy, 110:170–180.

I Huang, R. and Ting, C. (2008).A functional approach to the price impact of stock trades and the implied true price.Journal of Empirical Finance, 15:1–16.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 55 / 56

Page 56: Algorithmic Trading and the Market Price of …Algorithmic Trading Strategies Order Placement Strategies Order Routing Strategies Christopher Ting August 11, 2016 12 / 56 (Lee Kong

References Thank You for Your Attention!

References (cont’d)

I Konishi, H. (2002).Optimal slice of a {VWAP} trade.Journal of Financial Markets, 5(2):197–221.

I Kyle, A. S. (1985).Continuous auctions and insider trading.Econometrica, 53:1315–1335.

I Roll, R. (1984).A simple implicit measure of the effective bid-ask spread in an efficient market.Journal of Finance, 39:1127–1139.

I Ting, C. (2014).A common measure of liquidity costs for futures and stock exchanges.In Lee, D. and Gregoriou, G. N., editors, Handbook of Asian Finance: REITs, Trading, and FundPerformance, volume 2, pages 201–213. Elsevier Academic Press, Massachusetts, USA.

Christopher Ting (Lee Kong Chian School of Business Singapore Management University [1em] August 11, 2016 [6em] )August 11, 2016 56 / 56