Order book approach to price impact



Similar documents
Large stock price changes: volume or liquidity?

Stock price fluctuations and the mimetic behaviors of traders

arxiv:physics/ v2 [physics.comp-ph] 9 Nov 2006

An analysis of price impact function in order-driven markets

Execution Costs. Post-trade reporting. December 17, 2008 Robert Almgren / Encyclopedia of Quantitative Finance Execution Costs 1

Trading and Price Diffusion: Stock Market Modeling Using the Approach of Statistical Physics Ph.D. thesis statements. Supervisors: Dr.

High-frequency trading in a limit order book

The Power (Law) of Indian Markets: Analysing NSE and BSE Trading Statistics

Chapter 10. Key Ideas Correlation, Correlation Coefficient (r),

An introduction to Value-at-Risk Learning Curve September 2003

Scaling in an Agent Based Model of an artificial stock market. Zhenji Lu

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

Modeling and simulation of a double auction artificial financial market

INTRADAY DYNAMICS AND BUY SELL ASYMMETRIES OF FINANCIAL MARKETS

Descriptive Statistics

CROSS-CORRELATION BETWEEN STOCK PRICES IN FINANCIAL MARKETS. 1. Introduction

Trading activity as driven Poisson process: comparison with empirical data

The relation between the trading activity of financial agents and stock price dynamics

The Effects of Start Prices on the Performance of the Certainty Equivalent Pricing Policy

Chapter 4: Vector Autoregressive Models

MODELING OF STOCK RETURNS AND TRADING VOLUME. Abstract

Real-time Volatility Estimation Under Zero Intelligence. Jim Gatheral Celebrating Derivatives ING, Amsterdam June 1, 2006

Behind Stock Price Movement: Supply and Demand in Market Microstructure and Market Influence SUMMER 2015 V O LUME10NUMBER3

Probability and Statistics Prof. Dr. Somesh Kumar Department of Mathematics Indian Institute of Technology, Kharagpur

Describing impact of trading in the global FX market

The Power of Patience: A Behavioral Regularity in Limit Order Placement

FE570 Financial Markets and Trading. Stevens Institute of Technology

Are Supply and Demand Driving Stock Prices?

Simple model of a limit order-driven market

INCORPORATION OF LIQUIDITY RISKS INTO EQUITY PORTFOLIO RISK ESTIMATES. Dan dibartolomeo September 2010

The Effect of Dropping a Ball from Different Heights on the Number of Times the Ball Bounces

Hedge-funds: How big is big?

99.37, 99.38, 99.38, 99.39, 99.39, 99.39, 99.39, 99.40, 99.41, cm

STock prices on electronic exchanges are determined at each tick by a matching algorithm which matches buyers with

CALCULATIONS & STATISTICS

Descriptive statistics Statistical inference statistical inference, statistical induction and inferential statistics

Association Between Variables

Truncated Levy walks applied to the study of the behavior of Market Indices

Pie Charts. proportion of ice-cream flavors sold annually by a given brand. AMS-5: Statistics. Cherry. Cherry. Blueberry. Blueberry. Apple.

arxiv:nlin/ v2 [nlin.ao] 7 May 2003

1) Write the following as an algebraic expression using x as the variable: Triple a number subtracted from the number

Introduction to Quantitative Methods

Biostatistics: DESCRIPTIVE STATISTICS: 2, VARIABILITY

Power-law Price-impact Models and Stock Pinning near Option Expiration Dates. Marco Avellaneda Gennady Kasyan Michael D. Lipkin

Correlations and clustering in the trading of members of the London Stock Exchange

LOCAL SCALING PROPERTIES AND MARKET TURNING POINTS AT PRAGUE STOCK EXCHANGE

Fluctuations in airport arrival and departure traffic: A network analysis

HISTOGRAMS, CUMULATIVE FREQUENCY AND BOX PLOTS

How to Win the Stock Market Game

Studies in Nonlinear Dynamics & Econometrics

An empirical investigation of Australian Stock Exchange Data.

ECON 459 Game Theory. Lecture Notes Auctions. Luca Anderlini Spring 2015

Lecture 24: Market Microstructure Steven Skiena. skiena

Greed, fear and stock market dynamics

Market Microstructure in the FX Spot Market

Reflection and Refraction

Asymmetric Reactions of Stock Market to Good and Bad News

CFDs and Liquidity Provision

New Results on Gain-Loss Asymmetry for Stock Markets Time Series

4. Continuous Random Variables, the Pareto and Normal Distributions

CITY UNIVERSITY OF HONG KONG DEPARTMENT OF PHYSICS AND MATERIALS SCIENCE

Jitter Measurements in Serial Data Signals

Betting on Volatility: A Delta Hedging Approach. Liang Zhong

Expression. Variable Equation Polynomial Monomial Add. Area. Volume Surface Space Length Width. Probability. Chance Random Likely Possibility Odds

The relation between news events and stock price jump: an analysis based on neural network

