Abstract
Recent research on the response of stock prices to trading activity revealed long-lasting effects, even across stocks of different companies. These results imply non-Markovian effects in price formation and when trading many stocks at the same time, in particular trading costs and price correlations. How the price response is measured depends on data set and research focus. However, it is important to clarify how the details of the price response definition modify the results. Here, we evaluate different price response implementations for the Trades and Quotes (TAQ) data set from the NASDAQ stock market and find that the results are qualitatively the same for two different definitions of time scale, but the response can vary by up to a factor of two. Furthermore, we show the key importance of the order between trade signs and returns, displaying the changes in the signal strength. Moreover, we confirm the dominating contribution of immediate price response directly after a trade, as we find that delayed responses are suppressed. Finally, we test the impact of the spread in the price response, detecting that large spreads have stronger impact.
Similar content being viewed by others
1 Introduction
While the definition of complexity varies, it is widely agreed upon that a system is referred to as complex if it, first, consists of a large number of interacting agents or constituents, respectively, second, is non-stationary, i.e., cannot be described by standard equilibrium approaches, and, third, its interactions are typically not captured by microscopic governing equations, rather, by statistical rules. There are many examples, ranging from the traditional physical over biological to social and economic systems. The present interdisciplinary contribution studies financial markets, and it is put forward in the proven physics spirit: first, that every quantity which is used has to be a measurable observable; second, that the results given are quantitative and statistically sound; and third, that the methods are carefully and critically checked and verified. The emphasis of the present contribution is particularly on the third point: we evaluate the methods and show the impact of slight changes on the results. In view of an increasing interest in the analysis of response functions, we feel that this is a rewarding effort. It helps to answer the highly relevant question of the extent to which financial markets deviate from the largely Markovian behavior.
Financial markets use order books to list the number of shares bid or asked at each price. An order book is an electronic list of buy and sell orders for a specific security or financial instrument organized by price levels, where agents can place different types of instructions (orders).
In general, the dynamics of the prices follow a random walk. There are two extreme models that can describe this behavior: the Efficient Market Hypothesis (EMH) and the Zero Intelligence Trading (ZIT). The EMH states that all available information is included in the price and price changes can only be the result of unanticipated news, which by definition are totally unpredictable [5, 7, 23, 35]. On the other hand, the ZIT assumes that agents instead of being fully rational, have “zero intelligence” and randomly buy or sell. It is supposed that their actions are interpreted by other agents as potentially containing some information [5, 7, 35, 44]. In both cases, the outcome is the same, and the prices follow a random walk. Reality is somewhere in-between [7, 35], and non-Markovian effects due to strategies or liquidity costs are not contained either.
There are diverse studies focused on the price response [3,4,5, 7, 13, 15, 16, 19, 22, 23, 29, 30, 32, 41,42,43,44]. In our opinion, a critical investigation of definitions and methods and how they affect the results is called for.
Regarding price self-response functions in Refs. [4, 5, 7], Bouchaud et al. found an increase to a maximum followed by a decrease as the time lag grows. In Ref. [16], Gerig found that larger sized transactions have a larger absolute impact than smaller sized transactions but a much smaller relative impact. In Ref. [29], it is found that the impact of small trades on the price is, in relative terms, much larger than that of large trades and the impact of trading on the price is quasi-permanent.
For price cross-responses functions, Refs. [3, 44] revealed that the diagonal terms are on average larger than the off-diagonal ones by a factor \(\sim 5\). The response at positive times is roughly constant, what is consistent with the hypothesis of a statistically efficient price. Thus, the current sign does not predict future returns. In Ref. [44], the trends in the cross-responses were found not to depend on whether or not the stock pairs are in the same economic sector or extend over two sectors.
Here, we want to discuss, based on a series of detailed empirical results obtained on trade by trade data, that the variations in the details of the parameters used in the price response definition modify the characteristics of the results. Aspects like time scale, time shift, time lag, and spread used in the price response calculation have an influence on the outcomes. To facilitate the reproduction of our results, the source code for the data analysis is available in Ref. [24].
We delve into the key details needed to compute the price response functions, and explore their corresponding roles. We perform a empirical study in different time scales. We show that the order between the trade signs and the returns have a key importance in the price response signal. We split the time lag to understand the contribution of the immediate returns and the late returns. Finally, we shed light on the spread impact in the response functions for single stocks.
The paper is organized as follows: in Sect. 2, we present our data set of stocks. We then analyze the definition of the price response functions and describe the physical and trade time in Sect. 3. We implement different price responses for several stocks and pairs of stocks in Sect. 4. In Sect. 5, we show how the relative position between trade signs and returns has a huge influence in the results of the computation of the response functions. In Sect. 6 we explain in detail how the time lag \(\tau \) behaves in the response functions. Finally, in Sect. 7, we analyze the spread impact in the price response functions. Our conclusions follow in Sect. 8.
2 Data set
Modern financial markets are organized as a double continuous auctions. Agents can place different types of orders to buy or to sell a given number of shares, roughly categorized as market orders and limit orders.
In this study, we analyzed trades and quotes (TAQ) data from the NASDAQ stock market. We selected NASDAQ, because it is an electronic exchange where stocks are traded through an automated network of computers instead of a trading floor, which makes trading more efficient, fast, and accurate. Furthermore, NASDAQ is the second largest stock exchange based on market capitalization in the world.
In the TAQ data set, there are two data files for each stock. One gives the list of all successive quotes. Thus, we have the best bid price, best ask price, available volume, and the time stamp accurate to the second. The other data file is the list of all successive trades, with the traded price, traded volume and time stamp accurate to the second. Despite the 1 s accuracy of the time stamps, in both files, more than one quote or trade may be recorded in the same second.
To analyze the response functions across different stocks in Sects. 4, 5, and 6, we select the six companies with the largest average market capitalization (AMC) in three economic sectors of the S&P index in 2008. Table 1 shows the companies analyzed with their corresponding symbol and sector, and three average values for a year.
To analyze the spread impact in response functions (Sect. 7), we select 524 stocks in the NASDAQ stock market for the year 2008. The selected stocks are listed in Appendix A.
This contribution specifically addresses methodical aspects related to the price response functions and spread impact in correlated financial markets. We carefully check and verify the methods used to evaluate response functions, spread impact, and related quantities. This is important as such observables quantify the deviation from the largely Markovian behavior of financial markets. We chose the year 2008 to clarify these methodical aspects. We plan to extend our results in a future study to different years for a comparison of price response functions and spread impact.
To avoid overnight effects and any artifact due to the opening and closing of the market, we systematically discard the first 10 and the last 10 min of trading in a given day [7, 13, 19, 44]. Therefore, we only consider trades of the same day from 9:40:00 to 15:50:00 New York local time. We will refer to this interval of time as the “market time”. The year 2008 corresponds to 253 business days.
3 Price response function definitions
In Sect. 3.1, we introduce the fundamental quantities used in the price response definitions. In Sect. 3.2, we describe the physical time scale and the trade time scale. We introduce the price response functions used in literature in Sect. 3.3.
3.1 Key concepts
Market orders are execute at the best available buy or sell price, limit orders set a maximum purchase price for a buy order, or a minimum sale price for a sell order. If the limit price is not matched, the order will not be carried out [13, 14, 21, 35]. Limit orders often fail to result in an immediate transaction, and are stored in a queue called the limit order book [8, 14, 21, 29]. The order book also identifies the market participants behind the buy and sell orders, although some choose to remain anonymous. The order book is visible for all traders and its main purpose is to ensure that all traders have the same information on what is offered on the market. The order book is the ultimate microscopic level of description of financial markets.
Buy limit orders are called “bids”, and sell limit orders are called “asks”. At any given time, there is a best (lowest) offer to sell with price \(a\left( t\right) \), and a best (highest) bid to buy with price \(b\left( t\right) \) [5, 9, 11, 29, 35]. The price gap between them is called the spread \(s\left( t\right) = a\left( t\right) -b\left( t\right) \) [5,6,7, 9, 13, 20, 35]. Spreads are significantly positively related to price and significantly negatively related to trading volume. Companies with more liquidity tend to have lower spreads [1, 2, 9, 17].
The average of the best ask and the best bid is the midpoint price, which is defined as: [5, 7, 13, 20, 29, 35]
As the midpoint price depends on the quotes, it changes if the quotes change. The midpoint price grows if the best ask or the best bid grow. On the other hand, the midpoint price decreases if the best ask or the best bid decrease.
Price changes are typically characterized as returns. If one denotes \(S\left( t\right) \) the price of an asset at time t, the return \(r^{\left( g\right) }\left( t, \tau \right) \), at time t and time lag \(\tau \) is simply the relative variation of the price from t to \(t + \tau \) [5, 10, 25,26,27, 34]:
It is also common to define the returns as [3, 5, 10, 12, 13, 15, 16, 19, 31, 33]:
Equations (2) and (3) agree if \(\tau \) is small enough [5, 10].
At longer timescales, midpoint prices and transaction prices rarely differ by more than half the spread. The midpoint price is more convenient to study, because it avoids problems associated with the tendency of transaction prices to bounce back and forth between the best bid and ask [13].
We define the returns via the midpoint price as:
The distribution of returns is strongly non-Gaussian and its shape continuously depends on the return period \(\tau \). Small \(\tau \) values have fat tails return distributions [5]. The trade signs are defined for general cases as:
where \(\delta \) is a positive time increment. Hence, we have:
\(\varepsilon (t) = +1\) indicates that the trade was triggered by a market order to buy and a trade triggered by a market order to sell yields \(\varepsilon (t) = -1\) [5, 7, 19, 30, 38].
It is well known that the series of the trade signs on a given stock exhibit large autocorrelation. A very plausible explanation of this phenomenon relies on the execution strategies of some major brokers on given markets. These brokers have large transactions to execute on the account of some clients. To avoid market making movements because of an inconsiderable large order, they tend to split large orders into small ones [10].
3.2 Time definition
A direct comparison between the trade time scale and the physical time scale is not possible. To compare them directly, we need to assume whether the midpoint price or the trade signs are on the same scale. We assume the midpoint prices in the trade time scale to be the same as the midpoint prices in physical time scale. Therefore, we have the time lag for both computations in seconds. This approximation allow us to directly compare both scales to have an idea of the difference and similarities they have. In the other sections, as we are not directly comparing the time scales, the corresponding quantities of each time scale are not mixed. Thus, physical time scale is measured in seconds and trade time scale is measured in trades.
Due to the nature of the data, they are several options to define time for analyzing data.
In general, the time series are indexed in calendar time (hours, minutes, seconds, and milliseconds). Moreover, tick-by-tick data available on financial markets all over the world are time stamped up to the millisecond, but the order of magnitude of the guaranteed precision is much larger, usually 1 s or a few hundreds of milliseconds [6, 10]. Several papers are used different time definitions (calendar time, physical time, event time, trade time, and tick time) [10, 18, 37]. The TAQ data used in the analysis have the characteristic that the trades and quotes cannot be directly related due to the time stamp resolution of only 1 s [44]. Hence, it is impossible to match each trade with the directly preceding quote. However, using a classification for the trade signs, we can compute trade signs in two scales: trade time scale and physical time scale.
The trade time scale is increased by one unit each time a transaction happens. The advantage of this count is that limit orders far away in the order book do not increase the time by one unit. The main outcome of trade time scale is its “smoothing” of data and the aggregational normality [10].
The physical time scale is increased by one unit each time a second passes. This means that computing the responses in this scale involves sampling [18, 44], which has to be done carefully when dealing for example with several stocks with different liquidity. This sampling is made in the trade signs and in the midpoint prices.
Facing the impossibility to relate midpoint prices and trade signs with the TAQ data in trade time scale, we will use the midpoint price of the previous second with all the trade signs of the current second. This will be our definition of trade time scale analysis for the response function analysis.
For physical time scale, as we can sampling, we relate the unique value of midpoint price of a previous second with the unique trade sign value of the current second.
3.2.1 Trade time scale
We use the trade sign classification in trade time scale proposed in Ref. [44] and used in Refs. [39, 40, 43] that reads:
\(\varepsilon ^{\left( t\right) }\left( t,n \right) = +1\) implies a trade triggered by a market order to buy, and a value \(\varepsilon ^{\left( t\right) }\left( t,n \right) = -1\) indicates a trade triggered by a market order to sell.
In the second case of Eq. (7), if two consecutive trades with the same trading direction did not exhaust all the available volume at the best quote, the trades would have the same price, and in consequence, they will have the same trade sign.
With this classification, we obtain trade signs for every single trade in the data set. According to Ref. [44], the average accuracy of the classification is \(85\%\) for the trade time scale.
The TAQ time step is 1 s, and as it is impossible to find the correspondences between trades and midpoint prices values inside a second step, We used the last midpoint price of every second as the representative value of each second. This introduce an apparent shift between trade signs and returns. In fact, we set the last midpoint price from the previous second as the first midpoint price of the current second [44].
As we know the second in which the trades were made, we can relate the trade signs and the midpoint prices, as shown in Fig. 1. For the trade time scale, there are, in general, several midpoint prices in a second. For each second, we select the last midpoint price value, and we relate it to the next second trades. In Fig. 1, the last midpoint price (circle) between the second \(-1\) and 0 is related to all the trades (squares and triangles) in the second 0 to 1, and so on. In the seconds when the quotes do not change, the value of the previous second (vertical line over the physical time interval) is used. Thus, all the seconds in the open market time have a midpoint price value, and in consequence return values. We assume that as long as no changes occurred in the quotes, the midpoint price remains the same as in the previous second.
The methodology described is an approximation to compute the response in the trade time scale. A drawback in the computation could come from the fact that the return of a given second is composed by the contribution of small returns corresponding to each change in the midpoint price during a second. As we are assuming only one value for the returns in each second, we consider all the returns in 1 s interval to be positive or negative with the same magnitude, which could not be the case. This could increase or decrease the response signal at the end of the computation.
Figure 2 illustrate this point. Suppose there are three different midpoint prices in 1 s interval, and thus, three different returns for these three midpoint price values. Furthermore, suppose that the volumes of limit orders with the corresponding midpoint prices are the same in the bid and in the ask (the returns have the same magnitude). In the case of the top left (top right) sketch, all the changes are due to the rise (decrease) of the midpoint price, that means, consumption of the best ask (bid), so all the contributions of the individual returns in the second are positive (negative), and in consequence, the net return is positive (negative). In the case of the bottom, the changes are due to a combination of increase and decrease of the midpoint price, so in the end, the individual returns sum up to a net return, which can be positive or negative, depending of the type of midpoint price values in the interval. Thus, in this case, we are assuming in the end that all the returns were positive or negative, which probably was not the case, and in consequence, will increase or decrease the real value of the net return.
In all cases, we choose the last change in the midpoint price in a second interval as described before in Fig. 1. We use this method knowing that the variation in 1 s of the midpoint price is not large (in average, the last midpoint price of a second differ with the average midpoint of that second in \(0.007\%\)), and hence, it can give us representative information on the response functions.
3.2.2 Physical time scale
We use the trade sign definition in physical time scale proposed in Ref. [44] and used in Refs. [39, 43], that depends on the classification in Eq. (7) and reads:
where \(N \left( t \right) \) is the number of trades in a second interval. \(\varepsilon ^{\left( p\right) }\left( t \right) = +1\) implies that the majority of trades in second t were triggered by a market order to buy, and a value \(\varepsilon ^{\left( p\right) }\left( t \right) = -1\) indicates a majority of sell market orders. In this definition, they are two ways to obtain \(\varepsilon ^{\left( p\right) }\left( t \right) = 0\). One way is that in a particular second, there are no trades, and then no trade sign. The other way is that the addition of the trade signs (\(+1\) and \(-1\)) in a second be equal to zero. In this case, there is a balance of buy and sell market orders.
Market orders show opposite trade directions to limit order executed simultaneously. An executed sell limit order corresponds to a buyer-initiated market order. An executed buy limit order corresponds to a seller-initiated market order.
As the trade time scale, on the physical time scale, we use the same strategy to obtain the midpoint price for every second, so all the seconds in the open market time have a midpoint price value. Even if there is no change of quotes in a second, it still has a midpoint price value and return value.
In this case, we do not compare every single trade sign in a second, but the net trade sign obtained for every second with the definition, see Eq. (8). This can be seen in Fig. 3, where we related the midpoint price of the previous second with the trade sign of the current second. According to Ref. [44], this definition has an average accuracy up to \(82\%\) in the physical time scale.
3.3 Response function definitions
The response function measures price changes resulting from execution of market orders. In Refs. [4, 5, 7], Bouchaud et al. use a self-response function that only depends on the time lag \(\tau \). This function measures how much, on average, the price moves up (down) at time \(\tau \) conditioned to a buy (sell) order at time zero. They found for France Telecom that the response function increases by a factor 2 between \(\tau = 1\) and \(\tau \approx 1000\) trades, before decreasing back. For larger \(\tau \), the response function decreases, and even becomes negative beyond \(\tau \approx 5000\). However, in some cases, the maximum is not observed, and rather, the price response function keeps increasing mildly [5].
In Ref. [16], the price impact function is defined as the average price response due to a transaction as a function of the transaction’s volume. Empirically, the function is highly concave [16]. The curvature of the price impact function is entirely due to the probability that a transaction causes a nonzero impact. The larger the size of the transaction, the larger the probability. In Ref. [29], they found that the response function for three French stocks first increases from \(\tau = 10s\) to a few hundred seconds, and then appears to decrease back to a finite value.
In Ref. [3], they defined a response function who measures the average price change of a contract i at time \(t+\tau \), after experiencing a sign imbalance in contract j at time t. In this work, \(\tau \) is used in units of five minutes.
In Ref. [28], local Gaussian correlations in financial and commodity markets were analyzed. These correlations distinguish between positive and negative local dependence. In this work, a breakpoint in August 2008 is found. The increased comovements between commodities and financial markets are more critical after the breakpoint, not only between commodities and the S&P500 and 10-year Treasuries, but also within commodities themselves.
In later works [19, 44], Grimm et al. and Wang et al. use the logarithmic return for stock i and time lag \(\tau \), defined via the midpoint price \(m_{i} \left( t \right) \) to define a cross-response function. The response function measures how a buy or sell order at time t influences on average the price at a later time \(t + \tau \). The physical time scale was chosen, since the trades in different stocks are not synchronous (TAQ data). They found that in all cases, an increase to a maximum is followed by a decrease. The trend is eventually reversed.
Finally, in Ref. [41], Wang et al. define the response function on a trade time scale (Totalview data), as the interest is to analyze the immediate responses. Here, the time lag \(\tau \) is restricted to one trade, such that the price response quantifies the price impact of a single trade.
4 Price response function implementations
The main objective of this work is to analyze the price response functions. In general, we define the self- and cross-response functions in a correlated financial market as:
where the index i and j correspond to stocks in the market, \(r_{i}^{{\left( {{\text {scale}}} \right) }}\) is the return of the stock i in a time lag \(\tau \) in the corresponding scale, and \(\varepsilon _{j}^{{\left( {{\text {scale}}} \right) }}\) is the trade sign of the stock j in the corresponding scale. The superscript scale refers to the time scale used, whether physical time scale (\({\text {scale}} = p\)) or trade time scale (\({\text {scale}} = t\)). Finally, The subscript average refers to the way to average the price response, whether relative to the physical time scale (\({\text {average}} = P\)) or relative to the trade time scale (\({\text {average}} = T\)).
We use the returns and the trade signs to define three response functions: trade time scale response, physical time scale response, and activity response.
To compare the three response functions, we define the following quantities:
where the subscript d refers to the days used in the response computation. We use Eq. (10) to make easier the comparison between the results, as all the defined responses use the trade sign term.
In Sect. 4.1, we analyze the responses functions in trade time scale; in Sect. 4.2, we analyze the responses functions in physical time scale; and in Sect. 4.3, we define a response function to analyze the influence of the frequency of trades in a second.
4.1 Response functions on trade time scale
We define the self- and cross-response functions in trade time scale, using the trade signs in trade time scale. For the returns, we select the last midpoint price of every second and compute them. We use this strategy with the TAQ data set considering that the price response in trade time scale cannot be directly compared with the price response in physical time scale. In this case, we relate each trade sign in 1 s with the midpoint price of the previous second. Then, to compute the returns, instead of using trades as the time lag (it would make no sense as all the midpoint price are the same in 1 s), we use seconds. Thus, we force the response in trade time scale to have a physical time lag, and then, be able to compare with the physical time scale response. This approximation is feasible considering the discussion in Sect. 3. The price response function in trade time scale is defined as:
where the superscript t refers to the trade time scale. We explicitly calculate the average in Eq. (12):
where:
is a weight function that depends on the normalization of the response.
To compute the response functions on trade time scale, we used all the trade signs during a day in market time. As we cannot associate an individual midpoint price with their corresponding trade signs, all the trade signs in 1 s are associated with the midpoint price of the previous second. As \(\tau \) depends on the midpoint price, even if we are using trade signs in trade time scale, the value of \(\tau \) is in seconds.
The results of Fig. 4 show the self-responses of the six stocks used in the analysis and the cross-responses for pairs of stocks representing three different economic sectors.
The self-response functions increase to a maximum and then slowly decrease. In some stocks, this behavior is more pronounced than in others. For our selected tickers, a time lag of \(\tau = 10^{3}\) s is enough to see an increase to a maximum followed by a decrease. Thus, the trend in the self-response functions is eventually reversed. On the other hand, the cross-response functions have smaller signal strength than the self-response functions. For our cross-response functions of stocks in the same sectors, some couples exhibit the increase–decrease behavior inside a time lag of \(\tau = 10^{3}\) s. Other couples seems to need a larger time lag to reach the decrease behavior.
4.2 Response functions on physical time scale
One important detail to compute the market response in physical time scale is to define how the averaging of the function will be made, because the response functions highly differ when we include or exclude \(\varepsilon ^{\left( p\right) }_j \left( t\right) = 0\) [44]. The price responses including \(\varepsilon ^{\left( p\right) }_j \left( t\right) = 0\) are weaker than the excluding ones due to the omission of direct influence of the lack of trades. However, either including or excluding \(\varepsilon ^{p}_j \left( t\right) = 0\) does not change the trend of price reversion versus the time lag, but it does affect the response function strength [43]. For a deeper analysis of the influence of the term \(\varepsilon ^{\left( p\right) }_j \left( t\right) = 0\), we suggest to check Refs. [43, 44]. We will only take in account the response functions excluding \(\varepsilon ^{p}_j \left( t\right) = 0\).
We define the self- and cross-response functions in physical time scale, using the trade signs and the returns in physical time scale. The price response function on physical time scale is defined as:
where the superscript p refers to the physical time scale. The explicit expression corresponding to Eq. (16) reads:
where:
take only in account the seconds with trades and:
is a weight function that depends on the normalization of the response.
The results showed in Fig. 5 are the self- and cross-response functions in physical time scale. For the self-response functions, we can say again that in almost all the cases, an increase to a maximum is followed by a decrease. Thus, the trend in the self- and cross-response is eventually reversed. In the cross-response functions, we have a similar behavior with the previous subsection, where the time lag in some pairs was not enough to see the decrease of the response.
Compared with the response functions in trade time scale, the response functions in physical time scale are stronger.
4.3 Activity response functions on physical time scale
Finally, we define the activity self- and cross-response functions in physical time scale, using the trade signs and the returns in physical time scale. We add a factor \(N_{j,d} \left( t \right) \) to check the influence of the frequency of trades in a second in the response functions. The activity price response function is defined as:
where the superscript a refers to the activity response function. The corresponding explicit expression reads:
where:
is a weight function that depends on the normalization of the response.
As \(E_{j,d}\left( t\right) \) is the sum of \(+1\) and \(-1\) in 1 s and \(N_{j,d}\left( t\right) \) is the number of trades in a second, \(N_{j,d}\left( t\right) \ge E_{j,d}\left( t\right) \). \(N_{j,d}\left( t\right) = E_{j,d}\left( t\right) \) only when all the trades in a second are buys \((+1)\).
The trade weight \(w_{j,d}^{\left( t\right) }\left( t\right) \) reduces noises. The physical weight \(w_{j,d}^{\left( p\right) }\left( t\right) \) gives every step the same weight, and the activity weight \(w_{j,d}^{\left( a\right) }\left( t\right) \) emphasizes seconds with large activity.
In Fig. 6, we can see how the three responses have approximately the same shape, but the strength of the signal varies depending on the definition. The frequency of trades have a large influence in the responses.
As predicted by the weights, the event response is weaker than the physical response, and the activity response is the strongest response.
We propose a methodology to directly compare price response functions in trade time scale and physical time scale. Additionally, we suggest a new definition to measure the impact of the number of trades in physical time scale. In the three curves in the figure can be seen the increase–decrease behavior of the response functions.
Our results are consistent with the current literature, where the results differ about a factor of two depending on the time scale. We note that the activity response function implementation is only a test and was never defined in previous works. That is why the difference of a factor of two can not be seen in Fig. 6 for \(R_{ij}^{\left( p,a\right) } \left( \tau \right) \).
A special situation occurs when financial and commodity markets are analyzed to find correlations as shown in Ref. [28]. In this analysis, a breakpoint in August 2008 is found, where, before and after the point, the results are qualitatively different. However, our work is only focused in correlated financial markets. Our price response functions, on average, have the same behavior despite the time of the year.
5 Time shift response functions
The relative position between returns and trade signs directly impact the result of the response functions. Shifting the values to the right or to the left either in trade time scale or physical time scale has approximately the same effect.
To test this claim, we used the definition of the response function from Ref. [44] and add a parameter \(t_{s}\) that shifts the position between returns and trade signs. To see the impact of the time shift. we analyzed the stocks showed in Table 1 in the year 2008. We used different time shifts in the response function:
where the index i and j correspond to stocks in the market, \(r_{i}^{{\left( {{\text {scale}}} \right) }}\) is the return of the stock i in a time lag \(\tau \) with a time shift \(t_{s}\) in the corresponding scale and \(\varepsilon _{j}^{{\left( {{\text {scale}}} \right) }}\) is the trade sign of the stock j in the corresponding scale. The superscript \({{\text {scale}}}\) refers to the time scale used, whether physical time scale (\({{\text {scale}}} = p\)) or trade time scale (\({{\text {scale}}} = t\)). \(R_{ij}^{\left( {{\text {scale}}}, s\right) }\) is the time shift price response function, where the superscript s refers to the time shift. Finally, the subscript average refers to the way to average the price response, whether relative to the physical time scale (\({{\text {average}}} = P\)) or relative to the trade time scale (\({{\text {average}}} = T\)).
We compute the response functions according to two cases. In one case, we set \(\tau \) to a constant value and vary \(t_{s}\), and in the other case, we set \(t_{s}\) to a constant value and vary \(\tau \).
In Sect. 5.1, we analyze the influence of the time shift between the trade signs and returns in trade time scale, and in Sect. 5.2, we analyze the influence of the time shift between the trade signs and returns in physical time scale.
5.1 Trade time scale shift response functions
On the trade time scale, we compute the response function:
In this case for \(r^{\left( t\right) }_{i}\), we associate all the trade signs to a return value and create pseudo-midpoint price values in trade time scale. Then, we shift the trade signs and the returns by trades. Hence, the time lag and time shift are in trade time scale.
In Fig. 7, we show the response functions results for fixed \(\tau \) values, while \(t_{s}\) is variable. In the different \(\tau \) values of figures, the results are almost the same. The response functions are zero either if the time shift is larger than \(\tau \), or if the time shift is smaller than zero. However, related to the time lag, there is a zone where the signal is different from zero. For values between zero and \(\tau \), there is a peak in a position related to \(\tau \). The response function grows and decreases relatively fast.
We tested the response function for fixed time shift values, while \(\tau \) is variable. In Fig. 8, we use a time shift of 10 trades (left) and 100 trades (right). In both, self- and cross-response results are qualitatively the same. It can be seen that the response functions have a zero signal before the time shift. After the returns and trade signs find their corresponding order, the signals grow. In comparison with the values obtained in Fig. 4, it looks like the response function values with large time shift are stronger. However, this is an effect of the averaging of the functions. As the returns and trade signs are shifted, there are less values to average, and then, the signals are stronger. Anyway, the figure shows the importance of the position order between the trade signs and returns to compute the response function.
5.2 Physical time scale shift response functions
In the physical time scale, we compute the response function:
Similar to the results in Sect. 5.1, Fig. 9 shows the responses functions for fixed \(\tau \) values, while \(t_{s}\) is variable. Again, the response functions are zero if the time shift is larger than the time lag, or if the time shift is smaller than zero. For every \(\tau \) value, there is a peak. The peak grows and decays relatively fast. The response signal usually starts to grow in zero or a little bit earlier and grows to a value around to \(\tau \). In this zone, the response functions are different to zero.
The results for fixed time shift values and variable time lag (\(t_{s}=10\) s and \(t_{s}=100\) s) are shown in Fig. 10. The self- and cross-response results are qualitatively the same compared with the previous subsection. The response functions are zero before the time shift value. After the returns and the trade signs reach their order, the signals grow. The same effect of the apparent stronger signal can be seen here, and again, it is due to the averaging values.
The results in trade time scale and physical time scale can be explained understanding the dynamics of the market. A trade can or cannot change the price of a ticker. Therefore, when a change in price happens, a change in midpoint price, and consequently in returns happens. Thus, it is extremely important to keep the order of the events and the relation between them. When we shift the trade signs and returns, this order is temporarily lost and as outcome the signal does not have any meaningful information. When the order is recovered during the shift, the signal grows again, showing response function values different to zero. In this section, we were interested only in the order (shift) and not in the responses values, which were analyzed in Sect. 4. A time shift smaller than zero does not have any useful information about the response. If the time shift is equal to zero, the signal is weak, due to the time needed by the market to react to the new information. On the other hand, a time shift larger than two steps shows the information is lost and the signal only grows when the original order is resumed.
Then, the question is what is the ideal time shift to compute the response functions. Our approach in Sect. 4 takes into account that the changes in the quotes are the ones that attract the agents to buy or sell their shares. Hence, they directly impact the trade signs. According to the results, the response can take up to two time steps in the corresponding scale to react to the change in quotes. Thus, a time shift larger than two time steps makes no sense. On the other hand, in the case of the physical time scale, where a sampling is used, to assure the selection of a midpoint price at the beginning of a second, it is a good strategy to use the last midpoint of the previous second as the first midpoint price of the current second. In this case, an apparent 1 s shift is used between returns and trade signs.
6 Time lag analysis
Regarding Eq. (2), we use a time lag \(\tau \) in the returns to see the gains or loses in a future time. However, the strength of the return in the time lag should not be equal along its length. Then, we divide the full range time lag \(\tau \) in an immediate time lag and in a late time lag as show in Fig. 11, where:
for \(\tau ' < \tau \). This distinguish the returns depending on the time lag as the short (immediate) return \(\tau '\) with the long return \(\tau - \tau '\). This approach is similar to the concept used in Ref. [41], where the price impact for a single trade is estimated by the immediate response on an event time scale. In our case, we check all over the range of the time lag in the price response function on a physical time scale.
To use the short and long time lag, we rewrite the returns in physical time scale as:
where the superscript sl refers to short-long and the second term of the right part is constant with respect to \(\tau \). Replacing Eq. (29) in the price response function in physical time scale (Eq. 16), we have:
where the first term in the right side of Eq. (30) is the long response and the right term is the short response. Again, the right term of Eq. (30) is independent of \(\tau \).
The results in Fig. 12 show the short response, the long response, the addition of the short response and long response (Sum), the original response, a random response, and the value of \(\tau '\).
The main signal of the response function come from the short response. Depending on the stock and the value of \(\tau '\), the long response can increase or decrease the short response signal, but in general, the long response does not give a significant contribution to the complete response.
Before \(\tau '\), the short response and long response are the same, as the self and cross-response definition do not define values smaller than \(\tau '\), so it is computed as the original response. In the figure, the curves of the short and long response are under the curve of the original response. After \(\tau '\), the short response is a strong constant signal. On the other hand, the long response immediately fades, showing the small contribution to the final response. To compare the significance of the long response, We added a random response made with the trade signs used to compute the response but with a shuffle order. The long response and the random response are comparable, and show how the long response is not that representative in the final response. If we add the short and long response, we obtain the original response. In Fig. 12, the original response (red line) has the same shape to the addition of the short and long responses (green line).
For the response functions that show the increase–decrease behavior in between the time lag \(\tau = 10^{3}\), the peak is usually between \(\tau = 10^{1}\) and \(\tau = 10^{2}\). In these cases, the long response are always negative after the \(\tau '\) value and are comparable in magnitude with the random signal. On the other hand, the response functions that require a bigger time lag to show the increase–decrease behavior have non-negative long responses, but, still, they are comparable in magnitude with the random signal.
According to our results, price response functions show a large impact on the first instants of the time lag. We proposed a new methodology to measure this effect and evaluate their consequences. The short response dominates the signal, and the long response vanishes.
7 Spread impact in price response functions
When we calculate the price response functions, the signal of the response depends directly on the analyzed stock. Thus, even if the responses functions are in the same scale, their values differ from one to another. We choose the spread [36] to group 524 stocks in the NASDAQ stock market for the year 2008 in physical time scale, and check how the average strength of the price self-response functions in physical time scale behaved for this groups. For each stock, we compute the spread in every second along the market time. Then, we average the spread during the 253 business days in 2008. With this value, we group the stocks.
We used three intervals to select the stocks groups (\(s<0.05\$\), \(0.05\$\) \(\le s <0.10\$\) and \(0.10\$\) \(\le s <0.40\$\)). The detailed information of stocks, the spread, and the groups can be seen in Appendix A. With the groups of the stocks defined, we averaged the price response functions of each group.
In Fig. 13, we show the average response functions for the three groups. The average price response function for the stocks with smaller spreads (more liquid) have in average the weakest signal in the figure. On the other hand, the average price response function for the stocks with larger spreads (less liquid) have in average the strongest signal. According to the results described in Sects. 3 and 4, the average price response functions for all the groups follow the increment to a maximum followed by a decrease in the signal intensity.
The strength of the price self-response function signals grouped by the spread can be explained knowing that the response functions directly depend on the trade signs. As long as the stock is liquid, the number of trade signs grow. Thus, at the moment of the averaging, the large amount of trades reduces the response function signal. Therefore, the response function decrease as long as the liquidity grows, and as stated in the introduction, the spread is negatively related to trading volume and, hence, firms with more liquidity tend to have lower spreads.
Finally, an interesting behavior can be seen in Fig. 13. Despite each stock has a particular price response according to the returns and trade signs, the average price response function for the different groups seems to be quite similar. As all the analyzed stocks come from the same market, we can infer that the general behavior of the market affects all the stocks, influencing in average a group response.
8 Conclusion
We went into detail about the response functions in correlated financial markets. We define the trade time scale and physical time scale to compute the self- and cross-response functions for six companies with the largest average market capitalization for three different economic sectors of the S&P index in 2008. Due to the characteristics of the data used, we had to classify and sampling values to obtain the corresponding quantities in different time scales. The classification and sampling of the data had impact on the results, making them smoother or stronger, but always keeping their shape and behavior.
The response functions were analyzed according to the time scales. We proposed a new approach to compare price response functions from different scales. We used the same midpoint prices in physical time scale with the corresponding trade signs in trade time scale or physical time scale. This assumption allowed us to compare both price response functions and get an idea of how representative was the behavior obtained in both cases. For trade time scale, the signal is weaker due to the large averaging values from all the trades in a year. In the physical time scale, the response functions had less noise and their signal were stronger. We proposed an activity response to measure how the number of trades in every second highly impact the responses. As the response functions can not grow indefinitely with the time lag, they increase to a peak, to then decrease. It can be seen that the market needs time to react and revert the growing. In both time scale cases depending on the stocks, two characteristics behavior were shown. In one, the time lag was large enough to show the complete increase–decrease behavior. In the other case, the time lag was not enough, so some stocks only showed the growing behavior.
We modify the response function to add a time shift parameter. With this parameter we wanted to analyze the importance in the order of the relation between returns and trade signs. In trade time scale and physical time scale, we found similar results. When we shift the order between returns and trade signs, the information from the relation between them is temporarily lost, and as outcome, the signal does not have any meaningful information. When the order is recovered, the response function grows again, showing the expected shape. We showed that this is not an isolated conduct, and that all the shares used in our analysis exhibit the same behavior. Thus, even if they are values of time shift that can give a response function signal, empirically, we propose that this time shift should be a value between \(t_{s} = \left( 0,2\right] \) time steps.
We analyzed the impact of the time lag in the response functions. We divided the time lag in a short and long time lag. With this division, we adapted the price response function in physical time scale. The response function that depended on the short time lag showed a stronger response. The long response function vanishes, and depending on the stock could take negative and non-negative values comparable to a random signal.
Finally, we checked the spread impact in price self-response functions. We divided 524 stocks from the NASDAQ stock market in three groups depending on the year average spread of every stock. The response functions signal were stronger for the group of stocks with the larger spreads and weaker for the group of stocks with the smaller spreads. A general average price response behavior was spotted for the three groups, suggesting a market effect on the stocks.
Data Availability Statement
This manuscript has no associated data or the data will not be deposited. [Authors’ comment: Due to the data copyright, it is not possible to deposit the data. However, the reader can check the implementation of the analysis in Ref. [24].]
References
H.-J. Ahn, J. Cai, Y. Hamao, R.Y.K. Ho, The components of the bid-ask spread in a limit-order market: evidence from the Tokyo stock exchange. J. Empir. Financ. 9(4), 399–430 (2002)
Y. Amihud, H. Mendelson, The effects of beta, bid-ask spread, residual risk, and size on stock returns. J. Financ. 44(2), 479–486 (1989)
M. Benzaquen, I. Mastromatteo, Z. Eisler, J.-P. Bouchaud, Dissecting cross-impact on stock markets: an empirical analysis. J. Stat. Mech. Theory Exp. 2017(2), 023406 (2017)
J.P. Bouchaud, J. Kockelkoren, M. Potters, Random walks, liquidity molasses and critical response in financial markets. Quant. Financ. 6, 115 (2004)
J.-P. Bouchaud, The subtle nature of financial random walks. Chaos 15(2), 026104 (2005). https://doi.org/10.1063/1.1889265
J.P. Bouchaud, D. Farmer, F. Lillo, How Markets Slowly Digest Changes in Supply and Demand (North-Holland, Amsterdam, 2008)
J.-P. Bouchaud, Y. Gefen, M. Potters, M. Wyart, Fluctuations and response in financial markets: the subtle nature of “random” price changes. Quant. Financ. 4(2), 176–190 (2004). https://doi.org/10.1080/14697680400000022
J.-P. Bouchaud, M. Mézard, M. Potters, Statistical properties of stock order books: empirical results and models. Quant. Financ. 2(4), 251–256 (2002)
C. Callahan, C. Lee, T. Yohn, Accounting information and bid-ask spread. Account. Horiz. 11, 50–60 (1997)
A. Chakraborti, I. Toke, M. Patriarca, F. Abergel, Econophysics: empirical facts and agent-based models. Quantitative Finance Papers, 09 (2009)
K.H. Chung, B.F. Van Ness, R.A. Van Ness, Limit orders and the bid-ask spread. J. Financ. Econ. 53(2), 255–287 (1999)
R. Cont, Empirical properties of asset returns: stylized facts and statistical issues. Quant. Financ. 1, 223–236 (2001)
J.D. Farmer, L. Gillemot, F. Lillo, S. Mike, A. Sen, What really causes large price changes? Quant. Financ. 4(4), 383–397 (2004)
J.D. Farmer, P. Patelli, I.I. Zovko, The predictive power of zero intelligence in financial markets. Proc. Natl. Acad. Sci. 102, 2254 (2003)
X. Gabaix, P. Gopikrishnan, V. Plerou, H. Stanley, A theory of power-law distributions in financial market fluctuations. Nature 423, 267–70 (2003). https://doi.org/10.1038nature01624
A. Gerig, A theory for market impact: how order flow affects stock price. Quantitative Finance Papers, 04 (2008)
L.R. Glosten, L.E. Harris, Estimating the components of the bid/ask spread. J. Financ. Econ. 21(1), 123–142 (1988)
J.E. Griffin, R.C.A. Oomen, Sampling returns for realized variance calculations: tick time or transaction time? Econ. Rev. 27(1–3), 230–253 (2008)
S. Grimm, T. Guhr, How spread changes affect the order book: comparing the price responses of order deletions and placements to trades. Eur. Phys. J. B 92, 1–11 (2018)
S. Krause, J. Fiegen, T. Guhr, Emergence of stylized facts during the opening of stock markets. Eur. Phys. J. B (2018)
F. Lillo, Introduction to market microstructure and heterogeneity of investors. Comput. Soc. Sci. Complex. Syst. 203, 73–89 (2019). https://doi.org/10.3254/190006
F. Lillo, J. Doyne Farmer, R.N. Mantegna, Master curve for price-impact function. Nature 421, 129–30 (2003). https://doi.org/10.1038/421129a
J.F. Lillo, D. Farmer, The long memory of the efficient market. Stud. Nonlinear Dyn. Econ. 8(3), 35 (2004)
J.C.H. Londono, First release—Price response functions and spread impact in correlated financial markets code. (2020)
M.C. Münnix, R. Schäfer, T. Guhr, Compensating asynchrony effects in the calculation of financial correlations. Phys. A Stat. Mech. Appl. 389(4), 767–779 (2010). https://doi.org/10.1016/j.physa.2009.10.033
M.C. Münnix, R. Schäfer, T. Guhr, Impact of the tick-size on financial returns and correlations. Phys. A Stat. Mech. Appl. 389(21), 4828–4843 (2010)
M.C. Münnix, R. Schäfer, T. Guhr, Statistical causes for the Epps effect in microstructure noise. Int. J. Theor. Appl. Financ. 14(08), 1231–1246 (2011)
Q.N. Nguyen, S. Aboura, J. Chevallier, L. Zhang, B. Zhu, Local Gaussian correlations in financial and commodity markets. Eur. J. Oper. Res. 285(1), 306–323 (2020)
M. Potters, J.P. Bouchaud, More statistical properties of order books and price impact. Phys. A Stat. Mech. Appl. 324(1), 133–140 (2003)
V. Plerou, P. Gopikrishnan, X. Gabaix, H.E. Stanley, Quantifying stock-price response to demand fluctuations. Phys. Rev. E 66(2), 027104 (2002). https://doi.org/10.1103/PhysRevE.66.027104
V. Plerou, P. Gopikrishnan, B. Rosenow, L.A.N. Amaral, H.E. Stanley, T. Guhr, Random matrix approach to cross correlations in financial data. Phys. Rev. E 65, 066126 (2002)
V. Plerou, H.E. Stanley, X. Gabaix, P. Gopikrishnan, On the origin of power-law fluctuations in stock prices. Quant. Financ. 4(1), 11–15 (2004)
B. Rosenow, Fluctuations and market friction in financial trading. Int. J. Mod. Phys. C 13(03), 419–425 (2002)
T.A. Schmitt, D. Chetalova, R. Schäfer, T. Guhr, Non-stationarity in financial time series: generic features and tail behavior. EPL (Europhys. Lett.) 103(5), 58003 (2013)
E. Smith, J.D. Farmer, L. Gillemot, S. Krishnamurthy, Statistical theory of the continuous double auction. Quant. Financ. 3(6), 481–514 (2003). https://doi.org/10.1088/1469-7688/3/6/307
M. Theissen, S.M. Krause, T. Guhr, Regularities and irregularities in order flow data. Eur. Phys. J. B 90, 218 (2017)
I.M. Toke, Market Making in an Order Book Model and Its Impact on the Spread (Springer, Milan, 2011), pp. 49–64
B. Tóth, I. Palit, F. Lillo, J.D. Farmer, Why is equity order flow so persistent? J. Econ. Dyn. Control 51(C), 218–239 (2015)
S. Wang, Trading strategies for stock pairs regarding to the cross-impact cost. (2017). arXiv:1701.03098
S. Wang, T. Guhr, Local fluctuations of the signed traded volumes and the dependencies of demands: a copula analysis. J. Stat. Mech. Theory Exp. 2018(3), 033407 (2018)
S. Wang, S. Neusüß, T. Guhr, Grasping asymmetric information in price impacts. Eur. Phys. J. B 91(11), 266 (2018)
S. Wang, S. Neusüß, T. Guhr, Statistical properties of market collective responses. Eur. Phys. J. B 91(8), 191 (2018)
S. Wang, R. Schäfer, T. Guhr, Average cross-responses in correlated financial markets. Eur. Phys. J. B 89(9), 207 (2016)
S. Wang, R. Schäfer, T. Guhr, Cross-response in correlated financial markets: individual stocks. Eur. Phys. J. B 89(4), 1 (2016)
Acknowledgements
We thank S. Wang for fruitful discussions. One of us (JCHL) acknowledges financial support from the German Academic Exchange Service (DAAD) with the program “Research Grants - Doctoral Programmes in Germany” (Funding programme 57381412).
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
TG proposed the research. SMK and JCHL developed the method of analysis. The idea to look the time shift and to analyze the spread impact was due to JCHL, and the idea of the time lag analysis was due to SMK; JCHL carried out the analysis. All the authors contributed equally to analyze the results and write the paper.
Corresponding author
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Henao-Londono, J.C., Krause, S.M. & Guhr, T. Price response functions and spread impact in correlated financial markets. Eur. Phys. J. B 94, 78 (2021). https://doi.org/10.1140/epjb/s10051-021-00077-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1140/epjb/s10051-021-00077-z