advertisement

An Order Flow Model and a Liquidity Measure of Financial Markets by Adlar Jeewook Kim B.S. Carnegie Mellon University (1998) B.S. Carnegie Mellon University (1998) M.S. Carnegie Mellon University (2000) Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Doctor of Philosophy at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY September 2008 c Massachusetts Institute of Technology 2008. All rights reserved. Author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Department of Electrical Engineering and Computer Science August 8, 2008 Certified by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tomaso Poggio Eugene McDermott Professor Thesis Supervisor Certified by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Andrew W. Lo Harris and Harris Group Professor Thesis Supervisor Certified by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J. Doyne Farmer Professor, Santa Fe Institute Thesis Supervisor Accepted by . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Terry P. Orlando Chair, Department Committee on Graduate Students An Order Flow Model and a Liquidity Measure of Financial Markets by Adlar Jeewook Kim Submitted to the Department of Electrical Engineering and Computer Science on August 8, 2008, in partial fulfillment of the requirements for the degree of Doctor of Philosophy Abstract The thesis seeks a better understanding of liquidity generation process of financial markets and attempts to find a quantitative measure of market liquidity. Various statistical modeling techniques are introduced to model order flow generation, which is a liquidity generation process of the market. The order flow model successively replicates various statistical properties of price returns including fat-tailed distribution of returns, no autocorrelation of returns and strong positive autocorrelation of transaction signs. While attempting to explain how the order flow model satisfies Efficient Market Hypothesis (EMH), I discovered a method of calibrating market liquidity from order flow data. Thesis Supervisor: Tomaso Poggio Title: Eugene McDermott Professor Thesis Supervisor: Andrew W. Lo Title: Harris and Harris Group Professor Thesis Supervisor: J. Doyne Farmer Title: Professor, Santa Fe Institute 2 To my parents; Jae Won Kim and Jee Sook Hwang 3 Acknowledgments My plan to pursue PhD in this topic began many years back when I was an undergraduate student at Carnegie Mellon University. I was one of the fortunate people who had chance to personally interact with the late Herbert Simon who unfortunately is no longer with us today. I would like to thank him for encouraging me to pursue research of my interests even though it could have been (and had been) a difficult journey. I wish to express my sincere gratitude to all those who helped me during the course of this work. I gratefully acknowledge my mentors Tomaso Poggio, Andrew W. Lo, and J. Doyne Farmer, and my thesis committee members John N. Tsitsiklis and Patrick H. Winston for their patience, guidance and advice. I am also thankful to all the people at CBCL, LFE, and Santa Fe Institute. At CBCL, I was fortunate to meet people who are now my good friends. I especially thank Nicholas Tung Chan for getting me involved in various projects, Sanmay Das for stimulating discussions which helped me forming ideas for my thesis, and Gadi Geiger for being always available to talk openly about everything over the countless coffee breaks. I was fortunate to share my office with Tony Ezzat who had been a great friend and a colleague. I very much enjoyed talking to Tony about my work and also many other things in life. I also gratefully acknowledge Mary Pat Fitzgerald, Minjoon Kouh, Luis Perez-Breva, Thomas Serre, Christian Shelton, Kathleen Sullivan, and Gene Yeo at CBCL; Ely Dahan at UCLA; Mike Epstein and Svetlana Sussman at LFE; Marilyn Pierce and Janet Fischer at MIT EECS department; Austin Gerig, Nate Metheny, Yonathan Schwarzkopf, Michael Twardos, Javier Vicente, Neda Zamani at Santa Fe Institute for the opportunities to interact with them. More personally, I am thankful to friends outside of my lab. Especially to Insuk Choi, Eunjong Hong, and Chanryeol Rhyou, your friendships have been invaluable to me. I have to say, we have some good memories while we were at MIT. To my lifelong friends, Hyung Kyu Lee and Hongchul Byun, thank you for keeping me up-to-date on what lives outside of MIT are like. Finally, to my family. To my brother, Warren Kim, thank you for listening to all my agonies in life and suggesting solutions. I am so lucky to have you as my big brother. To my parents, I thank you for your love and support throughout this journey. None of this could have been possible without you and for that I am dedicating this to you. 4 Contents 1 Introduction 17 1.1 Major Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.2 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2 London Stock Exchange Data 19 2.1 Order Matching Mechanism . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2 Limit Order Removal Times . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.2.1 Event Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.2.2 Time-to-Fill and Time-to-Cancel . . . . . . . . . . . . . . . . . . . . 21 2.3 Trading Periods: Auction vs. Continuous . . . . . . . . . . . . . . . . . . . 22 2.4 Summary Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3 Stock Order Flow Model 3.1 26 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.1 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.2 Our Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Order Sign Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2.1 Fractional Autoregressive Integrated Moving Average Model . . . . 29 3.2.2 Order Sign Generation . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Price Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.3.1 Input-Output Hidden Markov Models (IOHMMs) . . . . . . . . . . . 35 3.3.2 A Supervised Learning Algorithm . . . . . . . . . . . . . . . . . . . 37 3.3.3 Price Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4 Cancellation Time Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 3.2 3.3 5 4 Limit Order Removal Times Model 48 4.0 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.1.1 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Data Censoring and Survival Analysis . . . . . . . . . . . . . . . . . . . . . 49 4.2.1 Fitting Observed Data . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.2.2 τ -Generation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Estimation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.3.1 Maximum Likelihood Estimation (MLE) . . . . . . . . . . . . . . . . 57 4.3.2 Kaplan-Meier Estimators and Least Squares Fit . . . . . . . . . . . 58 4.3.3 Inconsistency with Estimation Methods and Improvement . . . . . . 60 Empirical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.4.1 Unconditional Model: With vs. Without Censored Data . . . . . . . 63 4.4.2 Conditional Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.4.3 Tail Exponent γ of Removal Times . . . . . . . . . . . . . . . . . . . 79 4.4.4 Time-to-Fill Measures Using First Passage Time vs. Our Method . . 82 4.2 4.3 4.4 4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Order Flow Simulation 86 87 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5.2 Simulation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5.3 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.3.1 Fat-Tailed Returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5.3.2 Clustered Volatility . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.3.3 Market Efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Liquidity Measure 91 92 6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 6.2 Liquidity Measure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 6.3 Analyses on Simulated Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6.4 Analysis of Real Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 6 7 Conclusion 102 A Order Flow Model Parameter Estimates 103 A.1 Order Sign Model Parameter Estimates . . . . . . . . . . . . . . . . . . . . 103 A.2 Price Model Parameter Estimates . . . . . . . . . . . . . . . . . . . . . . . . 104 A.3 Cancellation Time Model Parameter Estimates . . . . . . . . . . . . . . . . 114 B MIT Web Market Simulator 115 B.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 B.2 Technical Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 B.2.1 Abstract Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . 115 B.2.2 Component Level Design . . . . . . . . . . . . . . . . . . . . . . . . 116 B.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 C Securities Trading of Concepts (STOC) C.0 Preface 126 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 C.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 C.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 C.2.1 Prior methods of measuring product concept preferences . . . . . . . 130 C.2.2 Prediction Markets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 C.2.3 Rational Expectations (RE) Models and Experimental Markets . . . 133 C.3 Design of Markets and Securities . . . . . . . . . . . . . . . . . . . . . . . . 135 C.4 Possible Trading Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 C.5 Results of STOC Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 C.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 7 List of Figures 2-1 Three types of continuous order execution (cancellation) scenarios. The A, B, C, and D indicate different states of limit order book. The arrow for each order indicates order placement time and execution (cancellation) time. . . 23 3-1 Autocorrelation of transaction sign series for the stock AZN (black). The same transaction sign series is randomly reordered to kill the autocorrelation (red). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3-2 Autocorrelation of the actual (left) and the simulated (right) transaction sign ˆ 0) model with dˆ = 0.1753 is used. series for stock AZN. The FARIMA(0, d, 10,000 past order signs are used to compute the sign predictor Ψ̂t using Equation 3.4. 568,563 transaction signs are simulated from the model which is equal to the actual number of transaction signs in the data set. . . . . . . 32 3-3 Empirical PDFs of order price for buy (line) and sell (dotted line) orders of stock AZN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3-4 Empirical PDFs of order price of stock AZN conditioning on bid/ask spread at time t defined as xt . The PDFs for orders placed while xt ≤ 0.0025 and xt > 0.0025 are plotted separately for buy orders (left) and sell orders (right). 35 3-5 Bayesian network describing IOHMM for order placement price model. st , pt , and xt in the diagram refer to hidden state, price, and bid-ask spread at time t respectively. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3-6 Change in out-of-sample log-likelihoods for stock AZN. Out of 675 trading days, 30% of them are randomly selected as out-of-sample and remaining 70% are used for training. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 44 3-7 Empirical PDFs of the actual and the simulated price for the stock AZN. Total of 2,328,429 prices are simulated. The left (right) figure shows a price distribution when bid-ask spread xt is xt ≤ 0.0025 (xt > 0.0025). . . . . . . 46 4-1 Different shapes of the hazard function hqw (τ ) for the q-Weibull distribution. The values for q and λ are fixed to 1.5 and 1000 respectively. The α values are varied – 1, 1.5, and 1.9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4-2 Weibull and q-Weibull fits to the empirical survival probabilities of observed time-to-fills (left) and observed time-to-cancels (right) of stock AZN. The censored observations are ignored. For the observed time-to-fill estimated Weibull parameters are α = 0.57 and λ = 24.18, and estimated q-Weibull parameters are q = 1.30, α = 0.62 and λ = 6.30. For the observed timeto-cancel estimated Weibull parameters are α = 0.60 and λ = 29.01, and estimated q-Weibull parameters are q = 1.35, α = 0.71 and λ = 7.53. . . . . 54 4-3 Survival plots of actual vs. simulated observed removal times for stock AZN: observed time-to-fills (left) and observed time-to-cancels (right). For simulated observed removal times q-Weibull distribution is used only using the uncensored data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4-4 q-Weibull MLE estimation for Pe (τ ) for the stock AZN. Change in loglikelihood le0 (α, λ|q) given different values of q. The optimal value for q, which results the maximum log-likelihood is q ∗ = 1.75 (left). Contour plot of log-likelihood le0 (α, λ|q ∗ = 1.75) of maximization problem (eqn 4.10) given optimal q ∗ (right). The optimal α and λ are (α∗ , λ∗ ) = (1.25, 17.76). In this data set, 77.49% of orders are canceled. . . . . . . . . . . . . . . . . . . . . 58 4-5 q-Weibull least squares fit for Pe (τ ) of stock AZN: The change in R2 over different q’s (left). The optimal value q ∗ is 1.67. The plot of Equation 4.12 for q ∗ and its least squares fit (right). The optimal α and λ are (α∗ , λ∗ ) = (1.00, 25.23). In this data set, 77.49% of orders are canceled. . . . . . . . . . 9 59 4-6 Comparison of q-Weibull tail parameter estimates of synthetic data sets with various cancellation probabilities. The survival analysis was used to exploit the censored observations. For each cancellation probability, 100 data sets with 10,000 orders are used to calculate the mean of tail estimates. The left plot shows q vs probability of cancellation for actual, least squares fit of Kaplan-Meier estimators, MLE, and Alternative estimation methods. The right plot shows the absolute difference between actual and estimated tail parameters of the three estimation methods for various probabilities of cancellations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4-7 Absolute difference between actual and estimated survival functions |Sest (τ )− Sactual (τ )| using three different estimation methods. Arbitrary set of qWeibull parameters for time-to-fill and time-to-cancel are used to generate orders with cancellation probability of 0.9. The 95% confidence intervals are calculated using 100 generations of synthetic data set with 10,000 orders in each set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4-8 Survival plots of empirical vs. simulated observed removal times of stock AZN with and without censored data: observed time-to-fills (left) and observed time-to-cancels (right). The q-Weibull distribution is used for both removal time models. When modeling removal times with censored data, 69.18% of them are canceled orders, therefore, time-to-fill model is indirectly modeled deriving from the estimate of time-to-cancel model and the observed timeto-fill distribution as we described in Section 4.3.3. . . . . . . . . . . . . . . 64 4-9 Survival plots of empirical vs. simulated observed time-to-fills of 8 stocks. . 66 4-10 Survival plots of empirical vs. simulated observed time-to-cancels of 8 stocks. 66 4-11 Change in probabilities of cancellation of limit orders given s and ∆p: Mean of s vs. Cancellation (left), Mean of ∆p vs. Cancellation (right). Three are picked from the ten stocks used in our analysis to plot the figure. The other seven stocks follow similar patterns to those are shown here. . . . . . . . . . 68 4-12 Autocorrelation of removal times for the stock AZN. For both observed timeto-fill (left) and observed time-to-cancel (right), the autocorrelation function decays slowly. The removal times are ordered by the time of removal. . . . . 10 69 4-13 q-Weibull parameter estimates for the conditional time-to-fill model for the stock AZN. The 95% confidence intervals are calculated using the empirical bootstrap method. Cubic smoothing splines are used to model the parameter change over s and ∆p. (a) Pe (τ |s): time-to-fill conditioning on s. (b) Pe (τ |∆p): time-to-fill conditioning on ∆p. . . . . . . . . . . . . . . . . . . . 73 4-14 q-Weibull parameter estimates for the conditional time-to-cancel model for the stock AZN. The 95% confidence intervals are calculated using the empirical bootstrap method. The cubic smoothing splines are used to model the parameter change over s and ∆p. (a) Pc (τ |s): time-to-cancel conditioning on s. (b) Pc (τ |∆p): time-to-cancel conditioning on ∆p. . . . . . . . . . . . . 74 4-15 Quantile-Quantile plots for observed time-to-fill for stock AZN. In generating observed time-to-fills, all four possible combinations of conditional variables are used in τ -generation model: (a) ∆p for time-to-fill and s for time-tocancel, (b) ∆p for both time-to-fill and time-to-cancel, (c) s for both timeto-fill and time-to-cancel, (d) s for time-to-fill and ∆p for time-to-cancel. . . 77 4-16 Quantile-Quantile plots for observed time-to-cancel for stock AZN. The same combinations of conditional variables are used as described in figure 4-15. . 77 4-17 Survival plots of actual vs. simulated observed time-to-fills of 8 stocks from conditional model using ∆p and s as conditional variables for time-to-fill and time-to-cancel respectively. . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 4-18 Survival plots of actual vs. simulated observed time-to-cancels of 8 stocks from conditional model using ∆p and s as conditional variables for time-to-fill and time-to-cancel respectively. . . . . . . . . . . . . . . . . . . . . . . . . . 4-19 The change in the tail exponent γ = (q−2) (1−q) 78 × α for the stocks RIO, SDR, and AZN. Tail exponents for time-to-fill conditioning on ∆p’s (left). Tail exponents for time-to-cancel conditioning on s’s (right). . . . . . . . . . . . 80 4-20 Expected and empirical removal times vs the size s and the price improvements ∆p. The left plot shows time-to-cancel given s, and the right plot shows time-to-fill given ∆p. . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 82 4-21 The comparison between the first passage time and our model based on survival analysis using time-to-fill measures for the stock AZN. The upper limit of 3,600 seconds is used for calculation (T = 3600 in Equation 4.23). The left figure shows expected time-to-fill within 3,600 seconds. The right figure shows execution probability within 3,600 seconds. . . . . . . . . . . . 85 4-22 The comparison between the first passage time and our model based on survival analysis using time-to-fill measures for the stock DEB. The upper limit of 3,600 seconds is used for calculation (T = 3600 in Equation 4.23). The left figure shows expected time-to-fill within 3,600 seconds. The right figure shows execution probability within 3,600 seconds. . . . . . . . . . . . 85 5-1 Description of Order Flow Simulation . . . . . . . . . . . . . . . . . . . . . 88 5-2 The PDFs of actual (black) and simulated (red) returns for the stock AZN. The Gaussian PDF (green) is also shown to emphasize the fat-tail of return distributions. 106 event times are simulated from the order flow model. . . 89 5-3 Autocorrelation of actual (black) and simulated (red) absolute return series |r| for the stock AZN. 106 event times are simulated from the order flow model. 90 5-4 Autocorrelation of actual (black) and simulated (red) return series r for the stock AZN. 106 event times are simulated from the order flow model. . . . . 90 6-1 Correlations of buy/sell transaction sign predictabilities vs. buy/sell liquidities for the stock AZN. Pearson’s linear correlation coefficient ρ’s are reported in the figure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 6-2 Correlation of transaction sign predictability vs. total liquidity for the stock AZN. Pearson’s linear correlation coefficient ρ is reported in the figure. . . . 97 6-3 Autocorrelation of simulated transaction signs and price return series for the stock AZN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6-4 Autocorrelation functions of (a) buy, (b) sell, and (c) total liquidity measure for the stock AZN. Every other liquidity values are used to avoid the bias due to overlapping windows. . . . . . . . . . . . . . . . . . . . . . . . . . . 99 6-5 Change in total liquidities for the stock AZN. . . . . . . . . . . . . . . . . . 100 6-6 Change in total liquidities for the remaining 8 stocks. 101 12 . . . . . . . . . . . . B-1 An Abstract Level Design of MIT Web Market . . . . . . . . . . . . . . . . 116 B-2 A Component Level Design of MIT Web Market . . . . . . . . . . . . . . . 117 B-3 A Console Window for Market Server . . . . . . . . . . . . . . . . . . . . . 119 B-4 A Sign up/Login Window for Trader . . . . . . . . . . . . . . . . . . . . . . 121 B-5 A Trading Interface for Trader . . . . . . . . . . . . . . . . . . . . . . . . . 122 B-6 An Entity Relationship Diagram (ERD) of MIT Web Market Database . . . 124 C-1 Attributes for Bike Pumps, Crossover Vehicles and Laptop PC Messenger Bags135 C-2 11 Bike Pump Product Concepts Underlying the STOC Securities . . . . . 136 C-3 8 Crossover Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 C-4 8 Laptop PC Messenger Bags . . . . . . . . . . . . . . . . . . . . . . . . . . 137 C-5 Laptop PC Messenger Bags Depicted Without the Attribute Data Table . . 137 C-6 Typical Product Information for Bike Pumps, Crossover Vehicles, and Laptop PC Messenger Bags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 C-7 STOC Trading User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 139 C-8 Price and Volume History of AirStik for Test 1 (left) and Test 2 (right). . . 140 C-9 Crossover Vehicle Trader Attitudes Before and After Trading (n = 77) . . . 142 C-10 Which STOC Metric Correlates Best to Validation Data? . . . . . . . . . . 144 13 List of Tables 2.1 Summary statistics of auction, carried-over, and continuous orders from May 2, 2000 to December 31, 2002 of 9 individual stocks listed in the LSE. Auction orders are those placed before 8:00 am or after 4:30 pm. The carried-over orders are those placed between 8:00 am and 4:30 pm and not executed or canceled on the same day. Continuous orders are those placed between 8:00 am and 4:30 pm and are either executed or canceled on the same day. . . . 2.2 25 Summary statistics of effective limit and effective market continuous orders (Type 1) from May 2, 2000 to December 31, 2002 of 9 individual stocks listed in the LSE. The filled and canceled orders are continuous limit orders that are either executed or canceled. The crossed limit orders are buy(sell) orders with limit price higher(lower) than the ask(bid) price, which result in immediate execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 q-Weibull parameter estimates of execution time (time-to-fill) model for the 9 stocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 65 q-Weibull parameter estimates of cancellation time (time-to-cancel) model for the 9 stocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 25 65 5 and 95 percentiles of tail exponents predicted from are removal time models. The missing value indicates that q < 1, which means the q-Weibull does not asymptotically converge to a power law. . . . . . . . . . . . . . . . . . . . . 6.1 Pearson’s correlation coefficients of buy/sell transaction sign predictabilities vs. buy/sell liquidities for all 9 stocks. . . . . . . . . . . . . . . . . . . . . . 6.2 81 96 Pearson’s correlation coeffiencts of transaction sign predictability vs. total liquidity for all 9 stocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 97 A.1 FARMA(0, d, 0) parameter estimates for the 9 stocks. . . . . . . . . . . . . . 103 A.2 Parameter estimates of IOHMM output probability of order price model for stock AZN. The output pt ’s are scaled by its standard deviation 0.0026. . . 105 A.3 IOHMM transition probabilities of order price model for stock AZN. . . . . 105 A.4 IOHMM initial state probabilities of order price model for stock AZN. . . . 105 A.5 Parameter estimates of IOHMM output probability of order price model for stock BLT. The output pt ’s are scaled by its standard deviation 0.0028. . . 106 A.6 IOHMM transition probabilities of order price model for stock BLT. . . . . 106 A.7 IOHMM initial state probabilities of order price model for stock BLT. . . . 106 A.8 Parameter estimates of IOHMM output probability of order price model for stock BSY. The output pt ’s are scaled by its standard deviation 0.0032. . . 107 A.9 IOHMM transition probabilities of order price model for stock BSY. . . . . 107 A.10 IOHMM initial state probabilities of order price model for stock BSY. . . . 107 A.11 Parameter estimates of IOHMM output probability of order price model for stock LLOY. The output pt ’s are scaled by its standard deviation 0.0029. . 108 A.12 IOHMM transition probabilities of order price model for stock LLOY. . . . 108 A.13 IOHMM initial state probabilities of order price model for stock LLOY. . . 108 A.14 Parameter estimates of IOHMM output probability of order price model for stock PRU. The output pt ’s are scaled by its standard deviation 0.0031. . . 109 A.15 IOHMM transition probabilities of order price model for stock PRU. . . . . 109 A.16 IOHMM initial state probabilities of order price model for stock PRU. . . . 109 A.17 Parameter estimates of IOHMM output probability of order price model for stock RTO. The output pt ’s are scaled by its standard deviation 0.0036. . . 110 A.18 IOHMM transition probabilities of order price model for stock RTO. . . . . 110 A.19 IOHMM initial state probabilities of order price model for stock RTO. . . . 110 A.20 Parameter estimates of IOHMM output probability of order price model for stock RTR. The output pt ’s are scaled by its standard deviation 0.0033. . . 111 A.21 IOHMM transition probabilities of order price model for stock RTR. . . . . 111 A.22 IOHMM initial state probabilities of order price model for stock RTR. . . . 111 A.23 Parameter estimates of IOHMM output probability of order price model for stock TSCO. The output pt ’s are scaled by its standard deviation 0.0027. . 112 A.24 IOHMM transition probabilities of order price model for stock TSCO. . . . 112 15 A.25 IOHMM initial state probabilities of order price model for stock TSCO. . . 112 A.26 Parameter estimates of IOHMM output probability of order price model for stock VOD. The output pt ’s are scaled by its standard deviation 0.0036. . . 113 A.27 IOHMM transition probabilities of order price model for stock VOD. . . . . 113 A.28 IOHMM initial state probabilities of order price model for stock VOD. . . . 113 A.29 q-Weibull parameter estimates of cancellation time model for the 9 stocks. . 114 C.1 Data Collected for each Product Category . . . . . . . . . . . . . . . . . . . 132 C.2 Correlations Between (2) Bicycle Pump STOC Tests and Validation Data From Dahan and Srinivasan (2000) . . . . . . . . . . . . . . . . . . . . . . . 146 C.3 Correlations Between (2) Laptop Bag STOC Tests and Simulated Store Unit Sales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 C.4 Correlations Between (4) Crossover Vehicle STOC Tests and Validation Data from Actual Unit Sales, Self-Stated Choices, and Virtual Concept Tests . . 16 148 Chapter 1 Introduction Modern financial markets provide a vast amount of microscopic data on the behaviors of agents who make buying and selling decisions of financial instruments. For the past few decades, availability of data made it possible to either validate or challenge theoretical models in finance theory through empirical analyses. In this thesis, I propose an extra step towards the better understanding of market microstructure. This is achieved by introducing statistical models that can be trained using the empirical data. Then the resulting models can simulate infinite number of possible scenarios of outcomes, which follow statistical regularities. These models are more realistic than the theoretical ones with fewer realistic assumptions, and can be better tested. 1.1 Major Contributions This thesis focuses on the modeling of a liquidity generation process of financial markets and derives a quantitative measure for market liquidity. In the first part of this thesis, I demonstrate statistical modeling techniques to model order flow generation, which is a liquidity generation process for financial markets. I implement the model and through simulation, I demonstrate the order flow model successfully replicates various statistical properties of price returns, such as clustered volatility, fat-tailed return distribution, and no predictability of future returns. In the second half of this thesis, I argue that the change in market liquidity explains how my order flow model satisfies the weak form of the Efficient Market Hypothesis (EMH), which asserts that future price returns cannot be predicted from past returns. This is not an obvious result since the order flow model has 17 a predictable transaction sign process (i.e. buyer or seller initiated trades) as one of its components. A method of quantifying market liquidity from order flow data is introduced to explain this result. I also present the periodicity of change in liquidity discovered in the real market data. 1.2 Outline The following is the outline of my thesis. In Chapter 2, I describe the data set from the London Stock Exchange including the market mechanisms and detailed summary statistics. In Chapter 3 I build a market model based on real market data, which can simulate known statistical properties of the real market. I propose an approach to empirically model the aggregated behavior of the trading crowd, which involves modeling the time sequence of orders placed/canceled in the market called the order flow. In Chapter 4, I propose a parametric model of limit order removal times. The term removal time refers to both limit order execution and cancellation times. I show that using a standard statistical technique to model removal times cannot accurately model the removal time’s diffusive behavior and therefore introduce a better approach of modeling it. In Chapter 5, I compare the simulated data from our order flow model to the empirical data. For comparison, I focus on three statistical properties of stock returns: fat-tailed distribution of returns, clustered volatility, and no autocorrelation of returns. Although there is no direct link between the statistics of placement/cancellation processes and the statistics of price returns, the results show that the model can successfully replicate the statistical properties of stock returns. In Chapter 6, I introduce a method of calibrating market liquidity from the order flow data. I verify the method by showing the correlation between order sign predictability and the liquidity measure. This explains why the price return series is not autocorrelated when the transact sign series is a long memory process. This result shows how the return series satisfy the efficient market hypothesis (EMH). I also applied the method on real order flow data and identified patterns in change in market liquidity. I conclude in Chapter 7. 18 Chapter 2 London Stock Exchange Data All results presented in this thesis are from stocks traded on the London Stock Exchange (LSE) over the period of May 2, 2000 to December 31, 2002. I used LSE data to train/verify the model and to perform various statistical analyses. In this chapter I provide a general overview of the LSE’s market mechanism and its data. Although the market mechanisms differ slightly from one exchange to another, the LSE is one of the largest exchanges in the world; therefore, by studying the LSE we can focus on those characteristics that are common in large exchanges. Also, due to its large data size, we can conduct meaningful statistical analyses. The trades in LSE can occur from two different systems, via electronic limit order book, which is referred to as the on-book market, or via retail service provider (RSP), which is referred to as the off-book quotation market. Empirically it is known that the electronic open limit order book is the dominant mechanism for price formation (LSEbulletin, 2001). The off-book trades mostly consist of large block trades and 75% of them are executed within the best bid/ask prices in the limit order book. In my analysis I used the order, quote, trade data from the Stock Exchange Electronic Trading System (SETS), which is one of the trading services the LSE offers for on-book trading based on the electronic open limit order book. In SETS, upon submission of orders from market participants, the orders are routed to the central order book and are automatically executed. The off-book trades are not used in the analysis because trading times are reported manually, which results in unpredictable reporting time lags. Although the data set only consists of orders that are executed through SETS, it is the dominant mechanism for the price formation, and thus, I believe that it is a sufficient data set for the 19 study. 2.1 Order Matching Mechanism In the LSE, market participants submit mainly two types of orders to SETS - limit and market. A limit order is an order to transact a prespecified number of shares at a prespecified price. When there is no matching order that can fulfill these conditions, the limit order will remain in the limit order book until one or more matching orders arrive. In contrast, a market order is an order to transact a prespecified number of shares at the best market price1 . As long as there are matching limit orders, the market orders will be executed immediately as they arrive in the central limit order book. The SETS is an order-driven market, in which there are no market makers2 , and liquidity is solely generated by limit orders submitted by market participants. The participants can choose whether to submit limit or market orders based on their preferences. If they want immediate execution, they will prefer a market order, but there is a risk of having orders executed at undesirable price(s). If they want guaranteed execution price, they will prefer a limit order, but in this case they bear a risk of having to wait a long time until execution, or even of getting no execution at all. When orders arrive in the central limit order book, an execution priority is given to each order. For market orders priority is based on order of arrival. For limit orders priority is based on price and then on order of arrival. The difference between the highest buy and the lowest sell price defines the bid-ask spread. When the size and/or price of an order is modified before execution, a new timestamp is assigned to the order and priority is assigned accordingly. When an order is partially executed, it keeps the original timestamp with no change in execution priority. 2.2 Limit Order Removal Times As mentioned earlier a market order is guaranteed an immediate execution whereas a limit order is not. While a limit order remains in the order book, it can be either executed or 1 The best market price refers to the best ask price when it is a buy order and the best bid price when it is a sell order. When the size of a market order is larger than the size of all the limit orders at the best price, the remaining part of the market order, if any, will transact at the next best price. 2 Market makers are designated person(s) or firm(s) by the exchange to quote bid and ask price in the market. 20 canceled. In Chapter 3 & 4 we present an order removal times model, which attempts to model limit order execution (time-to-fill) and cancellation (time-to-cancel) times. Both time-to-fill and time-to-cancel describe a time duration of limit order remaining in the order book. Depending on how the order is removed from the book – either by execution or cancellation – the duration is identified accordingly. 2.2.1 Event Time Throughout my thesis, I will measure removal times in terms of event time. Instead of measuring time in seconds the event time measures it in number of events. An event is defined to be an occurrence that causes change in the order book. In our case, order submissions and cancellations are events, but executions are not. An execution occurs simultaneously with a market order submission and I define such as a single event. This simplifies my studies especially the order flow model in Chapter 3, because I do not have to worry about modeling the actual time intervals between the events. Also other studies have shown that using event time instead of calendar time does not significantly change the results of their analyses (Farmer et al., 2004). Although I do not report in Chapter 4, I have similar results when I model removal times in terms of calendar time. 2.2.2 Time-to-Fill and Time-to-Cancel When the limit order’s price and/or size gets modified before execution, they receive new timestamps. To handle the modification in the most natural way, I simply divide a modified order into multiple orders separated by the time when the limit price and/or size of the order is modified. This is the same as concurrently receiving an order cancellation and a new order submission at the time of the modification. Also, there is no guarantee that limit orders are fully executed at a single point in time. When a limit order is partially executed it becomes ambiguous to define the time-to-fill of that order. To remedy this, we need to consider all the possible scenarios of limit order executions and cancellations. There are four possibilities for limit order execution and cancellation: (1) full execution without partial fill, (2) full execution with partial fill(s), (3) cancellation after partial fill(s), and (4) cancellation without partial fill. Full execution without partial fill and cancellation without partial fill are the simplest cases – they will just be considered as single limit orders with apparent durations for time-to-fill or time-to-cancel. For full execution with partial fill(s), 21 I define the time-to-fill to be the duration for the order to be fully executed regardless of how many partial fills occurred before the full execution. Cancellation with partial fill(s) is more complicated because part of the order generates a time-to-fill and the other part generates a time-to-cancel. In order to resolve this ambiguity, I separate the orders so that one will be a full execution with partial fill(s) and the other will be a cancellation without partial fill. (Both orders are placed at the same original time.) For example, consider a buy order of 2,000 shares at price £10.00 is placed at time t = 0, 1,000 shares are executed at t = 10, and the rest are canceled at t = 15. I treat this as two 1,000 buy orders at price £10.00, placed at t = 0. One of these is fully executed at t = 10, and the other is canceled at t = 15. This separation into multiple orders does not affect price formation. 2.3 Trading Periods: Auction vs. Continuous The trading day in the LSE contains 3 main trading periods: opening auction, continuous trading, and closing auction3 . I define auction orders and continuous orders to be orders placed during auction and continuous periods respectively. The market opens with the opening auction at 7:50 am, which ends roughly at 8:00 am. After the opening auction the continuous trading period begins. Then at 4:30 pm the continuous trading period closes and the closing auction begins and lasts for roughly 5 minutes. Unlike continuous orders, auction orders will stay in the order book without execution until the end of the auction period. At the end of each auction period, the LSE calculates a common clearing price using a matching algorithm and executes the matching orders in the limit order book at a common price. In order to prevent traders from manipulating the clearing price of the stock, the auction ending time varies randomly within 30 seconds. In this framework the auction orders’ times-to-fill or times-to-cancel are ill defined. When the auction orders are executed at the end of the auction period, they are executed all at once regardless of their placement time. Also, when they are cleared either by execution or cancellation during the continuous trading period (which is followed by the end of the opening auction), the time duration of orders left in the order book during the auction period cannot be included in the calculation of time-to-fill or time-to-cancel since the order matching did not occur continuously during that period. For this reason including auction orders will bias the 3 The closing auction period was introduced on May 20, 2000. 22 Opening A Auction Continuous Trading Order Type 1 B Closing Opening C Auction Auction Order Type 2 Continuous Trading D Closing Auction Order Type 3 Time Figure 2-1: Three types of continuous order execution (cancellation) scenarios. The A, B, C, and D indicate different states of limit order book. The arrow for each order indicates order placement time and execution (cancellation) time. analysis and thus I discard them. Similarly, limit order removal times can be ill defined for some of the continuous orders as well. Figure 2-1 shows three types of continuous order removal scenarios. Order type 1 is the case where the order is placed during continuous trading and removed in the same period. This is the most common case for limit order removal, and the one in which timeto-fill and time-to-cancel are clearly defined. Order types 2 and 3 correspond to orders placed during the continuous period and carried over to the next trading period. Type 2 corresponds to the case in which an order is placed in one continuous trading period and removed in a subsequent period. One may argue that we can define removing time to be the time that the order remained in the book only during continuous trading. However, this is not an accurate measure since the state of the limit order book at the opening of the closing auction is very different from its state at the closing of the opening auction – indicated by B and C in the figure. In the data set an average of 98% of the orders in the order book during the closing auction are either canceled or executed during the auction. Thus, the states of limit order books B and C in the figure are very different. Lastly, order type 3 indicates carried over continuous orders that are removed during an auction. Similar to auction orders, they are removed during the auction when continuous matching is suspended, so the removal time is ill defined. Among these three types of continuous orders, I only used order type 1 in my analyses and discarded type 2 and 3. In the data set approximately 97% of the continuous orders are type 1 orders. 23 2.4 Summary Statistics Table 2.1 & 2.2 show the summary statistics of 9 stocks that I analyzed in the data set. The list consists of stocks with a range of different average trading volumes. Table 2.1 shows that on average 0.21% of orders are auction orders, and 1.87% are type 2 & 3 continuous orders. This shows that discarding auction orders and carried-over continuous orders will have little effect in my analyses. Table 2.1 also shows that type 1 continuous orders are almost equally divided into buy and sell orders. Table 2.2 shows summary statistics of type 1 limit and market orders traded during the continuous trading period. I categorized limit and market orders in terms of their net effects on the limit order book. The effective market orders are those that resulted in immediate execution. This includes the market orders that transacted a prespecified number of shares at a market price as defined in Section 2.1. Similar to market orders, crossed limit orders are limit orders with a prespecified price that is better than the current opposite best, resulting in immediate execution. Their net effect is the same as that of market orders, and thus we categorize them as effective market orders. Effective limit orders are those that do not result in immediate execution. Effective limit orders consist of canceled limit orders, which are removed from the order book before execution, and filled limit orders, which are executed. 24 Symbol # Auction Orders (%) # Carried Over Orders - Type 2 & 3 (%) AZN 3,423 (0.14) Continuous Orders - Type 1 # obs % buy % sell 28,483 (1.15) 2,444,477 50.52 49.48 BLT 2,977 (0.28) 15,984 (1.51) 1,039,153 51.68 48.32 BSY 3,130 (0.22) 28,682 (2.02) 1,390,002 50.46 49.54 LLOY 3,054 (0.14) 34,405 (1.63) 2,077,984 51.06 48.94 PRU 2,771 (0.18) 23,588 (1.55) 1,496,505 50.39 49.61 RTO 2,984 (0.40) 16,317 (2.16) 738,189 49.77 50.23 RTR 3,141 (0.20) 29,378 (1.89) 1,526,973 50.52 49.48 TSCO 2,885 (0.23) 24,426 (1.91) 1,254,989 50.76 49.24 VOD 3,772 (0.12) 93,909 (3.01) 3,030,508 51.21 48.79 Table 2.1: Summary statistics of auction, carried-over, and continuous orders from May 2, 2000 to December 31, 2002 of 9 individual stocks listed in the LSE. Auction orders are those placed before 8:00 am or after 4:30 pm. The carried-over orders are those placed between 8:00 am and 4:30 pm and not executed or canceled on the same day. Continuous orders are those placed between 8:00 am and 4:30 pm and are either executed or canceled on the same day. Symbol Effective Limit Orders # obs % filled Effective Market Orders % canceled # obs % market % crossed AZN 1,846,940 0.31 0.69 597,537 0.26 0.74 BLT 763,987 0.32 0.68 275,166 0.30 0.70 BSY 1,015,668 0.35 0.65 374,334 0.25 0.75 LLOY 1,451,678 0.39 0.61 626,306 0.32 0.68 PRU 1,086,915 0.34 0.66 409,590 0.32 0.68 RTO 518,675 0.36 0.64 219,514 0.29 0.71 RTR 1,096,126 0.35 0.65 430,847 0.29 0.71 TSCO 847,986 0.44 0.56 407,003 0.31 0.69 VOD 1,958,101 0.50 0.50 1,072,407 0.28 0.72 Table 2.2: Summary statistics of effective limit and effective market continuous orders (Type 1) from May 2, 2000 to December 31, 2002 of 9 individual stocks listed in the LSE. The filled and canceled orders are continuous limit orders that are either executed or canceled. The crossed limit orders are buy(sell) orders with limit price higher(lower) than the ask(bid) price, which result in immediate execution. 25 Chapter 3 Stock Order Flow Model 3.1 Introduction In this chapter I introduce a stock order flow model based on the statistical description of order placement and cancellation. Such model is often referred to as “zero intelligence” model since it randomly generates orders without any notion of rationality of agents. This modeling approach contrasts with earlier market models based on the assumption that traders make rational probabilistic decisions based on available information (Glosten and Milgrom, 1985; Kyle, 1985). Surprisingly absence of rationality assumptions in “zero intelligence” models have shown to be capable of replicating various market behaviors. 3.1.1 Related Work The order flow model introduced in this chapter is much in the same spirit as in a long list of other market models, which attempt to describe order flow as a statistical process. Similar to the model based on rationality assumption, they show a “zero intelligence” model can be used to make strong predictions based on a compact set of assumptions. For instance, Mendelson (1982) studied the behavior of prices and quantities from a model with random order placement with periodic clearing suggesting the possible implications of market conditions. Maslov (2000) studied a simple model of a limit order-driven market, which traders randomly choose to place different types of orders. He showed that despite of such minimalistic settings, the price pattern generated by the model has realistic features such as power law tails of the returns and volatility clustering. Challet and Stinchcombe (2001) 26 introduced a model of limit order markets based on the Island ECN order book data. From the model they observed power law tails of the returns and volatility clustering. Bouchaud et al. (2002) studied statistical properties of the order book of stocks traded in the Paris Bourse. They found the statistics of limit order prices follow power-law around the current bid-ask quotes, and the shape of average order book can be reproduced using simple “zero intelligence” model. Smith et al. (2003) and Daniels et al. (2003) introduced a model which the order arrival and cancellation are defined to be Poisson random processes. They found that such simplified market model is capable of inducing anomalous diffusion and temporal structure of prices. Later Farmer and Mike (2006) further improved this model with different order placement and cancellation processes and show that the model is capable of replicating statistical properties such as distribution of the volatility and the bid-ask spread of some stocks they used for training. 3.1.2 Our Approach I introduce a new approach of modeling order flow, which is complementary to the models studied earlier. In the earlier models, various unrealistic assumptions were made such as neglecting long memory of order signs, or overlooking complexity of order placement and cancellation processes. Although some simplification is inevitable, I attempt to create an order flow model closer to reality by applying various statistical modeling techniques. The order flow model represents placement or cancellation of four types of orders market1 buy, market sell, limit2 buy, and limit sell orders. There are three variables, which are used to model such orders: 1. Order sign ψ: A variable indicating whether the order is buy or sell order. 2. Order price p: A variable for the price of an order. An order is considered a market order if the price generated by the model crosses the opposite best price3 in the order book. 3. Cancellation time τ : A variable indicating how long the order will remain in the order book for execution. If an order is not executed within this time period, it is canceled. The event time is used and this only applies to limit orders since all market orders 1 A market order is an order to buy or sell a stock at the current market price. A limit order is an order to buy or sell a security at a specific price. 3 A best bid price for a sell order generated and a best ask price for a buy order generated. 2 27 gets executed immediately except for unrealistic market state where no limit orders are present in the order book. I made couple of simplifications in my order flow model. First, the model only simulates orders consist of all three components listed above. Some of the simulated orders will have price crossing the opposite best price, which are identified as effective market orders resulting immediate executions. These orders are similar to ordinary market orders with no price embedded in their order description. Therefore when I train the price model, I cannot ignore market orders with missing price. Instead, I attached hypothetical prices to market orders based on the price at which the market order is executed. I will go over this in more detail when I describe the price model in Section 3.3. Second, an order size is fixed in the model. This is justified by the study of the on-book market of the LSE by Farmer et al. (2004). The study showed that orders that remove more than the depth at the opposite best quote are rare. Similarly, Bouchaud et al. (2002) also showed in his “zero intelligence” model that the size distribution play a minor role in reproducing the shape of average order book. Third, the model simulates order flow in event time. The event in event time is defined to be either arrival or cancellation of an order. This implies the model does not require to simulate order arrival times. In reality the actual calendar time (such as in seconds) between the events will not be uniform, however, simulating order flows in event time will not change the price formation. In the rest of this chapter I describe each component – order sign, price, and cancellation time – of the model in more detail. 3.2 Order Sign Model In the previous studies by Lillo and Farmer (2004) and Bouchaud et al. (2004), the long memory effect of supply and demand in the market data is introduced. In the study, they analyzed data from the London Stock Exchange, the Paris Bourse, and the New York Stock Exchange and showed that the strong autocorrelation of buyer/seller initiated trades4 are universal. This was due to a stream of buy and sell orders being autocorrelated, which implies a buy order is likely to arrive in the market after stream of buy orders and vice 4 Buyer initiated trades are trades occurred by market buy orders and seller initiated trades are trades occurred by market sell orders. 28 0.1 Unscrambled Transaction Signs AZN 0.08 Scrambled Transaction Signs AZN Autocorrelation 0.06 0.04 0.02 0 −0.02 0 100 200 300 400 500 600 700 800 900 1000 Lags Figure 3-1: Autocorrelation of transaction sign series for the stock AZN (black). The same transaction sign series is randomly reordered to kill the autocorrelation (red). versa. Figure 3-1 shows the autocorrelation function of transaction sign series for the stock AZN in black (+1 for buyer and −1 for seller initiated orders). If the model assumes IID order signs, the autocorrelation function of simulated transaction signs will look similar to the plot shown in red in Figure 3-1 where the original transaction signs are randomly reordered. The Hurst exponent of the transaction sign series for AZN is 0.6753, which indicates the long memory process5 . In the following section we introduce fractional autoregressive moving average model (FARIMA), which can simulate long memory process of transaction sign series. 3.2.1 FARIMA Model In order to model strongly autocorrelated stream of buy and sell initiated trades, we used fractional autoregressive integrated moving average (FARIMA) model introduced by Granger and Joyeux (1980) and Hosking (1981). FARIMA (sometimes called fractional ARIMA or ARFIMA) is a generalization of autoregressive moving average model (ARIMA) introduced by Box and Jenkins (1970), which is generally referred to as an ARIMA(p, d, q) with integer values p, d, q ≥ 0 where p, d, q are the order of the autoregressive, integrated, 5 If the Hurst exponent is 0.5 < H < 1, the process is a long memory process. 29 and moving average part respectively. Given the time series data Ψt where Ψt ’s are real numbers at time t, ARIMA(p, d, q) model is given by 1− p X ! φi Li (1 − L)d Ψt = 1+ i=1 q X ! θi Li t , (3.1) i=1 where L is the lag operator, φi and θi are the parameters of the autoregressive and moving average part of the model respectively, and t are the error terms with zero mean and variance σ2 . In Equation 3.1 the level of term-by-term differencing is expressed with the lag operator L and integrated parameter d. Since d is defined to be an integer greater than or equal to 0, (1 − L)d can be expressed as (1 − L)d = d X d k=0 k (−1)k Lk , (3.2) where the binomial coefficients can be expressed in terms of gamma function Γ(·) as d d! Γ(d + 1) = = . k k!(d − k)! Γ(k + 1)Γ(d − k + 1) (3.3) FARIMA models are a natural extension of the ARIMA models by allowing the parameter d of integrated part of the model to be a real value within the range of − 12 < d < 12 . Since Γ(·) is defined for all real numbers, Equation 3.3 can be used to extended the model for the real numbers of this range. As shown by Granger and Joyeux (1980) and Hosking (1981), the range of d that is interesting in the context of long memory process is 0 ≤ d < 12 . Also parameters p and q allow for more flexible modeling of short range properties whereas the parameter d determines the long term behavior. In my model, I use FARIMA(0, d, 0), which only focuses on the long term behavior of the time series data. When we set p, q = 0, the FARIMA(0, d, 0) process can be represented as an infinite moving average or an infinite autoregressive process with coefficient that can be given explicitly (Hosking, 1981). This result becomes useful when we want to predict future observations from a close to infinite past. For the prediction from a finite past of size 30 k (which can be a very large number), the best linear predictor Ψ̂t is Ψ̂t = k X βkj Ψt−j , (3.4) j=1 where βkj is βkj k Γ(j − d)Γ(k − d − j + 1) . =− Γ(−d)Γ(k − d + 1) j (3.5) Also the estimated parameter d of FARIMA process has a following relation 1 dˆ = Ĥ − , 2 (3.6) where Ĥ is estimated Hurst exponent of the time series data. This can be shown by deriving spectral density of FARIMA model as a function of spectral density of ARMA model which is equal to FARIMA(p, 0, q). The detailed derivation of this can be found in Hosking (1981) and Beran (1994, Chapter 2). For my order sign model, I first model transaction sign series of a stock – series of buyer/seller initiated trades – with FARIMA(0, d, 0). In this case, time series variable Ψt holds +1 (−1) for buyer (seller) initiated transactions. The parameter dˆ of FARIMA model is derived from Equation 3.6 using the estimated Hurst exponent Ĥ of transaction sign series data. In the rest of this section I explain how the order signs can be generated from this model. 3.2.2 Order Sign Generation ˆ 0) model trained with transaction signs, I can simulate an order sign From a FARIMA(0, d, at time t using transaction sign predictor Ψ̂t . This can be computed from Equation 3.3 using previously generated transaction signs. If we represent a buyer and a seller initiated order as +1 and −1 respectively, the transaction sign predictor Ψ̂t is Ψ̂t = (+1)P (buy) + (−1)P (sell), 31 (3.7) 0 0 10 10 −1 −1 10 10 −2 −2 10 Autocorrelation Autocorrelation 10 −3 10 −4 10 0.1 0.08 −5 10 0.06 −6 10 0 −8 10 0 10 0.1 0.08 −5 10 0.06 −6 0.02 −7 −4 10 10 0.04 10 −3 10 0.04 0.02 −7 10 0 0 500 1 10 1000 2 3 10 10 0 500 1000 −8 4 10 10 5 10 0 10 Lags 1 10 2 3 10 4 10 10 5 10 Lags Figure 3-2: Autocorrelation of the actual (left) and the simulated (right) transaction sign ˆ 0) model with dˆ = 0.1753 is used. 10,000 past order series for stock AZN. The FARIMA(0, d, signs are used to compute the sign predictor Ψ̂t using Equation 3.4. 568,563 transaction signs are simulated from the model which is equal to the actual number of transaction signs in the data set. and the probability of transaction being a buyer initiated at time t is P (buy) = Ψ̂t + 1 . 2 (3.8) Then I generate order sign ψt (buy or sell) based on this probability. Note that transaction (buyer or seller initiated) will only occur when generated order is an effective market order. If effective limit order is generated, the transaction series will not change, therefore, the probability of order sign will not change. This way, the simulation will generate long memory transaction sign series similar to the stock data used for training. Figure 3-2 shows autocorrelation functions of actual and simulated transaction signs for ˆ 0) with dˆ = 0.1753 is the stock AZN in both linear and log-log scale. The FARIMA(0, d, used to compute order sign probabilities. To calculate the transaction sign predictor Ψ̂t , past 10,000 signs are used. The figure shows the FARIMA model successfully generates transaction signs with long memory similar to the actual data. The estimated parameter of order sign model for all 9 stocks are shown in Appendix A.1. It shows the parameter estimates dˆ for remaining 8 stocks are also within the range of 0 ≤ d < memory processes. 32 1 2 implying long 3.3 Price Model In this section I introduce an architecture of modeling order price generation using a variant of Hidden Markov Models (HMM) called an Input-Output Hidden Markov Model (IOHMM) (Rabiner, 1989; Bengio, 1999). IOHMMs are well suited model to generate prices sequentially over time from conditional distributions. Before I go into details about the IOHMMs I will address the statistical properties of time series data of order prices observed from the data. The order price is defined as a difference between logarithm of order price and the logarithm of same best price. Thus, the order price pt for a limit order placed at time t is defined as log(p bid,t ) − log(pl,t ) pt = log(p ) − log(p ) l,t ask,t if buy order (3.9) if sell order. For example when a limit buy order of £5.10 is placed in the market and the current bid price in the market is £5.11, then the price is the difference of the logarithm of current bid price and the logarithm of its limit price, which is 0.002 in this case. Similarly the order price for limit sell order is calculated by taking a difference of the logarithm of limit price and the logarithm of current ask price. By this definition having negative (positive) pt refers to more (less) aggressive orders relative to the same best price. In the data set, not all orders have price information. Market order is an order without a prespecified price which gets executed immediately. For these orders I attached a hypothetical price by referring to price at which the orders are executed. When a market order is executed at more than one price by removing more than the depth at the opposite best price, I define hypothetical price to be the latest executed price of that order. For example when a part of market buy order gets executed at ask price of £5.10 and rest at next ask price of £5.11, the hypothetical price for this order is £5.11. The rationale behind this is such market order has the same effect as limit order with the same order size and the hypothetical price as its limit price. Figure 3-3 shows the empirical probability density functions (PDFs) of order prices of stock AZN in semi-log scale. The figure shows the price distributions for buy and sell orders are indifferent. Also the distributions are asymmetric indicating given the same magnitude 33 0 10 Buy Sell −1 10 −2 PDF 10 −3 10 −4 10 −5 10 −6 10 −0.03 −0.02 −0.01 0 0.01 0.02 0.03 Placement Price Figure 3-3: Empirical PDFs of order price for buy (line) and sell (dotted line) orders of stock AZN. of price |pt |, relatively smaller number of aggressive orders (pt < 0) are placed compare to the non-aggressive orders (pt > 0). In addition to asymmetric distribution, the data show that bid-ask spread is relevant to price distributions. The bid-ask spread at time t is defined as a difference between the logarithm of ask and the logarithm of bid prices at time t, xt = log(pask,t ) − log(pbid,t ). (3.10) Figure 3-4 shows the empirical PDFs of stock AZN conditioning on bid-ask spread xt for buy (left) and sell (right) orders. For both buy and sell, the PDFs for orders placed while the spread is tight (xt ≤ 0.0025) has a heavier tail than the PDFs for order placed while the spread is wide (xt > 0.0025). This implies order price pt is dependent of spread xt . Also this has an interesting implication regarding traders’ order placing behavior. When bid-ask spread is wide, it shows that traders seeking immediacy will place aggressive orders with higher probability than the time when bid-ask spread is tight. Also for traders seeking better price will place less aggressive orders with higher probability when the bid-ask spread is wide. The order price model is to simulate price of orders forming asymmetric distribution as shown in Figure 3-3, which also has dependence to spread as shown in Figure 3-4. Since I am modeling sequence of order prices dependent on bid-ask spread, I use a variant of 34 0 0 10 10 x ≤ 0.0025 x ≤ 0.0025 t t xt > 0.0025 −1 10 10 −2 −2 10 PDF PDF 10 −3 10 −4 −3 10 −4 10 10 −5 −5 10 10 −6 10 −0.03 xt > 0.0025 −1 −6 −0.02 −0.01 0 0.01 0.02 10 −0.03 0.03 Placement Price (Buy) −0.02 −0.01 0 0.01 0.02 0.03 Placement Price (Sell) Figure 3-4: Empirical PDFs of order price of stock AZN conditioning on bid/ask spread at time t defined as xt . The PDFs for orders placed while xt ≤ 0.0025 and xt > 0.0025 are plotted separately for buy orders (left) and sell orders (right). Hidden Markov Model called Input-Output Hidden Markov Model (IOHMM). 3.3.1 Input-Output Hidden Markov Models (IOHMMs) A Hidden Markov Model (HMM) is a probabilistic model widely used to learn data with sequential structure. The sequential structure exists in various applications and HMMs have been applied to problems such as natural language processing, handwriting recognition, pattern recognition in molecular biology, fault detection, and gesture recognition to name the few. The HMM assumes the system being modeled to be a Markov process with unknown number of “hidden” states. In order to model order prices sequentially placed in the market that is also dependent on bid-ask spread, I use a variant of HMM called an Input-Output Hidden Markov Model (IOHMM). The IOHMM presents similarities to HMMs, but it also allows to map input sequences to output sequences using the same processing style as recurrent neural networks. Unlike recurrent neural networks, IOHMMs consider a probability distribution over a discrete state dynamical system instead of continuous state. The IOHMM is defined by • m: A number of discrete states. • P (s0 ): Initial state distribution where state at time 0 to be s0 = s1 , ..., sm . 35 s0 s1 s2 p0 p1 p2 x0 x1 x2 Figure 3-5: Bayesian network describing IOHMM for order placement price model. st , pt , and xt in the diagram refer to hidden state, price, and bid-ask spread at time t respectively. • P (st+1 |st ): State transition probabilities from st to st+1 . • P (pt |st , xt ): Output probability of output pt given state st and input value xt at time t. The state variable st is discrete and the input variable xt can be both discrete and continuous. In the price model, I use conditional mixture Gaussian for the output probability with continuous conditional variable xt , which is a bid-ask spread at time t. In addition to state and output variables st and pt , IOHMM has additional input variable xt denoting an input value at time t. Similar to HMMs, IOHMMs are simplified by introducing two crucial conditional independence assumptions. P (st+1 |s0 , s1 , ..., st , p0 , p1 , ..., pt , x0 , x1 , ..., xt ) = P (st+1 |st ), (3.11) P (pt |s0 , s1 , ..., st , p0 , p1 , ..., pt−1 , x0 , x1 , ..., xt ) = P (pt |st , xt ), which implies the state variable st will summarize all the past values of the state sequences and both state and input variables st and xt will summarize all the past values of the output sequences. Figure 3-5 shows the Bayesian network describing IOHMM for the order price model. A variable st indicating the state at time t can be loosely defined as a market state and with additional market information of bid-ask spread xt , the model outputs price pt . The figure describes the conditional independence assumptions described in Equation 3.11 where given a state and a bid-ask spread at time t (indicated with variables st and xt respectively), the probability of price pt is independent from previous market states and bid-ask spreads. 36 Similarly, the model describes only current state st is relevant to determine the next state st+1 , in other words, the transition of next state is independent from all the other previous bid-ask spreads and states given the current market state. 3.3.2 A Supervised Learning Algorithm Training of IOHMM price model is similar to ordinary HMM model except the output probability is a conditional distribution over not only the given state st but also the realvalued input variable of bid-ask spread xt . Like HMM, learning of IOHMM is derived from the maximum likelihood principle. Given the training data of N pairs of input-output sequences, which in our case are the prices pt ’s and bid-ask spreads xt ’s of a particular stock, the likelihood function is given by L(θ) = N Y P (pT1 n |xT1 n , θ), (3.12) n=1 where θ denotes set of parameters for initial state P0 (s0 ), state transition P1 (st+1 |st ), and output P (pt |st , xt ) probability distributions of IOHMM. In the training set, each inputoutput sequence represents the price pT1 n and bid-ask spread xT1 n within a single trading day. The data set has 675 days of trading data (N = 675) and each day has variable number of input-output pairs – for example, a stock AZN has Tn ranging from 446 to 9,682 pairs. The maximization of Equation 3.12 involves parameter estimation with missing data, where the missing (or hidden) variable is the state sequence s1 , ..., sTn for each input-output sequence 1, .., N . I use Expectation-Maximization (EM) algorithm to maximize the above likelihood function with hidden states. The EM algorithm formalized in Dempster et al. (1977) solves maximum likelihood estimation (MLE) problem using an iterative approach consisting of two parts: an estimation step (E-step) and a maximization step (M-step). Before breaking down the algorithm into these two steps it is necessary to formulate how EM computes the likelihood of IOHMM of Equation 3.12 when the state sequences are not observable from the training data. The derivation of this problem for more generalized version of IOHMM where the transition probabilities also have dependencies on input values is described in Bengio and Frasconi (1995) and Bengio and Frasconi (1996). The EM algorithm attempts to estimate complete data likelihood, which consist of 37 input, output, and state sequences. Assuming we have a complete data Dc including the state sequences and set of parameters for IOHMM θ, the complete data likelihood is defined as Lc (θ; Dc ) = N Y P (pT1 n , sT1 n |xT1 n ; θ). (3.13) n=1 Using IOHMM’s conditional independence assumption stated in Equation 3.11, we can rewrite Equation 3.13 as following Lc (θ; Dc ) = = Tn N Y Y P (pt |st , xt ; θ)P (st |st−1 ; θ) n=1 t=1 Tn Y N Y S Y S Y (3.14) P (pt |st = i, xt ; θ)zi,t P (st = i|st−1 = j; θ)zi,t ,zj,t−1 , n=1 t=1 i=1 j=1 where zi,t is an indicator variable that zi,t = 1 if the state at time t is i and zi,t = 0 otherwise. Since the value of state sequence is not observable from the training data, I cannot directly compute the complete data likelihood. Instead I formulate expected complete data loglikelihood using auxiliary function which integrates the logarithm of likelihood function (Equation 3.14) over the distribution of state paths S = {sT1 n ; n = 1, ..., N } using the parameter estimate θ̂ from the previous iteration6 . Given the observable output and input sequences P = {pT1 n ; n = 1, ..., N } and X = {xT1 n ; n = 1, ..., N }, and previously estimated model parameter θ̂, the auxiliary function Q(θ; θ̂) is defined as h i Q(θ; θ̂) = ES lc (θ; Dc )|P, X , θ̂ = Tn X N X S X h i ES zi,t |pT1 , xT1 , θ̂ log P (pt |st = i, xt ; θ) n=1 t=1 i=1 S h X i ES zi,t , zj,t−1 |pT1 , xT1 , θ̂ log P (st = i|st−1 = j; θ) + j=1 = Tn X N X S X γ̂i,t log P (pt |st = i, xt ; θ) n=1 t=1 i=1 S X ξˆij,t log P (st = i|st−1 = j; θ) + j=1 6 For the first iteration θ̂ is picked randomly. 38 (3.15) where given the model and the observed input-output sequences, γ̂i,t is defined as the probability of being in state i at time t, and ξˆij,t is defined as the probability of being in state j at time t − 1, and state i at time t. The following formulates these two probability measures γ̂i,t = P (st = i|pT1 , xT1 ; θ̂); (3.16) ξˆij,t = P (st−1 = j, st = i|pT1 , xT1 ; θ̂). Note that Equation 3.16 can be computed with known input-output sequences pT1 and xT1 , and previously estimated parameter θ̂. In order to compute γ̂i,t and ξˆij,t efficiently, I use forward-backward procedure introduced in Baum and Egon (1967) and Baum and Sell (1968). The forward probability αi,t is defined as αi,t = P (pt1 , st = i|xt1 ) = S X (3.17) P (pt1 , st = i, st−1 = j|xt1 ) j=1 = S X t P (pt |pt−1 1 , st = i, st−1 = j, x1 ) j=1 t−1 t t · P (st = i|pt−1 1 , st−1 = j, x1 )P (p1 , st−1 = j|x1 ) = S X P (pt |st = i, xt )P (st = i|st−1 = j)αj,t−1 j=1 where the simplified forward equation consists of output and state transition probabilities of the IOHMM. The last step of Equation 3.17 is using conditional independence assumption of the model shown in Equation 3.11 to simplify the computation. It also shows that forward probability αi,t is computed recursively starting with initial forward probability at time 0 equal to the initial state probability: αi,0 = P (st = i). 39 Similar to forward probability, a backward probability βi,t is defined as βi,t = P (pTt+1 |st = i, xTt ) = S X (3.18) P (pTt+1 , st+1 = j|st = i, xTt ) j=1 = S X P (pt+1 |pTt+2 , st+1 = j, st = i, xTt ) j=1 · P (pTt+2 |st+1 = j, st = i, xTt )P (st+1 = j|xt = i, uTt ) = S X P (pt+1 |st+1 = j, xt )P (st+1 = j|st = i)βj,t+1 j=1 where the backward probability can also be computed recursively starting with initial condition βi,T = 1. From this we can see that the forward and backward procedures for the IOHMM is similar to HMM, except additional input condition is included. Using Equations 3.17 and 3.18, I can compute γi,t and ξij,t as following using the forward, backward, output and transition probabilities as following γi,t = P (st = i|pT1 , xT1 ) (3.19) = P (st = i, pT1 |xT1 )/P (pT1 |xT1 ) = P (pt1 , st = i|xt1 )P (pTt+1 |st = i, xTt )/P (pT1 |xT1 ) αi,t βi,t , = PS j=1 αj,t βj,t ξij,t = P (st−1 = j, st = i|pT1 , xT1 ) (3.20) = P (st−1 = j, st = i, pT1 |xT1 )/P (pT1 |xT1 ) = P (p1t−1 , st−1 = j|xt1 ) · P (pt |st = i, xt ) · P (st = i|st−1 = j) · P (pTt |st = i, xTt )/P (pT1 |xT1 ) αj,t−1 P (pt |st = i, xt )P (st = i|st−1 = j)βi,t = . PS j=1 αj,t βj,t As mentioned earlier the EM algorithm is an iterative approach consisting of two parts: • E-step (Estimation): The algorithm computes posterior probabilities γ̂i,t and ξˆij,t for all states i and time t using previously estimated model parameter θ̂ and set of input-output training sequences. 40 • M-step (Maximization): The algorithm searches for new model parameter θ̂0 that maximizes the auxiliary function Q(θ; θ̂). The algorithm iterates the expectation and maximization steps until the improvement of expected complete log-likelihoods over iteration falls below certain threshold. For the M-step, maximization of parameter θ depends on the choice of models for transition and output probabilities. But regardless of the choice of models, the auxiliary function (Equation 3.15) can be broken down into two separate maximization problems. For each state j = 1, .., S, I find parameter estimate θ1 for transition probability where it optimizes the following maximization problem, max θ1 Tn X S N X X ξˆij,t log P (st = i|st−1 = j; θ1 ). (3.21) n=1 t=1 i=1 Similarly for output probabilities, I find parameter θ2 that optimizes the following maximization problem for each state j max θ2 Tn N X X γ̂j,t log P (pt |st = j, xt ; θ2 ). (3.22) n=1 t=1 In the rest of this section I describe the M-step specific to the choice of models of output and transition probabilities. State Transition Probability For my price model, solving Equation 3.21 is simple because the transition probability does not depend on real-valued bid-ask spread xt . Since the state variable st are discrete and finite, the transition probability behaves like lookup tables addressed by the state symbols. I use Lagrange multiplier λ to find transition probability values, which maximizes Equation 3.21 with constraint that transition probability from state j to all i’s sums to 1. Let’s call aij = P (st = i|st−1 = j), then S N Tn X S X ∂ XX ξˆij,t log aij + λ 1 − aij ∂aij n=1 t=1 i=1 i=1 41 ! PN = n=1 PTn ˆ t=1 ξij,t + λ. aij (3.23) By setting Equation 3.23 equal to 0, we get âij = PN n=1 PTn λ t=1 ξij,t PN PTn t=1 ξij,t = Pn=1 N PTn t=1 γj,t n=1 (3.24) Output Probability Solving Equation 3.22 requires bit more work. For each state in the model, output probability describes conditional distribution of prices conditioning on the market’s bid-ask spread. For this I used mixture of conditional Gaussian distributions. Given state i and mixture k, distribution for output probability of the model is P (pt |st = j, mt = k, xt ) = σjk 1 √ (pt − Bjk xt − µjk )2 exp − 2 2σjk 2π ! , (3.25) 2 refers to mean, regression coefficient for conditional where parameters µjk , Bjk , and σjk variable, and variance of the conditional Gaussian of state j and mixture k. As shown in Equation 3.25, defining output probability as Gaussian mixture requires additional discrete mixture variable mt . This requires rewriting the posterior probability in Equation 3.22 to incorporate the mixture variable. The new posterior ωjk,t for state j, mixture k at time t can be derived as ωjk,t = P (st = j, mt = k|pT1 , xT1 ) = = (3.26) t−1 T T T T P (pt |st = j, mt = k, pt−1 1 , pt+1 , x1 )P (st = j, mt = k|p1 , pt+1 , x1 ) T T p(pt |pt−1 1 , pt+1 , x1 ) T T P (pt |st = j, mt = k, xt )P (mt = k|st = j)P (st = j|pt−1 1 , pt+1 , x1 ) = γj,t · T T P (pt |pt−1 1 , pt+1 , x1 ) P (pt |st = j, mt = k, xt )P (mt = k|st = j) , PK l=1 P (pt |st = j, mt = l, xt ) which is a function of posterior γj,t defined in Equation 3.19, and posterior mixture and 2 . This results re-writing our expected output probabilities with parameters Bjk , µjk , and σjk complete log-likelihood in Equation 3.22 as l = Tn X N X M X n=1 t=1 k=1 ω̂jk,t log 1 √ σjk 2π − Tn X N X M X n=1 t=1 k=1 42 ω̂jk,t (pt − Bjk xt − µjk )2 2 2σjk ! . (3.27) In M-step we compute parameter estimates for output probabilities, which maximize the above log-likelihood. For output probability of state j and mixture k, differentiating 2 result following equations the new log-likelihood respect to parameters Bjk , µjk , and σjk ∂l ∂Bjk = N Tn 1 XX ω̂jk,t (pt − Bjk xt − µjk )xt = 0, 2 σjk n=1 t=1 ∂l ∂µjk = N Tn 1 XX ω̂jk,t (pt − Bjk xt − µjk ) = 0, 2 σjk n=1 t=1 = 2 σjk ∂l 2 )−1 ∂(σjk Tn N X X ω̂jk,t − n=1 t=1 Tn N X X (3.28) ω̂jk,t (pt − Bjk xt − µjk )2 = 0. n=1 t=1 For each output probability for state j and mixture k, the set of new parameter estimates can be computed by solving Equation 3.28 with posteriors ω̂jk,t , Bˆjk , µ̂jk , and training input-output sequences xT1 and pT1 as following Bjk = µjk = 2 σjk = PN n=1 PN PTn t=1 ω̂jk,t xt n=1 t=1 ω̂jk,t pt xt − µjk , PN PTn 2 n=1 t=1 ω̂jk,t xt PTn PN PTn t=1 xt n=1 t=1 ω̂jk,t pt − B̂jk , PN PTn ω̂ jk,t n=1 t=1 PN PTn PN PTn n=1 n=1 (3.29) t=1 ω̂jk,t (pt − B̂jk xt PN PTn t=1 ω̂jk,t n=1 − µjk )2 . Next, new mixture probabilities can be estimated with posterior ω̂jk,t by solving the following maximization problem, which is a part of Equation 3.27 where the mixture probability is used. max θ2 Tn X N X M X ω̂jk,t log P (pt |st = j, mt = k, xt ; θ2 ). (3.30) n=1 t=1 k=1 Similar to the method for estimating a transition probability of our model, I use Lagrange P multiplier and constraint M k=1 P (mt = k|st = j) = 1 to solve for optimal P (mt = k|st = j) for all state j’s and mixture m’s. PT ω̂jk,t P (mt = k|st = j) = PK t=1 PT l=1 t=1 ω̂jl,t 43 (3.31) 5 −4.45 x 10 Out−of−Sample Log−Likelihood −4.5 −4.55 −4.6 −4.65 −4.7 −4.75 6 8 10 12 14 16 18 20 22 24 26 28 Number of States Figure 3-6: Change in out-of-sample log-likelihoods for stock AZN. Out of 675 trading days, 30% of them are randomly selected as out-of-sample and remaining 70% are used for training. Initial State Probability Lastly, estimating initial probability P (s1 ) for the model is the simplest of all. After estimating transition and output parameters θ̂ using methods described earlier, we compute initial probability as P (s1 = i) = P (s1 = i|pT1 , xT1 ; θ̂) = γ̂1,i . (3.32) Size of IOHMM Using the supervised learning method discussed so far, I can train IOHMM price model. However, before discussing the performances of the model it is essential to address the issue of selecting size of IOHMM. Although I introduced a rigorous way of estimating model parameters of IOHMM with given number of mixtures and states, it is not so clear how many mixtures and states are appropriate to model prices. Unfortunately, there is no known method for solving model selection problem for IOHMMs with firm theoretical ground. Therefore based on the empirical findings, I follow an Occam’s Razor principle and identify the smallest possible size of IOHMM that I think is the good representation of the price process. For number of mixtures, I use 2 mixtures of Gaussians for each state to model asymmetric distribution of prices shown in Figure 3-3 and 3-4. For number of states, 44 I tested how much improvement is made as a result of adding an extra state to the model in terms of improvement in out-of-sample likelihoods. Such test is done by first randomly selecting 30% of 675 trading days from our data as out-of-sample set. Let IOHMM(S) denote IOHMM with S number of states. I train IOHMM(S) with remaining 70% of the data, and compute the log-likelihood of 30% of out-of-sample data using the trained model. I do this for various number of states and plot the out-of-sample likelihoods over different number of states. Figure 3-6 shows the change in out-of-sample log-likelihoods for stock AZN over number of states. From the figure, we no longer observe significant increase in out-of-sample loglikelihoods when S > 12. From this result I choose S = 12 for the stock AZN. The same method is applied to remaining 8 stocks and the resulting number of hidden states ranges from 10 to 16. The estimated parameters of price model for all 9 stocks are shown in Appendix A.2. 3.3.3 Price Generation Once the IOHMM price model is trained with the actual sequence of price (pt ) and bid-ask spread (xt ) data, I use this model to generate a new sequence of price for the simulated orders. At the beginning of simulation, an initial state is randomly chosen using the initial state probabilities P (s1 ) as prior. Then for given state st and bid-ask spread xt at time t, I generate a price from the following mixture of Gaussians P (pt |st = i, xt ) = K X P (mt = k|st = i)P (pt |st = i, mt = k, xt ), (3.33) k=1 where i is the state at time t and K is the number of mixture components where in our case K = 2. Once the price pt is generated, I generate the next state st+1 using the state transition probability P (st+1 |st ). Figure 3-7 shows PDFs of actual and simulated prices for the stock AZN. The sequence of bid-ask spread of length 2,328,429 from the actual data is used for simulation. To show how the price model reacts to the different sizes of bid-ask spread, I separately plot prices with bid-ask spread smaller (left) and greater (right) than 0.0025. The figure shows the price model successfully generates prices close to the actual data. 45 0 0 10 10 Actual Simulated −1 10 −2 −2 10 PDF 10 PDF Actual Simulated −1 10 −3 10 −4 −3 10 −4 10 10 −5 −5 10 10 −6 10 −0.03 −6 −0.02 −0.01 0 0.01 0.02 Relative Price from Best (x ≤ 0.0025) 10 −0.03 0.03 t −0.02 −0.01 0 0.01 0.02 Relative Price from Best (xt > 0.0025) 0.03 Figure 3-7: Empirical PDFs of the actual and the simulated price for the stock AZN. Total of 2,328,429 prices are simulated. The left (right) figure shows a price distribution when bid-ask spread xt is xt ≤ 0.0025 (xt > 0.0025). 3.4 Cancellation Time Model The last component of the order flow model is a cancellation time model, which determines the duration of orders remaining in the order book. Every order has its cancellation time assigned by the cancellation time model. If an order gets executed before this duration, the cancellation time has no effect. The details of modeling method requires much space not feasible to put them in a single section. Thus in this section, I only describe an overview of the problem and the result. I explain the details of modeling method in Chapter 4. The difficulty of modeling cancellation time is caused by missing data. Some orders are executed before they are canceled, therefore, their cancellation times are not known. In addition to this, since I do not have a full data describing the cancellation process, it is also not clear which statistical model to use and how to test it. In Chapter 4, I introduce a statistical technique, which helps overcoming the missing data problem and I also introduce a method indirectly verifying our estimated model. The parametric form I introduce for the cancellation time model is called a q-Weibull distribution, which is a generalized form of a Weibull distribution. I will denote a PDF of cancellation time τ as fc (τ ) and its functional form has 3 parameters fc (τ ) = (2 − q) α τ α−1 −( λτ )α eq , λ λ 46 (3.34) 1/(1−q) ] if 1 − (1 − q)τ ≥ 0 where q-exponential function eq is defined as e−τ q ≡ [1 − (1 − q)τ ] and e−τ q ≡ 0 if 1 − (1 − q)τ < 0. The estimated parameters of cancellation time model for all 9 stocks are shown in Appendix A.3. In Chapter 4, I introduce conditional variables, price and size of order, and study their effects on cancellation time. However, in order flow model, I use marginal distribution shown in Equation 3.34 to generate cancellation times since such effects are negligible. In Chapter 4, I also show that the order price has a very little effect on cancellation times and since the order flow model simulates orders with fixed size, the effect of order size on cancellation time can be safely ignored. 3.5 Discussion This chapter introduces a stock order flow model consists of three sub-models – order sign, price, and cancellation time. Each sub-model simulates a component of order, and when they are combined, it simulates an order flow. The combining of these three components and results of simulations are discussed in Chapter 5. In this chapter, I show how each component of order flow model can be modeled. The methods can be summarized as follows: • The order signs are modeled with FARIMA model, which simulates buy/sell order signs forming a long memory transaction sign series. The estimated parameter of FARIMA model will ensure that actual and simulated transaction sign series to have similar Hurst exponents. • The order price is modeled with IOHMM, which simulates a sequence of prices dependent on bid-ask spread. The result shows that IOHMM can successfully model asymmetry of price distribution and the dependence on bid-ask spread. • The cancellation time is modeled with q-Weibull distribution. The details about the modeling method and results are not presented in this chapter. Chapter 4 is partly dedicated for this. 47 Chapter 4 Limit Order Removal Times Model 4.0 Preface Part of this chapter is a continuation of modeling stock order flow described in Chapter 3.4. In this chapter I introduce removal time model comprised of limit order cancellation and execution time models. A cancellation time model I describe here is used in the order flow model. 4.1 Introduction One of the widely used methods for trading financial securities is placing a limit order. A limit order is an order to transact a prespecified number of shares at a prespecified price, which gives the trader a control over the price at which the order is executed1 . The primary advantage of a limit order is the absence of price risk by guaranteeing the execution price, but downside of it is the prespecified price can delay or even indefinitely prevent the execution. Therefore, when traders are faced with a decision placing a limit order, it is useful to know how much delay to expect. In this chapter I propose a parametric model of limit order removal times, which can be used as a tool for understanding expected lifetime of limit orders in the market. The limit order execution times cannot be understood only with execution times from market data since limit order removals happen in two ways – execution and cancellation. The execution 1 Here I denote limit order as effective limit order, which its prespecified price is not crossing the opposite best price (i.e. greater than best bid price when sell and lesser than best ask price when buy). 48 and the cancellation are two sides of same coin such that the observed execution times in the market data are results of executions occurred before the cancellation and vice versa. Thus to model execution times (time-to-fill) of limit orders, it is essential to also model cancellation times (time-to-cancel) of limit orders. Throughout this chapter I use the term “removal time” to refer to both time-to-fill and time-to-cancel. The parametric form I introduce for the removal time model is a q-Weibull distribution, which is a generalized form of Weibull distribution. The q-Weibull distribution captures the diffusive behavior of the removal times studied by Eisler et al. (2007), which shows that limit order removal times decay asymptotically in time as a power law. Also I extend our approach to a conditional model and show that it captures similar effects of limit price and limit size on the limit order removal times studied by Lo et al. (2002). Several other studies explore the probability of limit order execution. Angel (1994), Hollifield et al. (1999), Battalio et al. (1999), Biais et al. (1995), Handa and Schwartz (1996), Harris and Hasbrouck (1996), Keim and Madhavan (1995), McInish and Wood (1986), and Petersen and Fialkowski (1994) are a few examples. Although none of these papers attempt to model removal times as I introduce in this paper, my model can be used as a tool to further study the issues they address. 4.1.1 Outline The chapter is organized as follows: In Section 4.2 I identify problems of modeling limit order execution times when cancellation times are ignored and vice versa. In Section 4.3 I show that using a standard statistical technique to model removal times cannot accurately model the removal time’s diffusive behavior and introduce a better approach of modeling it. In Section 4.4 I show the performance of the model by simulating removal times and comparing them with the empirical data. Then I extend the analysis to the conditional model and report additional findings. I conclude in Section 4.5. 4.2 Data Censoring and Survival Analysis The survival analysis is a statistical analysis of death or failure time in biological or mechanical systems Cox and Oakes (1984); Kalbfleisch and Prentice (1980); Miller (1981). Since the goal is to model limit order removal times, which can be viewed as death or failure time 49 of limit orders, I apply this technique. The advantage of a survival analysis is its ability to accommodate censored observations. For example, when modeling time-to-fill some orders are canceled before they are executed, therefore their execution times are “censored” due to their earlier cancellations. Although we do not know the time-to-fill of canceled orders, their time-to-cancel yields useful information – we know that they are not executed for at least a certain period of time. Despite the fact that the canceled orders do not have execution times, ignoring them can dramatically bias the time-to-fill estimation. A similar argument can be made when modeling the time-to-cancel of limit orders. In this case the executed orders are censored observations. The survival analysis involves estimating the survival function S(τ ), which is the inverse cumulative density function F (τ ), S(τ ) = 1 − F (τ ). (4.1) The survival function S(τ ) can be estimated using either parametric or non-parametric methods. In both cases it will attempt to model the survival function using both censored and uncensored observations. The technical details of applying survival analysis on the data set will be explained in Section 4.3. The amount of censored observations is directly related to how much we can benefit from the survival analysis. In this analysis such gains are inevitable since I am modeling time-to-fill and time-to-cancel simultaneously, which can be viewed as opposite sides of the same coin. When we have a data set with high cancellation rate, modeling time-to-cancel will not benefit much since the amount of censored observations is small, but modeling time-to-fill will benefit a lot due to high censoring rate and vice versa. In the rest of this section I introduce a parametric form for time-to-fill and time-tocancel models. Before applying the survival analysis I first focus on model parameter estimation only using the observed (uncensored) data and demonstrate the adaptiveness of the parametric form on the data set. Then I introduce removal time generation model which describes how the censoring occurs in our framework. Lastly I show ignoring the censored observations will lead to a biased removal time models, which makes applying survival analysis necessary. 50 4.2.1 Fitting Observed Data One natural approach to modeling time-to-fill and time-to-cancel is to use the observed (uncensored) data. In this section I focus on choosing parametric form for the removal time models only using the observed data. Exploring analysis of observed time-to-fill and time-to-cancel suggested the Weibull distribution as a possible candidate functional form, which is one of the most widely used distributions in survival data (Cox and Oakes, 1984). I found, however, that where the Weibull distribution fits the body well, it failed to fit the fat tails of the data. This led me to propose a more generalized parametric family called the q-Weibull. The Weibull distribution is used to describe positive-valued random variables. The functional form of the PDF fw (x) of the Weibull distribution is given by Hallinan (1993); Johnson et al. (1994) fw (τ ) = α τ α−1 −( τ )α e λ , λ λ (4.2) where α, λ > 0. The survival and hazard rate of Weibull distribution Sw (τ ) and hw (τ ) are defined as Sw (τ ) = 1 − Z ∞ τ α fw (u)du = 1 − e−( λ ) , (4.3) 0 hw (τ ) = fw (τ ) α τ α−1 = . 1 − Fw (τ ) λ λ (4.4) The survival function S(τ ) is the probability an event has not been removed after time τ and the hazard rate2 is the estimate of relative risk which in this case is a probability of removal of an order relative to a probability of survival at time τ . Note that PDF, survival, hazard rate functions are different ways formulating the same removal time process and they all share the same parameters. From Equation 4.4, we can see that the Weibull distribution can have monotonically increasing, decreasing, or constant hazard rate when α is greater, lesser, or equal to 1. In the context of our analysis, an increasing (decreasing) hazard rate indicates orders being likely to be removed in a faster (slower) rate as τ increases. 2 A hazard rate is also called a failure rate. 51 Because the observed time-to-fills and time-to-cancels are heavy tailed distributions I introduce a generalization of the Weibull distribution, called the q-Weibull distribution (Picoli et al., 2003). The extra parameter q gives an extra degree of freedom to fit a distribution with a tail that decays as a power law. The PDF of the q-Weibull distribution can be written as3 fqw (τ ) = (2 − q) α τ α−1 −( λτ )α eq . λ λ (4.5) The PDF of q-Weibull distribution is derived from Weibull distribution in Equation 4.2 by replacing the exponential function with generalized q-exponential function. 1/(1−q) ] if 1 − (1 − q)τ ≥ 0 The q-exponential function is defined as e−τ q ≡ [1 − (1 − q)τ ] and e−τ ≡ 0 if 1 − (1 − q)τ < 0. Also note that the generalization introduces two more q parameter constraints: q 6= 2 and λ(1/(1 − q))1/α > max(τ ) when q < 1. The q-exponential function is a generalization of the exponential function, that converges to it when q = 1 that arises from optimizing the Tsallis entropy (Tsallis, 1988; Gell-Mann and Tsallis, 2004). As the parameter q becomes greater than 1 the tail of the distribution gets fatter, and conversely when q becomes smaller than 1, the tail gets thinner. When the tail decays faster than the Weibull distribution (q < 1) the probability goes to zero for a finite value of τ due to its fast decay. Therefore, the newly introduced constraint forces all samples to have valid probabilities. Also, note that when we take the limit as q → 1, the normal Boltzmann-Gibbs entropy is recovered and therefore, in our case, it will converge back to the normal Weibull distribution in Equation 4.2. The survival function for the q-Weibull survival function is Sqw (τ ) = 1 − Z ∞ 0 h τ α i 2−q 1−q . fqw (u)du = 1 − (1 − q) λ (4.6) When the tail parameter q > 1 the q-Weibull distribution asymptotically converges to a power law of the form P (≥ τ ) ∝ τ −γ for large τ . The tail exponent γ can be written in terms of q and α as γ = α · (q − 2)/(1 − q) when q > 1. The q-Weibull distribution is a generalized form of several other distributions. As already mentioned, in the limit q → 1 the q-Weibull distribution converges to the Weibull distribution. Taking the limit as α → 1 reduces to a q-exponential. Taking the limits q → 1 3 The (2 − q) in fqw (τ ) is to satisfy R∞ 0 fqw (u)du = 1. 52 7 α=1 α = 1.5 α = 1.9 6 qw h (τ) (x 10−4) 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 τ (x 103) Figure 4-1: Different shapes of the hazard function hqw (τ ) for the q-Weibull distribution. The values for q and λ are fixed to 1.5 and 1000 respectively. The α values are varied – 1, 1.5, and 1.9 and α → 1 simultaneously gives an exponential distribution, and taking the limit as q → 1, √ α → 2, and λ → 2β together gives a Rayleigh distribution. The hazard function for the q-Weibull distribution, hqw (τ ), is defined as (2 − q) αλ λτ fqw (τ ) hqw (τ ) = = 1 − Fqw (τ ) 1 − (1 − q) α−1 τ α λ . (4.7) Unlike Weibull distribution the hazard function for the q-Weibull distribution can be nonmonotonic when α > 1 and q > 1. Figure 6-6 shows the different shapes of q-Weibull hazard functions when α is varied. When α > 1 and q > 1, the hazard rate function is non-monotonic. Figure 4-2 shows Weibull and q-Weibull fits to the observed time-to-fills and time-tocancels of stock AZN. The survival plots are shown in log-log scale to emphasize the tail behavior of removal times4 . As shown in the figure the empirical survival plot shows slower decay than normal Weibull can model resulting a poor fit towards large τ . In contrast q-Weibull introduces an extra parameter q, which controls the fatness of the tail resulting a better fit. Next we need to check if the resulting models are good models for the underlying removal time processes. By ignoring the censored data, one critical fact I ignored is that time-to-fill process is a censoring process of time-to-cancel process and vice versa. Do these models 4 I refer all removal times in event times. 53 Observed Time−to−Fill 0 10 Survival Probability S(τ) Survival Probability S(τ) Observed Time−to−Cancel 0 10 −1 10 −2 10 Empirical Weibull Fit q−Weibull Fit −3 10 0 10 1 10 −1 10 −2 10 Empirical Weibull Fit q−Weibull Fit −3 10 2 3 10 10 4 0 10 10 1 10 2 3 10 τ 10 4 10 τ Figure 4-2: Weibull and q-Weibull fits to the empirical survival probabilities of observed time-to-fills (left) and observed time-to-cancels (right) of stock AZN. The censored observations are ignored. For the observed time-to-fill estimated Weibull parameters are α = 0.57 and λ = 24.18, and estimated q-Weibull parameters are q = 1.30, α = 0.62 and λ = 6.30. For the observed time-to-cancel estimated Weibull parameters are α = 0.60 and λ = 29.01, and estimated q-Weibull parameters are q = 1.35, α = 0.71 and λ = 7.53. really describe the distributions of time-to-fill and time-to-cancel of limit orders? To test this, I introduce removal time generation model describing how the censoring occurs in this framework. Then using the removal time generation model I can test if my estimated timeto-fill and time-to-cancel models simulate observed removal times similar to the empirical data. 4.2.2 τ -Generation Model In this subsection I introduce a removal time generation model describing how censoring occurs. I define the time-to-fill of an order to be the time it takes for an order to be fully executed in the market. Market participants who place a limit order are allowed to cancel it at anytime as long as the order is not executed. In the data set an average of 72% of limit orders are canceled before execution. In order to understand how time-to-fill and time-tocancel are observed in the data set, it is important to model an underlying mechanism of time-to-fill and time-to-cancel, which we call the τ -generation model. Let’s define τiobs as the observed time5 order i took to get either executed or canceled in the order book. All orders will eventually be removed from the book either by execution 5 The removal times are measured in event time. 54 or cancellation. Although we cannot always directly observe these, I define two underlying distributions Pe (τ ) and Pc (τ ), which determine the order i’s execution and cancellation times, τie and τic . When the order is placed, the market will determine when the order will be executed according to Pe (τ ) and the market participants will decide when the order will be canceled according to Pc (τ ). From this mechanism, the orders will either be executed or canceled whichever one occurs first. From the data set we can also see if order i was canceled or executed, therefore, we introduced an indicator function Ie (i) which outputs 1 for the executed order and 0 for the canceled order. In summary, the model that generates observed time-to-fill or observed time-to-cancel of an order i is as follows6 : τic ∼ Pc (τ ), τie ∼ Pe (τ ) (4.8) τiobs = min(τic , τie ), Ie (i) = {0, 1} where the underlying removal time distributions Pe (τ ) and Pc (τ ) are unknown, and τiobs and Ie (i) are known from the data. Now we can simulate the τ -generation process of Equation 4.8 with previously estimated removal time models using q-Weibull distributions, P̂e (τ ) and P̂c (τ ). In sec- tion 4.2.1, I ignored the censored data and assumed that P̂e (τ ) = P (τiobs |Ie (i) = 1) and P̂c (τ ) = P (τiobs |Ie (i) = 0). If censored data does not bias the underlying removal time processes too much, the simulated observed time-to-fills and time-to-cancels by τ -generation model will form similar distributions to the empirical ones. To simulate removal times for N orders, we sampled time-to-fill and time-to-cancel values, τie and τic , for i = 1...N from estimated removal time distributions, P̂e (τ ) and P̂c (τ ). Once a (τie , τic ) pair is generated for an order i, we take the minimum of the two as the observed removal time τiobs of an order i, and set the value of indicator function Ie (i) to be 1 when τie is picked and 0 otherwise. Figure 4-3 shows the survival plots of empirical and simulated observed time-to-fills and time-to-cancels. For simulated removal times 1,843,713 orders are simulated, which is equal to the number of orders in the empirical data. The figure shows after censoring mechanism is introduced by the τ -generation model, the simulated observed removal time for both 6 The symbol “∼” in Equation 4.8 means “sampled from” a given conditional distribution. 55 Observed Time−to−Fill 0 10 Survival Probability S(τ) Survival Probability S(τ) Observed Time−to−Cancel 0 10 −1 10 −2 10 −3 0 10 1 10 −2 10 −3 Empirical Simulated 10 −1 10 Empirical Simulated 10 2 3 10 10 4 0 10 10 1 10 τ 2 3 10 10 4 10 τ Figure 4-3: Survival plots of actual vs. simulated observed removal times for stock AZN: observed time-to-fills (left) and observed time-to-cancels (right). For simulated observed removal times q-Weibull distribution is used only using the uncensored data. time-to-fill and time-to-cancel have drastically different distributions to the empirical ones. This indicates ignoring censored data during estimation will lead to biased removal time processes and therefore, applying survival analysis technique is necessary. In the next section I introduce technical details of various model estimation methods using the survival analysis technique with q-Weibull distributions. 4.3 Estimation Methods As I described in discussing the τ -generation model in section 4.2, the market data does not contain full information about removal times – if an order is executed, its time-to-cancel is unknown and if an order is canceled its time-to-fill is unknown. I have shown that these censored data can lead to biased models. For instance when modeling underlying time-tofill process, some limit orders are canceled before execution and more persistent orders are much more likely to be canceled, which biases the time-to-fill distribution towards shorter execution times. In this section, I introduce a survival analysis technique that deals with cases like this. I first discuss two ways of applying survival analysis in modeling limit order removal times using q-Weibull distributions – maximum likelihood estimation, and least squares fitting of Kaplan-Meier estimators. However, I find that when we are using to model fat-tailed distributions such as q-Weibull, this technique does not work well when the number of 56 censored observations dominates the number of uncensored observations. I introduce a third method of resolving this issue. The examples of modeling methods will be shown for time-to-fill distribution for the stock AZN. The same methods can be applied to other stock data or to model time-tocancel process. 4.3.1 Maximum Likelihood Estimation (MLE) Under the parametric method the survival analysis defines likelihood function Le (θ) for time-to-fill with the q-Weibull distribution as Le (θ) = N Y fqw (τi ; θ)Ie (i) Sqw (τi ; θ)1−Ie (i) , (4.9) i=1 where θ is the set of q-Weibull parameters {q, α, λ}, N is the number of orders, τi is the removal time of order i, and Ie (i) is the indicator function having 1 for executed orders and 0 for canceled orders. Unlike ordinary MLE technique our likelihood function Le (θ) in Equation 4.9 not only consists of products of probability densities fqw (τ ) of the time-to-fill of executed orders, but also products of survival probabilities Sqw (τ ) of the time-to-cancel of canceled orders, which are uncensored and censored observations respectively. Also note that fqw (τ ) and Sqw (τ ) share the same q-Weibull parameters θ. By maximizing the above likelihood Le (θ) we can obtain a time-to-fill model, which can correctly simulate potential time-to-fill of every orders so that some orders will remain (survive) in the order book long enough for the time-to-cancel model to identify them as canceled orders. The likelihood for the time-to-cancel model Lc (θ) is the same as Equation 4.9, except the time-to-cancel and the time-to-fill are applied to maximize probability densities and survival probabilities respectively by swapping Ie (i) and 1 − Ie (i). When estimating parameters using MLE it is more convenient to maximize the loglikelihood function for q-Weibull, N X α τi α−1 −( τλi )α Ie (i) log (2 − q) eq + le (q, α, λ) = λ λ i=1 h N τ α i 2−q 1−Ie (i) X 1−q i log 1 − (1 − q) . λ i=1 57 (4.10) 4 −8.4 x 10 24 −8.42 −8.44 22 20 −8.48 λ log−likelihood −8.46 −8.5 (1.25,17.76) 18 −8.52 16 −8.54 −8.56 −8.58 14 1 1.2 1.4 1.6 1.8 2 1 1.05 q 1.1 1.15 1.2 1.25 1.3 1.35 1.4 α Figure 4-4: q-Weibull MLE estimation for Pe (τ ) for the stock AZN. Change in log-likelihood le0 (α, λ|q) given different values of q. The optimal value for q, which results the maximum log-likelihood is q ∗ = 1.75 (left). Contour plot of log-likelihood le0 (α, λ|q ∗ = 1.75) of maximization problem (eqn 4.10) given optimal q ∗ (right). The optimal α and λ are (α∗ , λ∗ ) = (1.25, 17.76). In this data set, 77.49% of orders are canceled. Finding an optimal set of parameters that maximizes the Equation 4.10 is difficult since the log-likelihood function is not convex, which results in multiple local maxima. To simplify the computation we fix q and perform the optimization over α and λ only, which results in a unique maximum, then exhaustively search over q to find the values (q ∗ , α∗ , λ∗ ) with the maximum log-likelihood. Figure 4-4 shows the result of MLE algorithm described above for the time-to-fill distribution Pe (τ ) for the stock AZN. Since we estimate time-to-fill, cancellation times are used as censored observations. The left figure plots total log-likelihoods of the AZN data set for various q values and the right figure is a contour plot of log-likelihoods given an optimal q ∗ , illustrating that there is a unique maximum for fixed q. 4.3.2 Kaplan-Meier Estimators and Least Squares Fit Another way of applying survival analysis is to use a non-parametric estimator using the statistical technique developed by Kaplan and Meier (1958). By using the product limit method, Kaplan and Meier developed a non-parametric maximum likelihood estimate of 58 1 12 Kaplan−Meier Estimator Least Squares Fit 0.995 10 0.99 8 0.985 6 ln[τ] R2 0.98 0.975 4 0.97 0.965 2 0.96 0 0.955 0.95 1.3 1.4 1.5 1.6 1.7 1.8 1.9 −2 −4 2 −2 0 2 4 ln[(1−Se(τ)(1−q)/(2−q))/(1−q)] q 6 8 Figure 4-5: q-Weibull least squares fit for Pe (τ ) of stock AZN: The change in R2 over different q’s (left). The optimal value q ∗ is 1.67. The plot of Equation 4.12 for q ∗ and its least squares fit (right). The optimal α and λ are (α∗ , λ∗ ) = (1.00, 25.23). In this data set, 77.49% of orders are canceled. Ŝe (τ ) of the form Y nj − dj Ŝe (τ ) = 1− . nj (4.11) τj ≤τ To estimate time-to-fill, τj is the time until j executions are observed, nj is the number of orders that are remaining without execution or cancellation prior to time τj , and dj is the number of executions at time τj . This treats canceled orders as censored observations. Similarly a non-parametric estimate for the time-to-cancel survival function can be obtained by taking executed orders as censored observations. Once we obtain a non-parametric estimator of the survival function I fit it with the q-Weibull survival function using least squares. This is conveniently done by rearranging the q-Weibull survival function in Equation 4.6 into linear form and setting Sqw (τ ) = Ŝe (τ ) and τ = τ̂ , where Ŝe (τ ) is the Kaplan-Meier estimate for τ̂ . 1−q ln(τ̂ ) = 1 · ln α 1 − Ŝe (τ ) 2−q 1−q ! + ln(λ). (4.12) In order to apply the least squares method to Equation 4.12, q needs to be known. Therefore, as I did for the MLE estimation, I fix q and perform an exhaustive search. For the optimal q ∗ the plot for Equation 4.12 will be the straightest line, with slope 1/α∗ and 59 intercept ln(λ∗ ). The optimal q ∗ is found by maximizing R2 over q. Figure 4-5 shows the result using this method. The left figure shows the change of R2 over different q’s, and the right figure compares Equation 4.12 for q ∗ to the Kaplan-Meier estimator. 4.3.3 Inconsistency with Estimation Methods and Improvement Although two estimation methods introduced are applied to the same data, the q-Weibull parameter estimates significantly differs from one another. The estimated q-Weibull parameters {q ∗ , α∗ , λ∗ } for time-to-fill model for AZN are {1.75, 1.25, 17.76} for MLE, and {1.67, 1.00, 25.23} for least squares fit to Kaplan-Meier estimators. Moreover, due to censoring, we cannot directly compare the results to the true underlying time-to-fill distribution, which leads to having no direct way of finding which of these two are the better estimates. A possible reason that leads to such inconsistency is high censoring rate. The set of AZN orders we tested has 77.49% of canceled orders and since I am estimating time-to-fill model in the previous examples, canceled orders are censored observations. The censoring in our data set is not a uniform random event. For both time-to-fill and time-to-cancel models, when τ increases the probability of an observation becoming a censored one will increase. This will cause relatively larger loss of information on the tail of the distribution than the body. Since the q-Weibull has a parameter q which is sensitive to the tail, we cannot accurately estimate q when the censor rate is too high. I propose an alternative estimation method that works better for high censoring rates. When the data set has a high cancellation rate we can use canceled orders to model cancellation and then using the resulting model as a parameter model for the censoring process for time-to-fill. Define the PDF function for observed time-to-fill, P (τiobs |Ie (i) = 1), as feobs (τ ). Then we can formulate feobs (τ ) in terms of time-to-fill and time-to-cancel distributions, feobs (τ ) = fe (τ )Sc (τ ) f (τ )(1 − Fc (τ )) R∞ e = R∞ . 0 fe (u)(1 − Fc (u))du 0 fe (u)Sc (u)du (4.13) The τ -generation model explains why the equality in Equation 4.13 holds. For order i, τie and τic are sampled from distributions fe (τ ) and fc (τ ). If τie < τic the order will be executed after τie and if τie > τic it will be canceled after τic . Thus the probability that 60 order i is executed after time τie is fe (τie ) · R∞ τie fc (u)du – the probability of τie is sampled from fe (τ ) multiplied by the probability that a value greater than τie will be sampled from fc (τ ). Then feobs (τ ) will be the normalized distribution of the above probabilities for all τ ’s. For observed time-to-cancel distribution fcobs (τ ), the same equality condition will hold by swapping time-to-fill and time-to-cancel distributions in Equation 4.13. Also note that R∞ 0 fe (u)Sc (u)du is the average probability of execution re , which can be directly measured from the data set. We can use Equation 4.13 to yield a better time-to-fill model by the following: If the majority of orders in data set are canceled (censored) orders, we can find a fairly accurate q-Weibull estimate for the time-to-cancel model using the Kaplan-Meier estimator with least squares fitting as we explained in section 4.3.2. The observed time-to-fill in the data set feobs (τ ) can be estimated with q-Weibull distribution. Given the empirical execution rate r̂e , the Kaplan-Meier estimators for the time-to-cancel survival function Ŝc (τ ), and the PDF of observed time-to-fill from the data set fˆeobs (τ ), the PDF of underlying time-to-fill fe (τ ) can be solved with the following Equation fe (τ ) = fˆeobs (τ ) · r̂e Ŝc (τ ) . (4.14) Once we run the above method, Equation 4.14 will yield set of (τ, fe (τ )) pairs, which are non-parametric estimators of fe (τ ). Similar to what we did in section 4.3.2 with KaplanMeier estimators, we can apply q-Weibull least squares fit on these set of non-parametric estimators to find q-Weibull parameters for time-to-fill model. When there are more executed orders than canceled orders, we can apply a similar method to model time-to-cancel by swapping time-to-fill and time-to-cancel in Equation 4.14. To compare the estimation methods I test them on synthetic data generated by the τ -generation model. Several sets of arbitrary q-Weibull parameters for Pe (τ ) and Pc (τ ) are picked to vary the cancellation rate. Since the time-to-fill and time-to-cancel models are known we can compare the performance of the estimation methods. To simulate N orders I based on an assumption that observed removal times are emerged from the τ -generation model I described in Section 4.2.2. I sampled time-to-fill and timeto-cancel values, τie and τic , for i = 1...N from known distributions, Pe (τ ) and Pc (τ ). Once a (τie , τic ) pair is generated for an order i, we take the minimum of the two as the observed 61 1.72 0.06 Actual Least Squares Fit MLE Alternative Least Squares Fit MLE Alternative 1.7 0.05 1.68 |qest−qactual| q 1.66 1.64 1.62 1.6 1.58 0.04 0.03 0.02 0.01 1.56 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0 0.9 Probability of Cancellation 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 Probability of Cancellation Figure 4-6: Comparison of q-Weibull tail parameter estimates of synthetic data sets with various cancellation probabilities. The survival analysis was used to exploit the censored observations. For each cancellation probability, 100 data sets with 10,000 orders are used to calculate the mean of tail estimates. The left plot shows q vs probability of cancellation for actual, least squares fit of Kaplan-Meier estimators, MLE, and Alternative estimation methods. The right plot shows the absolute difference between actual and estimated tail parameters of the three estimation methods for various probabilities of cancellations. removal time τiobs of an order i, and set the value of indicator function Ie (i) to be 1 when τie is picked and 0 otherwise. For each data set 10,000 orders are generated. Using the synthetic data I estimated q-Weibull parameters for the time-to-fill model using three estimation methods. I repeated data generation and estimation 100 times for each parameter set. In Figure 4-6 the plot on the left compares the actual and mean of estimated values of q for all three estimation methods and for various probabilities of cancellation. A larger probability of cancellation implies a larger number of censored observations in the synthetic data set. The result in the figure shows that as the number of censored observation increases it is more difficult to estimate the tail parameter q. Also it shows the alternative estimation method introduced produces a better tail estimates than the other two methods. The left plot shows the difference in tail estimates more clearly. The y-axis of the plot is the absolute difference between the actual and mean of estimated tail parameters. It shows that the tail estimates from the alternative method are consistently better than the other two estimates. The amount of inaccuracy of tail parameter estimates shown here affects the overall distributions significantly. Figure 4-7 is a plot of the absolute difference between the actual and estimated survival functions |Sest (τ )−Sactual (τ )| over various τ ’s for synthetic data with cancellation probability of 0.90. The result shows that the alternative method estimated 62 0.05 Actual Least Squares Fit MLE 0.045 0.04 |Sest(τ)−Sactual(τ)| 0.035 0.03 0.025 0.02 0.015 0.01 0.005 0 0 0.5 1 1.5 τ 2 2.5 3 4 x 10 Figure 4-7: Absolute difference between actual and estimated survival functions |Sest (τ ) − Sactual (τ )| using three different estimation methods. Arbitrary set of q-Weibull parameters for time-to-fill and time-to-cancel are used to generate orders with cancellation probability of 0.9. The 95% confidence intervals are calculated using 100 generations of synthetic data set with 10,000 orders in each set. significantly more accurate estimates when the fraction of censored observations is high. 4.4 Empirical Analysis I now turn to the empirical analysis of limit order removal time data of 9 stocks in LSE using our τ -generation model. I first focus on unconditional removal time model, and then extend this to conditional model by introducing conditional variables. I show that introduced survival analysis technique can successfully model underlying removal time processes, which simulate observed time-to-fills and time-to-cancels close to the empirical distributions. Then I discuss the effects of introduced conditional variables on the limit order removal times, and economic implications of change in tail exponent of removal time distributions over conditional variables. Lastly I compare our modeling method to the previously known method for modeling time-to-fill using first passage time analysis. 4.4.1 Unconditional Model: With vs. Without Censored Data As shown in Figure 4-3 ignoring censored observations in modeling time-to-fill and timeto-cancel processes as P̂e (τ ) = P (τiobs |Ie (i) = 1) and P̂c (τ ) = P (τiobs |Ie (i) = 0) results inaccurate models, which fail to simulate observed removal time distributions close to the 63 Observed Time−to−Fill 0 10 Survival Probability S(τ) Survival Probability S(τ) Observed Time−to−Cancel 0 10 −1 10 −2 10 Empirical Simulated Without Censoring Simulated With Censoring −3 10 0 10 1 10 2 −2 10 Empirical Simulated Without Censoring Simulated With Censoring −3 10 3 10 −1 10 10 4 0 10 10 τ 1 10 2 3 10 10 4 10 τ Figure 4-8: Survival plots of empirical vs. simulated observed removal times of stock AZN with and without censored data: observed time-to-fills (left) and observed time-to-cancels (right). The q-Weibull distribution is used for both removal time models. When modeling removal times with censored data, 69.18% of them are canceled orders, therefore, time-tofill model is indirectly modeled deriving from the estimate of time-to-cancel model and the observed time-to-fill distribution as we described in Section 4.3.3. empirical ones. An alternative modeling method using the survival analysis is introduced in Section 4.3 with detailed estimation method to overcome the difficulty of modeling fat tailed distribution when the number of censored observations dominates the number of uncensored observations. Figure 4-8 illustrates how much the removal time models are improved when censored data are included in the estimation. In stock AZN 69.18% of orders are canceled orders, which the number of censored dominates the number of uncensored observations when modeling time-to-fill. Therefore in estimating time-to-cancel we use the least square fit of Kaplan-Meier estimators described in Section 4.3.2, and in estimating time-to-fill we derive the parameter estimates from the time-to-cancel model and the observed time-tofill distribution as described in Section 4.3.3. In simulating both observed time-to-fill and time-to-cancel the new method results significantly better removal time models than the ones modeled without the censored data. The same analyses are done with rest of the 8 stocks7 . Table 4.1 and 4.2 report estimated q-Weibull parameters for time-to-fill and timeto-cancel respectively. Also using the parameter estimates, Figure 4-9 and 4-10 show the estimated removal time models simulate observed time-to-fills and time-to-cancels close to the empirical distributions for all stocks. 7 Other 8 stocks we analyzed are BLT, BSY, LLOY, PRU, RTO, RTR, TSCO, and VOD. 64 Stock q α λ AZN BLT BSY LLOY PRU RTO RTR TSCO VOD 1.80 1.73 1.79 1.81 1.80 1.76 1.80 1.77 1.06 0.9459 0.8483 0.9430 1.0275 0.9804 0.9423 0.9970 0.9655 0.3241 6.0002 7.4387 4.4881 3.6813 4.5808 5.2043 3.6883 4.2397 86.0865 Table 4.1: q-Weibull parameter estimates of execution time (time-to-fill) model for the 9 stocks. Stock q α λ AZN BLT BSY LLOY PRU RTO RTR TSCO VOD 1.43 1.48 1.43 1.38 1.50 1.38 1.40 1.32 1.09 0.7024 0.8020 0.7197 0.6461 0.8786 0.6637 0.6534 0.5983 0.4153 9.3382 6.4889 9.8304 15.1451 8.6154 9.5057 8.5210 22.1437 118.5829 Table 4.2: q-Weibull parameter estimates of cancellation time (time-to-cancel) model for the 9 stocks. 65 −1 −2 10 Empirical Simulated 0 10 Empirical Simulated −3 10 4 0 10 10 τ 0 10 10 −1 0 10 −2 Empirical Simulated −3 2 4 0 10 10 τ −1 −2 4 −2 10 Empirical Simulated 0 10 VOD 0 10 −3 2 4 10 10 10 10 2 10 τ 10 10 10 10 −1 S(τ) S(τ) Empirical Simulated 10 10 10 −3 0 TSCO 0 −1 −2 10 4 10 10 10 Empirical Simulated −3 10 2 τ 10 10 S(τ) 10 4 RTR 0 10 10 Empirical Simulated −3 10 2 −2 10 τ RTO 0 −2 10 10 2 10 S(τ) −3 10 −1 10 S(τ) S(τ) −2 PRU 0 10 −1 10 10 LLOY 0 10 −1 10 S(τ) BSY 0 10 S(τ) BLT 0 10 10 τ Empirical Simulated −3 10 2 10 4 0 10 10 τ 2 10 4 10 τ Figure 4-9: Survival plots of empirical vs. simulated observed time-to-fills of 8 stocks. −1 −2 10 Empirical Simulated 0 10 Empirical Simulated −3 10 4 0 10 10 τ 0 10 10 −1 0 10 −2 2 τ Empirical Simulated −3 4 10 0 10 2 4 10 VOD 0 −1 10 −2 −2 10 Empirical Simulated −3 τ 4 10 10 10 10 2 10 τ 10 10 10 10 −1 S(τ) S(τ) Empirical Simulated 10 10 10 −3 0 TSCO 0 −1 −2 10 4 10 10 10 Empirical Simulated −3 10 2 τ 10 10 S(τ) 10 4 RTR 0 10 10 Empirical Simulated −3 10 2 −2 10 τ RTO 0 −2 10 10 2 10 S(τ) −3 10 −1 10 S(τ) S(τ) −2 PRU 0 10 −1 10 10 LLOY 0 10 −1 10 S(τ) BSY 0 10 S(τ) BLT 0 10 0 10 2 10 τ Empirical Simulated −3 10 4 10 0 10 2 10 4 10 τ Figure 4-10: Survival plots of empirical vs. simulated observed time-to-cancels of 8 stocks. 66 4.4.2 Conditional Model I now extend the estimation method to model conditional removal time model. There are many micro and macro economic variables that can be introduced to model their effects on limit order removal times. In this section I study two variables which are directly related to the limit order conditions, the price and size of a limit order. Conditional Variables In order to understand how the removal times are affected by order size and limit price I introduce two conditional variables s and ∆p and model underlying conditional distributions8 Pe (τ |·) and Pc (τ |·) based on an assumption that observed removal times are generated from τ -generation model. The size of an order s is represented in monetary terms since the number of shares has a different meaning depending on price. The size is defined as s = pf × (# of shares), (4.15) where pf is the limit price. The mid-point price is defined as the average of the logarithm of the best bid and ask prices pmid = (log(pbid ) + log(pask ))/2 at the time of limit order submission. To see the effect of the limit order price on removal times we use the distance between the order’s limit price and the mid-point price ∆p, defined as p mid − log(pf ) ∆p = log(p ) − p f mid if buy order (4.16) if sell order. Larger ∆p corresponds to less aggressive order placement and larger expected order removal time. Similarly, as the size of order s increases we expect larger expected order removal times. The parameters for the conditional distributions of order removal times are estimated by dividing the data set into bins such that each bin will contain orders with certain ranges of conditional values. The bins containing the largest s’s and ∆p’s are discarded in the analysis since the variance of conditional values are too large. Using each subset we estimate 8 The “·” in Pe (τ |·) and Pc (τ |·) represents either s or ∆p 67 ∆ p vs. Cancellation 1 0.9 0.9 0.8 0.8 Probability of Cancellation Probability of Cancellation Size vs. Cancellation 1 0.7 0.6 0.5 0.4 0.3 0.2 0.6 0.5 0.4 0.3 0.2 0.1 0.1 AZN 0 0.7 0 1 LLOY 2 3 RTR 4 AZN 5 6 7 0 −1 8 0 1 LLOY 2 3 RTR 4 5 6 7 8 9 10 ∆ p (x 10−3) s (x 104) Figure 4-11: Change in probabilities of cancellation of limit orders given s and ∆p: Mean of s vs. Cancellation (left), Mean of ∆p vs. Cancellation (right). Three are picked from the ten stocks used in our analysis to plot the figure. The other seven stocks follow similar patterns to those are shown here. parameters for conditional distributions for time-to-cancel, Pc (τ |s) and Pc (τ |∆p), and timeto-fill, Pe (τ |s) and Pe (τ |∆p). When the data set is divided into bins based on conditionals, the proportions of executed and canceled orders can be dramatically shifted. For instance, the 69.18% of entire AZN data are canceled orders, but when the data set is divided based on ∆p the amount of canceled orders ranges from 30% to 90%. Figure 4-11 shows cancellation probabilities of orders as a function of mean of ∆p and s in each bin for 3 stocks among the 9 stocks we studied. The remaining 6 stocks show similar effects. The figure shows that the probability of cancellation does not change on s (left) but increases as ∆p gets larger (right). From this result one may conclude the patterns of market participants’ order cancellation behavior such that ∆p plays an dominant role when traders make cancellation decisions. This is an incorrect observation since we do not know how time-to-fill model will change as ∆p increases. If expected time-to-fill dramatically increases over ∆p, we may see the same result even with the absence of change in traders’ cancellation behavior. Therefore, in order to understand the conditional effects on both time-to-fill and time-to-cancel, it is important to correctly model the τ -generation process from market data using estimation methods described in Section 4.3. 68 Observed Time−to−Fill 0 10 −1 −1 10 Autocorrelation 10 Autocorrelation Observed Time−to−Cancel 0 10 −2 10 0.15 0.1 −3 10 −2 10 0.3 −3 10 0.2 0.05 0 0.1 0 50 0 100 −4 10 0 50 100 −4 0 10 1 10 2 10 3 10 10 4 10 0 10 Lag 1 10 2 10 3 10 4 10 Lag Figure 4-12: Autocorrelation of removal times for the stock AZN. For both observed timeto-fill (left) and observed time-to-cancel (right), the autocorrelation function decays slowly. The removal times are ordered by the time of removal. Modeling Parameter Change with Cubic Splines Our goal is to find a parametric form for the conditional distributions Pe (τ |·) and Pc (τ |·) as a function of conditional values. In this subsection I introduce a method for modeling q-Weibull parameter change on conditional values using smoothing cubic splines. Before applying smoothing method with cubic splines I calculate confidence intervals for the parameter estimates using the empirical bootstrap method (Efron, 1979, 1981). The method first creates multiple sets (100 sets in our analysis) of orders sampled with replacement from the empirical distribution. Each set contains the same number of orders as in the original bin. Then I model the time-to-fill and the time-to-cancel of each sampled set with our estimation method. By the central limit theorem, I assume that the sample of bootstrap parameters are normally distributed. From this I can calculate the confidence intervals for the parameter estimates using the means and variances. One important issue with the bootstrap method that needs to be addressed is the positive autocorrelation of removal times. Figure 4-12 shows the autocorrelation of both time-to-fill and time-to-cancel for the stock AZN, ordered by the time of order removal. In both cases the observations have strong positive autocorrelations. This means the confidence intervals to be overly optimistic. The estimated q-Weibull parameters for each bin and their confidence intervals describe conditional distribution of removal times given certain range of conditional values – i.e. 69 Pe (τ |a ≤ ∆p < b) where a and b are the minimum and the maximum of ∆p in the bin. To model the parameter change given a fixed conditional value instead of the range, a cubic spline smoothing technique is used. A cubic spline is a set of piecewise third-order polynomials joined together with conditions that ensure continuity. A non-parametric regression using a cubic spline (Schoenberg, 1964; Reinsch, 1967) will be used to learn a function describing q-Weibull parameters given conditional values. For example a cubic smoothing spline describing the change in tail parameter q of conditional time-to-fill Pe (τ |∆p) is a function gq (∆p) that minimizes the following equation, δ n X 2 (qi − gq (µ∆pi )) + (1 − δ) Z max(µ∆pi ) 00 gq (u)2 du, (4.17) min(µ∆pi ) i=1 where qi is a tail parameter estimate for i-th bin with conditional mean µ∆pi and δ is a smoothing parameter. By minimizing Equation 4.17 we are minimizing the residual sum of squares and the amount of curvature of the spline – to quantify the curvature, the equation integrates the square of the second derivative of the spline function gq . The former will make the function gq close to the data and the latter will make gq smoother. The smoothness parameter δ determines how much weight to place on these contradictory demands. For δ = 0, minimizing Equation 4.17 will result in a linear least squares fit and for δ = 1 it will result in cubic spline interpolation. Choosing a good smoothing parameter δ is an important aspect in finding a smoothing cubic spline function. Among various methods proposed in the literature (Wahba, 1975; [k] Silverman, 1985), I used leave-one-out cross-validation to pick δ. Let’s define gq,δ be the cubic spline minimizing the following function, δ n X Z 2 qi − gq[k] (µ∆pi ) + (1 − δ) max(µ∆pi ) 00 gq (u)2 du. (4.18) min(µ∆pi ) i=1,j6=k The leave one out cross-validation function is n 2 1 X [k] V (δ) = yk − gq,δ (xk ) , n (4.19) k=1 and the cross-validation estimate of δ is the minimizer of Equation 4.19. The smoothing cubic splines for the other two q-Weibull parameters α and λ can be written similar to 70 Equation 4.18 and 4.19 by replacing qi with αi or λi and the spline function gq to gα or gλ . Once we find the cubic splines describing the parameter change over conditional values we can combine them with Equation 4.6 and express conditional survival function of limit order removal time model. For example the survival function for time-to-fill conditioned on ∆p is 2−g " e Sqw (τ |∆p) = 1 − (1 − gq,δ (∆p)) τ gλ,δ (∆p) (∆p) gα,δ (∆p) # 1−gq,δ q,δ (∆p) . (4.20) The conditional survival function for time-to-cancel or with the other conditional variable s can be similarly derived, which is similar to Equation 4.20. In summary the estimation method first utilizes the survival analysis and the q-Weibull parameter estimation method described in Section 4.3 to exploit censored observations and effectively fit the parameters for the q-Weibull distributions. Then using the empirical bootstrap method, I compute the bootstrap estimates for the confidence intervals of the parameter estimates. Lastly, I model the parameter change given conditional variables s and ∆p using cubic smoothing splines. In the end, the final product of this modeling method e (τ |s), S e (τ |∆p), is a conditional survival function for time-to-fill and time-to-cancel, Sqw qw c (τ |s), and S c (τ |∆p), for each stock. Sqw qw Figures 4-13 and 4-14 show the change in q-Weibull parameters of conditional survival functions for time-to-fill and time-to-cancel of stock AZN respectively. One of the important difference among the models is change in scale parameter λ. When comparing two different 1 (τ ) and S 2 (τ ), the overall scale of τ ’s sampled from them will be survival functions Sqw qw determined by their scale parameters λ1 and λ2 . When the range of λ1 is much greater than 1 (τ ) will generally have much greater variance than the range of λ2 , the samples from Sqw 2 (τ ). If the scale parameters are similar (λ ≈ λ ), then it becomes the samples from Sqw 1 2 meaningful to compare their shape and tail parameters α’s and q’s to study the differences of two models. Therefore, to see how the conditional variables s and ∆p affect the limit order removal times, I first compare the range of scale parameters. Figure 4-13 (a) and (b) shows change in scale parameters for time-to-fill models conditioning on s and ∆p respectively for the stock AZN. For both conditional variables, the scale parameters increase as conditional increases. This indicates when the limit order is an large order or it is placed far away from the price currently trading at, it will take longer time to 71 get executed, which is intuitively correct. What is more interesting is the amount of increase in scale parameters when the conditional variables increase. To observe the difference, the figure shows the changes in λ’s in same scale in y-axis. For the stock AZN, it shows that the ∆p contributes to much faster increase in λ. This indicates that the major determinant of time-to-fill of limit orders for the stock is not the size of the order, but the price. This effect may be explained by market participants’ behavior. When placing limit orders, they place orders with s within the range that will make a small difference in execution times by chopping the orders into smaller pieces. As a result, unlike ∆p, we don’t see a significant increase in time-to-fill since we only have data set with limit orders within such range. A similar comparison is performed for time-to-cancel figure 4-14 (a) and (b). Here we observe an opposite effect – the major determinant of time-to-cancel is not the price, but the size of an order. Also, it is worth noting that the behavior is more complex than it was for time-to-fill. In summary, I identified that execution and cancellation times are mainly determined by the price and the size of an order respectively. In the next section, I will verify this result by simulating τ -generation model and showing that it can generate observed removal times similar to the empirical ones. 72 Time−to−Fill Model (a) (b) 1.9 1.9 1.8 1.8 q 2 q 2 1.7 1.7 1.6 1.6 1.5 0 0.5 1 1.5 2 2.5 3 1.5 −0.5 3.5 0 0.5 s (x 10 ) 2 1.8 1.8 1.6 1.6 1.4 1.4 1.2 1.2 1 1 0.8 0.8 0 0.5 1 1.5 2 2.5 3 0.6 −0.5 3.5 0 0.5 100 100 80 80 60 60 λ λ 2 2.5 3 40 40 20 20 0 0.5 1 1.5 2 1 1.5 2 2.5 3 2 2.5 3 ∆ p (x 10−3) s (x 107) 0 1.5 2.2 2 α α 2.2 0.6 1 ∆ p (x 10−3) 7 2.5 3 0 −0.5 3.5 0 0.5 1 1.5 ∆ p (x 10−3) s (x 107) Figure 4-13: q-Weibull parameter estimates for the conditional time-to-fill model for the stock AZN. The 95% confidence intervals are calculated using the empirical bootstrap method. Cubic smoothing splines are used to model the parameter change over s and ∆p. (a) Pe (τ |s): time-to-fill conditioning on s. (b) Pe (τ |∆p): time-to-fill conditioning on ∆p. 73 Time−to−Cancel Model (b) 1.8 1.8 1.7 1.7 1.6 1.6 q q (a) 1.5 1.5 1.4 1.4 1.3 0 0.5 1 1.5 2 2.5 3 1.3 −0.5 3.5 0 0.5 1 1.5 2 2.5 3 2 2.5 3 2 2.5 3 ∆ p (x 10−3) 7 s (x 10 ) 2.5 2.5 2 2 α 3 α 3 1.5 1.5 1 1 0.5 0 0.5 1 1.5 2 2.5 3 0.5 −0.5 3.5 0 0.5 1 1.5 −3 s (x 107) ∆ p (x 10 ) 50 40 40 λ 60 50 λ 60 30 30 20 20 10 10 0 0 0.5 1 1.5 2 2.5 3 0 −0.5 3.5 0 0.5 1 1.5 ∆ p (x 10−3) 7 s (x 10 ) Figure 4-14: q-Weibull parameter estimates for the conditional time-to-cancel model for the stock AZN. The 95% confidence intervals are calculated using the empirical bootstrap method. The cubic smoothing splines are used to model the parameter change over s and ∆p. (a) Pc (τ |s): time-to-cancel conditioning on s. (b) Pc (τ |∆p): time-to-cancel conditioning on ∆p. 74 Simulation of τ -Generation with Conditional Model In order to check if the choice of our model is valid we need to run the test with real data. Since we cannot get complete information about time-to-fill and time-to-cancel from the data set I tested how closely the model can simulate the observed time-to-fills and observed time-to-cancels. To test this N orders are simulated, where N is the number of orders in the data set. For each order i I used its empirical conditional value ∆pi and si to compute the conditional survival function of time-to-fill and time-to-cancel from our model (Equation 4.20). Since I discarded very large ∆p’s and s’s during model estimation, I discarded orders with conditional values falling beyond the range of our smoothing splines functions. Then, similar to the method I used to generate the synthetic data earlier, I sampled τie and τic from estimated conditional time-to-fill and time-to-cancel survival functions and set the execution parameter Ie (i) accordingly. Figures 4-15 and 4-16 show quantile-quantile plots of real versus simulated order removal times for the stock AZN. There are four possible ways of simulating the removal times using e (τ |∆p) and S c (τ |s), (b) S e (τ |∆p) different combinations of conditional variables: (a) Sqw qw qw c (τ |∆p), (c) S e (τ |s) and S c (τ |s), (d) S e (τ |s) and S c (τ |∆p). Each plot in the and Sqw qw qw qw qw figure shows the quantile-quantile plot with simulated orders generated from these possible combinations. The figures confirm the findings from the previous analysis that conditional variables ∆p and s are the major determinants of time-to-fill and time-to-cancel respectively. The figure 4-15 and 4-16 (a)’s are the quantile-quantile plots of observed time-to-fill and time-tocancel where the conditional variable ∆p and s are used respectively to derive the survival functions. Among the results, they follow most closely to the 45 degree line, which indicate the closest fit to the real data. The next closest one is when ∆p’s are used for both execution and cancellation times (figure 4-15 & 4-16 (b)). Although the goodness-of-fit for observed time-to-cancel is almost indistinguishable from the previous one, it results less good fit for the observed time-to-fill. The other two cases where execution times are generated using the order size s result much worse fits, which clearly indicates s is not an important factor determining the time-to-fill. Figures 4-17 and 4-18 show the survival plots of actual and simulated observed time-tofill and time-to-cancel for rest of the 8 stocks. Here I used ∆p and s to simulate execution 75 and cancellation time respectively. This result verifies that our choice of using ∆p and s to formulate conditional time-to-fill and time-to-cancel models respectively is the plausible one. All models observed removal times close to the actual distributions. In the remaining part of this section I will discuss the economic implications of the change in the tail exponent of the conditional model. Also I will compare our modeling method to the previously known method for modeling time-to-fill using first passage time instead of the survival analysis. 76 (b) 3 Simulated (x103) Simulated (x103) (a) 2 1 0 1 2 0 3 0 1 2 3 Actual (x103) Actual (x103) (c) (d) 3 2 1 0 2 1 Simulated (x103) Simulated (x103) 0 3 3 2 1 0 1 2 0 3 0 1 3 2 3 3 Actual (x10 ) Actual (x10 ) Figure 4-15: Quantile-Quantile plots for observed time-to-fill for stock AZN. In generating observed time-to-fills, all four possible combinations of conditional variables are used in τ -generation model: (a) ∆p for time-to-fill and s for time-to-cancel, (b) ∆p for both timeto-fill and time-to-cancel, (c) s for both time-to-fill and time-to-cancel, (d) s for time-to-fill and ∆p for time-to-cancel. (b) 3 Simulated (x103) Simulated (x103) (a) 2 1 0 1 2 0 3 0 1 2 Actual (x103) Actual (x103) (c) (d) 3 2 1 0 2 1 Simulated (x103) Simulated (x103) 0 3 3 3 2 1 0 1 2 0 3 Actual (x103) 0 1 2 3 Actual (x103) Figure 4-16: Quantile-Quantile plots for observed time-to-cancel for stock AZN. The same combinations of conditional variables are used as described in figure 4-15. 77 −1 −2 10 Empirical Simulated 0 10 Empirical Simulated −3 10 4 0 10 10 τ 0 10 10 −1 −2 10 Empirical Simulated −3 10 4 0 10 10 τ −1 10 Empirical Simulated 0 10 −2 10 −3 10 VOD 0 −2 4 4 10 10 10 2 2 10 τ 10 10 2 10 −1 S(τ) S(τ) Empirical Simulated 0 10 10 10 −3 0 TSCO 0 −1 −2 10 4 10 10 10 Empirical Simulated −3 10 2 τ 10 10 S(τ) 10 4 RTR 0 10 10 Empirical Simulated −3 10 2 −2 10 τ RTO 0 −2 10 10 2 10 S(τ) −3 10 −1 10 S(τ) S(τ) −2 PRU 0 10 −1 10 10 LLOY 0 10 −1 10 S(τ) BSY 0 10 S(τ) BLT 0 10 10 τ Empirical Simulated −3 10 2 10 4 0 10 10 τ 2 10 4 10 τ Figure 4-17: Survival plots of actual vs. simulated observed time-to-fills of 8 stocks from conditional model using ∆p and s as conditional variables for time-to-fill and time-to-cancel respectively. −1 −2 10 Empirical Simulated 0 10 Empirical Simulated −3 10 4 0 10 10 τ 0 10 10 −1 −2 10 10 τ Empirical Simulated −3 4 10 0 10 10 10 τ VOD 0 −1 10 −2 −2 10 Empirical Simulated −3 4 4 10 10 10 2 2 10 τ 10 10 2 10 −1 S(τ) S(τ) Empirical Simulated 0 10 10 10 −3 0 TSCO 0 −1 −2 10 4 10 10 10 Empirical Simulated −3 10 2 τ 10 10 S(τ) 10 4 RTR 0 10 10 Empirical Simulated −3 10 2 −2 10 τ RTO 0 −2 10 10 2 10 S(τ) −3 10 −1 10 S(τ) S(τ) −2 PRU 0 10 −1 10 10 LLOY 0 10 −1 10 S(τ) BSY 0 10 S(τ) BLT 0 10 0 10 10 τ Empirical Simulated −3 10 2 4 10 0 10 2 10 4 10 τ Figure 4-18: Survival plots of actual vs. simulated observed time-to-cancels of 8 stocks from conditional model using ∆p and s as conditional variables for time-to-fill and time-to-cancel respectively. 78 4.4.3 Tail Exponent γ of Removal Times When the q-Weibull distribution has a fat tail (q > 1) it asymptotically converges to a power law of the form P (≥ τ ) ∝ τ −γ for large τ . The tail exponent γ can be written in terms of the tail and shape parameters q and α as γ =α× q−2 . 1−q (4.21) I can combine Equation 4.21 with the smoothing splines describing the changes of q and α over conditional values. Since we know that ∆p and s are mainly determining the execution times and cancellation times respectively, I replace q and α in Equation 4.21 with e (∆p) and g e (∆p) for time-to-fill, and g c (s) and g c (s) for time-tospline functions gq,δ α,δ q,δ α,δ cancel. Then I can write tail exponents for time-to-fill and time-to-cancel as, e e (∆p) × γ∆p = gα,δ e (∆p) − 2 gq,δ e (∆p) 1 − gq,δ and c (s) × γsc = gα,δ c (s) − 2 gq,δ c (s) 1 − gq,δ . (4.22) What Equation 4.22 describes is the change in tail exponent of removal time distributions over different conditional values ∆p and s. Unlike λ, the parameters q and α are very sensitive to the exogenous factors I ignored in my analysis. For instance, the volatility of market or the imbalance of supply and demand can have a large effect on the shape and the tail of the time-to-fill distribution. Also the heterogeneity of market participants’ cancellation behavior or their order placing strategies can significantly affect the shape and tail of time-to-cancel distributions. Although such outside factors can affect the tail exponents, some interesting regularities are observed e as a function of ∆p for time-to-fill, and γ c as function of s for Figure 4-19 shows γ∆p s time-to-cancel for the stocks RIO, SDR, and AZN. The range of tail exponents of each stock varies significantly, which makes identifying patterns difficult when we plot them altogether. Therefore I chose three stocks with similar range. Such large variance in tail exponents across different stocks is also related to the positive autocorrelations of removal times shown earlier. e generally slopes downward as ∆p increases. The smaller tail exponents For all stocks γ∆p indicate a fatter tail, therefore, this implies when a limit order is placed further away from the current price its time-to-fill distribution has a heavier tail. This implies a slower rate 79 0.85 1.4 RIO SDR AZN RIO 1.3 0.75 1.2 0.7 1.1 0.65 1 SDR AZN γ γ 0.8 0.6 0.9 0.55 0.8 0.5 0.7 0.45 0.6 0.4 −0.5 0 0.5 1 1.5 2 2.5 0.5 3 −3 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 s (x 107) ∆ p (x 10 ) (q−2) Figure 4-19: The change in the tail exponent γ = (1−q) × α for the stocks RIO, SDR, and AZN. Tail exponents for time-to-fill conditioning on ∆p’s (left). Tail exponents for time-to-cancel conditioning on s’s (right). of decay of the time-to-fill survival function, meaning as the order gets placed further away from the current price the rate of increase in the probability of the order not being executed for very long period of time increases. e With some stocks for small ∆p I observed an increase in γ∆p as ∆p increases. This suggests that more aggressive orders have fatter tails, which is opposite from the previous observation. In Figure 4-19 (left) we can observe these patterns near negative regions of ∆p. This may be due to chasing orders in situations when there exists a large imbalance between supply and demand in the order book. For example when there are many more buyers than sellers in the market, the price will go up. In this case the chasing orders are buy orders placed very near the trading price (small ∆p). Since the price is rising, the time-to-fill will be longer than the usual case where there is no such imbalance. If more aggressive orders are placed when the imbalance is greater, such patterns can be observed. For γsc we generally observe downward slope as function of s, which implies that the time-to-cancel distribution has heavier tails for larger order sizes. The stocks RIO and AZN in figure 4-19 (right) show such patterns. This implies that market participants who place larger orders will generally have more patience. In some stocks, I observed a peak or multiple peaks creating a ‘U’ pattern similar to the stock SDR in figure 4-19 (left). My hypothesis is that such pattern emerges as result of the heterogeneity of market participants having different cancellation strategies or the cluster of participants with similar cancellation strategies but different size in trading capitals. Although such explanations of these patterns 80 Stock e γ∆p (time-to-fill) γsc (time-to-cancel) 5 percentile 95 percentile 5 percentile 95 percentile AVZ 0.52 0.67 0.78 0.98 AZN 0.47 0.61 0.69 1.06 DEB 0.82 1.74 0.90 1.70 MNU 2.55 - 0.67 2.25 RIO 0.64 0.72 0.66 1.18 RNK 0.96 1.44 0.93 1.15 SAB 0.65 0.86 0.80 1.02 SCR 0.83 6.54 0.89 0.97 SDR 0.48 0.77 0.73 0.99 SGC 1.05 2.96 0.83 1.44 Table 4.3: 5 and 95 percentiles of tail exponents predicted from are removal time models. The missing value indicates that q < 1, which means the q-Weibull does not asymptotically converge to a power law. are not closely verified in this study, it can be studied rigorously using individual’s trading patterns from the data. In many cases the tail exponents of removal time distributions had values smaller than 1, which indicates the first moments of removal times do not exist. Table 4.3 shows 5 and e ’s and γ c ’s computed from the conditional values in the data set. The 95 percentiles of γ∆p s missing value indicates having q < 1, which does not asymptotically converge to power law. This is significant because when we measure the removal times, we cannot describe the measure in terms of expectation. For example when the time-to-fill model estimates tail exponent less than 1, the model implies the expected time-to-fill is infinite because far too many orders have probability of not executing for significantly long period of time. An alternative way of thinking about removal time measure is by putting an upper limit on time. For example if the upper limit is T , we can compute a probability of order being executed between 1 and T seconds and the expected time-to-fill within this range, e {Probability of order removal within T seconds} = 1 − Sqw (T ) {Expected removal time within T seconds} = T X (4.23) e fqw (τ ) · τ. τ =1 Figure 4-20 shows the change in expected removal times and mean of empirical observed removal times over different conditional values for the stock AZN. The expected removal times are calculated using one continuous trading period (8 1/2 hours) as the upper limit 81 2500 4000 Predicted Actual Predicted Actual 3500 2000 3000 2500 τ τ 1500 1000 2000 1500 1000 500 500 0 0 0.5 1 1.5 2 2.5 3 3.5 0 −0.5 4 0 0.5 1 1.5 2 2.5 3 ∆ p (x 10−3) 7 s (x 10 ) Figure 4-20: Expected and empirical removal times vs the size s and the price improvements ∆p. The left plot shows time-to-cancel given s, and the right plot shows time-to-fill given ∆p. T in Equation 4.23. For both time-to-fill and time-to-cancel, our model predicts higher removal times than the observed times. Since our model predicts removal times assuming that no censoring will occur, its expectation is a prediction of true removal times rather than the observed one after censoring. The difference in the two gets larger as conditional values increase, which indicates the recovery of the problem of biased censoring – the removal times are biased towards shorter times. Next I will explore the prospect of measuring time-to-fill indirectly via constructing hypothetical execution times from transaction data. I will use the above time-to-fill measure to compare the results. 4.4.4 Time-to-Fill Measures Using First Passage Time vs. Our Method When modeling time-to-fill, another way of exploring the information contained in canceled orders is to construct hypothetical limit order executions using empirical data. This approach was first proposed by Handa and Schwartz (1996) and has been used by Angel (1994), Battalio et al. (1999), and others. The first passage time is defined to be the first time the transaction price reaches or crosses the limit price. For example suppose a canceled buy order is placed at £100.00. The first time after the order placement that a transaction occurs at a price equal to or lower than £100.00 is the first passage time of that canceled order. Lo et al. (2002) compared first passage times and actual limit orders using New York 82 Stock Exchange data from 1994 to 1995. From the statistical tests they revealed some serious biases, which makes the first passage time an unreliable indicator of actual execution times. The major problem with the first passage time approach is it only refers to a lower bound of execution time of a canceled order. This is because the approach ignores the placement of the canceled order in the queue. If the order is at the top of the queue, the first passage time is equal to the actual execution time, however, if the order is at the bottom of the queue, the order may not be filled with first incoming effective market order, thus, the actual execution time may be greater than the first passage time. In NYSE data, Lo et al. (2002) showed that such effect generates significant biases. The biases were stronger with illiquid stocks since the lower placement in the queue will result a longer delay in those stocks. In this section I explore if such bias exists in LSE data. Our data is not only more recent, but also has smaller tick size, therefore the delay due to placement may be small enough to ignore. To compare our time-to-fill model with the first passage time approach I apply the following procedure: I first merge all the transaction data into one time sequence ignoring the daily boundary. The closing time between daily boundaries are ignored. The reason for doing this is many canceled orders will be thrown out if we only use a single day transaction data. Having all the transaction data stitched together into one sequence will help us to retain most of the canceled order in our analysis. Then for every canceled order I compute its first passage time by tracing the transaction prices from the actual placement time of the order. If the condition for the first passage time is not met, I treat the observation as missing. With hypothetical time-to-fills generated from first passage time approach for canceled and observed time-to-fills for executed orders, we can fit the data with our q-Weibull timeto-fill model. In this case none of the orders are canceled, thus, the survival analysis is not used. Once we have a set of parameter estimates, we can use Equation 4.23 to calculate the time-to-fill measure within an upper time limit T . Figure 4-21 and 4-22 show the change in time-to-fill measures over ∆p of first passage time and our model for the stock AZN and DEB using upper time limit of 3,600 seconds (1 hour). These two stocks are picked to represent liquid and illiquid stocks in our data set respectively. For stock AZN in Figure 4-21 we can see both methods produce similar time-to-fill measures except for large ∆p’s. This is due to orders with large ∆p’s being 83 thrown out by not meeting the first passage time condition. The difference gets greater when the method is applied to an illiquid stock. For stock DEB in Figure 4-22 we see expected time-to-fill measures are lower when the first passage time approach is applied. This indicates bias of first passage time due to ignoring placement in a queue is still significant. 84 1 600 0.9 500 0.8 Execution Probability Expected Time−to−Fill 700 400 300 200 100 0.7 0.6 0.5 0.4 First Passage Time Our Model 0 −1.5 −1 −0.5 First Passage Time Our Model 0 0.5 1 1.5 2 2.5 3 −1.5 ∆ p (x 10−3) −1 −0.5 0 0.5 1 1.5 2 2.5 3 ∆ p (x 10−3) 800 0.9 700 0.8 600 0.7 Execution Probability Expected Time−to−Fill Figure 4-21: The comparison between the first passage time and our model based on survival analysis using time-to-fill measures for the stock AZN. The upper limit of 3,600 seconds is used for calculation (T = 3600 in Equation 4.23). The left figure shows expected time-to-fill within 3,600 seconds. The right figure shows execution probability within 3,600 seconds. 500 400 300 200 0.5 0.4 0.3 100 0.2 First Passage Time Our Model 0 −15 0.6 −10 First Passage Time Our Model −5 0 5 0.1 −15 10 ∆ p (x 10−3) −10 −5 0 5 10 −3 ∆ p (x 10 ) Figure 4-22: The comparison between the first passage time and our model based on survival analysis using time-to-fill measures for the stock DEB. The upper limit of 3,600 seconds is used for calculation (T = 3600 in Equation 4.23). The left figure shows expected time-to-fill within 3,600 seconds. The right figure shows execution probability within 3,600 seconds. 85 4.5 Conclusion This chapter presents parametric models of limit order execution and cancellation times. By introducing generalized Weibull distribution, namely q-Weibull, I show the model fits the data remarkably well including removal time’s diffusive behavior decaying asymptotically in time as a power law. When there are too many censored observations in the data, I find that survival analysis cannot accurately estimate the tail part of the q-Weibull distribution. Since time-to-fill process is a censoring process of time-to-cancel and vice versa, I overcome this problem by fist modeling one of the removal time processes with less number of censored observations, then deriving the other process from it. I show that resulting removal time model simulates observed time-to-fills and time-to-cancels close to the empirical distributions. I also extend the modeling method to estimate conditional removal times introducing limit price and limit size as conditional variables. Using smoothing splines to model the change of parameter estimates over different conditional values, I present a parametric form for the conditional limit order removal time model. I find that time-to-fills and time-tocancels are quite sensitive to limit price and limit size respectively. Given the values of these conditionals I show that conditional model simulates observed removal times closer to the empirical distributions. I also explore the changes in tail exponents of the conditional removal time model over different conditional values. I find that as the limit order is placed at a price farther away from the midpoint price, the tail exponent of time-to-fill model becomes smaller indicating fatter tail. Similar to time-to-fill, time-to-cancel distributions generally results fatter tail when the limit size becomes larger. The fatter tail implies slower rate of decay of survival probabilities meaning we expect more un-executed and un-cancelled orders given τ for timeto-fill and time-to-cancel respectively. Lastly I explore an alternative method of dealing with censored data problem using empirical first-passage times widely used in other literatures (Handa and Schwartz, 1996; Angel, 1994; Battalio et al., 1999). The method already has a limitation of dealing censored data problem only when modeling time-to-fills because it can only provide hypothetical time-to-fills. Similar to the result shown in Lo et al. (2002), the method performs very poorly especially when we model time-to-fills for illiquid stocks. 86 Chapter 5 Order Flow Simulation 5.1 Introduction In this chapter I describe a procedure of simulating order flow using the model described in Chapter 3. I then compare the price return statistics of simulated data to the empirical data. For the comparison, I focus on three statistical properties of stock returns: fat-tailed distribution of returns, clustered volatility, and no autocorrelation of returns. The order flow model simulates order placement and cancellation using three components: order sign, price, and cancellation time models. There is no direct link between the statistics of placement/cancellation processes and the statistics of resulting price returns. Surprisingly, the results show that the model can successfully replicate the statistical properties of stock returns observed in the empirical data. 5.2 Simulation Procedure The order flow is simulated using order placement and cancellation models described in Chapter 3 and 4. A price of an order is sampled from IOHMM, which simulates price sequences conditioned on previous state and bid/ask spread. A side (buy or sell) of an order is sampled from FARIMA model, which simulates long memory process of transaction signs. Finally a cancellation time of an order is simulated from q-Weibull distribution estimated from the empirical data using survival analysis. As in the LSE, a simple double auction market mechanism is used to match the order and from this, transaction prices are simulated. Figure 5-1 depicts the procedure of order flow simulation. 87 ψ p Price Order Sign Order τ Cancellation Time Volume Order Book Price Figure 5-1: Description of Order Flow Simulation 5.3 Simulation Results In this section, I compare the statistical properties of the empirical stock returns to the simulated returns. There has been many empirical studies of statistical properties of stock returns – fat-tailed returns distributions, clustered volatility, and market efficiency. I will address all three properties of price returns and show that our order flow model can successfully replicate them. 5.3.1 Fat-Tailed Returns A price return at time t is a logarithm difference of mid-prices at time t and t − 1, rt = log(pt ) − log(pt−1 ), (5.1) where a mid-price at time t is an average of bid and ask prices at time t, pt = pask,t + pbid,t . 2 (5.2) Figure 5-2 shows the probability densities of acutal (black) and simulated price (red) returns in semi-logarithmic scale. It shows the simulated order flow formed a fat-tailed return distribution close to the actual data. The figure also shows the probability density function of Gaussian (green), which has a parabolic shape in semi-logarithmic scale. Both the actual and the simulated returns have fatter tail than the Gaussian density. 88 0 10 Actual Simulated Gaussian −1 10 −2 PDF 10 −3 10 −4 10 −6 −4 −2 0 2 Return 4 6 8 −3 x 10 Figure 5-2: The PDFs of actual (black) and simulated (red) returns for the stock AZN. The Gaussian PDF (green) is also shown to emphasize the fat-tail of return distributions. 106 event times are simulated from the order flow model. 5.3.2 Clustered Volatility Figure 5-3 shows autocorrelation of absolute return series |rt | of both actual and simulated data. Having a positive autocorrelation of absolute returns indicates a large (small) price moves are more likely to be followed by large (small) price moves. The figure shows the simulated data closely replicates the well known pheneomenon of clustered volatility. 5.3.3 Market Efficiency The weak form of Efficient Market Hypothesis (EMH) asserts that future price returns cannot be predicted from past returns (Fama, 1965; Samuelson, 1965; Fama, 1970). This can be verified by the autocorrelation function of price returns. Figure 5-4 shows the autocorrelation of actual and simulated returns. Similar to actual data, the simulated data showed no autocorrelation, which leads to an interesting puzzle of price returns. Let’s describe return rt as the following rt = Ψt P I(vt ) + ηt , 89 (5.3) 0.35 Actual |r| Simulated |r| 0.3 Autocorrelation 0.25 0.2 0.15 0.1 0.05 0 0 10 20 30 40 50 60 70 80 90 100 Lag Figure 5-3: Autocorrelation of actual (black) and simulated (red) absolute return series |r| for the stock AZN. 106 event times are simulated from the order flow model. 0.1 Actual r Simulated r 0.05 Autocorrelation 0 −0.05 −0.1 −0.15 −0.2 −0.25 0 10 20 30 40 50 60 70 80 90 100 Lag Figure 5-4: Autocorrelation of actual (black) and simulated (red) return series r for the stock AZN. 106 event times are simulated from the order flow model. 90 where Ψt is an transaction sign of an order flow, P I(vt ) is a price impact of order size vt , and ηt is a random noise. If Equation 5.3 is a true description of returns and assuming the variance of random noise ηt is small, return series has to be positively autocorrelated in both actual and simulated cases since we know that transaction signs are postively autocorrelated. An alternative description of price return is introduced by Lillo and Farmer (2004), rt = Ψt P I(vt ) + ηt , ζt (5.4) where ζt is a measure of liquidity of the market at time t. If the transaction sign Ψt and the liquidity ζt are positively correlated, we can explain the market efficiency. In Chapter 6 I introduce a possible measure of market liquidity ζt to show how simulated price returns can satisfy the weak form of EMH. The further details of theory of price impact and market liquidity described in this section are described in Gerig (2007). 5.4 Conclusion We simulated an artificial “zero intelligence” order book and showed that the model replicates statistical properties of price returns, such as clustered volatility, fat-tailed return distribution, and no predictability of future returns. We argued that the change in market liquidity explains how the order flow model satisfies the weak form of the Efficient Market Hypothesis (EMH), which asserts that future price returns cannot be predicted from past returns. This is not an obvious result since the order flow model has a predictable transaction sign process (i.e. buyer or seller initiated trades) as one of its components. In Chapter 6, we introduce a method of quantifying market liquidity from order flow data to explain this result. 91 Chapter 6 Liquidity Measure 6.1 Introduction The term liquidity refers to different aspects of markets, such as price impact, time-to-fill, and probability of fill of various orders. Generally, liquidity means an ability to quickly trade stocks without causing a significant impact on the stock price. Although the term liquidity is widely used in finance literatures, its meaning is loosely defined and there is no quantitative measure for it. In Chapter 5, I showed that our order flow model simulates price return series rt with no autocorrelation even when the transact sign series Ψt is a long memory process. Such phenomenon can be explained from the following model of price return. Here I assume that random noise ηt in Equation 6.1 is small enough so that it has almost no effect on price returns. It is safe to ignore the noise since it is not clear what the noise variable is referring to in the return model. Therefore, the modified price return model is, rt = Ψt P I(vt ) , ζt (6.1) where P I(vt ) is a price impact function of order size vt , and ζt is a liquidity measure. Our order flow model simulates long memory transact signs Ψt , and since all the volume vt are fixed, we can assume that the price impact P I(vt ) is constant for every transactions. In order for this model to simulate a series of returns with no autocorrelation, a liquidity measure ζt has to scale down the price impact P I(vt ) when the transact signs are highly predictive. This means the predictability of transact sign Ψt and liquidity measure ζt are 92 positively correlated. In this chapter we introduce a possible quantitative measure of market liquidity ζt , which affects price returns to become a no memory process. 6.2 Liquidity Measure The quantitative measure of market liquidity is derived by answering the following questions. Given a current market state: • What is the expected cost of immediacy paid by traders who place market orders (i.e. liquidity takers)? • In order to save this expected cost, what is the expected wait time for traders who place limit orders (i.e. liquidity providers)? To compute the expected wait time for saving the expected cost of immediate executions, the above two questions need to be answered. Notice that the liquidity measure I am proposing is the relative measure, meaning the increase (decrease) in liquidity can occur in two ways. For instance a longer expected wait time refers to a greater market liquidity and this can occur by liquidity takers (market order placers) taking lesser liquidities (standing limit orders) by placing lesser market orders, or liquidity providers (limit order placers) providing more liquidities by placing more limit orders. In both cases, the expected wait time will increase indicating increase in liquidity. The similar argument can be made for the shorter expected wait time, which refers to decrease in market liquidity. Our approach is to measure ζt using the orders placed within the fixed interval in event times. The expected cost of market orders are computed by taking an average of the absolute differences of the transacted price and the same best price of market orders. For instance when a share of buy market order is transacted at £10.10 and the same best price (bid price) at that time is at £10.00, the cost paid by the trader who submitted this market order is £0.10. I defined this to be the cost of the market order since a share could have been bought at the bid price (£10.00) by waiting. Therefore the average cost of market order pm is defined as pm = Nm 1 X |pi,m − pi,sb |, Nm i=1 93 (6.2) where Nm is the number of market orders submitted, pi,m is the i’th market order’s transacted price, and pi,sb is the same best price when the i’th market order is submitted. Equation 6.2 provides the answer to the first question mentioned above – the expected cost paid by liquidity takers for the immediate transactions. The expected wait time for liquidity providers to save pm by placing limit orders can be computed using the limit order data. First let’s assume that all the limit orders in our order flow data are executed. Then the average gain p` by waiting is N 1 X̀ p` = |pi,` − pi,ob |, N` (6.3) i=1 where N` is the number of limit orders submitted, pi,` is the i’th limit order’s limit price, and pi,ob is the opposite best price when the i’th limit order is submitted. However, Equation 6.3 assumes the wait time τ is long enough that all the limit orders are executed. To compute the expected gain p0` by waiting for a particular wait time τ , we introduce our q-Weibull time-to-fill model defined in Chapter 4 to this equation p0` = (1 − Se (τ )) · p` N τ α 2−q 1 X̀ 1−q = 1 − 1 − (1 − q) |pi,` − pi,ob |, λ N` (6.4) i=1 where Se (τ ) is a survival probability, and q, α, λ are the q-Weibull parameters of the timeto-fill model. Then the expected wait time τ for liquidity providers to save pm can be solved by setting the Equation 6.2 equal to the Equation 6.4, and solving for τ pm p` 1−q 2−q 1− τ = q−1 1 α − 1 · λ. (6.5) Based on the analyses which I describe in the following sections, I found that the logarithm of τ turns out to be a plausible measure for market liquidity ζt = log(τ ). 94 (6.6) In the following section, I compute liquidity measures of simulated order flow and explain how the return series model (Equation 6.1) can produce a no memory return series. 6.3 Analyses on Simulated Data Using simulated order flow, liquidity measures ζt ’s are computed. I used 1,000 events window of order flow data, and the window is moved 500 events at each step to compute the next ζt . This makes each window to contain 500 overlapping events with the prior window. I have simulated order flow of 1 million events, which results 1,999 ζt ’s. Initially I computed two different liquidity measures for each window – buy and sell liquidities. The buy (sell) liquidity is computed using only buy (sell) orders, which refers to a liquidity of demand (supply) side of the order book. To see how liquidities change over predictability of transaction signs, I compute transaction sign probability for each transaction using FARIMA model introduced in Chapter 3. From this I separately compute averages of (1) P (buy) − 0.5 when P (buy) > 0.5, and (2) P (sell) − 0.5 when P (sell) > 0.5. The greater these values refers to the greater deviation from chance meaning greater predictability of transaction signs. Figure 6-1 shows correlations of buy/sell liquidities and predictability of buy/sell transaction signs for the stock AZN. The high predictability of a buyer initiated transaction means there has been more buyer initiated transactions in the past. This is due to the fact that the transaction sign series are strongly and positively autocorrelated. Since there were more buyer initiated transactions in the past, we expect less liquidities in the supply side of the order book. Also more buyer initiated transactions means less seller initiated transactions, therefore, this will result more liquidities in the demand side of the order book. This explains the strong positive and negative correlations of predictability of buy transaction signs versus buy and sell liquidities in figure 6-1 (a) & (c) respectively. The similar argument can be made to explain the figure 6-1 (b) & (d) with the case when there is high predictability of seller initiated transaction. The same analysis is applied to the remaining 8 stocks and the results are persistent throughout all of them. The Pearson’s linear correlation coefficient ρ’s are reported in Table 6.1. 95 (b) ρ = −0.57 0.16 Avg. Sell Predictability Avg. Buy Predictability (a) ρ = 0.65 0.14 0.12 0.1 0.08 0.06 0.15 0.1 0.05 0.04 4 5 6 7 8 Buy Liquidity ζ 4 t 5 Avg. Excess Sell Probability Avg. Buy Predictability 0.14 0.12 0.1 0.08 0.06 0.04 5 6 8 (d) ρ = 0.68 0.16 4 7 t (c) ρ = −0.60 3 6 Buy Liquidity ζ 7 Sell Liquidity ζ 8 9 0.15 0.1 0.05 3 t 4 5 6 7 Sell Liquidity ζ 8 9 t Figure 6-1: Correlations of buy/sell transaction sign predictabilities vs. buy/sell liquidities for the stock AZN. Pearson’s linear correlation coefficient ρ’s are reported in the figure. Symbol Buy Liquidity Sell Liquidity Buy Predictability Sell Predictability Buy Predictability Sell Predictability AZN 0.65 -0.57 -0.60 0.68 BLT 0.51 -0.43 -0.41 0.50 BSY 0.56 -0.45 -0.39 0.55 LLOY 0.72 -0.63 -0.63 0.72 PRU 0.68 -0.59 -0.56 0.64 RTO 0.64 -0.48 -0.34 0.50 RTR 0.66 -0.58 -0.54 0.62 TSCO 0.67 -0.51 -0.56 0.66 VOD 0.64 -0.49 -0.66 0.71 Table 6.1: Pearson’s correlation coefficients of buy/sell transaction sign predictabilities vs. buy/sell liquidities for all 9 stocks. 96 ρ = 0.45 0.17 Order Sign Predictability 0.16 0.15 0.14 0.13 0.12 0.11 4.5 5 5.5 Total Liquidity ζ 6 6.5 t Figure 6-2: Correlation of transaction sign predictability vs. total liquidity for the stock AZN. Pearson’s linear correlation coefficient ρ is reported in the figure. Stock AZN BLT BSY LLOY PRU RTO RTR TSCO VOD ρ 0.45 0.28 0.33 0.27 0.23 0.43 0.37 0.53 0.42 Table 6.2: Pearson’s correlation coeffiencts of transaction sign predictability vs. total liquidity for all 9 stocks. To explain how the price return model of Equation 6.1 can generate the return series rt with zero autocorrelation, we need to compute the total liquidity and the average transaction sign predictability of the market. The total liquidity is computed using both buy and sell orders. Similarly the average transaction sign predictability is computed by averaging the absolute value of transaction sign probabilities deviating from chance, which is |P (buy)−0.5|. Figure 6-2 shows a correlation of average transaction sign predictor versus the total market liquidity measure for the stock AZN. The figure shows a positive correlation between the predictability of Ψt and the liquidity measure ζt , and this explains why the proposed return model generates return series with no memory even when the transaction signs have strong positive autocorrelation. The same analysis is applied to the remaining 8 stocks and the results are persistent across all stocks. In addition to this, I simulate price return series directly from the price return model 97 Figure 6-3: Autocorrelation of simulated transaction signs and price return series for the stock AZN suggested in Equation 6.1. From simulated order flow, I first compute the probability of transaction sign Ψt and the liquidity measure ζt at time t, then infer the price return rt from the price return model. Figure 6-3 shows the autocorrelations of simulated transaction signs and price returns. It shows that although the transactions signs are positively autocorrelated, the autocorrelation of price returns quickly dies out. If transaction signs Ψt ’s have strong positive autocorrelation and are positively correlated with liquidity measures ζt ’s, the liquidity measure should also be positively autocorrelated. Figure 6-4 shows autocorrelation functions of buy, sell, and total liquidities of the stock AZN. Every other liquidity values are used to avoid the bias due to overlapping windows. In all three cases – especially the total liquidity – we see a positive autocorrelation. This result has a very interesting implication – by seeing the past liquidities we can predict the future liquidity. 98 (a) Buy Side Liquidity Autocorrelation 0.5 0.4 0.3 0.2 0.1 0 −0.1 0 10 20 30 40 50 60 70 80 90 100 70 80 90 100 70 80 90 100 Lag (b) Sell Side Liquidity Autocorrelation 0.5 0.4 0.3 0.2 0.1 0 −0.1 0 10 20 30 40 50 60 Lag (c) Total Liquidity 0.6 Autocorrelation 0.5 0.4 0.3 0.2 0.1 0 −0.1 0 10 20 30 40 50 60 Lag Figure 6-4: Autocorrelation functions of (a) buy, (b) sell, and (c) total liquidity measure for the stock AZN. Every other liquidity values are used to avoid the bias due to overlapping windows. 99 6.4 Analysis of Real Data In this section we use our method of measuring market liquidity on a real data set. The window size of 1,000 event times is used to calculate total liquidities. Figure 6-5 shows the change in total liquidities over time for the stock AZN. The figure shows a monthly pattern in change in liquidity. AZN 5 2001 2002 4.5 4 3.5 ζt 3 2.5 2 1.5 1 0.5 0 0 500 1000 1500 2000 2500 3000 3500 4000 t Figure 6-5: Change in total liquidities for the stock AZN. Figure 6-6 shows change in total liquidities for the remaining 8 stocks. Similar to AZN, all 8 stocks seem to have similar patterns in change in market liquidity. 6.5 Discussion In this chapter we introduce a method of calibrating market liquidity from the order flow data. We verify our method by showing the correlation between order sign predictability and the liquidity measure. This explains why the price return series is not autocorrelated when the transact sign series is a long memory process. We also applied our method on real order flow data and identified patterns in change in market liquidity. 100 BLT BSY 7 2001 5 2002 4 2002 5 3 ζt ζt 2001 6 4 3 2 2 1 0 1 0 200 400 600 800 1000 1200 1400 0 1600 0 500 1000 1500 t t LLOY PRU 2000 8 2001 2002 4 ζt ζt 2001 5 2002 6 4 3 2 2 1 0 0 6 500 1000 1500 2001 2000 2500 0 3000 0 500 1000 1500 t t RTO RTR 4 2002 2001 2000 2500 2002 5 3 ζt ζt 4 3 2 2 1 1 0 0 200 400 600 800 1000 0 1200 0 500 1000 t 1500 2000 2500 t TSCO VOD 8 6 2001 2001 2002 2002 5 6 ζt ζt 4 4 3 2 2 1 0 0 200 400 600 800 1000 1200 1400 1600 1800 0 2000 t 0 500 1000 1500 2000 2500 3000 3500 t Figure 6-6: Change in total liquidities for the remaining 8 stocks. 101 4000 4500 5000 Chapter 7 Conclusion In the first part of this thesis, I demonstrated statistical modeling techniques to model order flow generation, which is a liquidity generation process for financial markets. I have shown that simulation of the order flow model successfully replicates various statistical properties of price returns, such as clustered volatility, fat-tailed return distribution, and no predictability of future returns. In the second half of the thesis, I argued that the change in market liquidity explains how my order flow model satisfies the weak form of the Efficient Market Hypothesis (EMH), which asserts that future price returns cannot be predicted from past returns. This is not an obvious result since the order flow model has a predictable transaction sign process (i.e. buyer or seller initiated trades) as one of its components. Then a method of quantifying market liquidity from order flow data is introduced to explain this result. The method of quantifying market liquidity introduced in the thesis introduces a new set of interesting future research topics in financial markets. For instance, I have shown that there exists some interesting patterns of liquidity measures in the real market data. A study of why such patterns emerges from the market data may help us better understand the market dynamics. Another interesting study is to integrate the liquidity measure into existing financial models. 102 Appendix A Order Flow Model Parameter Estimates A.1 Order Sign Model Parameter Estimates Symbol dˆ AZN BLT BSY LLOY PRU RTO RTR TSCO VOD 0.1753 0.2012 0.1847 0.2002 0.1800 0.2293 0.2411 0.1933 0.2772 Table A.1: FARMA(0, d, 0) parameter estimates for the 9 stocks. An expected transact sign will be computed from ˆ 0) model using the following equation, FARIMA(0, d, Ψ̂t = k X βkj Ψt−j , j=1 where Ψt−j is a transact sign at time t − j. Given a gamma function Γ(·), βkj is βkj ˆ k Γ(j − d)Γ(k − dˆ − j + 1) =− . ˆ j Γ(−d)Γ(k − dˆ + 1) Then at time t, the order sign ψt can be sampled according to the following probabilities, P (buy) = 103 Ψ̂t + 1 , P (sell) = 1 − P (buy). 2 A.2 Price Model Parameter Estimates A price series is modeled with an IOHMM. The top table shows parameter estimates for the output probabilities. At time t, a price pt is sampled from the following conditional probability. Given state i and bid-ask spread xt , P (pt |st = i, xt ) = 2 X P (mt = k|st = i)P (pt |st = i, mt = k, xt ). k=1 All of our price models use 2 mixture components and values of P (mt = k|St = i) for k = 1, 2 are shown in the first two columns of the top table. The rest of the table show parameters for the second conditional probability in the above equation, which is a conditional Gaussian as the following, P (pt |st = j, mt = k, xt ) = σjk 1 √ (pt − Bjk xt − µjk )2 exp − 2 2σjk 2π ! . The next two tables are values for transition and initial state probabilities P (St = j|St−1 = i) and P (S1 = i). Since IOHMM states are discrete, values are presented as lookup tables. 104 105 0.161 0.002 0.000 0.003 0.008 0.028 0.001 0.160 0.010 0.000 0.010 0.000 1 2 3 4 5 6 7 8 9 10 11 12 0.009 0.611 0.001 0.023 0.044 0.018 0.002 0.011 0.012 0.011 0.013 0.040 2 ωi,m 0.953 0.344 0.492 0.974 0.109 0.001 0.257 0.112 0.966 0.736 0.997 0.690 m=2 -16.70 -29.87 -9.92 -72.36 -70.10 -388.65 -70.17 -52.76 -193.70 -171.01 -70.72 -116.18 m=1 Bi,m -83.06 -30.59 -21.53 -355.42 -175.50 -25.10 -109.74 -7.90 -146.42 -2.95 -6.40 -36.66 m=2 0.088 3.579 -0.072 -2.155 0.269 0.032 1.128 0.273 0.085 1.428 -2.166 -0.606 m=1 µi,m 0.526 0.104 -0.048 1.135 0.194 0.288 -0.012 -0.042 0.294 -0.060 0.023 -0.083 m=2 m=1 0.106 17.853 0.058 0.046 0.165 0.021 0.337 0.162 0.067 1.674 0.048 0.416 0.000 0.005 0.793 0.001 0.003 0.135 0.000 0.000 0.005 0.000 0.000 0.008 3 0.007 0.024 0.000 0.287 0.041 0.050 0.007 0.032 0.030 0.044 0.011 0.017 4 0.001 0.009 0.000 0.009 0.186 0.035 0.000 0.001 0.011 0.001 0.006 0.000 5 0.054 0.092 0.203 0.191 0.471 0.294 0.004 0.067 0.522 0.127 0.040 0.060 6 0.003 0.004 0.000 0.007 0.000 0.002 0.969 0.001 0.000 0.003 0.000 0.000 7 0.598 0.029 0.000 0.073 0.012 0.041 0.002 0.673 0.008 0.004 0.015 0.000 8 0.007 0.029 0.002 0.019 0.096 0.147 0.000 0.008 0.387 0.010 0.001 0.001 9 0.001 0.085 0.000 0.340 0.032 0.211 0.015 0.008 0.010 0.791 0.007 0.018 10 0.159 0.105 0.000 0.046 0.106 0.034 0.000 0.039 0.004 0.008 0.897 0.000 11 0.000 0.006 0.000 0.001 0.000 0.003 0.000 0.000 0.000 0.000 0.000 0.856 12 Table A.3: IOHMM transition probabilities of order price model for stock AZN. 1 HH j i HH 0.047 0.656 0.508 0.026 0.891 0.999 0.743 0.888 0.034 0.264 0.003 0.310 m=1 σi,m 0.189 0.120 0.070 0.311 0.108 0.190 0.089 0.053 0.169 0.050 0.069 0.601 m=2 1 2 3 4 5 6 7 8 9 10 11 12 i 0.000 0.462 0.000 0.005 0.000 0.110 0.000 0.000 0.000 0.292 0.045 0.086 P (S1 = i) Table A.4: IOHMM initial state probabilities of order price model for stock AZN. Table A.2: Parameter estimates of IOHMM output probability of order price model for stock AZN. The output pt ’s are scaled by its standard deviation 0.0026. 1 2 3 4 5 6 7 8 9 10 11 12 i AZN 106 i j 0.449 0.001 0.010 0.000 0.033 0.050 0.043 0.038 0.014 0.001 0.001 0.006 0.016 0.002 0.005 0.014 1 0.001 0.687 0.000 0.064 0.000 0.226 0.000 0.000 0.000 0.445 0.128 0.000 0.000 0.000 0.000 0.006 2 0.012 0.000 0.061 0.000 0.002 0.000 0.010 0.000 0.002 0.000 0.000 0.023 0.032 0.014 0.047 0.016 3 ωi,m 0.296 0.960 0.026 0.377 0.977 0.830 0.959 0.814 0.842 0.549 0.499 0.033 0.906 0.999 0.868 0.607 m=2 0.58 -96.25 -52.85 -97.69 -279.92 -34.08 -221.54 -194.13 -197.67 -4.00 4.37 -1.27 -245.64 79.96 -368.75 -354.17 m=1 Bi,m -21.35 0.82 -111.36 -27.58 -64.36 -106.32 -120.33 -60.65 -103.20 -76.44 -145.49 -44.07 16.20 -75.23 -11.24 -88.04 m=2 -0.103 -1.595 0.709 -1.310 -0.088 0.118 -0.074 0.022 -0.082 -1.149 -0.530 -0.110 -0.720 -7.917 0.092 0.016 m=1 µi,m 6.012 -0.261 -3.515 -0.102 0.680 1.310 0.473 1.827 1.116 -0.911 -1.821 -1.929 0.139 0.271 -0.038 0.136 m=2 0.000 0.009 0.000 0.755 0.000 0.006 0.000 0.000 0.000 0.015 0.032 0.000 0.000 0.000 0.000 0.002 4 0.018 0.000 0.004 0.000 0.205 0.000 0.275 0.002 0.002 0.000 0.000 0.002 0.032 0.176 0.013 0.000 5 0.028 0.096 0.000 0.012 0.000 0.603 0.000 0.000 0.000 0.045 0.052 0.000 0.000 0.000 0.000 0.005 6 0.006 0.000 0.002 0.000 0.036 0.000 0.045 0.002 0.001 0.000 0.000 0.002 0.017 0.017 0.001 0.000 7 0.025 0.008 0.004 0.020 0.007 0.002 0.018 0.254 0.034 0.002 0.004 0.081 0.029 0.002 0.003 0.043 8 0.024 0.000 0.000 0.000 0.000 0.002 0.005 0.020 0.575 0.001 0.000 0.069 0.074 0.009 0.000 0.003 9 0.000 0.118 0.000 0.039 0.000 0.017 0.000 0.000 0.000 0.356 0.022 0.000 0.000 0.000 0.000 0.001 10 0.000 0.011 0.000 0.008 0.000 0.003 0.000 0.000 0.000 0.005 0.751 0.000 0.000 0.000 0.000 0.000 11 0.062 0.000 0.151 0.000 0.035 0.001 0.070 0.306 0.301 0.000 0.000 0.721 0.025 0.002 0.005 0.026 12 0.010 0.000 0.011 0.000 0.014 0.000 0.068 0.008 0.018 0.000 0.000 0.003 0.759 0.003 0.000 0.000 13 0.018 0.000 0.031 0.000 0.422 0.000 0.369 0.008 0.044 0.000 0.000 0.001 0.009 0.768 0.003 0.000 14 0.064 0.712 0.158 0.226 1.967 1.094 0.093 0.201 0.127 0.077 0.362 0.067 0.617 2.223 0.030 0.018 m=1 0.106 0.000 0.650 0.000 0.246 0.000 0.094 0.063 0.006 0.000 0.000 0.005 0.005 0.007 0.908 0.011 15 Table A.6: IOHMM transition probabilities of order price model for stock BLT. HH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HH 0.704 0.040 0.974 0.623 0.023 0.170 0.041 0.186 0.158 0.451 0.501 0.967 0.094 0.001 0.132 0.393 m=1 σi,m 5.082 0.069 2.270 1.153 0.114 16.855 0.276 1.875 0.632 0.260 0.565 0.217 0.218 0.260 0.082 0.236 m=2 0.242 0.071 0.076 0.101 0.001 0.089 0.003 0.298 0.003 0.128 0.009 0.087 0.001 0.001 0.015 0.872 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 i 0.131 0.237 0.000 0.019 0.000 0.388 0.000 0.002 0.000 0.098 0.055 0.070 0.000 0.000 0.000 0.000 P (S1 = i) Table A.7: IOHMM initial state probabilities of order price model for stock BLT. Table A.5: Parameter estimates of IOHMM output probability of order price model for stock BLT. The output pt ’s are scaled by its standard deviation 0.0028. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 i BLT 107 0.725 0.009 0.000 0.182 0.000 0.001 0.000 0.000 0.000 0.000 0.000 0.000 1 2 3 4 5 6 7 8 9 10 11 12 0.007 0.886 0.000 0.012 0.000 0.001 0.000 0.001 0.004 0.000 0.000 0.000 2 ωi,m 0.810 0.607 0.557 0.911 0.374 0.255 0.985 0.497 0.586 0.332 0.005 0.713 m=2 -16.75 -152.77 -105.00 -26.28 -5.87 -17.58 -322.91 -6.98 -13.53 -61.36 -5.46 19.69 m=1 Bi,m -1.52 -29.12 -0.66 -17.52 -5.10 -102.14 -134.35 -318.00 -158.15 -4.55 -120.61 -244.63 m=2 -2.569 -0.639 1.596 -0.631 -0.060 -1.444 -0.556 -0.102 -0.221 0.525 -0.057 2.825 m=1 µi,m -0.150 -0.195 -0.111 4.169 -0.071 -1.379 0.531 0.046 -0.101 -0.023 -1.669 0.868 m=2 0.003 0.002 0.664 0.035 0.004 0.680 0.037 0.037 0.000 0.005 0.002 0.050 3 0.259 0.025 0.008 0.573 0.000 0.000 0.000 0.003 0.002 0.000 0.000 0.003 4 0.000 0.000 0.029 0.016 0.349 0.000 0.037 0.016 0.000 0.040 0.070 0.028 5 0.004 0.002 0.034 0.000 0.004 0.076 0.006 0.006 0.000 0.004 0.004 0.003 6 0.000 0.000 0.062 0.013 0.051 0.005 0.259 0.139 0.000 0.275 0.022 0.031 7 0.001 0.061 0.089 0.102 0.221 0.211 0.419 0.580 0.124 0.255 0.109 0.566 8 0.001 0.011 0.001 0.013 0.000 0.000 0.000 0.011 0.865 0.000 0.000 0.000 9 0.000 0.000 0.001 0.002 0.025 0.000 0.123 0.075 0.000 0.260 0.009 0.041 10 0.000 0.000 0.032 0.048 0.312 0.000 0.073 0.039 0.000 0.138 0.771 0.072 11 5.891 0.706 0.955 0.266 0.074 0.239 0.835 0.066 0.117 0.259 0.071 6.672 m=1 0.000 0.004 0.080 0.003 0.033 0.025 0.046 0.093 0.005 0.023 0.014 0.205 12 Table A.9: IOHMM transition probabilities of order price model for stock BSY. 1 HH j i HH 0.190 0.393 0.443 0.089 0.626 0.745 0.015 0.503 0.414 0.668 0.995 0.287 m=1 σi,m 0.108 0.817 0.086 9.850 0.068 9.247 0.255 0.023 0.090 0.118 0.121 0.329 m=2 1 2 3 4 5 6 7 8 9 10 11 12 i 0.476 0.007 0.104 0.327 0.000 0.000 0.007 0.063 0.000 0.005 0.000 0.011 P (S1 = i) Table A.10: IOHMM initial state probabilities of order price model for stock BSY. Table A.8: Parameter estimates of IOHMM output probability of order price model for stock BSY. The output pt ’s are scaled by its standard deviation 0.0032. 1 2 3 4 5 6 7 8 9 10 11 12 i BSY 108 0.443 0.679 0.073 0.138 0.582 0.037 0.040 0.702 0.291 0.997 m=1 ωi,m 0.557 0.321 0.927 0.862 0.418 0.963 0.960 0.298 0.709 0.003 m=2 -156.81 54.29 -105.01 -13.86 -16.57 373.31 116.86 -13.60 -28.06 -311.18 m=1 Bi,m -2.25 -78.95 130.44 -111.04 -16.89 -35.20 -121.47 -369.78 -354.38 -212.55 m=2 1.810 2.860 -2.032 0.253 -0.011 0.872 -1.797 -0.027 -0.076 1.092 m=1 µi,m -0.140 0.150 0.693 -0.019 -0.005 0.204 0.478 -0.262 0.066 0.353 m=2 1.689 13.252 0.060 0.611 0.092 3.299 0.144 0.904 0.068 0.338 m=1 σi,m 0.080 0.151 0.508 0.066 0.094 0.201 0.235 0.383 0.026 0.147 m=2 0.853 0.024 0.015 0.000 0.002 0.000 0.004 0.034 0.027 0.056 1 2 3 4 5 6 7 8 9 10 0.016 0.485 0.006 0.001 0.025 0.000 0.011 0.022 0.028 0.021 2 0.001 0.000 0.076 0.000 0.011 0.015 0.136 0.000 0.023 0.005 3 0.001 0.012 0.000 0.626 0.001 0.000 0.000 0.000 0.111 0.001 4 0.022 0.207 0.372 0.000 0.643 0.065 0.196 0.000 0.255 0.092 5 0.000 0.000 0.075 0.000 0.010 0.899 0.011 0.000 0.008 0.005 6 0.003 0.005 0.159 0.000 0.026 0.002 0.232 0.000 0.053 0.091 7 0.001 0.002 0.000 0.000 0.000 0.000 0.000 0.905 0.001 0.000 8 0.082 0.255 0.269 0.372 0.271 0.017 0.296 0.019 0.410 0.481 9 0.020 0.011 0.027 0.001 0.011 0.001 0.115 0.020 0.082 0.248 10 Table A.12: IOHMM transition probabilities of order price model for stock LLOY. 1 HH j i HH 1 2 3 4 5 6 7 8 9 10 i 0.439 0.367 0.000 0.000 0.041 0.024 0.000 0.021 0.101 0.007 P (S1 = i) Table A.13: IOHMM initial state probabilities of order price model for stock LLOY. Table A.11: Parameter estimates of IOHMM output probability of order price model for stock LLOY. The output pt ’s are scaled by its standard deviation 0.0029. 1 2 3 4 5 6 7 8 9 10 i LLOY 109 i j 0.461 0.451 0.014 0.026 0.000 0.003 0.014 0.262 0.000 0.000 0.010 0.076 0.038 0.000 0.079 0.002 1 0.053 0.054 0.010 0.005 0.000 0.001 0.011 0.021 0.000 0.000 0.007 0.019 0.004 0.000 0.006 0.018 2 0.008 0.030 0.365 0.011 0.015 0.000 0.019 0.054 0.001 0.002 0.005 0.067 0.020 0.000 0.060 0.004 3 ωi,m 0.018 0.994 0.169 0.013 0.941 0.147 0.653 0.650 0.836 0.958 0.033 0.009 0.538 0.563 0.553 0.986 m=2 -22.84 -43.15 -1.86 -3.99 -287.77 -11.95 -0.37 -178.83 -68.06 -106.03 -2.59 -18.24 -6.46 -16.49 55.54 -9.87 m=1 Bi,m -213.79 -84.95 -197.77 -66.34 -40.53 -42.32 -0.13 -318.19 -1.12 -0.93 -41.73 -47.45 -13.49 -180.28 -145.76 -81.15 m=2 0.060 0.473 -0.130 -0.070 -0.307 0.118 -0.133 0.697 0.539 0.255 -0.086 1.380 7.090 -0.163 2.925 0.289 m=1 µi,m 0.317 0.659 -0.631 -1.596 0.349 0.783 -0.135 0.007 -0.084 -0.081 -0.357 0.435 -0.056 -0.055 1.917 0.003 m=2 0.155 0.291 0.067 0.079 0.358 0.197 0.064 0.315 0.557 0.223 0.101 0.825 2.248 0.072 1.710 0.310 m=1 0.037 0.178 0.013 0.745 0.002 0.004 0.010 0.117 0.000 0.001 0.053 0.254 0.046 0.000 0.087 0.001 4 0.000 0.000 0.010 0.001 0.907 0.000 0.004 0.000 0.000 0.000 0.012 0.000 0.017 0.000 0.021 0.000 5 0.002 0.008 0.000 0.000 0.000 0.962 0.000 0.002 0.000 0.000 0.000 0.002 0.002 0.000 0.014 0.000 6 0.003 0.006 0.013 0.005 0.002 0.000 0.179 0.018 0.000 0.007 0.000 0.035 0.007 0.009 0.014 0.035 7 0.392 0.172 0.393 0.149 0.000 0.016 0.269 0.403 0.002 0.012 0.060 0.125 0.132 0.066 0.228 0.540 8 0.000 0.000 0.000 0.000 0.000 0.001 0.001 0.000 0.378 0.274 0.001 0.000 0.012 0.014 0.007 0.003 9 0.000 0.000 0.002 0.000 0.000 0.000 0.020 0.012 0.560 0.692 0.002 0.002 0.018 0.003 0.015 0.002 10 0.001 0.009 0.004 0.008 0.015 0.000 0.000 0.006 0.000 0.000 0.537 0.109 0.031 0.000 0.223 0.002 11 0.010 0.021 0.115 0.030 0.015 0.000 0.055 0.035 0.000 0.001 0.100 0.237 0.014 0.001 0.036 0.024 12 0.003 0.004 0.004 0.002 0.010 0.000 0.002 0.005 0.003 0.001 0.012 0.004 0.555 0.000 0.025 0.002 13 0.001 0.001 0.001 0.000 0.000 0.000 0.070 0.008 0.034 0.002 0.000 0.001 0.004 0.897 0.004 0.015 14 0.022 0.045 0.045 0.009 0.031 0.008 0.039 0.026 0.003 0.005 0.191 0.047 0.051 0.002 0.155 0.011 15 Table A.15: IOHMM transition probabilities of order price model for stock PRU. HH 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 HH 0.982 0.006 0.831 0.987 0.059 0.853 0.347 0.350 0.164 0.042 0.967 0.991 0.462 0.437 0.447 0.014 m=1 σi,m 0.249 0.315 0.685 0.223 0.870 0.254 0.063 0.017 0.061 0.060 0.772 0.328 0.117 0.063 12.273 0.085 m=2 0.008 0.020 0.011 0.008 0.002 0.004 0.306 0.029 0.018 0.003 0.010 0.021 0.049 0.006 0.026 0.341 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 i 0.008 0.036 0.008 0.005 0.111 0.000 0.000 0.074 0.037 0.020 0.375 0.031 0.141 0.000 0.143 0.009 P (S1 = i) Table A.16: IOHMM initial state probabilities of order price model for stock PRU. Table A.14: Parameter estimates of IOHMM output probability of order price model for stock PRU. The output pt ’s are scaled by its standard deviation 0.0031. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 i PRU 110 0.258 0.093 0.927 0.452 0.500 0.741 0.556 0.094 0.223 0.513 m=1 ωi,m 0.742 0.907 0.073 0.548 0.500 0.259 0.444 0.906 0.777 0.487 m=2 1.43 -132.00 34.31 -36.60 -207.13 -0.77 -115.42 -133.63 -46.98 12.04 m=1 Bi,m -188.96 -4.88 -187.43 -282.89 -16.32 -72.96 -164.43 -8.86 -0.77 -108.61 m=2 -0.304 0.538 2.863 0.013 -0.539 -1.228 0.924 -1.666 0.662 0.004 m=1 µi,m 0.014 -0.085 -1.222 0.030 -0.326 -0.088 0.373 -0.030 -0.124 0.455 m=2 0.087 0.390 5.916 0.140 0.679 9.945 1.205 0.062 1.525 0.141 m=1 σi,m 0.099 0.067 0.678 0.020 0.815 1.382 0.237 0.088 0.074 0.331 m=2 0.873 0.000 0.010 0.012 0.016 0.006 0.000 0.000 0.000 0.000 1 2 3 4 5 6 7 8 9 10 0.000 0.856 0.173 0.134 0.000 0.002 0.003 0.000 0.000 0.015 2 0.007 0.006 0.186 0.022 0.018 0.068 0.027 0.016 0.082 0.006 3 0.109 0.137 0.236 0.669 0.059 0.149 0.465 0.023 0.060 0.014 4 0.005 0.000 0.003 0.001 0.889 0.006 0.000 0.001 0.001 0.000 5 0.001 0.000 0.019 0.007 0.012 0.317 0.000 0.007 0.036 0.000 6 0.005 0.000 0.043 0.123 0.000 0.001 0.393 0.007 0.108 0.000 7 0.000 0.000 0.009 0.001 0.000 0.001 0.002 0.943 0.000 0.001 8 0.000 0.000 0.308 0.029 0.006 0.448 0.106 0.000 0.712 0.000 9 0.000 0.001 0.012 0.003 0.000 0.000 0.004 0.003 0.000 0.963 10 Table A.18: IOHMM transition probabilities of order price model for stock RTO. 1 HH j i HH 1 2 3 4 5 6 7 8 9 10 i 0.000 0.000 0.087 0.027 0.000 0.367 0.000 0.000 0.519 0.000 P (S1 = i) Table A.19: IOHMM initial state probabilities of order price model for stock RTO. Table A.17: Parameter estimates of IOHMM output probability of order price model for stock RTO. The output pt ’s are scaled by its standard deviation 0.0036. 1 2 3 4 5 6 7 8 9 10 i RTO 111 0.751 0.001 0.003 0.000 0.000 0.017 0.000 0.010 0.023 0.000 0.003 0.000 1 2 3 4 5 6 7 8 9 10 11 12 0.074 0.621 0.249 0.354 0.495 0.372 0.130 0.081 0.009 0.125 0.069 0.475 2 ωi,m 0.247 0.456 0.677 0.010 0.838 0.138 0.575 0.003 0.758 0.583 0.398 0.032 m=2 -63.85 -4.92 -61.23 -55.85 -148.06 -1.62 -6.30 -147.28 -203.38 0.33 -95.50 -83.69 m=1 Bi,m 13.44 -299.91 -0.88 -16.54 -186.10 -64.74 -5.67 -73.16 -14.57 -212.17 -35.07 -128.62 m=2 -0.779 -0.105 1.833 0.370 0.054 5.729 -0.058 1.010 -1.062 -0.069 -0.158 -1.619 m=1 µi,m -0.324 -0.001 -0.114 0.036 0.756 -0.181 -0.061 -0.877 -0.151 -0.973 -0.230 -1.348 m=2 0.259 0.086 1.571 0.353 0.138 3.323 0.085 6.176 0.439 0.149 0.114 0.232 m=1 0.048 0.069 0.540 0.017 0.059 0.181 0.005 0.420 0.018 0.054 0.002 0.247 3 0.001 0.100 0.034 0.434 0.160 0.058 0.019 0.016 0.001 0.181 0.003 0.044 4 0.021 0.151 0.066 0.116 0.233 0.040 0.017 0.014 0.001 0.573 0.011 0.017 5 0.021 0.007 0.026 0.004 0.004 0.209 0.002 0.023 0.031 0.000 0.002 0.000 6 0.000 0.034 0.027 0.062 0.039 0.066 0.821 0.000 0.000 0.016 0.002 0.194 7 0.064 0.008 0.052 0.004 0.002 0.032 0.000 0.425 0.044 0.001 0.000 0.000 8 0.018 0.000 0.002 0.000 0.000 0.018 0.000 0.010 0.869 0.001 0.000 0.000 9 0.000 0.002 0.000 0.005 0.005 0.000 0.000 0.000 0.000 0.048 0.000 0.001 10 0.001 0.003 0.001 0.001 0.002 0.007 0.001 0.000 0.000 0.001 0.908 0.001 11 0.000 0.004 0.001 0.004 0.001 0.000 0.006 0.000 0.004 0.000 0.001 0.020 12 Table A.21: IOHMM transition probabilities of order price model for stock RTR. 1 HH j i HH 0.753 0.544 0.323 0.990 0.162 0.862 0.425 0.997 0.242 0.417 0.602 0.968 m=1 σi,m 0.234 0.016 0.098 0.183 0.449 0.545 0.083 0.249 0.336 0.666 0.092 2.245 m=2 1 2 3 4 5 6 7 8 9 10 11 12 i 0.057 0.051 0.517 0.001 0.000 0.141 0.000 0.123 0.090 0.001 0.000 0.018 P (S1 = i) Table A.22: IOHMM initial state probabilities of order price model for stock RTR. Table A.20: Parameter estimates of IOHMM output probability of order price model for stock RTR. The output pt ’s are scaled by its standard deviation 0.0033. 1 2 3 4 5 6 7 8 9 10 11 12 i RTR 112 0.969 0.832 0.877 0.883 0.077 0.750 0.432 0.239 0.728 0.230 m=1 ωi,m 0.031 0.168 0.123 0.117 0.923 0.250 0.568 0.761 0.272 0.770 m=2 -4.27 86.23 -375.59 -151.10 -344.75 25.59 -328.59 -130.83 -69.72 -4.41 m=1 Bi,m -258.91 6.34 -158.10 -51.77 -40.36 -146.15 -15.90 3.45 2.07 -0.05 m=2 -0.397 2.177 -0.000 -0.270 -0.524 0.839 1.108 1.764 1.697 -0.397 m=1 µi,m -2.041 -1.122 0.186 0.472 -0.162 0.126 -0.403 0.423 -0.321 0.000 m=2 0.014 13.537 0.010 0.099 0.167 0.136 0.413 1.988 16.046 0.014 m=1 σi,m 0.026 0.150 1.004 1.155 1.236 0.493 0.024 0.020 0.148 0.010 m=2 0.426 0.037 0.012 0.001 0.001 0.000 0.005 0.067 0.004 0.066 1 2 3 4 5 6 7 8 9 10 0.003 0.204 0.023 0.002 0.030 0.019 0.025 0.023 0.066 0.023 2 0.032 0.177 0.276 0.247 0.033 0.071 0.341 0.159 0.016 0.212 3 0.000 0.001 0.017 0.744 0.003 0.000 0.000 0.000 0.000 0.000 4 0.000 0.000 0.002 0.000 0.860 0.000 0.000 0.000 0.036 0.000 5 0.000 0.015 0.017 0.000 0.003 0.505 0.021 0.010 0.003 0.006 6 0.050 0.171 0.230 0.003 0.019 0.076 0.138 0.117 0.004 0.089 7 0.128 0.050 0.089 0.000 0.004 0.066 0.131 0.163 0.005 0.111 8 0.001 0.004 0.003 0.000 0.046 0.000 0.000 0.001 0.839 0.000 9 0.359 0.341 0.333 0.003 0.001 0.263 0.338 0.460 0.029 0.494 10 Table A.24: IOHMM transition probabilities of order price model for stock TSCO. 1 HH j i HH 1 2 3 4 5 6 7 8 9 10 i 0.000 0.000 0.041 0.000 0.134 0.000 0.000 0.038 0.652 0.135 P (S1 = i) Table A.25: IOHMM initial state probabilities of order price model for stock TSCO. Table A.23: Parameter estimates of IOHMM output probability of order price model for stock TSCO. The output pt ’s are scaled by its standard deviation 0.0027. 1 2 3 4 5 6 7 8 9 10 i TSCO 113 0.648 0.000 0.000 0.536 0.162 0.000 0.478 0.281 0.000 0.004 0.001 0.300 0.000 0.000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0.000 0.213 0.049 0.000 0.000 0.003 0.000 0.000 0.064 0.074 0.172 0.000 0.127 0.022 2 0.415 0.481 0.828 0.439 0.550 0.473 0.006 0.117 0.962 0.953 0.909 0.658 0.201 0.855 m=2 -275.98 -56.68 -52.52 -38.02 0.27 -51.87 -100.81 -23.13 -131.59 -28.51 -77.48 41.72 -146.76 -138.39 m=1 Bi,m -110.37 477.13 -40.34 -39.93 -3.84 -49.92 -248.50 -223.56 40.46 0.48 142.17 -32.13 -132.12 -104.20 m=2 0.005 -0.486 -0.498 -0.093 -0.231 -0.497 2.701 -0.063 -0.377 -1.489 -0.443 0.853 -2.937 -0.792 m=1 µi,m 0.223 2.114 -0.529 -0.089 -0.222 -0.503 -0.024 1.707 0.547 -0.001 1.024 -0.062 -0.797 -0.949 m=2 0.014 0.021 0.021 0.074 0.057 0.021 8.412 0.069 0.017 0.205 0.023 0.361 3.403 0.117 m=1 0.000 0.169 0.369 0.000 0.000 0.001 0.001 0.000 0.177 0.246 0.155 0.000 0.261 0.247 3 0.069 0.000 0.000 0.331 0.000 0.000 0.170 0.000 0.000 0.000 0.000 0.004 0.000 0.000 4 0.075 0.000 0.000 0.000 0.465 0.000 0.034 0.315 0.000 0.000 0.000 0.000 0.000 0.000 5 0.000 0.014 0.001 0.000 0.000 0.218 0.000 0.000 0.055 0.027 0.033 0.000 0.000 0.022 6 0.047 0.000 0.000 0.109 0.005 0.000 0.257 0.010 0.000 0.000 0.000 0.012 0.000 0.001 7 0.086 0.000 0.000 0.000 0.368 0.000 0.038 0.394 0.000 0.000 0.000 0.000 0.000 0.000 8 0.000 0.129 0.126 0.000 0.000 0.520 0.000 0.000 0.233 0.164 0.159 0.000 0.128 0.178 9 0.003 0.375 0.382 0.000 0.000 0.205 0.005 0.000 0.404 0.427 0.363 0.000 0.295 0.201 10 0.000 0.086 0.059 0.000 0.000 0.051 0.001 0.000 0.051 0.045 0.102 0.000 0.036 0.058 11 0.072 0.000 0.000 0.023 0.000 0.000 0.014 0.000 0.000 0.000 0.000 0.684 0.000 0.000 12 0.000 0.006 0.005 0.000 0.000 0.000 0.000 0.000 0.004 0.005 0.005 0.000 0.151 0.001 13 0.000 0.008 0.009 0.000 0.000 0.002 0.000 0.000 0.010 0.008 0.011 0.000 0.001 0.270 14 Table A.27: IOHMM transition probabilities of order price model for stock VOD. 1 HH j HH i 0.585 0.519 0.172 0.561 0.450 0.527 0.994 0.883 0.038 0.047 0.091 0.342 0.799 0.145 m=1 ωi,m σi,m 0.194 3.845 0.021 0.074 0.058 0.021 0.024 3.161 0.022 0.010 0.166 0.107 0.108 0.050 m=2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 i 0.306 0.048 0.045 0.058 0.001 0.001 0.382 0.025 0.036 0.054 0.009 0.000 0.022 0.013 P (S1 = i) Table A.28: IOHMM initial state probabilities of order price model for stock VOD. Table A.26: Parameter estimates of IOHMM output probability of order price model for stock VOD. The output pt ’s are scaled by its standard deviation 0.0036. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 i VOD A.3 Cancellation Time Model Parameter Estimates A cancellation time is modeled with a q-Weibull distribution. The functional form for q-Weibull PDF is fc (τ ) = (2 − q) α τ α−1 −( λτ )α eq , λ λ 1/(1−q) ] if 1 − (1 − q)τ ≥ 0 where q-exponential function eq is defined as e−τ q ≡ [1 − (1 − q)τ ] and e−τ q ≡ 0 if 1 − (1 − q)τ < 0. The table below shows q-Weibull parameter estimates for all 9 stocks. The times are measured in event times. Stock q α λ AZN BLT BSY LLOY PRU RTO RTR TSCO VOD 1.43 1.48 1.43 1.38 1.50 1.38 1.40 1.32 1.09 0.7024 0.8020 0.7197 0.6461 0.8786 0.6637 0.6534 0.5983 0.4153 9.3382 6.4889 9.8304 15.1451 8.6154 9.5057 8.5210 22.1437 118.5829 Table A.29: q-Weibull parameter estimates of cancellation time model for the 9 stocks. 114 Appendix B MIT Web Market Simulator B.1 Introduction In order to conduct the order flow simulations and the market experiments described in Chapter 5 and Appendix C respectively, we developed a software which replicates the mechanisms of real-world market. The MIT Web Market is a software market implemented in Java, which provides a platform for different types of electronic markets on the World Wide Web. The software is designed to be used as control laboratory for software and/or human agents based simulations and experiments. B.2 Technical Description In this section we first describe the design of MIT Web Market software in abstract level and then discuss how the code is modularized for object-oriented programming. B.2.1 Abstract Level Design An abstract level design of the system concretely defines roles of electronic market in abstract level as shown in Figure B-1. The main roles are broken down into pieces as the following: order routing, match/execution, clearance/settlement, information dissemination, market administration, and market surveillance. When an order is received from a trader (client), the market is responsible for routing the order to an appropriate internal order book, where market-makers (or auctioneers) can match it with other order(s). When multiple securities are traded, each order needs 115 ;; ;; ;; ; ;; Order Routing Information Dissemination Client Order Execution Market Administration Market Surveillance External Information Flow Internal System Control Clearing and Settlement MIT Web Market Figure B-1: An Abstract Level Design of MIT Web Market to be routed to an appropriate market-maker (or an auctioneer) who handles the same security. After orders are matched and executed, the role of the MIT Web Market is to clear and settle the orders. The clearing/settling simply means updating the market information such as last traded price, and each trader’s portfolio information. After order is matched/executed and cleared/settled, traders are notified of updated market information and their portfolio holdings, which is the role defined as information dissemination. Additionally, a market surveillance has to be taken place while orders are routed and executed. The market surveillance is to monitor the orders to make sure that they are not violating the pre-defined market rules. Lastly, the system needs to be capable of administrating the rules of the market in terms of order matching, executing, clearing, and settling. B.2.2 Component Level Design After the roles of MIT Web Market are defined in abstract level, the system is designed into several modules to fulfill such roles. The MIT Web Market architecture is implemented in Java 1.5 with Oracle Database 11g, which consists of four main modules: market server, automated market-makers, database, and Graphic User Interface (GUI) for human traders. The market participants access the market via Java applet, which gets downloaded into their Web browser. The Java language provides several advantages such as portability, dynamic loading, multi-threading, and object serialization, which make it a convenient platform for 116 Client User Interface Automated Market Makers Market Server Database Figure B-2: A Component Level Design of MIT Web Market implementing the inherent complexity of the market simulator. These factors are especially advantageous to our system since it uses Web technology. They made it possible for all users to interact with the system from any platforms and trade securities concurrently in the market. Also they have made possible to build a robust system with relatively limited time. The Figure B-2 represents the associations between modules. In rest of this section, we describe each module in more detail. Market Server Module (webmarket.server package) The market server module serves six major functions: order match/execution, information dissemination, order routing, clearance/settlement, market administration, and brokerage service. 1. Order Match/Execution — The order match/execution plays a central role in handling and executing the orders. One of the principal advantages of object-oriented programming is that we can easily incorporate different types of order match/execution schemes into the system. 2. Information Dissemination — The information dissemination provides various market information to traders. The market server disseminates information in two ways; one is to disseminate information to all traders participating in the market, and the other is to disseminate information to a specific trader. In order to disseminate information to all traders, the market server uses ‘Ticker Tape’, which is an object storing public 117 information. All traders have direct access to the ‘Ticker Tape’. Security information are placed on the ‘Ticker Tape’ when the security is traded, or when the bid/ask prices are altered by newly placed orders. The ‘Ticker Tape’ also provides other general market information – whether market is open or closed, opening time of market, duration of sessions, and other market news. In order to disseminate information to a specific trader, market server directly sends information to the trader using private channel. Each client maintains the channel for direct communication with the market server. The private information such as trade confirmation and portfolio holdings are sent through this channel. The market server is designed to privately send any kind of text information using this channel. 3. Order Routing — The automatic order routing comes naturally as part of the system. In market server, an order execution module can be an auctioneer (auction algorithm), a specialist (monopolistic market-maker) or competitive dealers (multiple marketmakers). An auctioneer is a computer algorithm that matches order according to a set of pre-determined rules. The routing mechanisms are particularly easy to build under this simple rule-based algorithm. In the other hand, specialist or competitive dealer models add complexities to order routing. The automated market-maker(s) are intelligent agent(s) providing price discovery and liquidity to the market and they are designed to maintain proprietary positions and therefore bear risks. Since automated market-makers are separate module in our system, we separately discuss this in the later section. 4. Clearance/Settlement — After a trade has taken place, the market server clears the transaction between two counter-parties by transferring cash and securities between buyer’s and seller’s accounts. The role of market server as a clearinghouse is to update trader’s portfolio in the database. The server creates a JDBC connection to the database and updates information. After the update, the market server provides updated portfolio information to the owner of that portfolio. Such design also contributes to flexibility of the market structure. It can be implemented with different settlement rules and clearing procedures that may apply to different securities. For example, futures market has different settlement rules from those of the options market. 118 Figure B-3: A Console Window for Market Server 5. Market Administration — In order to administer the market, the system provides a console window for market administrator as depicted in Figure B-3. The console window is to serve five major roles: opening and closing of the market, monitoring traders who are participating in the market, monitoring the market-makers, configuring duration of sessions, and disseminate general market information to traders. 6. Brokerage Service — The essence of the brokerage service is the maintenance of accounts. Traders open accounts through simple registration process. When a new trader opens up an account, the market server accesses the information stored in the database on how the initial portfolio shall be created. Based on this information, the market server assigns pre-defined amount of fictitious money and shares of securities to the newly created account. 119 Market-Maker Module (webmarket.emm package) The MIT Web Market is a highly configurable market in two major aspects, the market institutional structures (trading mechanisms) and the types of securities to be traded. The market structure is abstracted in the model of market-makers and auctioneers. Specifically, for each security traded in the market, different types of software market-makers can be integrated into the market in a “plug-and-play” manner. In the current MIT Web Market system, market-maker is not responsible for checking general market rules, but may wish to impose additional rules on its own clients for transactions placed through the market-maker itself. If so, market-maker should give appropriate error message of the rules that are violated to the trader. If no rules are violated, and the order is actually placed, then the market-maker must note the order to its back-end office. In addition, if this order allows some sales to proceed, the market-maker may note the sale on its back-end office to consummate the sales. Each market-maker should strive to fulfill orders eventually, of course; however, there is no requirement that it be done immediately. Also, multiple market-makers can handle the same security. GUI Module for Human Traders (webmarket.client package) The human traders can access the market using GUI interface developed in Java applet. The applet consists of two parts: sign up/login, and trading interface. In sign up/login, trader can either register herself as a new user or login to the market with pre-existing user ID and password. The challenge/response scheme is used to avoid transmitting the password over the network. The login window is depicted in Figure B-4. After logging in, the client side protocol allows trader to do the followings using trading interface: place and cancel orders, obtain updates on ongoing market activity, and obtain information on its own portfolio. 1. Place and Cancel Orders — Orders are placed by creating an “Order” object and sending it to the market server. While orders are not executed, they can be canceled by the client. The client applet keeps track of order IDs that are previously placed, which are assigned by the market server. The client protocol sends order cancellation request along with order ID and market server uses the ID to identify the order for cancellation. If the order is not executed, the order gets canceled. 120 Figure B-4: A Sign up/Login Window for Trader 2. Obtain Updates on Ongoing Market Activity — The updates are obtained in one of two ways. The updates on market activity may be read out sequentially, or client may request to update the information from the server. The server periodically informs the ongoing sales, or other events as they have been declared of interest to a particular client. 3. Obtain Information on Portfolio — The number of shares held in given security are obtained by sending a holding information request to the server. The client needs to supply the security ID to receive the information. The client can also request information of amount of cash held in her portfolio in similar way. As shown in Figure B-5, the trading interface consists of five panels: market news, trade, chart, order status, and quote/portfolio information. The information displayed in this window are obtained in two ways; 1. public information such as quote information or general market information are obtained from ‘Ticker Tape’ object where the market server posts public market information. 2. private information such as trader’s portfolio are obtained from private channel between the market server and the trader. 1. Market News Panel — The purpose of the market news panel is to disseminate general market information. Information such as market state (whether market is open or closed), duration of the market, and etc. 121 Figure B-5: A Trading Interface for Trader 2. Trade Panel — Traders can place orders using trade panel. From the pull-down menu, trader chooses a security that she wants to buy or sell, and specify size and price of an order. There are four types of orders which can be placed: market buy, market sell, limit buy, and limit sell. When market order is placed, the price is ignored by the system. If trader places an order violating the market rules, such as placing short sell when short position is not allowed, the order is ignored by the system and the order rejection message is displayed. 3. Chart Panel — The chart shows the price movement of particular security chosen by the trader. The trader can choose a security from pull-down menu. The chart also shows current time which is synchronized with server side time and also time remaining if there is a pre-defined duration of the market. The bid/ask prices are shown in the graph by red triangles, and the last prices are shown in blue horizontal line. At the bottom of the graph, the traded volumes are shown in bar graph. 4. Order Status Panel — There are two types of order status information: open orders, and transactions. The open order panel displays list of orders that are placed by the 122 trader, but yet been executed. The transactions panel displays executed orders that are placed by the trader. A trader is allowed to cancel an order if the order is listed in the open orders panel. Once an order is executed and listed in transactions panel, it cannot be canceled. 5. Quote/Portfolio Panel — The quote/portfolio panel is to display bid/ask prices, last traded price, and total traded volume of securities. It also displays trader’s portfolio information. The client applet receives security information from ‘Ticker Tape’ object and displays them in the quote side of the panel. It also receives trader’s portfolio information through private channel, calculates the market value of the portfolio, and displays them in the portfolio side of the panel. Database Module One of the important advantages of the integration of sub-systems is sharing of information among them. A centralized database is the core of such system. Despite the fact that the whole system may consist of a collection of geographically dispersed servers, the MIT Web Market can be viewed as a centralized system in terms of its abstract architecture. Note that within this concept, a centralized market is capable of accommodating fragmented market structures. One scenario is that within a single market, there can be multiple market-makers dealing with the same security. The market-makers receive orders via the same order routing system and are monitored by the same surveillance units. More importantly, the centralized database stores market information, security information and trader information that are shared by different sub-systems. For instance, both the brokerage and clearing service need to access the account information of an investor after a transaction. Consider the following sequence of how a investor’s trading request is served. The investor places an order via some trading software provided by the brokerage service. The order arrives at the market electronically, and is further transmitted to one of the market-makers who executes the order and reports the trade information to the market. The market in turn disseminates new trade and quote information to all traders connected to the market. Simultaneously, the clearinghouse is notified of the execution. It clears the trade and makes appropriate portfolio adjustments for the two parties involved in the trade (updating cash and security position information, for example), and notify the brokerage service for the updates. Updated 123 Figure B-6: An Entity Relationship Diagram (ERD) of MIT Web Market Database portfolio information is then sent to the two investors who participate in the trade. The MIT Web Market uses Oracle Database 11g and it is designed based on the Entity Relationship Diagram (ERD) depicted in Figure B-6. The database is divided into two groups of tables; tables for defining the market, and tables for storing trading information. 1. Defining Market — There are four entities that defines the market; security information, users, initial value of portfolios, and market session. In order to setup a market, all of those information need to be provided. When trader registers as a new user, the trader’s information are stored in the ‘users’ table. At the same time, the trader’s initial portfolio is created in the ‘portfolios’ table based on the initial value, which are pre-defined in the database. 2. Storing Trading Information — There are mainly two types of trading information. One is order information and the other is sales information. The order information are created by users and they are used to route orders to execute them. After the execution, the sales information are stored in ‘sale log‘ table. It is important to separate the two in the database since the first one is needed to show quote information, 124 and the second one is used to determine the price of securities. B.3 Summary In summary, the main features of the MIT Web Market Simulator are: automation in the trading mechanism (automated market-makers), flexible design that can accommodate various types of market structure, environment that allows interactions between electronic agents and human traders. The potential applications of the software are various financial or non-financial markets, educational or experimental markets, and tools for research in market micro-structure, which I have demonstrated in this thesis. 125 Appendix C Securities Trading of Concepts (STOC) C.0 Preface In addition to the research relating to financial markets, the following presents my work in using market as a tool for aggregating people’s preferences. The idea is to apply the market mechanism to collect consumer preferences towards product concepts through trading. This work was done in collaboration with Dr. Nicholas Tung Chan and Prof. Ely Dahan (UCLA) along with two of my research advisors Profs. Andrew W. Lo and Tomaso Poggio. C.1 Introduction Markets are well-known to be an efficient tool for collecting and aggregating diverse information regarding the value of commodities and assets (Hayek, 1945). They have been particularly successful in the domain of financial securities. In this chapter, we explore a novel application of the price-discovery mechanism of financial markets to marketing research using securities trading of concepts (STOC) to collect consumer preferences on product concepts. This application is motivated by the need for reliable, accurate, fast and economical means to gauge consumer preferences during new product development. It relies on the belief that markets are efficient in aggregating privately held information such as individual preferences and expectations of others preferences. It also exploits the incentive-compatible nature of markets, i.e. the fact that over- or under-valuing securities 126 reduces the participants rewards, and the preferences of most participants for competing in games over responding to direct surveys. In particular, we present results for multiple market experiments with live subjects in which participants express their preferences over new product concepts by trading virtual securities. The resulting securities prices are compared against preferences measured in separate studies of the same products using various stated-choice and revealed preference approaches: rank-ordered choice, the virtual concept testing (VCT) methodology developed by Dahan and Srinivasan (2000), and actual purchase decisions under controlled conditions and in actual product markets. We find that results across different market experiments in three product categories – bicycle pumps, laptop computer messenger bags and crossover vehicles – are, with one notable exception, reliable across repeated tests and predictive of stated-choice and revealed preference results. To gain a better understanding of how the STOC method may be achieving these results, we relate our market experiments with some classic examples from the experimental economics literature. The essence of the STOC methodology centers around the establishment of virtual stock markets that trade virtual securities, each associated with an underlying product or service concept that can either exist or be at the conceptual or prototype stage. Upon entering a concept market, each participant receives an initial portfolio of cash (virtual or real) and virtual stocks. Participants are also provided with detailed information on the products (stocks) that includes specifications, images, and multimedia illustrations. A typical objective of the STOC game might be for each participant to maximize the value of his or her portfolio, evaluated at the last price prior to the closing of the market. Markets are typically open for 20 to 30 minutes. If participants play with real money, they will have the opportunity to profit from trading and will conversely bear the risk of losing money. The financial stakes in the game provide incentives for participants to reveal true preferences, process information and conduct research. If fictitious money is used, prizes can be awarded according to individuals performances. One can also reward all participants simply for their service. As in real financial markets, stock prices are determined by supply and demand, which depend on participants evaluation of their own and others preferences for the underlying products. Thus, at the market equilibrium, prices should fully reflect all participants aggregate preference of the products. Traders make trading decisions just as they would in a 127 financial stock market: they assess the values of the stocks, sell over-valued ones and buy undervalued ones, essentially voting on the worth of the underlying products. In this way, a stocks price becomes a convenient index of a products consumer value. There are, of course, several well-established methods for estimating consumer preferences, e.g., surveys (Burchill and Brodie, 1997), voice-of-the-customer methods (Griffin and Hauser, 1993), conjoint analysis (Srinivasan and Shocker, 1973; Green and Wind, 1975; Green and Srinivasan, 1990), concept tests (Urban et al., 1990; Dahan and Hauser, 2002), and focus groups (Calder, 1977; Fern, 1982). However, concept markets may be a useful alternative to these methods for several reasons: 1. Accuracy: In order to win the game, participants have the incentive to trade according to the best, most up-to-date knowledge because of their financial stake in the market. STOC also captures, continuously, the ever changing pulse of the market for all participants since they can express their opinions multiple times during the course of the market rather than responding only once to a survey question. 2. Interactive Learning: A STOC market participant not only evaluates concepts on his or her own behalf, but also considers the opinions of the public at large. Furthermore, participants can observe others valuations of the virtual products and update and adjust their own valuations dynamically in the market environment. In short, learning is a crucial element in these markets. 3. Scalability: Unlike surveys, in which the number of questions asked is limited by the capacity of each respondent to answer, markets are intrinsically scalable due to the fact that each trader need only evaluate a small subset of the universe of securities. In fact, the efficiency of the market, and therefore the quality of data collected, improves with the number of participants. This extends to the number of product concepts that may be evaluated since there is no requirement that each respondent trade every security, the bounded rationality of the traders does not limit the number of concepts that can be evaluated in a STOC market. 4. Integrated Product Concepts: The STOC method is particularly useful relative to conjoint methods when a product cannot be easily quantified, delineated or represented by a set of attributes (for example, a movie script, fashion item, car body 128 style or piece of art). Market participants evaluate the concepts directly and market prices effectively reflect the overall viability of the concepts, including the ability of a concept to fulfill unarticulated needs. All that is required is a thorough description (and visualization) of each concept. Of course, market-based methods for eliciting information also have certain limitations. Unlike typical marketing research techniques in which information is collected from individuals and aggregated in subsequent analysis, the market method focuses on aggregate beliefs and preferences. Individual heterogeneity is not captured well in the end, even though it enters the trading process in the form of differences in security valuation. Virtual concepts markets may be vulnerable to price manipulations and speculative bubbles because the values of virtual securities hinge on the aggregate beliefs, which are endogenously determined within the same market. Traders may form false beliefs that could cause prices to deviate from their fundamentals. And all of the behavioral critiques that have been leveled against the Efficient Markets Hypothesis in the financial economics literature apply to concepts markets as well. For these reasons, the market method must be applied with caution, and the consistency of the results must be checked through repeated STOC markets or other means of validation. The greatest level of vulnerability may occur when traders have a poor sense of their own preferences or of those of other people. This might occur, for example, when the product category is too new for traders to grasp, or when the stimuli shown prior to trading are unclear or confusing (as we demonstrate in one instance shortly). A number of practical issues arise in attempting to infer consumer preferences via the STOC method. For example: • How many traders are needed? • How knowledgeable does each participant need to be of the product category and concepts being studied? Of the target market? • Do they need to be experienced at trading securities? • What strategy do traders adopt in order to win the game? • Are traders driven more by objectivity or personal biases? • For how long must trading proceed in order to collect useful data? 129 • What, exactly, is being measured by STOC? The present research attempts to answer many of these questions by positioning STOC in the context of prior experimental economics and prediction markets research, and by evaluating the results of empirical experiments in three product categories. In Section C.2, we outline the market research alternatives to STOC which also measure preferences for product concepts. These include virtual concept tests of bike pumps, a simulated store selling laptop bags and stated choice surveys and longitudinal revealed preference sales data for crossover vehicles. We then summarize relevant research from the prediction markets and experimental economics literature. Section C.3 introduces the three product categories that are tested in this research, the designs of the securities representing product concepts in those three categories, and the market mechanism used to trade these securities. In Section C.4 we conjecture on how STOC works by considering alternative strategies that traders might employ, and show how stock prices capture consensus preferences. Section C.5 presents results from multiple STOC experiments, and develops a taxonomy of internal and external validity testing. We conclude in Section C.6 with a discussion of the results, possible extensions and limitations. C.2 Background To validate the STOC method, we compare it against alternative methods of measuring preferences for new product concepts. We also position STOC in the context of prior work on prediction markets and experimental economics. C.2.1 Prior methods of measuring product concept preferences Concept testing enables new product development teams to identify those concepts most preferred by consumers. Dahan and Srinivasan (2000) present a virtual concept testing (VCT) methodology employing the Internet with virtual prototypes in place of real, physical ones. The goal of their study is to identify the most preferred of nine bicycle bump concepts versus the two commercially available products depicted in Figure C-2. The authors find that static images of the bike pumps on the Internet produce market share predictions that closely resemble those for real physical prototypes examined in person. We employ their physical prototype and static web virtual concept test results for bicycle pumps in hopes of 130 validating the STOC method. Both bicycle pump STOC tests, conducted on the other side of the country and six years after Dahan and Srinivasan collected their data, were conducted with the same group of traders as a method of confirming test-to-test reproducibility as well as external validity. Dahan and Hauser (2002) add multiple web-based market research methods to the mix, applying them to the eight existing and yet-to-be-released crossover vehicles depicted in Figure C-3. They also demonstrate a high degree of correlation between web-based concept testing and respondents self-stated-choices as measured by simple surveys. We test STOC in four independent crossover vehicle experiments and compare our results against self-stated data in three of them and against virtual concept testing (VCT) in all four. We estimate VCT preferences at the individual level in two ways: including both product preferences and vehicle prices to determine each traders utility score, and utilizing product preferences alone, excluding the effect of vehicle prices. In each case, we then aggregate individual preferences to generate market share estimates. Toubia et al. (2003) develop a new polyhedral adaptive approach to conjoint analysis, and test it against existing adaptive and static conjoint methods using the example of customizable laptop PC messenger bags sold for real money through a simulated store. Their work demonstrates the effectiveness of their method, but more importantly for the present research offers an excellent data set for validating STOC. We focus on eight randomly chosen bags, representing a range of popularity (market share) actually sold to 43% of the respondents in their research. Two STOC tests were run to measure preferences for the same eight bags, but utilizing two different forms of stimuli: the table shown in Figure C-4 and the individual images shown in Figure C-6. Additionally, in the six years following the crossover vehicle STOC tests, that is from 2001-2006, we also collected unit sales data for each of the eight vehicles from Wards Automotive News. These data are used as a test of external validity and the predictive power of the STOC method. We are grateful for the cooperation of the aforementioned researchers who enabled us to adopt the identical product concept illustrations in our STOC tests. Thus, we are able to compare results for identical market research problems using STOC versus each of the prior methods. We attempt to validate our method in the eight STOC trading tests conducted from 2000 to 2002, as summarized in Table C.1. Traders in the first six 131 tests were MBA students, but additional tests included attendees from the MIT Center for Electronic Business conference (crossover vehicle test 3) and more senior managers attending executive education classes (crossover vehicle test 4). All eight tests were run under controlled conditions in a business school trading laboratory. Table C.1: Data Collected for each Product Category For each of the above tests, STOC user interface was employed as shown in Figure C-7, and each test ran in under one hour including instructions and wrap up. C.2.2 Prediction Markets Non-financial prediction markets have been established for political elections, movie box office estimation, and other real world outcomes. The Iowa Electronic Markets (IEM) pioneered prediction markets for the purpose of forecasting election results (Forsythe et al., 1993). The IEM was founded for research and educational purposes. Trading profits from the market provide incentives for traders to collect and process information about future events. The IEM features real-money futures markets in which contract payoffs depend on the outcome of political and economic events. IEMs predictions have outperformed 132 most national polls. Similarly, the Hollywood Stock Exchange, HSX.com, has provided accurate predictions of movie box office results (Spann and Skiera, 2003). The Foresight Exchange (FX) , predict the probability of future events occurring such as changes in the environment, scientific breakthroughs, the collapse of companies, or political and news outcomes. Companies such as Hewlett Packard, Microsoft, Best Buy and Google have employed prediction markets to forecast printer sales, software release dates, consumer electronics sales, and software take-up rates. Prediction markets share with STOC the benefits of information aggregation, the joy of competitive play, the ability to learn from others and the incentive to be accurate. Prediction markets focus on actual outcomes, operate for weeks, months, and sometimes years, and incorporate private information and news as it happens. STOC markets, in contrast, focus on concepts that may never come into existence, and therefore may never have actual outcomes, run for 10-60 minutes typically, and are not influenced by outside news. In fact, the only information available to STOC traders is the personal preferences they hold, their expectations of others preferences, and whatever they learn by observing STOC price movements. C.2.3 Rational Expectations (RE) Models and Experimental Markets Our trading experiments are closely related to the literatures in rational expectations (RE) models with asymmetric information and experimental markets. In a standard asymmetric information RE model (Grossman, 1981), heterogeneous agents with diverse information trade with each other and, under certain conditions, the market will converge to an equilibrium in which prices fully reveal all relevant information. The most important criterion for convergence is that agents condition their beliefs on market information. In particular, agents make inferences from market prices and quantities about other agents private information. The RE model has received considerable attention in the study of experimental markets (Plott and Sunder, 1982, 1988; Forsythe and Lundholm, 1990; Davis and Holt, 1993). Studies of the informational efficiency of a market relative to the RE benchmark fall into two categories: markets with fully informed agents (insiders) and uninformed agents, and markets with many partially informed agents. In various experimental markets with human subjects, the results for both market structures are the same: markets eventually converge 133 to the RE equilibrium, i.e., information aggregation and dissemination occur successfully. STOC trading share some characteristics with such experimental economics markets, and information aggregation and dissemination provide compelling explanation for the success of our STOC market. For example, traders who possess superior information about the products or have high confidence in their beliefs can be considered insiders. On the other hand, traders who have little knowledge or opinion of the products can be regarded as the uninformed. The interaction between the insider and uninformed constitutes information dissemination. What is intriguing about this scenario is that even when a subset of traders ignores the underlying product information and only focuses on market information, the market still converges to efficient prices that aggregate all the relevant information and beliefs. Alternatively, individual traders may form their own beliefs about the products, acknowledging that market prices will depend on aggregate beliefs. This is similar to the information aggregation scenario in which there are no insiders, but where all traders are partially informed. Even in this case, where no single trader has full information, an RE equilibrium will be reached under very general conditions (Grossman, 1981; Davis and Holt, 1993, Chapter 7). However, there is one important difference between our STOC market and the other exchanges in the experimental markets literature. In a typical experimental market, subjects preferences and their information set are fixed and assigned by the researchers. Therefore, even before trading begins, theoretical equilibrium prices can be calculated. In contrast, in a STOC market, neither the subjects preferences nor their information sets are knownin fact, these are what STOC market trading experiments are meant to discover. This suggests an important practical consideration in implementing STOC markets: the composition of traders should match the population of target consumers as closely as possible, or at least include traders with insight into the preferences of these consumers. For example, if the target population for a particular product is teenage female consumers, a STOC market consisting of middle-age males may not yield particularly useful preference rankings for that product. However, if the cross section of traders in a STOC market is representative of the target population, the force of market rationality will ensure that the price-discovery mechanism will provide an accurate measure of aggregate preferences. 134 C.3 Design of Markets and Securities In addition to presenting full product concepts, we educated traders about the product attributes and attribute levels using Consumer Reports-style ratings as in Figure C-1. Figure C-1: Attributes for Bike Pumps, Crossover Vehicles and Laptop PC Messenger Bags In our eight tests, the STOC method is applied to the product concepts described in Dahan and Srinivasan (2000) (Figure C-2), Dahan and Hauser (2002) (Figure C-3) and Toubia et al. (2003) (Figure C-4). In order to anchor the value of the fictitious currency in the case of bike pumps, one of the eleven securities – Cyclone – has its price fixed at $10 and is not traded. Thus, Cyclone serves as a reference price or numeraire security. For example, if a trader thinks that TRS is worth twice as much as Cyclone, he or she would pay up to $20 for one share of TRS. The stocks of the ten freely traded concepts may be priced at any level, depending on the supply and demand in the market, i.e. the willingness of at least one trader to buy at the price at which another trader is willing to sell. The eight crossover vehicles in Figure 3 were tested in 2000 and 2001 and consisted of three already released at the time (Lexus, Mercedes and BMW) and five yet-to-be-released vehicles (Pontiac, Acura, Buick, Audi and Toyota). The eight laptop PC messenger bags shown in Figure 4 and Figure 5 were part of the controlled study described in Toubia et al. (2003) in which 330 first year MBA students were provided cash towards the purchase of a customized laptop PC messenger bag. These 135 Figure C-2: 11 Bike Pump Product Concepts Underlying the STOC Securities Figure C-3: 8 Crossover Vehicles 136 Figure C-4: 8 Laptop PC Messenger Bags Figure C-5: Laptop PC Messenger Bags Depicted Without the Attribute Data Table eight bags include designs that ranged from low to medium to high popularity amongst the 143 respondents to the original study who bought them from a simulated store with actual cash. In the first laptop bag STOC test, traders saw the eight laptop bags in the table shown in Figure C-4. In test 2, the eight laptop bags were depicted as simpler images, four of which are reproduced in Figure C-6, leaving out the table of product attributes and simply showing nine product attributes visually rather than verbally. The eight laptop PC messenger bags depicted in the two types of experiments are identical. The reason that a new set of stimuli were created to represent the same eight bags, frankly, was that the tabular form of presenting the bags was not well-received nor understood by the traders. In section C.5, this will become more apparent when the trading results of the two STOC tests are analyzed. Each stock security represents a particular bike pump, crossover vehicle, or laptop PC messenger bag. The objective of traders in the STOC game is to maximize the value of ones 137 Figure C-6: Typical Product Information for Bike Pumps, Crossover Vehicles, and Laptop PC Messenger Bags portfolio at market close. The value of a portfolio is calculated as the sum of the cash on hand plus the total market value of the stocks, as determined by the closing market price. Participants strive to maximize their profits by trading the stocks by buying low and selling high. Beyond the stimuli they are shown, the only available information on which to base trading decisions is (1) their own preferences for the product concepts, (2) their perceptions of others preferences, and any (3) information they can glean from the trading dynamics of the game. Fictitious money is used in the markets, but top players may be rewarded with actual prizes and recognition by their trading peers. This provides the participants an incentive to perform well in the experiments. In these eight tests, peer recognition was the only incentive offered. Each trader is provided with an identical portfolio that consists of $10,000 of cash and 100 shares of each security. No borrowing or short-selling is permitted in the market. Participants trade the securities through the graphical user interface shown in Figure C-7. Market information available to the traders includes the last transaction price and size, current bid/ask prices and sizes, and a historical price and volume chart for each security. A trader can submit either a limit or market order to trade, or cancel an outstanding order that has not been executed. The markets are typical double auction markets with no market-makers. A transaction occurs when a market or limit order matches with a limit 138 Figure C-7: STOC Trading User Interface order on the opposite side of the market. All prices are specified in sixteenths of a dollar. The trading prices (lines) and volumes (bars) for a sample security in the two bike pump tests are shown in Figure C-8. We note that price converges to approximately $25 in both tests. For analysis, we focus on the trading data, which consists of the time series of trading prices and quantities (p1,i , q1,i ), (p2,i , q2,i ), ..., (pTi ,i , qTi ,i ), where i is the index for the ith product and is the total number of the cleared trades for the ith product. Our hypothesis is that prices reveal market consensus of relative preferences for each product concept. In particular, we propose that a products market share can be predicted by its relative STOC price. In addition to the closing price, we consider other metrics that take into account all transactions during the session: the high, low, mean, median and volume weighted average prices. The high, low, mean and median prices are calculated from the time series of trade 139 Figure C-8: Price and Volume History of AirStik for Test 1 (left) and Test 2 (right). prices p1,i , p2,i , ..., pTi ,i ; the volume-weighted average price (VWAP) is computed as follows: V W APi = PTi t=1 P Ti pt,i qt,i t=1 qt,i . (C.1) The mean, high and low prices are sensitive to outliers – a small number of transactions that occur at extreme prices. All but VWAP ignore the volume in a transaction and treat all trades equally. Volume can be regarded as a measure of the amount of information in a transaction. A trade with higher volume may well be more informative than one with lower volume, since traders are risking more when they trade larger quantities of a stock. In our markets, volume is also related to how confident the traders are at the corresponding transaction price. VWAP effectively summarizes the prices by considering the amount of information and confidence behind the trades. In practice, VWAP has been a widely accepted benchmark price in financial markets. It is a commonly used metric for the evaluation of trade executions. So we might expect VWAP to more fully capture the consensus preferences of the traders. Now given a price statistic pi , which can be the high, low, closing, mean, median or volume weighted average prices, we can arbitrarily compute predicted market share as the relative market capitalization, pn p M S i = PN i = PN i , j=1 pj n j=1 pj (C.2) where N is the number of securities comprising the market and n is the total number of 140 shares for a security, which is equal for each security (each trader is given an identical endowment of each security prior to trading). Among the four price statistics, we expect the median price and VWAP to be particularly robust against potential price volatility. C.4 Possible Trading Strategies Our market tests are intended to aggregate diverse preferences or beliefs from all traders. We have evidence that the traders individual preferences prior to the STOC game were quite heterogeneous as reflected in stated-choice surveys and virtual concept tests run prior to the start of each game. Ones beliefs and preferences, and the trading strategy based upon them, may derive from three related elements: 1. Product Information. This is what a participant knows about the underlying products. All participants are provided with the same facts and specifications of the products, but they may have obtained extra product information from their personal experience outside the experiments. 2. Personal Preferences. This is what surveys and polls typically collect. Although the aggregate preference of the whole market is the object of interest, ones personal view and biases may contribute to trading decisions. 3. Assessments of Others Preferences. A participant may form opinions and expectations of what others think so as to make profitable trading decisions. This adds a significant element of gaming and competition to the STOC method. To get a sense of traders strategies before and after playing the STOC game, we surveyed the 77 traders in the two crossover vehicle STOC games, as summarized in Figure C-9. We note that trader attitudes are quite heterogeneous for all three questions, narrowing slightly after trading, but not shifting in a statistically significant way. The picture that forms is that traders strategies encompass both self preferences and expectations of others preferences. Traders expect their target prices for buying and selling will vary considerably throughout the game, even though no new outside information is added after the start of trading. We can therefore infer that traders expect to learn from each other through the 141 Figure C-9: Crossover Vehicle Trader Attitudes Before and After Trading (n = 77) pricing mechanism. And traders focus slightly more on the gaming aspect of STOC than they do on the product concepts underlying the securities. How are preferences aggregated in STOC markets? Not only do traders form their own assessment of value, but they also infer the stocks market value from the market itself. In typical experimental economics markets, both the preferences of the traders and the state of nature (for example, the probability distribution of a security payoff) are known to the researchers (Plott and Sunder, 1982, 1988; Forsythe and Lundholm, 1990; O’Brien and Srivastava, 1991). Traders are assigned preferences that specify securities payoffs in various possible states. The theoretical equilibrium (rational expectations equilibrium) prices can be derived given full information of the markets. The main focus of these experiments is whether and under what conditions rational expectations equilibria can be attained in double auction markets. Some attempts have been made to understand the convergence of prices and how learning occurs in the market as a whole. But it is unclear how individual human traders learn and react to the market. Attempts to model the trading strategies of individual traders from the market data may be overly ambitious. Below we try to shed some light on some possible strategies employed by different types of traders. The objective of the trading game is to predict the final prices of the securities, trade 142 accordingly, thereby maximizing ones final portfolio value. A trader may form an assessment of the fair values of the securities before trading begins. This assessment may naively take into account only her own preferences for the underlying products, or, if she is more sophisticated, what she perceives as the preferences of others. The trader then bases her trading decisions on her beliefs: she buys undervalued stocks and sells over-valued ones. During the course of trading, she may either maintain her valuations or update her beliefs in real time, conditioning on her observation of the market dynamics. Learning has taken place if the latter approach is adopted. But learning is a rather complex process because ones expectations of prices affect prices, prices are used to infer others assessments, and the inference of others assessments in turn affects both prices and expectations of prices. Some traders may take a dramatically different approach by largely ignoring all fundamental information about the underlying products and focusing on stock market dynamics only. These traders play the roles of speculators or market-makers who try to gain from the market by taking advantage of price volatility, providing liquidity, or looking for arbitrage opportunities. Their presence may introduce mixed effects to the market. While they could enhance liquidity on one hand, they may also introduce speculative bubbles and excess volatility into the market. In summary, STOC participants may include some combination of nave traders, longterm investors, and predatory arbitrageurs. The dynamics of the interactions between different groups within a given population is quite complex (Farmer and Lo, 1999; Farmer, 2002) and are beyond the scope of our study, but the principal of information revelation via the price-discovery process is the key to the STOC markets ability to infer aggregate preferences for concepts. C.5 Results of STOC Tests The outcomes of the eight STOC tests for three product categories which are summarized in Table C.1 led to our first key result regarding which metric best summarizes trading. In Figure C-10, we see that Volume-Weighted Average Prices (VWAP) fit the validation data better and more consistently than five alternative metrics. In subsequent results, therefore, we utilize VWAP outcomes to check internal and external validity. Recall that VWAP summarizes all of the trades made from start to finish 143 Figure C-10: Which STOC Metric Correlates Best to Validation Data? 144 during a trading game, weighting each trade price by the number of shares traded. Closing and High prices, which do not depend on all trades but rather depend exclusively on the final or highest trade for each security, had the worst fits with the validation data. One potential cause of the poor correlation is that in early tests we allowed market orders, in which a trader does not specify a price, and is therefore vulnerable to executing a trade at an unreasonable price. After seeing this occur in approximately 1% of trades in our two bicycle pump tests, we eliminated the option of placing market orders and required each trader to specify a price by placing limit orders. We note that the VWAP and median metrics are less sensitive to a small number of trades at extreme prices. Another explanation for the dramatic difference in correlation indicates that STOC markets, unlike prediction markets, behave more like traditional market research in which data is sampled from distributions with stationary means. In financial and prediction markets, this is not the case as security prices do not have stationary means due to the continuous arrival of new information. In our case, each STOC trade is similar to a survey response, and additional traders and greater trading time increase the sample size. Shin and Dahan (2007) develop a statistical model to test whether STOC market data implies stationary on non-stationary security prices. They analyze the same trading data as in the present research, and employ unit-root tests to verify the stationarity or lack thereof of the mean prices for each security. The α coefficients in their model are highly correlated to our VWAP data, and their results support the conclusion that an ideal STOC metric should include all trades. We wanted to see whether traders were consistent from test 1 to test 2, and whether the preference consensus represented by the STOC results matched those of Dahan and Srinivasan (2000). To verify the validity of the market method, we ask two questions: (1) whether the results from the market method are consistent across different experiments, and (2) how close the results from the markets are to those from Dahan and Srinivasan (2000). We find that the top three products (Skitzo, Silver Bullet and Epic), in terms of predicted market share and rankings, are the same in the two experiments, as well as in the original Web Static data in the original Virtual Concept Test research. In a typical concept testing process, it is important to be able to identify the best designs so as to allocate resources to those opportunities with the greatest potential, and STOC seems to fulfill this role well. 145 Table C.2: Correlations Between (2) Bicycle Pump STOC Tests and Validation Data From Dahan and Srinivasan (2000) For consistency across experiments, we calculate a pair-wise sample Pearson correlation of 0.86 between market share predictions based on the VWAPs from the two tests. Comparing STOC with the original VCT web static data, correlations of 0.81 and 0.89, respectively, for tests 1 and 2 are slightly higher than those between STOC and the physical prototype results (0.75 and 0.82, respectively). This is consistent with the fact that the two groups of STOC traders were shown only the web static images and not the physical prototypes. Also noteworthy is that test-to-test reproducibility is quite high, with a correlation of 0.86. The results from these initial bike pump experiments show a remarkable agreement with those from the Dahan and Srinivasan study despite fundamental differences between the two methods, timing and geography. Differences include those in the data collection mechanism (a virtual security market versus a virtual shopping experience), the modeling of the predicted market share (the use of relative security prices versus individual level conjoint analysis), the questions asked (what you prefer versus what the group prefers), and lastly the subject population (MIT students versus Stanford students). The two STOC tests of laptop PC bags tell a slightly different, and quite remarkable story. The first laptop bag STOC test, the one in which the stimuli were presented in the form of a table with small images and feature details (Figure C-4) failed miserably in correlating to the simulated store sales. The second STOC test, however, the one in which traders learned about the eight laptop bags by viewing full-sized images without the feature table (Figure C-6) performed quite well, yielding a correlation of 0.80 with the simulated store data. We attribute the dramatic difference in outcomes to the only factor that changed between 146 Table C.3: Correlations Between (2) Laptop Bag STOC Tests and Simulated Store Unit Sales the two tests, namely the stimuli. For the STOC method to perform well in capturing consensus preferences, traders must understand the product concepts reasonably well, so the quality of stimuli is crucial. While the feature table seems to have confounded or confused the traders, the full product images must have resonated with them. Extensive pre-testing of STOC stimuli is advised. The most complete data set we analyzed comes from the crossover vehicle case and the four STOC tests conducted using those eight stimuli. Key correlation results are summarized in Table C.4, with significant results in bold, and all are calculated within each group of traders. Self-stated survey data represent the normed market shares for vehicles ranked by each individual in the top 3 out of eight choices. VCT w/Prices represent vehicle market shares based on scoring in the top three of eight vehicles using Dahan and Srinivasan (2000) methodology and accounting for the price of each vehicle when calculating utility. VCT NO Prices is the same calculation, but based only upon vehicle preferences without accounting for vehicle prices in the utility calculations. And, as before, “STOC” represents the normed marker shares based on the volume-weighted average prices of each of the eight securities. Several significant results are captured in Table C.4, including the following five: 1. STOC vs. Actual Sales: The first row of the table, in which correlations to actual 2001-2006 unit sales of the eight vehicles were calculated for each method, reveals that all four STOC tests failed to predict actual sales. This result confirms our earlier analysis that STOC markets are not prediction markets, but rather measure a form of underlying preferences among the traders as we shall see shortly. 2. Self-Stated Choices and VCT w/Prices vs. Actual Share: Self-stated choices and 147 Table C.4: Correlations Between (4) Crossover Vehicle STOC Tests and Validation Data from Actual Unit Sales, Self-Stated Choices, and Virtual Concept Tests Virtual Concept Testing with pricing did predict actual unit sales (correlations in the 0.42 to 0.63 range), though not in the statistical significance sense. One explanation for the superiority of these two measures over STOC is that there is an important difference between what people prefer, and what they are willing to pay for. STOC seems to zero in on preference rather than willingness-to-pay. Also, vehicle prices were not emphasized in STOC tests 1, 2 and 4, and were only featured prominently during STOC test 3, which was the only STOC test with some predictive value (0.52, but not significant). 3. STOC Test-to-Test Reproducibility: We saw with bike pumps that test-to-test reliability between STOC games using the same stimuli and same traders was quite good. In the crossover case, we can go further and measure test-to-test reliability across different groups of traders. Five of the six pairings of STOC tests reveal reasonably strong correlations between 0.57 and 0.92. But STOC tests 3 and 4 were not in agreement at all (correlation of 0.19), possibly because in STOC Test 3, where vehicle prices were emphasized, the higher-priced Audi, Mercedes and BMW vehicles garnered only 33% share. Test 4 had only 16 traders and vehicle prices were not emphasized, and 148 the three highest-priced vehicles garnered a whopping 64% share. 4. Stated Choice and VCT Test-Test Reproducibility: We note that the four VCT w/Price tests correlated amazingly well with each other (0.81 to 0.97) as did the VCT NO Price Tests (0.76 to 0.96). Similarly, aggregate Self-Stated data were highly correlated (0.84 to 0.91). So even though individual preferences were extremely heterogeneous, and group sample sizes were small (n = 16 to 49), aggregate preferences across groups were quite similar. 5. STOC vs. VCT with and Without Prices: STOC correlates remarkably well with the virtual concept test results when vehicle prices are not factored in (correlations of 0.80, 0.97, 0.72 and 0.83, respectively, for STOC tests 1 through 4). There was no correlation between the STOC tests and VCT with vehicle prices (-0.10 to 0.31). In short, STOC traders seem to focus on the vehicles when trading, but neither on the prices of those vehicles nor on the willingness-to-pay those vehicle prices. We consider the degree of correlation within and across multiple tests and measures remarkable considering that most of the vehicles studied had not even entered the market and that the individuals comprising the trading groups were heterogeneous in their preferences and backgrounds. C.6 Conclusions In this paper we study a novel application of the market mechanism: the use of securities markets to aggregate and infer diverse consumer preferences. We implement this idea in the specific context of three product-concept testing studies that aim to predict potential market share for between eight to eleven product prototypes. The results from three seven of eight tests show remarkably high consistency among themselves, and significant correlation with independent preference measurement techniques. We note the importance of clear and salient stimuli, and the need for training and priming traders prior to the start of STOC games. We also caution that while the STOC methodology is particularly effective at screening most preferred concepts from among a larger set, it appears to be less effective at measuring price sensitivity or predicting actual sales. Of course, prediction markets can be designed to perform the latter, and other choice-based market research techniques are 149 ideal for measuring price sensitivity. The efficacy of STOC markets at identifying winning concepts may not be particularly surprising to economists. After all, Keynes (1958) commented on the similarities between stock selection and a beauty contest over a half-century ago: ... professional investment may be likened to those newspaper competitions in which the competitors have to pick out the six prettiest faces from a hundred photographs, the prize being awarded to the competitor whose choice most nearly corresponds to the average preferences of the competitors as a whole ... The analogy is perhaps more accurate for describing what happens in financial markets and STOC games in the short run. After all, over the long run financial stock prices depend not only on investors subjective beliefs and expectations of others, but also on other objective information such as companies earning potentials and valuations of assets. On the other hand, the trading experiments presented in this paper are precisely beauty contests, since values of the virtual securities are derived endogenously from the preferences of the market participants, and their expectations of others preferences, both of which are largely subjective. To improve the reliability of STOC markets, one may need to anchor the values of the securities to some objective fundamental variables of the corresponding products. To test predictions of market shares, for example, one could compare security values with the realized market shares of the subset of existing products, or, barring the existence of real market share data, with the outcomes of actual customer choice surveys. We hope to refine STOC market methods along these lines in future research. 150 Bibliography J. Angel. Limit versus market orders. Working Paper No. FINC-1377-01-293, School of Business Administration, Georgetown University, Washington, DC., 1994. R. Battalio, J. Greene, B. Hatch, and R. Jennings. Does the order routing decision matter? Unpublished working paper, School of Business, Indiana University, Bloomington, IN., 1999. L. E. Baum and J. A. Egon. An inequality with applications to statistical estimation for probabilistic functions of a markov process and to a model for ecology. Bulletin of the American Mathematical Society, 73(3):360–363, 1967. L. E. Baum and G. R. Sell. Growth functions for transformations on manifolds. Pacific Journal of Mathematics, 27(2):211–227, 1968. Y. Bengio and P. Frasconi. An input/output hmm architecture. Advances in Neural Information Processing Systems, 7:427–434, 1995. Y. Bengio and P. Frasconi. Input-output hmm’s for sequence processing. IEEE Transactions on Neural Networks, 7(5):1231–1249, 1996. Yoshua Bengio. Markovian models for sequential data. Neural Computing Surveys, 2: 129–162, 1999. J. Beran. Statistics for Long-Memory Processes. Chapman & Hall, 1994. B. Biais, P. Hillion, and C. Spatt. An empirical analysis of the limit order book and the order flow in the paris bourse. Journal of Finance, 50:1655–1689, 1995. J. P. Bouchaud, M. Mezard, and M. Potters. Statistical properties of stock order books: Empirical results and models. Quantitative Finance, 2:251–256, 2002. 151 J. P. Bouchaud, Y. Gefen, M. Potters, and M. Wyart. Fluctuations and reponse in financial markets: The subtle nature of ’random’ price changes. Quantitative Finance, 4(2):176– 190, 2004. G. E. P. Box and G. M. Jenkins. Time Series Analysis: Forecasting and Control. HoldenDay, San Francisco, 1970. G. W. Burchill and C. H. Brodie. Voices into choices. Cambridge, MA: Center for Quality Management, 1997. B. J. Calder. Focus groups and the nature of qualitative marketing research. Journal of Marketing Research, 14:353–364, 1977. D. Challet and R. Stinchcombe. Analyzing and modeling 1 + 1d markets. Physica A, 300: 285–299, 2001. D. Cox and D. Oakes. Analysis of Survival Data. Chapman & Hall, New York, 1984. E. Dahan and J. R. Hauser. The virtual customer. Journal of Product Innovation Management, 19(5):332–353, 2002. E. Dahan and V. Srinivasan. The predictive power of internet-based product concept testing using depiction and animation. Journal of Product Innovation Management, 17(2):99– 109, 2000. M. G. Daniels, J. D. Farmer, L. Gillemot, G. Iori, and E. Smith. Quantitative model of price diffusion and market friction based on trading as a mechanistic random process. Physical Review Letters, 90(10):108102, March 2003. D. Davis and C. Holt. Experimental Economics. Princeton University Press, Princeton, NJ, 1993. A.P. Dempster, N. M. Laird, and D. B. Rubin. Maximization-likelihood from incomplete data via em algorithm. Journal of Royal Statistical Society B, 39:1–38, 1977. B. Efron. Bootstrap methods: Another look at the jackknife. The Annals of Statistics, 7 (1):1–26, January 1979. 152 B. Efron. Nonparametric estimates of standard error: The jackknife, the bootstrap and other methods. Biometrika, 68(3):589–599, December 1981. Z. Eisler, J. Kertesz, F. Lillo, and R. N. Mantegna. Diffusive behavior and the modeling of characteristic times in limit order executions. ArXiv Physics e-prints, January 2007. E. F. Fama. The behavior of stock market prices. Journal of Business, 38:34–105, 1965. E. F. Fama. Efficient capital markets: A review of theory and empirical work. Journal of Finance, 25:383–417, 1970. J. D. Farmer. Market force, ecology and evolution. Industrial and Corporate Change, 11: 895–953, 2002. J. D. Farmer and A. W. Lo. Frontiers of finance: Evolution and efficient markets. Number 96, pages 9991–9992, 1999. J.D. Farmer and S. Mike. An empirical behavioral model of liquidity and volatility. Technical report, Santa Fe Institute Working Paper, 2006. J.D. Farmer, L. Gillemot, F. Lillo, S. Mike, and A. Sen. What really causes large price changes? Quantitative Finance, 4(4):383–397, 2004. E. F. Fern. The use of focus groups for idea generation: The effects of group size, acquaintanceship, and moderator on response quantity and quality. Journal of Marketing Research, 9:1–13, 1982. R. Forsythe and R. Lundholm. Information aggregation in an experimental market. Econometrica, 58:309–347, 1990. R. Forsythe, F. Nelson, G. Neumann, and J. Wright. The iowa presidential stock market: A field experiment. Research in Experimental Economics, pages 1–43, 1993. M. Gell-Mann and C. Tsallis, editors. Nonextensive Entropy - Interdisciplinary Applications. SFI Studies in the Sciences of Complexity. Oxford University Press, 2004. A. Gerig. A Theory for Market Impact: How Order Flow Affects Stock Price. PhD thesis, University of Illinois at Urbana-Champaign, 2007. 153 L. R. Glosten and P. R. Milgrom. Bid, ask and transaction prices in a specialist market with heterogeneously informed traders. Journal of Financial Economics, 14:71–100, 1985. C. W. J. Granger and R. Joyeux. A introduction to long-memory time series and fractional differencing. Journal of Time Series Analysis, 1:15–29, 1980. P. E. Green and V. Srinivasan. Conjoint analysis in marketing: New developments with implications for research and practice. Journal of Marketing, pages 3–19, 1990. P. E. Green and Y. Wind. New way to measure consumer judgment. Harvard Business Review, 53:107–117, July-August 1975. A. J. Griffin and J. R. Hauser. The voice of the customer. Marketing Science, Winter:1–27, 1993. S. J. Grossman. An introduction to the theory of rational expectations under asymmetric information. Review of Economic Studies, 48:541–559, 1981. A.J. Hallinan. A review of the weibull distribution. Journal of Quality Technology, 25: 85–93, 1993. P. Handa and R. Schwartz. Limit order execution. Journal of Finance, 51:1835–1861, 1996. L. Harris and J. Hasbrouck. Market vs. limit orders: the superdot evidence on order submission strategy. Journal of Financial and Quantitative Analysis, 31:213–231, 1996. F. Hayek. The use of knowledge in society. American Economic Review, XXXV(4):519–530, 1945. B. Hollifield, R. Miller, and P. Sandas. An empirical analysis of pure limit order market. Working Paper, University of Pennsylvania, Philadelphia, PA, 1999. J. R. M. Hosking. Fractional differencing. Biometrika, 68:165–176, 1981. N. Johnson, S. Kotz, and N. Balakrishnan. Continuous Univariate Distributions, volume 1. A Wiley-Interscience Publication, New York, 2 edition, 1994. J. Kalbfleisch and R. Prentice. The Statistical Analysis of Failure Time Data. Wiley, New York, 1980. 154 E.L. Kaplan and P. Meier. Nonparametric estimation from incomplete observations. Journal of the American Statistical Association, 53(282):457–481, June 1958. D. Keim and A. Madhavan. Anatomy of the trading process: Empirical evidence on the behavior of institutional traders. Journal of Financial Economics, 37:371–398, 1995. J. M. Keynes. The General Theory of Employment, Interest and Money. Harcourt Brace, New York, 1958. A. Kyle. Continuous auctions and insider trading. Econometrica, 53(6):1315–1335, November 1985. F. Lillo and J. D. Farmer. The long memory of the efficient market. Studies in Nonlinear Dynamics & Econometrics, 8(3):Article 1, 2004. A.W. Lo, A.C. MacKinlay, and J. Zhang. Econometric models of limit-order executions. Journal of Financial Economics, 65:31–71, 2002. LSEbulletin. Sets - four years on. Technical report, London Stock Exchange, 2001. S. Maslov. Simple model of a limit order-driven market. Physica A, 278:571–578, 2000. T. McInish and R. Wood. Hidden limit orders on the nyse. Journal of Portfolio Management, 21:19–26, 1986. H. Mendelson. Market behavior in a clearing house. Econometrica, 50(6):1505–1524, 1982. R. Miller. Survival Analysis. Wiley, New York, 1981. J. O’Brien and S. Srivastava. Dynamic stock markets with multiple assets. Journal of Finance, 46:1811–1838, 1991. M. Petersen and D. Fialkowski. Posted versus effective spreads. Journal of Financial Economics, 35:269–292, 1994. S. Picoli, R.S. Mendes, and L.C. Malacarne. q-exponential, weibull, and q-weibull distributions: an empirical analysis. Physica A, 324:678–688, 2003. C. R. Plott and S. Sunder. Efficiency of experimental security markets with insider information: An application of rational-expectations models. Journal of Political Economy, 90:663–698, 1982. 155 C. R. Plott and S. Sunder. Rational expectations and the aggregation of diverse information in laboratory security markets. Econometrica, 56:1085–1118, 1988. Lawrence R. Rabiner. A tutorial on hidden markov models and selected applications in speech recognition. Proceedings of the IEEE, 77(2):257–286, February 1989. C. H. Reinsch. Smoothing by spline functions. Numerische Mathematik, 10(3):177–288, October 1967. P. Samuelson. Proof that properly anticipated prices fluctuate randomly. Industrial Management Review, 6:41–49, 1965. I. J. Schoenberg. Spline functions and the problem of graduation. Proceedings of the National Academy of Sciences of the United States of America, 52(4):947–950, October 1964. H. Shin and E. Dahan. A time-varying model of securities trading of concepts. UCLA Working Paper, 2007. B. W. Silverman. Some aspects of the spline smoothing approach to non-parametric regression curve fitting. Journal of the Royal Statistical Society. Series B, 47(1):1–52, 1985. E. Smith, J. D. Farmer, L. Gillemot, and S. Krishnamurthy. Statistical theory of the continuous double auction. Quantitative Finance, 3(6):481–514, 2003. V. L. Spann and B. Skiera. Internet-based virtual stock markets for business forecasting. Management Science, 49(10):1310–1326, 2003. V. Srinivasan and A. D. Shocker. Estimating the weights for multiple attributes in a composite criterion using pairwise judgement. Psychometrika, 38(4):473–493, December 1973. O. Toubia, D. I. Simester, J. R. Hauser, and E. Dahan. Fast polyhedral adaptive conjoint estimation. Marketing Science, 22(3):273–303, 2003. C. Tsallis. Possible generalization of botzmann-gibbs statistics. Journal of Statistical Physics, 52:479, 1988. 156 G. L. Urban, J. R. Hauser, and J. H. Roberts. Prelaunch forecasting of new automobiles: Models and implementation. Management Science, 36(4):401–421, April 1990. G. Wahba. Smoothing noisy data by spline functions. Numerische Mathematik, 24:383–393, 1975. 157