Decimalization and market liquidity

26 Integers: Multiplication, Division, and Order

Cross-sectional (ensemble) analysis of asset return dynamics in generic and specialized stock portfolios

Quantitative Analysis of Foreign Exchange Rates

Introduction to time series analysis

Measures of implicit trading costs and buy sell asymmetry

Algebra II End of Course Exam Answer Key Segment I. Scientific Calculator Only

Component Ordering in Independent Component Analysis Based on Data Power

The Standard Normal distribution

Chapter 3 RANDOM VARIATE GENERATION


Short-term market reaction after extreme price changes of liquid stocks

Do Commodity Price Spikes Cause Long-Term Inflation?

Math 120 Final Exam Practice Problems, Form: A

Financial Market Microstructure Theory

Graphical Integration Exercises Part Four: Reverse Graphical Integration

Chapter 5: Working with contours

5 Numerical Differentiation

Trade arrival dynamics and quote imbalance in a limit order book

Review of Fundamental Mathematics

Modelling Emergence of Money

Statistical properties of trading activity in Chinese Stock Market

Daily vs. monthly rebalanced leveraged funds

Market Depth and Order Size

Chapter 1. Vector autoregressions. 1.1 VARs and the identi cation problem

Relationship among crude oil prices, share prices and exchange rates

An Empirical Analysis of Market Fragmentation on U.S. Equities Markets

1 Error in Euler s Method

TRADING AND ANALYTICS GUIDE

Autocorrelation in Daily Stock Returns

Duration and Bond Price Volatility: Some Further Results

Constructing a TpB Questionnaire: Conceptual and Methodological Considerations

Complex Behavior of Stock Markets: Processes of Synchronization and Desynchronization during Crises

Generating Random Numbers Variance Reduction Quasi-Monte Carlo. Simulation Methods. Leonid Kogan. MIT, Sloan , Fall 2010

Time Series and Forecasting

Transcription:

Quantitative Finance, Vol. 5, No. 4, August 25, 357 364 Order book approach to price impact P. WEBER and B. ROSENOW* Institut fu r Theoretische Physik, Universita t zu Ko ln, D-5923 Germany (Received 16 January 24; in final form 23 June 25) Buying and selling stocks causes price changes, which are described by the price impact function. To explain the shape of this function, we study the Island ECN orderbook. In addition to transaction data, the orderbook contains information about potential supply and demand for a stock. The virtual price impact calculated from this information is four times stronger than the actual one and explains it only partially. However, we find a strong anticorrelation between price changes and order flow, which strongly reduces the virtual price impact and provides for an explanation of the empirical price impact function. Keywords: Order book; Price impact; Resiliency; Liquidity In a perfectly efficient market, stock prices change due to the arrival of new information about the underlying company. From a mechanistic point of view, stock prices change if there is an imbalance between buy and sell orders for a stock. These ideas can be linked by assuming that someone who trades a large number of stocks might have private information about the underlying company, and that an imbalance between supply and demand transmits this information to the market. In this sense, volume imbalance and stock price changes should be connected causally, i.e. prices go up if demand exceeds supply and go down if supply exceeds demand. The analysis of huge financial data sets (Takayasu 22) allows a detailed study of the price impact function (Hasbrouck 1991, Hausman et al. 1992, Kempf and Korn 1999, Evans and Lyons 22, Hopman 22, Plerou et al. 22, Rosenow 22, Bouchaud et al. 23, Gabaix et al. 23, Lillo et al. 23, Potters and Bouchaud 23), which quantifies the relation between volume imbalance and price changes. In a series of previous studies (Hasbrouck 1991, Hausman et al. 1992, Kempf and Korn 1999, Evans and Lyons 22, Plerou et al. 22, Rosenow 22, Bouchaud et al. 23, Gabaix et al. 23, Lillo et al. 23, Potters and Bouchaud 23), the average price impact of an imbalance between buy and sell market orders or of individual market orders was studied. Generally, this average price impact function was found *Corresponding author. Email: rosenow@thp.uni-koeln.de to be a concave function of volume imbalance, which increases sublinearly for above average volume imbalance. However, there is evidence that this concave shape cannot be a property of the true price impact a trader in an actual market would observe. Firstly, such a concave price impact would be an incentive to do large trades in one step instead of breaking them up into many smaller ones as is done in practice. Secondly, in the presence of bluffers in the market, the enforcement of a strictly linear price impact is the only way in which a market maker or liquidity trader can protect herself against suffering losses. One possible way to achieve a better understanding of the average price impact is the analysis of information about potential supply and demand stored in the limit order book. Using this information, one can calculate a virtual or instantaneous price impact, which would be caused by a market order matched with limit orders from the order book. This virtual price impact can be used as a reference point for an understanding of the average price impact of market orders. An analysis of the limit order book of the Stockholm Stock Exchange (Sandas 21) suggests that the virtual price impact calculated from the order book is significantly larger than what is expected from a regression model. Similarly, a difference between hypothetical and actual price impact was found in Coppejans et al. (21) and considered as evidence for discretionary trading, e.g. large trades are more likely to be executed when the order book has sufficient depth. In this paper, we calculate both the average price impact of market orders and the virtual price impact Quantitative Finance ISSN 1469 7688 print/issn 1469 7696 online # 25 Taylor & Francis http://www.tandf.co.uk/journals DOI: 1.18/14697685244411

