Flash crashes and order avalanches Friedrich Hubalek and Thorsten Rheinländer Vienna University of Technology November 29, 2014 Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 1 / 32
Flash Crash As quoted from Wikipedia: A flash crash is a very rapid, deep, and volatile fall in security prices occurring within an extremely short time period. A flash crash frequently stems from trades executed by black-box trading, combined with high-frequency trading, whose speed and interconnectedness nature can result in the loss and recovery of billions of dollars in a matter of minutes and seconds. This type of event occurred on 6 May 2010 when a $4.1 billion trade on the NYSE resulted in a loss to the Dow Jones Industrial Average of over 1000 points and then a rise to approximately previous value, all over about fifteen minutes. The mechanism causing the event has been heavily researched and is in dispute. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 2 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 3 / 32
Overview In the limit order book (LOB), price level and number of orders away from the best bid/ask prices are recorded. We will show that flash crashes are important in the build up of the LOB, and study order execution avalanches. A bivariate Laplace-Mellin transform is derived for the joint height and length of flash crashes in a Brownian framework, involving the Riemann Xi-function. It is observed that the equality of two different representations of this transform, associated with two ways of disintegrating the Ito measure, is equivalent to the transformation formula of Jacobi s Theta function. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 4 / 32
Some key references 1 P. Biane, J. Pitman and M. Yor (2001). Probability laws related to the Jacobi theta and Riemann zeta functions, and Brownian excursions. Bull. Amer. Math. Soc. 38, pp. 435-465 2 K. Ito (1970). Poisson point processes attached to Markov processes. Proc. Sixth Berkeley Symp. Math. Stat. Prob., pp. 225-239 3 R. Mansuy and M. Yor (2008). Aspects of Brownian Motion. Springer 4 D. Revuz and M. Yor (2004). Continuous Martingales and Brownian Motion. 3rd edition, Springer (in particular Ch. XII: Excursion theory). 5 D. Williams (1970). Decomposing the Brownian path. Bull. Amer. Math. Soc. 76, pp. 871-873. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 5 / 32
Basic model We work in business time and model the mid price process B as a Brownian motion. A more realistic model in real time would result from subordinating B. The last hitting time of the level u is given as A u t = sup {s : B s = u, s < t}. During an infinitesimal time interval dt, it is assumed that new limit orders are created at every level B t + u with volume density g(u) du, for some integrable function g : R \ {0} R +. The volume of orders at time t > 0 and level u is thus given by V u t = t A u t g (u B s ) ds. We will focus just on the ask side (sell orders), i.e. we assume g(x) = 0 for x < 0. There will be no order withdrawal; limit orders are executed once the mid price hits the corresponding level. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 6 / 32
Execution mechanisms As a special case, we consider g(x) = x + µ for some fixed displacement µ > 0, so the total volume of orders at level u equals the local time at level u µ. We now assume that the Brownian motion B, B 0 = 0, has just surpassed the level µ: 1 Type I execution: an order is triggered whenever the running maximum of B is increasing. 2 Type II execution: like type I, but after a downward excursion straddling at least a size of µ, and lasting less than time ε ( flash crash ). 3 We take record if there is no order execution in a time period lasting longer than ε, i.e. when a downward excursion takes place with duration at least of ε. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 7 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 8 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 9 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 10 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 11 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 12 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 13 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 14 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 15 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 16 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 17 / 32
Order avalanches Orders in the LOB get executed via avalanches. In other words, limit orders may accumulate on some levels, and when the price process crosses those values, we will see a sudden decrease of the number of orders in the LOB. denote the time when there is the first order execution after a time of at least ε since the last execution, and Tε end similarly the Let T start ε last execution time before a downward excursion lasting at least ε takes place. An ε-avalanche is defined as the stopped process {B t : Tε start t L ε } where the avalanche length L ε is the difference between the last and the first execution time, L ε := T end ε T start ε. We are interested into the distribution of the avalanche length. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 18 / 32
6 5 4 3 Μ 2 1 2 4 6 8 1 Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 19 / 32
Laplace transform for avalanche length with no flash crash Let us first assume that there is no downward excursion straddling at least a size of µ, and lasting less than time ε. Dassios and Lim (2009) derive the Laplace transform of the avalanche length L ε in the context of Parisian options as E [ e λlε] = 1 λεπ erf ( λε ) + e λε. The same formula can be inferred (Laurent de Dok du Wit, Diploma Thesis 2012) from the Lévy measure of the subordinator consisting of Brownian passage times. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 19 / 32
6 5 4 3 Μ 2 1 5 10 15 Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 20 / 32
6 5 4 3 Μ 2 1 5 10 15 Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 21 / 32
Laplace transform for full avalanche length, including flash crashes We can show that the Laplace transform of the full avalanche length A ε is given as [ E e λaε] h(x) dx ε = ε 0 (1 e λx ) h(x) dx + h(x) dx ε where ( h(x) = x ) 3/2 x + 2 2π 3/2 2 k 2 µ 2 2 k 1 2π π x 5/2 e 2k2 µ 2 /x. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 22 / 32
Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 23 / 32
A short primer on excursion theory Denoting by (U, U) the measurable space of Brownian excursions, by (e t, t > 0) the excursion process, by Γ a measurable subset of U, one sets Nt Γ (ω) = 0<u t 1 Γ (e u (ω)). The Ito measure n is the σ-finite measure defined on U by [ ] n (Γ) := E N1 Γ. It turns out that the excursion process is a Poisson Point Process, and hence the Ito measure is its characteristic measure. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 24 / 32
Ito s description of n Denoting by R the excursion length, the density of R under n + (the Ito measure restricted to positive excursions) is 1 2 2πr 3. Moreover, under n + and conditionally on R = r, the coordinate process w has the law π r of the Bessel Bridge of dimension 3 over [0, r]. Hence if Γ is a measurable subset of U +, then n + (Γ) = 0 π r (Γ {R = r}) dr 2 2πr 3. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 25 / 32
Moment generating function of normalized excursion height The mgf of the height N of the normalized Brownian excursion can be determined as 1 [( π ) s ] 2 E 2 N = ξ (2s), s > 1, where ξ denotes the Riemann Xi function which is connected to the Riemann zeta function ζ by ξ (s) = s (s 1) ( s Γ π 2 2) s/2 ζ (s). In particular, the Xi function has no zeroes outside of the critical strip, and satisfies the reflection principle, for s C, ξ (1 s) = ξ (s). Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 26 / 32
Joint law of excursion length and height Our main result gives a transform of the joint distribution of the excursion length R and its height H. This transform is a bivariate Laplace-Mellin transform and states that for λ > 0, s > 1 U e λr(u) H (u) s 1 n + (du) = 1 ( λ 1 2 s s ) ( s Γ 8π 2 1 ξ. 2) This allows us to determine the joint law n + (R < ε; H > µ), i.e. the distribution of a flash crash under the Ito measure. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 27 / 32
Two differerent descriptions of the Ito measure The joint density f H,R of length R and height H under n can be written as f H,R (h, r) = f H R (h, r)f R (r) Ito description or f H,R (h, r) = f R H (h, r)f H (h) Williams description Ito s description involves the distribution of the height of a three-dimensional Bessel bridge. Williams description is based on the distribution of the sum of two independent copies of the hitting time of 1 by a three-dimensional Bessel process starting in zero. Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 28 / 32
Equality of the two disintegrations These two different disintegrations are equivalent, but the densities involved have different expressions. These leads for instance to equalities like π 2 h 4 ( e rn2 π 2 rn 4 π 2 2h 2 n=1 2h 2 ) 3n2 = h 32 2 πr 5 ( e 2h2 n 2 2h 2 n 4 r n=1 r ) 3n2, 2 which is just a formula encoding the equivalence of Ito s and William s description. There is an interesting connection to Jacobi s Theta function which is defined for τ > 0, and absolutely convergent for τ > ε > 0, by ϑ (τ) = 1 + 2 n=1 e πn2τ. It satisfies the transformation formula, for τ > 0, ϑ (1/τ) = τϑ (τ). Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 29 / 32
Equivalence with the Theta transformation Biane and Yor (1987) derive interesting consequences of the equivalence of the two different disintegrations, amongst others that this follows from the transformation formula for the theta function: Instrumental is here a function ϕ, defined for y > 0 via the absolutely convergent series for y > ε > 0, ϕ (y) := 4π n=1 It follows that ϕ satisfies the equation ( ) e πyn2 πyn 4 3n2. 2 ϕ(y) = 2yϑ (y) + 3ϑ (y). Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 30 / 32
As a consequence of the Theta transformation, one gets that ϕ scales like ϕ (1/y) = y 5/2 ϕ (y). From this the formula encoding the equivalence of the two different disintegrations follows immediately for the choice y := r/32πh 2, and vice verse. On the other hand, we can show that the functional equation satisfied by the ϕ-function in fact implies the transformation formula for the Theta function. Thus follows the surprising observation that a fundamental result involving Brownian motion and the Ito-measure is actually equivalent to a result found by Jacobi in his Fundamenta nova theoriae functionum ellipticarum (1829). Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 31 / 32
Thank You for Your attention! Friedrich Hubalek and Thorsten Rheinländer (Vienna Flash University crashes of and Technology) order avalanches November 29, 2014 32 / 32