DYTEC - Dynamic Tail Event Curves - Hu
Transcription
DYTEC - Dynamic Tail Event Curves - Hu
DYTEC - Dynamic Tail Event Curves Petra Burdejová Wolfgang Karl Härdle Ladislaus von Bortkiewicz Chair of Statistics C.A.S.E. – Center for Applied Statistics and Economics Humboldt–Universität zu Berlin http://lvb.wiwi.hu-berlin.de http://case.hu-berlin.de Motivation Importance of tail event (curves) Dynamic Tail Event Curves 1-1 Motivation 1-2 Intra-day trading volume 13 ● ●● ●● ● ●● ● ●● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● 9 cumulated 1-min volume ● ● ● ● ● ●● volume 11 12 250 trading days 10:00 - 16:00 ● ● ● ● 10 daily 01-12/2008 14 20080102 NASDAQ Market - CISCO stocks 10:00 12:00 14:00 time Dynamic Tail Event Curves 16:00 Motivation 1-3 Intra-day trading volume Jain and Joh (1988) the day of the week and the hour have effect on trading volume Darrat et al. (2003) and Spierdijk et al. (2003) lagged values of volatility and trading volume simultaneously Bialkowski et al. (2008) and Brownlees et al. (2011) dynamic volume approach for VWAP Dynamic Tail Event Curves Motivation 1-4 VWAP trading strategy Buying/Selling fixed amount of shares at average price pj I{pj >VWAP} that tracks the VWAP benchmark PJ VWAP = j=1 vj · pj PJ j=1 vj with price pj and volume vj of the j-th transaction 50 % of trades are VWAP orders Implementation requires model for intraday evolution of volume Dynamic Tail Event Curves Motivation 1-5 Intra-day trading volume 20080102−20080103 14 High frequency data ● High dimensions Focus on dynamics volume 11 12 Model curves 13 ● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ● ●● ●●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●●● ● ●● ●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ●●● ●● ● ●● ● ● ● ●●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ●●● ● ● ●●●● ● ● ●● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ●● ●● ● ●● ●●● ● ●● ● ●● ● ● ● ●●●●● ● ● ● ● ● ● ● ●● ●●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ●●● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ●●● ● ●●● ● ●● ● ● ●●●● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ●●●●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ●● ● ●● ●● ● ●● ● ● ● ● ● ●●● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● 9 Make forecasts 10 Comprising tail events ● ● ● ● ● ● ● ● 10:00 12:00 14:00 time Dynamic Tail Event Curves 16:00 Motivation 1-6 Intra-day trading volume 14 20080102 ● ● ● 13 ● volume 11 12 ● ●● ●● ● ●● ● ●● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● 9 10 ● ● ● ● ● ●● 10:00 12:00 14:00 16:00 time Figure: Expectiles for τ ∈ {0.01, 0.02, 0.05, 0.1, 0.2, 0.5, , . . .} Dynamic Tail Event Curves Motivation 1-7 Intra-day trading volume 0.00 0.01 cum. returns 0.02 0.03 0.04 CISCO 2/1/2008 10:00 12:00 14:00 16:00 time Figure: Cumulative returns of VWAP strategy with weights based on τ -expectiles of volume, τ = 0.05, 0.5, 0.95. Dynamic Tail Event Curves Motivation 1-8 Temperature data Are we getting stronger extremes? ● ● Berlin 0.95 expectiles 1948−2013 4.0 Daily average temperature ● ● ● ● ● ● ● ● Model Usage: Pricing weather derivatives 3.5 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● 2.0 ● ● ● ● ● ● ● Apr ● Jul ● ● ● ● ● ● ● ● ● ● ● ● ● Oct Dec ● ● month in year ● ● ● ● ● ● ● Jan ● ● Figure: 0.95-expectile of Berlin temperature residuals in 1948-1969 1970-1991 1992-2013 1948-2013 Dynamic Tail Event Curves ● ● ● ● 3.0 Model residuals ● ● 2.5 Berlin, 1948 - 2013 temperature residuals ● ● ● ● Motivation Hurricane predictions Dynamic Tail Event Curves 1-9 Motivation 1-10 Hurricane predictions Are we getting stronger extremes? observe different trend pattern 60 ● ● ● ●● ● 50 Years 1946 - 2011 ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ● ●● ● 0 ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 10 ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● wind 30 40 West Atlantic 20 Strength of wind in knots 70 Strenght of Atlantic huricanes yearly 1946 1967 1987 Year Figure: Yearly expectiles for τ = 0.25, 0.5, 0.75 and trend Dynamic Tail Event Curves 2011 Motivation Dynamic demand models Electricity demand I Quarter-hourly I Jan.2010 - Dec.2012 I Amprion company in west of Germany Water demand Gas demand Dynamic Tail Event Curves 1-11 Motivation Objectives & Challenges High frequency data Time-varying with intraday pattern Dependent Model curves Focus on dynamics and dependence Comprising tail events Make forecasts Dynamic Tail Event Curves 1-12 Outline 1. Motivation X 2. Quantiles and Expectiles 3. Modeling Time-varying Curves 4. Outlook 5. Empirical Study 6. References Dynamic Tail Event Curves Quantiles and Expectiles 2-1 Quantiles and Expectiles For r.v. Y obtain τ -quantile qτ = arg min E {ρτ (Y − θ)} θ with asymmetric loss function ρτ (u) = |u|α τ − I{u<0} where α = 1 for quantiles and α = 2 for expectiles Dynamic Tail Event Curves Quantiles and Expectiles 2-2 Quantiles and Expectiles 0.8 0.6 0.2 0.4 loss function 1.0 1.2 1.4 Loss function ρτ(u) = uκ τ − I(u<0) 0.0 LQRcheck −3 −2 −1 0 1 2 Figure: Loss function of expectiles and quantiles for τ = 0.5 (dashed) and τ = 0.9 (solid) x Dynamic Tail Event Curves 3 Quantiles and Expectiles 2-3 Expectile Curves Y associated with covariates X Define generalized regression τ -expectile e τ (x) = arg min E {ρτ (Y − θ) | X = x} θ Use method of penalized splines to estimate vector of coefficients α α b = arg min α n X n o ρτ yi − α> b(xi ) + λα> Ωα i=1 with b basis vector (e.g. B-splines) penalization matrix Ω and shrinkage parameter λ Dynamic Tail Event Curves Definition of B-splines Penalization matrix Quantiles and Expectiles 2-4 Estimation of Expectile Curves LAWS Schnabel and Eilers (2009): iterative LAWS algorithm Schnabel (2011): expectile sheets for joint estimation of curves 14 20080102 ● ● ● 13 ● volume 11 12 ● ●● ●● ●● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● 9 10 ● ● ● ● ● ●● 10:00 12:00 14:00 16:00 time Figure: CISCO trading volume expectiles (λ = 5) Dynamic Tail Event Curves Modelling Time-varying Curves 3-1 Modelling Time-varying Curves Fix τ and model τ e (t) = K X αk φk (t) k=1 with predefined basis Φ = (φ1 , . . . , φK )> and t = 1, . . . , T . Add variation in time, s = 1, . . . , S, and model esτ (t) = K X k=1 Dynamic Tail Event Curves αsk φk (t) Modelling Time-varying Curves 3-2 Modeling Time-varying Curves Guo et al. (2013) es (t) independent realizations of stationary process Functional princ. components Following Karhunen-Loève expansion: es (t) = µ(t) + K X αsk φk (t) = µ(t) + αs> Φ(t) k=1 Method of penalized splines for mean function and FPC with empirical loss function S X T X n o ρτ Yst − θµ> b(t) − αs> ΘΦ b(t) + pen.mtx s=1 t=1 Details Dynamic Tail Event Curves Modelling Time-varying Curves Temporal (weak) dependent curves Sequence {Xn } is m-dependent if for any k the σ-algebras + Fk− =σ (. . . , Xk−1 , Xk ) and Fk+m =σ (Xk+m , Xk+m+1 , . . .) are independent. Hörmann and Kokoszka (2010) Karhunen-Loève expansion applicable for m-dependent asymptotic properties of FPC estimates remain the same most of time series ARE NOT m-dependent fail if i.i.d. curves are too noisy fail if curves are sufficiently regular but dependency is too strong How to model stronger dependency? Dynamic Tail Event Curves 3-3 Modelling Time-varying Curves 3-4 Cramér-Karhunen-Loève representation Panaretos and Tavakoli (2013) spectral decomposition of stationary functional time series es (t) ≈ J X exp(iωj s) j=1 −π =ω1 < . . . < ωJ+1 = π φ eigenfunctions j,k k≥1 αj,k k≥1 corresponding coefficients Dynamic Tail Event Curves K X αjk φj,k (t) k=1 Theoretical details Modelling Time-varying Curves 3-5 Cramér-Karhunen-Loève representation Simplification: Assume φj,k (t) = φk (t) for each j Then: es (t) ≈ J X exp(iωj s) j=1 ≈ U(s)> AΦ(t) with U(s) = (exp (iω1 s) , . . . , exp (iωJ s)) > AJxK matrix of coefficients Φ(t) = (φ1 (t), . . . , φK (t))> Dynamic Tail Event Curves K X k=1 αjk φk (t) Modelling Time-varying Curves 3-6 Empirical loss function P Method of penalized splines for φk (t) = Ll=1 βkl bl (t) Then Φ(t) = BKxL b(t) Minimize loss function S X T n o X ρτ Ys,t − U(s)> Cb(t) + λkCJxL kGJ s=1 t=1 with CJxL = AJxK BKxL matrix of coefficients and Group lasso penalization v L J J u uX X X t c2 kC k = kc k = JxL GJ Gj 2 j=1 Dynamic Tail Event Curves jl j=1 l=1 Modelling Time-varying Curves 3-7 Empirical loss function S X T X J n o X ρτ Ys,t − U(s)> Cb(t) +λ kcGj k2 |s=1 t=1 j=1 {z } l(C) l (C ) continuously differentiable b to be a solution: K-K-T conditions for C b )G + λ CGj ∇l (C j kCG k2 =0 j if CGj 6= 0 b )G k2 ≤ λ if CG = 0 k∇l (C j j If τ = 0.5, closed form solution available Dynamic Tail Event Curves Modelling Time-varying Curves 3-8 Block-Coordinate Gradient Descent Algorithm (BCGD) Tseng & Yun (2009) Solve nonconvex nonsmooth optimization problem min f (x) + λP(x) x where λ > 0 P : Rn → ( − ∞, ∞ ] block-separable convex function f smooth on an open subset containing domP combination of quadratic approximation and coordinate descent algorithm global convergence Dynamic Tail Event Curves Theoretical details Modelling Time-varying Curves 3-9 B-C-G-D Algorithm Stepwise and blockwise minimize b (t) )+ 1 d > H (t) d +λ b (t) +d ) = l (C b (t) )+d > ∇l (C Sλ ( C 2 J X (t) kCGj +d k2 j=1 Details Notation: b (t) + d ) min Sλ (C dGj minimization, where d = (dG1 , . . . , dGJ ) with dGk = 0 for k 6= j Dynamic Tail Event Curves Modelling Time-varying Curves 3-10 B-C-G-D Algorithm repeat t=t+1 for j = 1 to J do b (t) k2 ≤ λ then b (t) )G − h(t) C if k∇l (C j Gj G j (t) dGj b (t) = −C Gj else (t) b (t) + d ) dGj = min Sλ (C dGj end if end for until convergence criterion met b (t+1) − C b (t) − α(t) d (t) =0 update C Dynamic Tail Event Curves Details Modelling Time-varying Curves 3-11 Algorithm for computing DYTEC Idea: start with initial weights ws,t (obtained separately for each s = 1, . . . , S) and iterate between following steps: b using BCGD algorithm compute C update weights ws,t = τ 1−τ b b(t), if Ys,t > U(s)> C otherwise. stop if there is no change in weights ws,t . Dynamic Tail Event Curves Modelling Time-varying Curves 3-12 Dynamic functional factor model generalization (capture nonstationarity) Hays et al.(2012) & Kokoszka et al.(2014) extend with the idea of two spaces of basis function Model es (t) = K X Zsk mk (t) = Zs> m(t) k=1 with time-varying factor loadings Zk and functional factors Dynamic Tail Event Curves Modelling Time-varying Curves 3-13 Dynamic functional factor model Time basis: Zsk = J X αkj uj (s) j=1 Zs = AKxJ · U(s) Space basis: mk (t) = L X βkl bl (t) l=1 m(t) = BKxL b(t) Dynamic Tail Event Curves Modelling Time-varying Curves Dynamic functional factor model es (t) = Zs> m(t) = U(s)> Cb(t) with CJxL = A> JxK BKxL matrix of coefficients, space basis vector b(t) = {b1 (t), . . . , bL (t)}> and time basis vector U(s) = {u1 (s), . . . , uJ (s)}> Same loss function: S X T X n o ρτ Ys,t − U(s)> Cb(t) + λkCJxL kGJ s=1 t=1 Dynamic Tail Event Curves 3-14 Modelling Time-varying Curves Time basis capture periodic variation capture trend Proposal by Song et al. (2013): I Legendre polynomial basis I Fourier series See Appendix Dynamic Tail Event Curves 3-15 Modelling Time-varying Curves Space basis capture daily patterns capture specific structure Proposal by Song et al (2013): I Data driven I Based on combination of smoothing techniques and FPCA B-splines Definition of B-splines Dynamic Tail Event Curves 3-16 Empirical Study 4-1 Empirical Study 13 ● ●● ●● ● ●● ● ●● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● 9 cumulated 1-min volume ● ● ● ● ● ●● volume 11 12 250 trading days 10:00 - 16:00 ● ● ● ● 10 daily 01-12/2008 14 20080102 NASDAQ Market - CISCO stocks 10:00 12:00 14:00 time Dynamic Tail Event Curves 16:00 Empirical Study 4-2 Trading volume - smoothing GCV 110.05 log(volume) 11 12 13 14 110.15 15 B-splines with knots every 5 minutes (i.e. 76 splines) Optimal λ = 164 ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ●● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● 9 109.95 10 ● ● 100 150 lambda Dynamic Tail Event Curves 200 10:00 12:00 14:00 2008−01−23 16:00 Empirical Study 4-3 Trading volume - FPCA 1.0 Use 14 FPCs to explain 90% of variation 0.6 cumulative expl. variability 0.7 0.8 0.9 ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● ●●●● ●●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0 Dynamic Tail Event Curves 14 40 Number of FPCA 60 Empirical Study 4-4 Trading volume - FPCA log(volume) 10 12 14 mean 10:00 12:00 14:00 time of day 16:00 log(volume) 0.00 0.06 1st FPCA 10:00 Dynamic Tail Event Curves 12:00 14:00 time of day 16:00 Empirical Study 4-5 Trading volume - FPCA 1500 Periodogram 0 −30 500 1000 0 −20 −10 score 10 2000 20 2500 Fisher’s G-test: p-value=0.000 0 50 100 150 200 250 0.0 day Figure: Scores of 1FPC and periodogram Dynamic Tail Event Curves 0.1 0.2 0.3 Frequency 0.4 0.5 Outlook Outlook Algorithm - Code in R Simulation and Empirical studies Dynamic Tail Event Curves 5-1 DYTEC - Dynamic Tail Event Curves Petra Burdejová Wolfgang Karl Härdle Ladislaus von Bortkiewicz Chair of Statistics C.A.S.E. – Center for Applied Statistics and Economics Humboldt–Universität zu Berlin http://lvb.wiwi.hu-berlin.de http://case.hu-berlin.de References References Bialkowski, J., Darolles, S., Le Fol, G. Improving VWAP strategies: A dynamic volume approach Journal of Banking & Finance 32(9): 1709-1722, 2008, DOI: 10.1016/j.jbankfin.2007.09.023 Brownlees, Ch. T., Cipolliniy, F., Gallo, G.M. Intra-daily Volume Modeling and Prediction for Algorithmic Trading Journal of Financial Econometrics 9(3): 489-518, 2011, DOI: 10.2139/ssrn.1393993 Dynamic Tail Event Curves 6-1 References Darrat, A. F., Rahman, S., Zhong, M. Intraday trading volume and return volatility of the DJIA stocks: A note Journal of Banking & Finance 27: 2035-2043, 2003, DOI: 10.2139/ssrn.348820 Engle, R. F., Granger, C.W.J., Rice, J., Weiss, A., Semiparametric Estimates of the Relation between Weather and Electricity Sales Journal of the American Statistical Association 81(394): 310-320, 1986, DOI: 10.2307/2289218 Dynamic Tail Event Curves 6-2 References 6-3 Guo, M., Härdle, W. K. Simultaneous confidence bands for expectile functions Advances in Statistical Analysis, 96: 517-541 published online, 2012, DOI: 10.1007/s10182-011-0182-1 Guo, M., Zhou, L., Huang, J. Z., Härdle, W. K. Functional data analysis of generalized regression quantiles Statistics and Computing, published online, 2013, DOI: 10.1007/s11222-013-9425-1 Dynamic Tail Event Curves References 6-4 Härdle, W. K., Hautsch, N. and Mihoci, A. Local Adaptive Multiplicative Error Models for High-Frequency Forecasts Journal of Applied Econometrics, accepted for publication, 2014, DOI: 10.1002/jae.2376 Hays, S., Shen ,H., Huang, J.Z, Functional dynamic factor models with application to yield curve forecasting The Anals of Applied Statistics 6(3): 870–894, 2012, DOI: 10.1214/12-AOAS551 Dynamic Tail Event Curves References Hörmann, S., Kokoszka ,P. Weakly dependent functional data The Anals of Statistics 38(3): 1845-1884, 2010, DOI: 10.1214/09-AOS768 Kokoszka ,P., Miao, H., Zhang, X. Functional Dynamic Factor Model for Intraday Price Curves Journal of Financial Econometrics 0(0): 1-22, 2014, DOI: 10.1093/jjfinec/nbu004 Dynamic Tail Event Curves 6-5 References 6-6 Panaretos, V. M., Tavakoli, S. Cramér-Karhunen-Loève representation and harmonic principal component analysis of functional time series Stochastic Processes and their Applications 123(7): 2779-2807, 2013, DOI: 10.1016/j.spa.2013.03.015 Jain, P. C., Joh, G. H. The Dependence between Hourly Prices and Trading Volume The Journal of Financial and Quantitative Analysis 23(3): 269-283, 1988, DOI: 10.2307/2331067 Dynamic Tail Event Curves References 6-7 Schnabel, S.K., Eilers, P. H. C. Optimal expectile smoothing Computational Statistics and Data Analysis 53(12): 4168-4177, 2009, DOI: 10.1016/j.csda.2009.05.002 Song, S., Härdle, W. K., Ritov, Y. Generalized Dynamic Semiparametric Factor Models for High Dimensional Nonstationary Time Series The Econometrics Journal, accepted for publication, 2013, DOI: 10.1111/ectj.12024 Dynamic Tail Event Curves References 6-8 Spierdijk, L., Nijman, T.E., van Soest, A.H.O. Price Dynamics and Trading Volume: A Semiparametric Approach Department of Applied Mathematics, University of Twente, 2004, DOI: 10.2139/ssrn.512342 Tseng, P., Yun, S. A coordinate gradient descent method for nonsmooth separable minimization Mathematical Programming 117(1-2): 387-423, 2009, DOI: 10.1007/s10107-007-0170-0 Dynamic Tail Event Curves Appendix 7-1 Model of Temperature data −15 −10 −5 Temperature 0 5 10 15 20 Berlin temperature 1945/1978/2013 Jan Apr Jul Day Oct Dec Figure: Daily average temperature in Berlin in 1948, 1980, 2013 Back to Motivation - Temperature Data Dynamic Tail Event Curves Appendix 7-2 Model of Temperature data For days t = 1, . . . , 24090 (i.e. 66 years) Xt = Tt − Λt 2 n m · π · t m · π · t o X Λt = a + bt + cm cos + dm sin 365 365 m=1 Xt = L X βl Xt−l + εt l=1 Back to Motivation - Temperature Data Dynamic Tail Event Curves Appendix 7-3 Model of Temperature data Series X_adjust â = 5.617 0.6 β̂1 = 0.786 −5 b̂ = 2.3 ∗ 10 β̂4 = 0.015 d̂1 = −7.932 β̂5 = 0.011 d̂2 = −3.109 β̂6 = 0.007 0.4 β̂3 = 0.024 0.2 ĉ2 = −7.14 ∗ 10 −2 0.0 ĉ1 = −4.15 ∗ 10 Partial ACF β̂2 = −0.078 −2 0 β̂7 = 0.001 β̂8 = 0.019 Back to Motivation - Temperature Data Dynamic Tail Event Curves 10 20 30 Lag 40 Appendix 7-4 B-splines Knot vector t = (t1 , . . . , tM ) as nondecreasing sequence in [0, 1] Control points P0 , . . . , PN Define i-th B-spline basis function Ni,j of order j as ( 1 if ti < t < ti+1 Ni,0 (t) = 0 otherwise Ni,j (t) = ti+j+1 − t t − ti Ni,j−1 (t) + Ni+1,j−1 (t) ti+j − ti ti+j+1 − ti+1 j = 1, . . . , N − M − 1 Back to Estimation of Expectile Curves Back to Space Basis Dynamic Tail Event Curves Appendix 7-5 Estimation of Quantile Curves Definition of Penalty matrix α b = arg min α N X n o ρτ yi − α> b(xi ) + λα> Ωα i=1 where b(x) = (b1 , . . . , bq (x))> is vector of B-spline basis functions Denote b̃(x) = (b̃1 (x), . . . , b˜q (x))> the vector of second derivatives of basis functions and set Z Ω= Back to Estimation of Expectile Curves Dynamic Tail Event Curves b̃(x)b̃(x)> dx Appendix 7-6 LAWS estimation Schnabel and Eilers (2009): min n X wi (τ )(yi − µi )2 i=1 where wi (τ ) = τ 1−τ if yi > µi if yi ≤ µi , µi expected value according to some model. Iterations: fixed weights, closed form solution of weighted regression recalculate weights until convergence criterion met. Back to Expectiles Curves Dynamic Tail Event Curves Appendix 7-7 LAWS estimation Example: Classical linear regression model Y = Xβ + ε where E (ε |X ) = 0 and µ = E (Y |X ) = X β. βb = arg min β n X wi (yi − µi )2 i=1 Then: βb = (X > WX )−1 XWY with W diagonal matrix of fixed weights wi . Back to Expectile Curves Dynamic Tail Event Curves Appendix 7-8 Functional principal components X (t) stochastic process on compound interval T with mean function µ(t) = E {X (t)} and covariance function K (s, t) = cov(X (s), X (t)) There exist orthogonal sequence of P eigenfunctions φj and eigenvalues λi such that K (s, t) = ∞ j=1 λj φj (s)φj (t) We can rewrite process as ∞ X p X (t) = µ(t) + λj κj φj (t) j=1 where κj = √1 λj R X (t)φj (s)ds , E(κj ) = 0 and E(κj κK ) = δjk . Back to Modelling of Time-varying Curves Dynamic Tail Event Curves Appendix 7-9 Guo(2013) - Empirical loss function S ∗ = S + Mµ + MΦ where S= D X T X ρτ Ydt − b(t)> θµ − b(t)> ΘΦ αd d=1 t=1 Mµ = θµ> MΦ = Z K X b̃(x)b̃(x)> dxθµ = θµ> Ωθµ Z θφ,k b̃(x)b̃(x)> dx θφ,k k=1 and b̃(x) vector of second derivatives Back to Guo(2013) - Estimation of Quantile Curves Dynamic Tail Event Curves Appendix 7-10 Cramér-Karhunen-Loève representation Conditions (Panaretos and Tavakoli (2013)) Xt second order stationary time series in L2 ([0, 1], R) with zero mean, E kX0 k22 < ∞ and autocovariance kernel at lag t : rt (u, v ) = E (Xt (u)X0 (v )) u, v ∈ [0, 1], t ∈ Z, inducing operator : Rt : L2 ([0, 1], R) → L2 ([0, 1], R) Assume: P i) t∈Z kRt k1 < ∞ ii) (u, v ) → rt (u, v ) continuous t ∈ Z, and Back to C-K-L representation Dynamic Tail Event Curves P t∈Z krt k∞ <∞ Appendix 7-11 Cramér-Karhunen-Loève representation Theorem (Panaretos and Tavakoli (2013)) Xt admits representation Z π exp(iωj t)dZω a.s. Xt = −π where for fixed ω, Zω is random element of L2 ([0, 1], C) and process ω → Zω has orthogonal increments. Integral can be understood as a Riemann-Stieltjes limit in sense E kXt − J X exp(iωj t)(Zωj+1 − Zωj )k22 → 0 as J → 0 j=1 Back to C-K-L representation Dynamic Tail Event Curves Appendix 7-12 Cramér-Karhunen-Loève representation Remark (Panaretos and Tavakoli (2013)) With spectral density operator Fω = having eigenfunctions {φωn }t≥1 1 2π P t∈Z exp(−iωt)Rt C-K-L representation can be interpreted as Z π Xt = exp(i) −π Back to C-K-L representation Dynamic Tail Event Curves ∞ X n=1 hφωn , dZω i φωn Appendix 7-13 Block-Coordinate Gradient Descent Algorithm Tseng & Yun (2009) min f (x) + λP(x) x Solve 1 > > min d ∇f (x) + d Hd + λP(x + d ) 2 d P is block-separable then H is block-diagonal solve subproblems (for every j take d = (dG1 , . . . , dGJ ) with dGk = 0 for k 6= j) Back to BCGD algorithm Dynamic Tail Event Curves Appendix 7-14 Block-Coordinate Gradient Descent Algorithm b (t) b (t) )G − h(t) C ∇l (C j Gj G (t) dGj = − 1 j b (t) )G − λ ∇l (C j (t) (t) (t) b (t) k2 b )G − hG C hGj k∇l (C j Gj j (t) (t) H (t) has submatrices HGj = hGj IGj for scalars hG(t) j α(t) set by Amijo rule (See Details: Tseng & Yun (2009)) Back to BCGD algorithm Dynamic Tail Event Curves Appendix Song et. al.(2013) - Time basis Orthogonal Legendre polynomial basis to capture the global trend in time u1 (d ) = 1/C1 , u2 (d ) = d /C2 , u3 (d ) = (3t 2 − 1)/C3 , . . . P 2 with generic constant Ci such that D d=1 ui (d )/Ci = 1 Fourier series to capture periodic variations u4 = sin(2πd /p)/C4 , u5 = cos(2πd /p)/C5 , u6 = sin(2πd /(p/2))/C6 , . . . with given period p Back to Song(2013) -Time Basis Dynamic Tail Event Curves 7-15