358 P. Weber and B. Rosenow Table 1. Summary statistics for the ten stocks studied. All values are calculated for five minute intervals. Numbers in brackets are in units of the respective standard deviation. AMAT BRCD BRCM CSCO INTC KLAC MSFT ORCL QLGC SEBL Returns G.4.53.49.34.34.36.25.39.41.5 jg max j.26.57.39.37.23.26.21.49.33.66 (6.46) (1.77) (8.1) (11.5) (6.86) (7.17) (8.3) (12.74) (8.2) (13.23) Median of G.22.28.25.18.18.2.13.2.22.26 (.55) (.53) (.52) (.52) (.55) (.55) (.53) (.51) (.55) (.52) Volume imbalance Q 9551.78 97.37 6196.3 22652.52 1666.35 5862.25 1129.98 161.11 6513.98 7152.31 jq max j 344657 193633 127274 424923 32316 11679 376168 396978 8254 189966 (36.8) (19.96) (2.54) (18.76) (19.39) (19.92) (34.1) (24.8) (12.67) (26.56) Median of Q 5958 669 486.5 1492.5 1128 3648 737.5 11 478.5 4429 (.62) (.63) (.66) (.66) (.67) (.62) (.66) (.63) (.63) (.62) Market orders hn market i 52.38 45.31 44.97 58.34 72.62 58.89 83.59 47.41 56.82 35.2 Nmarket 33.89 36.4 36.83 39.3 49.14 39.92 53.31 37.43 37.72 3.92 Limit orders hn added i 321.27 247.6 233.54 32.6 391.91 344.59 429.8 227.17 33.68 199.99 Nadded 183.49 156.22 16.86 213.87 232.65 169.97 244.83 165 162.2 156.1 hn cancelled i 286.91 22.13 26.39 256.38 343.71 35.64 376.4 191.54 268.41 177.9 Ncancelled 173.15 144.14 144.22 199.23 22.71 154.95 229.11 152.41 146.79 141.82 from information contained in the Island ECN order book. By comparing the two, we find that the virtual price impact is more than four times stronger than the actual one. In order to explain this surprising discrepancy, we study time-dependent correlations between order flow and returns and find strong evidence for resiliency: the market recovers from random uninformative price shocks as the flow of limit orders is anticorrelated with returns in contrast to the positive correlations between returns and market orders. Thus, limit orders placed in response to returns strongly reduce the virtual price impact and provide for a link between virtual and actual price impact. We include the possible influence of discretionary trading in our analysis by studying the average virtual price impact, the typical virtual price impact and the virtual price impact calculated from the average order book. The average virtual price impact is strongly influenced by low liquidity periods and hence not representative for the actual impact of market orders. In order to include the influence of discretionary trading in a semiquantitative way, we base our analysis on the virtual price impact as calculated from the average order book, which is weaker than the average and the typical price impact. Including the effect of resilience as apparent from the above-mentioned anticorrelations, the actual price impact can be explained quantitatively. We analysed limit order data from the Island ECN, NASDAQ s largest electronic communication network, which comprises about 2% of all trades. Island ECN is a limit order driven market which allows for placement and cancellation of limit orders. If a trader is willing to sell a certain volume (number of shares) of a stock at a given or higher price, she places a limit sell order. For buying at a given or lower price, a limit buy order is placed. Limit orders are stored in the order book at their respective price with the respective volume. The sell limit order with the lowest price defines the ask price S ask for that stock. Similarly, the buy limit order with the highest price defines the bid price S bid. If a buy limit order with a price higher than the current ask price is placed, it is executed immediately against the sell limit orders at the ask price, vice versa for sell limit orders at or below the bid price. Such marketable limit orders will be called market orders in the following. Market orders are placed by impatient traders who want to trade immediately. The time period we study is the entire year 22. Each day, we disregard the first five minutes due to the build up of the order book. We checked that our results are robust with respect to this choice by removing e.g. the first fifteen minutes and the last five minutes per day. We consider 25 trading days and divide each trading day into 77 intervals of five minute length. We chose the 1 most frequently traded stocks for the year 22, ticker symbols and descriptive statistics can be found in table 1. The volume of market buy orders is counted as positive and the volume of market sell orders as negative, and the volume imbalance Q(t) is defined as the sum of all signed market orders placed in the time interval ½t, t þ tš with t ¼ 5 miny. For the definition of stock price changes, we use the same five ywe do not include market orders executing hidden limit orders in the definition of QðtÞ as we want to compare with the order book containing visible orders only.

Order book approach to price impact 359 minute intervals as for the volume imbalance and define five minute returns GðtÞ ¼ ln S M ðt þ tþ ln S M ðtþ, where the midquote price S M ðtþ ¼ 1 2 ðs bidðtþ þ S ask ðtþþ is the arithmetic mean of bid and ask price. We analyse changes of the midquote price rather than transaction price changes to avoid a distortion of our analysis due to the bid ask bounce. The midquote price changes (i) when a market order fills the current bid or ask volume and changes the bid or ask price in this way, (ii) when the limit orders at the current bid or ask price are cancelled or (iii) new limit orders are placed inside the spread. In the first part of the paper we will concentrate on the relation between the market order flow and changes of the midquote price. In the second part, we will see that one has to include the influence of limit orders in order to understand the relation between market order flow and price changes. To make different stocks comparable, we normalize the return time series G(t) by their standard deviation G and the volume imbalance time series Q by its first centred moment Q ¼ jq hqij ; as for volumes the second moment is not well defined due to a slow decay of the probability distribution. This normalization ensures that the price impact functions for different stocks collapse (Plerou et al. 22). Price impact of market orders. We define the price impact of market orders as the conditional expectation value I market ðqþ ¼ hg t ðtþi Q : It describes the average relation between the return G in a given five minute interval and the market order flow Q in the same time interval. The functional form of I market ðqþ is shown in figure 1, it is in general agreement with the results (Kempf and Korn 1999, Plerou et al. 22, Rosenow 22, Lillo et al. 23). We find that I market ðqþ is a concave function of volume imbalance (Hasbrouck 1991), which can be well fitted by a power law G ¼ :48Q :76. In principle, it would be desirable to calculate the price impact function as a dynamical and stock by stock function. Due to our averaging procedure however, we obtain only one data point per five minute interval, and we need to aggregate over time and different stocks to obtain sufficient statistics for the calculation of the conditional average in the region of large volume imbalances. An analysis of the time dependence of liquidity is presented in Weber and Rosenow (24). We note that the power law exponent characterizing the price impact function depends both on the time horizon and on the market studied. Generally, the exponent tends to increase for an increasing time horizon (Plerou et al. 22). On a tick by tick basis, the exponent is very small (Lillo et al. 23) or the functional relation can be characterized by a logarithm (Potters and Bouchaud 23). On an intermediate time scale of ð1þ ð2þ 4 2 2 4 1 5 5 1 15 min it was found to be.5 (Plerou et al. 22, Gabaix et al. 23). An argument by Zhang (1999) based on a simple market maker model predicts a value of.5 as well. Analysing the TAQ data basey for the year 1997 instead of the years 1994 and 1995 as in Plerou et al. (22) and Gabaix et al. (23) and for a time interval of five minutes as compared to the fifteen minute interval in Plerou et al. (22) and Gabaix et al. (23), we find an exponent.58 for transaction price changes and.75 for midquote price changes. For the Island ECN data, the exponent is.76 for midquote returns and.73 for transaction returns, both calculated on a time scale of five minutes. Intuitively, one might expect a stronger price impact for the analysis of transaction prices as compared to the analysis of midquote prices. This intuition is in agreement with the results of the empirical analysis: as most five minute volume imbalances Q are small with Q < 1 (in units of Q ), there are many data points available in the region jqj<1. Hence, on a logarithmic scale one uses as many bins in this interval as in the region jqj > 1, and the region jqj < 1 contributes significantly to the result of a logarithmic fit. However, for jqj < 1, one has jqj > jqj for <, and the price impact for transaction prices is indeed stronger than the price impact for midquote prices. The concave shape of the function is very surprising: this type of price impact would theoretically be an incentive to make large trades as they would be less costly than many small ones. In contrast, a convex price impact would encourage a trader to brake up a large trade into several smaller ones, which is what actually happens. Having this in mind, we want to understand the mechanism responsible for this concave shape and analyse the trading information contained in the limit order book. There are two mechanisms conceivable for the explanation of the concave shape: (i) we will argue that to a large extent the concave shape can be explained by 1.1.1 1 1 Figure 1. The price impact function I market ðqþ describes returns between the beginning and end of five minute intervals in response to the volume imbalance in the same time interval. It is a monotonously increasing and concave function of the signed market order volume. A logarithmic plot (inset) shows that the function can be fitted by a power law. ywe analysed the 44 most frequently traded NASDAQ stocks using data from the Trades and Quotes (TAQ) data base published by the New York Stock Exchange.

36 P. Weber and B. Rosenow resiliency, i.e. by the interplay of limit orders and market orders, and (ii) one expects discretionary trading, i.e. large trades are made when the market is very liquid and when the price impact is small. In this paper, we will concentrate on mechanism (i) and will leave the empirical study of mechanism (ii) to a future publication. Order book and virtual price impact. The whole market information of the Island ECN is stored in text files where each line represents a message of one of the four major types: add limit order, cancel limit order, execute limit order or trade message. While the last type announces the execution of hidden orders which are not visible in the order book, the first three types allow for a complete reconstruction of the order book at every instant of time. The placement of a market order is indicated by the execution of one or several limit orders. For each stock, the database contains about one to four million messages for the whole year. We do not include hidden limit orders in our analysis as there is no information about their placement in our data base. We have checked that on the level of the average price impact fuction I market ðqþ the inclusion of hidden limit orders do not change our result as the change in Q accounts for the additional order volume. Each message contains all necessary information: the ticker symbol of the respective stock, the time past midnight in milliseconds, the number of shares, the limit price, an indicator whether the order is of buy or sell type, and a unique order reference number. We use this number as a key to store and identify each order in our data structure and perform (partial) executions and cancellations until an order is completely executed or cancelled. Since all open orders are purged from the book every evening, we can process the data day by day starting with an empty book each morning. In our analysis, every trading day is divided into intervals of five minutes length. To make the order book information amenable to a statistical analysis, we calculate at the beginning of each time interval and for each stock k the current order book as a density function k ð i, tþ. Due to the complexity of this calculation, we use a discrete coordinate i to obtain the order book from the data structure by sorting orders with respect to their limit prices and aggregating the number of shares on a lattice with spacing. For each price S limit, at which a limit order is placed, the coordinate i is defined as ½ i ¼ ðlnðs limitþ lnðs bid ÞÞ=Š limit buy order, ½ðlnðS limit Þ lnðs ask ÞÞ=Š limit sell order. Here, the function ½xŠ denotes the smallest integer larger than x. We define the density function such that k ði, tþ is the total volume in the price interval ½ði 1Þ, iš in the order book, where i is an integer. In our analysis, we chose ¼ :3 G as a compromise between computational speed and accuracy. We note that throughout the paper is measured in units of G. ð3þ Orderbook volume Q.25.2.15.1.5 1 5 5 1 (a).1 1 1 1 1 (b) Orderbook depth γ 1 5 5 1 Figure 2. (a) The average order book is characterized by a maximum at i ¼ 1 and a slow decay up to i ¼ 1. The negative side (buy orders) of the order book is similar to the positive one. (b) The virtual price impact function I hbooki ðqþ (circles) calculated from the average limit order book is a convex function of volume imbalance and much steeper than the price impact of market orders (squares). Volume imbalances are measured in units of Q ¼ jq hqij and returns are measured in units of standard deviations G. For the calculation of the time-dependent density functions for all ten stocks from information about placement, cancellation, and execution of limit orders contained in the Island ECN data base, we had to process about 6 GB of data. Next, we study the average order book hbooki ð i Þ ¼ h k ð i, tþi, where h:::i denotes an average over both time t and different stocks k. It is characterized by a flat maximum at i 1 and a slow decay for large i (see figure 2 (a)). Its overall shape agrees with the results of Challet and Stinchcombe (21), Maslov and Mills (21) and Bouchaud et al. (22). We want to compare the actual price impact I market ðqþ to a virtual price impact function calculated from the average order book. To this end, we calculate the market depth for a given return and invert this relation. We imagine a trader who wants to buy a volume Q of stocks and has only offers from the order book available. Beginning at the ask price, she executes as many limit orders as necessary to match her market order, and changes the ask price by an amount G. Traded volume (or market depth) Q hbooki ðgþ and return G are related by Q hbooki ðgþ ¼ X i G ðbookþ ð i Þ: ð4þ

Order book approach to price impact 361 By inverting equation (4), we define the virtual price impact I hbooki ðqþ with respect to the average order book. Here, we assume that the bid ask spread remains constant and that the midquote price changes by the same amount as the ask price. According to the above definition, the virtual price impact I hbooki ðqþ describes the price change due to a single market order of arbitrary size. Now, we want to compare the virtual price impact with the actual price impact I market ðqþ, which is calculated as a function of the volume imbalance Q(t) aggregated over a five minute interval. Using the virtual price impact to predict a return due to a time aggregated volume imbalance is an approximation, which is justified if (i) the order book is symmetric with respect to the buy and sell side and if (ii) its nonlinearities do not influence the final result essentially. As far as the average price impact is concerned, the assumption of a buy sell symmetry of the order book is justified and one sees from figure 2 that the nonlinearity of the virtual price impact is weak. We find that the virtual price impact I hbooki ðqþ is four times stronger than the price impact of actual market orders (see figure 2 (b)), a volume imbalance of 5 Q causes a virtual price change of 8 G but only an actual price change of 2 G. In addition, I hbooki ðqþ is a convex function that can be fitted by a power law I hbooki ðqþ ¼ 1:22Q 1:19, and not a concave function as I market ðqþ. Strictly speaking, the average virtual price impact cannot be calculated from the average order book. Instead, the inversion of the depth as a function of return should be performed at each instant of time and for each stock, and the average should be performed afterwards. To this end, we define a time resolved and per stock depth Q book ðg, t, kþ ¼ X i G k ð i, tþ: ð5þ By inverting this relation at each instant of time and for each stock, we obtain the virtual price impact I book ðq, t, kþ. We find that this function fluctuates strongly in time and that its average over time and different stocks hi book iðqþ is dominated by rare events with low liquidity. For this reason, the calculation of hi book iðqþ is somewhat subtle. In time intervals with very low liquidity, the domain of I book ðq, t, kþ does not even extend up to :5 Q since the amount of limit orders stored in the order book is too small. In this case, the return caused by an order with signed volume Q > :5 Q would be undefined and the average over all time intervals would be undefined as well. In order to expand the domain of hi book iðqþ to at least 3:5 Q, we extrapolate the depth linearly by connecting the last defined data point (with largest Q and G) with the origin. Since this procedure is necessary only for few time intervals, our extrapolation method does not disturb the final result. We checked this by using different methods, e.g. by continuing the depth function by a horizontal line instead of a linear extrapolation. The influence of the choice of a specific extrapolation method is clearly visible only for large volumes Q > 4 G. The average of hi book iðqþ is calculated on an equidistant grid on the Q axis and the values of the individual 1 5 5 1 5 4 3 2 1 1 2 3 4 5 Figure 3. The average virtual price impact function hi book iðqþ (full squares) is steeper than the typical virtual price impact hi book i median (open squares) calculated by taking the median instead of the average. The virtual price impact I hbooki ðqþ calculated from the average order book (full circles) is weaker than the other two. functions I book ðq, t, KÞ at these grid points are calculated by interpolation. In doing so, one obtains hi book iðqþ as a convex function of signed order volume which is much steeper than the average price impact, see figure 3. To reduce the influence of low liquidity periods on the virtual price impact, we have calculated a typical price impact hi book i median ðqþ by replacing the average over time and different stocks by the median. For large trading volumes, hi book i median ðqþ is considerably smaller than hi book iðqþ, see figure 3. hi book i median ðqþ is a convex function of signed volume and quite similar to I hbooki ðqþ. As a basis for the explanation of the actual price impact I market ðqþ, one should not consider hi book iðqþ due to the influence of discretionary trading: in low liquidity periods, which dominate hi book iðqþ, one expects little trading activity. On the other hand, if the liquidity in the order book is average in the sense of the median, one expects discretionary trading to play a less important role. Therefore, hi book i median ðqþ is a better reference point for the explanation of the actual price impact I market ðqþ. As I hbooki ðqþ is again a little less steep than the typical price impact, one can argue that due to the influence of discretionary trading it is the best starting point for the explanation of the average price impact of market orders I market ðqþ. The exact influence of discretionary trading certainly needs to be analysed in more detail. However, such an analysis is beyond the scope of the present paper as the data analysis presented here is already quite involved. The average order book and thus the virtual price impact can be decsribed by zero intelligence models (Bouchaud et al. 22, Daniels et al. 23), in which orders are placed randomly. Due to the fact that we have calculated our virtual price impact from an average over time and different stocks, it is comparable to such zero intelligence models. The disagreement between our virtual price impact and the actual one is evidence for the necessity to include additional mechanisms describing intelligent or collective behaviour.

362 P. Weber and B. Rosenow Correlations between order flow and returns. Which effect is responsible for the pronounced difference between virtual and actual price impact? In the following, we will argue that a strong anticorrelation between returns and limit orders gives rise to resiliency and reduces the virtual price impact. Thus, virtual and actual price impact can be linked to each other. In our analysis, we calculate correlation functions between returns and the flow of market or limit orders. A technical alternative to the calculation of correlation functions would be Granger causality tests using a VAR analysis (Chen et al. 21) or a semi-nonparametric estimate of the joint density of price change and volume (Gallant et al. 1992). These techniques were used to study the relation between volatility and trading volume. In order to understand how order flow and price changes are related, we study the correlation functions c ðþ ¼ hq ðt þ ÞGðtÞi hq ðtþihgðtþi Q G between the volume imbalance of market orders ( ¼ marketþ or limit orders ( ¼ limit) and returns. In order to increase the time resolution of these correlators, the order volume is measured in intervals ½t, t þ tš with width t ¼ 5 s, and the returns are recorded for five minute intervals as before. For ¼ market, Q market ðtþ is the volume of signed market orders, and for ¼ limit Q limit ðtþ ¼ X1 signð i Þ Q add t ð i Þ Q canc t ð i Þ 1 is the net volume of limit buy orders minus the net volume of limit sell orders. In equation (7), Q add t ð i Þ is the volume of limit orders added to the book at a depth i and Q canc t ð i Þ is the volume of orders cancelled from the book. The correlation functions are plotted in figure 4. We find that c market ðþ is zero for < 5 s as required for an efficient market where returns cannot be predicted over extended periods of time. For times 5 s, we find positive correlations which are strongest when the time intervals for orders and returns overlap. For 3 s (non-overlapping time intervals), we observe a slow decay of the correlation function which is probably caused by the strong autocorrelations of the market order flow (Hasbrouck 1991, Hopman 22, Lillo and Farmer 23). The correlation function between limit orders and returns vanishes for negative times < 5 s and has a small positive value c limit ð 5 sþ ¼ :4. Surprisingly, for zero and positive time differences there is a significant anticorrelation between limit orders and returns, which is strongest for ¼ 25 s (overlapping time intervals) and decays slowly to zero for large positive times. We interpret this anticorrelation as an indication that rising prices cause an increased number of sell limit orders and vice versa for falling prices. Price changes seem to be counteracted by an orchestrated flow of limit orders. ð6þ ð7þ Correlation function c market Correlation function c limit.3.2.1.1.2.3 (a) (b) 2 1 1 2 3 Time τ [min] Figure 4. Correlation functions between return and signed order flow (buy minus sell orders). (a) Market orders and returns show strong positive equal time correlations (shaded region) decaying slowly to zero. (b) Limit orders preceding returns have weak positive correlations with them, while equal time correlations (shaded region) are strongly negative. Limit order flow and feedback mechanism. The anticorrelation between returns and limit order flow suggests that dynamical effects are responsible for the difference between virtual and actual price impact. We take into account the influence of discretionary trading in a semiquantitative way by using I hbooki ðqþ, the least steep of the different virtual price impact functions, as the starting point for the explanation of the average price impact of market orders. The rational behind this choice is the idea that trades will be made preferentially if the liquidity is above average. In order to connect the virtual price impact to the actual one, one has to take into account both the average limit order flow within a five minute interval and the limit order flow in response to price changes. The density of the average limit order flow is described by flow ð i Þ ¼ hq add t ð i Þ Q canc t ð i Þi ð8þ with t ¼ 5 min. Near the ask price, the net volume of incoming limit orders is five times larger than the volume stored in the average order book. More than one G away from the bid and ask price, the order flow decreases rapidly. Summation of the order flow density up to a given return G contributes the additional volume Q flow ðgþ ¼ P i G flowð i Þ, which is displayed in figure 5 (a). It grows fast for small returns and saturates for larger returns.

Order book approach to price impact 363 2 1 1 2 8 4 4 8 8 4 4 8 (a) (b) Furthermore, there is an additional volume of incoming limit orders generated by the returns G due to the anticorrelation between returns and limit orders. The density of these additional orders is described by the conditional expectation value c ð i, GÞ ¼ hq add t 1 5 5 1 ð i Þ Q canc Figure 5. (a) The average flow of limit orders integrated up to an order book depth G (grey squares) changes rapidly at small returns and then stays constant. The additional volume of limit orders Q corr in response to a return G (circles) increases linearly for large G. (b) Empirical price impact I market ðqþ of market orders (open circles) compared to the theoretical price impact I theory ðqþ (full circles), which takes into account orders from the order book, the average flow of limit orders and the additional flow Q corr. t ð i Þi G hq add t ð i Þ Q canc ð i Þi: Here, Q add t ð i Þ is the number of limit orders added to the book at a depth i within the time interval ½t, t þ t Š. We find that c ð i, GÞ approximately saturates for t 3 min. In order to quantify the effect of this additional order flow, we must specify in which way to treat the influence of the extended time correlations of order flow. When taking into account only limit orders placed in the present time interval of five minutes, one underestimates the effect of correlated limit orders for the following reason: part of the market order volume placed in the current five minute interval is predictable in the sense that it can be explained by long correlations in the order flow (Bouchaud et al. 23, Lillo and Farmer 23). The correlations in the limit order flow which extend over more than five minutes cancel the price impact of the t ð9þ predictable part of the market order flow in such a way that returns become uncorrelated. In order to capture this complicated interplay partially, we integrate over all the correlated future limit order flow. This procedure would be exact in the (admittedly artificial) situation of stationary price changes in which we assume that GðtÞ G is constant in time. Then, the choice t ¼ 3 min makes sure that also the additional limit order volume due to returns in past time intervals is taken into account. The correlation volume corresponding to a return G is Q corr ðgþ ¼ X i G c ð i, GÞ: ð1þ Q corr ðgþ is slightly negative for small G and increases then almost linearly for larger G (see figure 4 (a)). The total volume Q(G) corresponding to a return G is the sum QðGÞ ¼ Q book ðgþ þ Q flow ðgþ þ Q corr ðgþ ð11þ of the volume Q book ðgþ of orders stored in the limit order book up to a depth G, the volume Q flow ðgþ arriving within a five minute interval on average, and the correlation volume Q corr ðgþ. The theoretical price impact function I theory ðqþ calculated by inverting this relation is shown in figure 5 (b). The agreement between I theory ðqþ and I market ðqþ is quite good, up to G ¼ 1 G there are no deviations within the error bars of I market ðqþ. Market resiliency gives rise to additional liquidity, the influx of limit orders anticorrelated with past returns has a strong influence on the price impact of market orders. It strongly reduces the virtual price impact and is responsible for the empirically observed concave shape of the price impact function. When calculating the correlation volume Q corr ðgþ over time intervals of length t ¼ 5 min instead of t ¼ 3 min, only half the discrepancy between virtual and actual price impact could be explained. Whether or not our original choice of t ¼ 3 min is the correct one in light of the arguments related to long-range correlations in the market order flow, can only be examined by a more detailed analysis beyond the scope of this paper. Our qualitative conclusion that the virtual price impact is strongly reduced by limit orders is not affected by this quantitative issue. We note that a reduction of bare price impact by liquidity providers was recently postulated in Bouchaud et al. (23) in order to reconcile the strong autocorrelations of market orders with the uncorrelated random walk of returns, and that Lillo and Farmer (23) explain the uncorrelated nature of returns by liquidity fluctuations. In summary, we find that the virtual price impact function as calculated from the average order book is convex and increases much faster than the concave price impact function for market orders. This difference can be explained by taking into account dynamical properties of the order book, i.e. the average net order flow and the strong anticorrelation between returns and limit order flow. This anticorrelation leads to an additional influx of limit orders as a reaction to price changes, which

364 P. Weber and B. Rosenow reduces the price impact of market orders. Including these dynamical effects, we quantitatively model the price impact of market orders. Acknowledgements We thank J.-P. Bouchaud, M. Potters and D. Stauffer for helpful discussions. References Bouchaud, J.-P., Gefen, Y., Potters, M. and Wyart, M., Fluctuations and response in financial markets: the subtle nature of random price changes. eprint cond-mat/37332, 23. Bouchaud, J.-P., Me zard, M. and Potters, M., Statistical properties of stock order books: empirical results and models. Quant. Finance, 22, 2, 251 256. Challet, D. and Stinchcombe, R., Analysing and modelling 1þ1d markets. Physica A, 21, 3, 287 299 (eprint cond-mat/16114). Chen, G.-M., Firth, M. and Rui, O.M., The dynamic relation between stock returns, trading volume, and volatility. Financ. Rev., 21, 38, 153 174. Coppejans, M.T., Domowitz, I.H. and Madhavan, A., Liquidity in an Automated Auction, 21 December 21, AFA 22 Atlanta Meetings, http://papers.ssrn.com/sol3/papers.cfm? abstract_id¼295765. Daniels, M.G., Farmer, J.D., Gillemot, L., Iori, G. and Smith, E., Quantitative model of price diffusion and market friction based on trading as a mechanistic random process. Phys. Rev. Lett., 23, 9, 1812[1] 1812[4]. Evans, M.D. and Lyons, R.K., Order flow and exchange rate dynamics. J. Political Economy, 22, 11, 17 18. Gabaix, X., Gopikrishnan, P., Plerou, V. and Stanley, H.E., A theory of power-law distributions in financial market fluctuations. Nature, 23, 423, 267 27. Gallant, A.-R., Rossi, P.E. and Tauchen, G., Stock prices and volume. Rev. Financ. Stud., 1992, 5, 199 242. Hasbrouck, J., Measuring the information content of stock trades. J. Finance, 1991, 46, 179 27. Hausman, J., Lo, A. and MacKinlay, C., An ordered probit analysis of transaction stock prices. J. Financ. Econ., 1992, 31, 319 379. Hopman, C., Are supply and demand driving stock prices? MIT Working Paper, December 22 (MIT). Kempf, A. and Korn, O., Market depth and order size. J. Financ. Mark., 1999, 2, 29 48. Lillo, F. and Farmer, J.D., The long memory of the efficient market. Stud. Nonlinear Dyn. Econometrics, 24, 8(3). Lillo, F., Farmer, J.D. and Mantegna, R.N., Master curve for price-impact function. Nature, 23, 421, 129. Maslov, S. and Mills, M., Price fluctuations from the order book perspective empirical facts and a simple model. Physica A, 21, 299, 234 246. Plerou, V., Gopikrishnan, P., Gabaix, X. and Stanley, H.E., Quantifying stock price response to demand fluctuations. Phys. Rev. E, 22, 66, 2714[1] 2714[4]. Rosenow, B., Fluctuations and market friction in financial trading. Int. J. Mod. Phys. C, 22, 13, 419 425. Potters, M. and Bouchaud, J.-P., More statistical properties of order books and price impact. Physica A, 23, 324, 133 14. Sandas, P., Adverse selection and competitiv market making: empirical evidence from a limit order market. Rev. Financ. Stud., 21, 14, 75 734. Takayasu, H. (Ed.), Empirical Analysis of Financial Fluctuations, 22 (Springer: Berlin). Weber, P. and Rosenow, B., Large stock price changes: volume or liquidity? preprint cond-mat/41132, 24. Zhang, Y.-C., Toward a theory of marginally efficient markets. Physica A, 1999, 269, 3.