{'fraction_non_alphanumeric': 0.0358292893101728, 'fraction_numerical': 0.015238786339516532, 'mean_word_length': 4.790441176470588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Common Scaling Patterns in Intertrade Times of U. S. Stocks

We analyze the sequence of time intervals between consecutive stock trades of thirty companies representing eight sectors of the U. S. economy over a period of four years. For all companies we find that: (i) the probability density function of intertrade times may be fit by a Weibull distribution; (ii) when appropriately rescaled the probability densities of all companies collapse onto a single curve implying a universal functional form; (iii) the intertrade times exhibit power-law correlated behavior within a trading day and a consistently greater degree of correlation over larger time scales, in agreement with the correlation behavior of the absolute price returns for the corresponding company, and (iv) the magnitude series of intertrade time increments is characterized by long-range power-law correlations suggesting the presence of nonlinear features in the trading dynamics, while the sign series is anti-correlated at small scales. Our results suggest that independent of industry sector, market capitalization and average level of trading activity, the series of intertrade times exhibit possibly universal scaling patterns, which may relate to a common mechanism underlying the trading dynamics of diverse companies. Further, our observation of long-range power-law correlations and a parallel with the crossover in the scaling of absolute price returns for each individual stock, support the hypothesis that the dynamics of transaction times may play a role in the process of price formation.

We analyze the sequence of time intervals between consecutive stock trades of thirty companies representing eight sectors of the U. S. economy over a period of four years. For all companies we find that: (i) the probability density function of intertrade times may be fit by a Weibull distribution; (ii) when appropriately rescaled the probability densities of all companies collapse onto a single curve implying a universal functional form; (iii) the intertrade times exhibit power-law correlated behavior within a trading day and a consistently greater degree of correlation over larger time scales, in agreement with the correlation behavior of the absolute price returns for the corresponding company, and (iv) the magnitude series of intertrade time increments is characterized by long-range power-law correlations suggesting the presence of nonlinear features in the trading dynamics, while the sign series is anti-correlated at small scales. Our results suggest that independent of industry sector, market capitalization and average level of trading activity, the series of intertrade times exhibit possibly universal scaling patterns, which may relate to a common mechanism underlying the trading dynamics of diverse companies. Further, our observation of long-range power-law correlations and a parallel with the crossover in the scaling of absolute price returns for each individual stock, support the hypothesis that the dynamics of transaction times may play a role in the process of price formation. Investigations of price dynamics of financial assets and indices have long been the key focus of economic research [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]. Recent studies, however, have turned to the information offered by other aspects of the trading process such as volume of shares traded at each transaction [24,25] or number of trades in a unit time [26,27], and their possible relation to price formation [7,28,29,30,31]. Empirical observations suggest a relationship between price and trading activity (Fig. 1). In addition, the impact of a significant price change on the level of trading activity can persist for much longer than the corresponding effect on the level of price fluctuations (Fig. 1a,b). These features suggest that information may be contained in the structure and temporal organization of trading activity, and that a close analysis of trading dynamics may offer quantitative insight into the complex mechanism driving price fluctuations [16,28].
Recent studies have examined trading activity as measured by the average number of trades in a unit time [26,27]. However, aggregation into uniform time intervals may affect the analysis, since choosing a short unit time interval may result in many points with none or very few trades, artificially altering the heteroskedasticity of the process, while using a long unit time interval averages out multiple transactions, and the fine timing structure of the data can be lost [29]. To understand the dynamics of market activity on a trade-by-trade level, we consider the series of time intervals between consecutive trades, the intertrade times (ITT). Only few empirical studies of ITT have previously been carried out, examining a single actively traded stock over a period of a few months [29,32,33,34], rarely traded nineteenth century stocks [35], or foreign exchange transactions [36,37].
Here we empirically investigate the statistical and scaling properties of ITT over extended periods of time.
In particular, we hypothesize that trading dynamics may carry features independent of individual company characteristics such as industry sector, level of trading activity and market capitalization. We examine thirty stocks listed on the New York Stock Exchange (NYSE) from eight sectors of the US economy: Technology/Communications(4), Pharmaceutical(6), Retail&Food(8), Automotive(2), Oil(2), Aerospace(1), Financial(4) and Chemicals (3). We study the time intervals between consecutive stock trades over a period of four years -Jan. 93 till Dec. 96 -as recorded in the Trades and Quotes (TAQ) database (NYSE, New York, 1993). The thirty companies vary in their average market capitalization and exhibit different levels of trading activity with different numbers of trades over this period (Table I).
We first study the probability density function of ITT. The distribution changes as companies with more frequently traded shares have a higher peak at shorter intertrade times, while more rarely traded companies have tails extended over larger intertrade times (Fig. 2).
We find that the individual probability distributions for all thirty companies are well fit by a generalized homogeneous form -the Weibull distribution where δ is the stretched exponent (or shape parame- indicate the values of the scaling exponent characterizing power-law correlations in ITT and |∆IT T | over small and large times scales. α1 is computed in the scaling range 1 × 10 −5 to 5 × 10 −4 for the first seventeen companies which have substantially less than 10 6 trades, and from 4 × 10 −6 to 2 × 10 −4 for the remaining companies. α2 is computed in the scaling range 3 × 10 −3 to 10 −1 for all companies (Fig. 3b, ter) and τ is the characteristic time scale (Fig. 2a) [38]. Studies of short ITT sequences -IBM stock trades during Nov. 90 to Jan. 91 [29] and GE stock trades during Oct. 99 [34] -suggest stretched exponential behavior for the tails of the probability distributions, in agreement with Eq. 1 [39]. The power-law prefactor in the Weibull form accounts for the steeper (relative to the stretched exponential) trend in the distribution at small ITT values. This functional form is markedly different to the power-law form of the distribution of number of stock trades in a unit time reported previously [27].
Since different companies have different average inter-trade intervals ITT (Table I), they are also characterized by a different parameter τ . A function P (x, τ ) is a generalized homogeneous function if there exist two numbers r and s, termed scaling parameters, such that, for all positive values of the parameter λ, increments with large magnitude (shaded area) are followed by patches of less volatile increments with small magnitude, suggesting persistent behavior, in accordance with our finding (Fig. 5a). (e) Sign series of the increments of consecutive intertrade times. The apparent strong alternation between +1 and −1 is consistent with our finding of anti-persistent behavior at small scales (Fig. 5b).
one for each value of τ , data points collapse onto a single curve given by the scaling function where the number of independent variables is reduced by defining the scaled variable x ≡ x/τ . To test the hypothesis that there is a possibly universal structure to the intertrade time dynamics of diverse companies, we rescale the distributions. We find that for all companies, data conform to a single scaled plot -"data collapse" (Fig. 2c) [41]. Such behavior is a hallmark of scaling, and is typical of a wide class of physical systems with universal scaling properties [42].
Next, we investigate the temporal organization of ITT. Empirical observations show that like many other financial time series, the ITT data exhibit nonstationary behavior and complex variability with a superposed pattern  (Table I). (c) Same probability distributions as in (b) after rescaling P (ITT) by ITT and ITT by 1/ ITT . This rescaling is equivalent to that described in Eq. 3 as P (ITT) ≡ P (x, τ ) and τ ∼ ITT . Data points collapse onto a single scaled curve. The solid line represents a Weibull fit to the data points with δ = 0.72, τ = 0.94. of daily activity (Fig. 1). Patches of inactive trading are often followed by patches of more active trading within a trading day. Similar patterns can be observed on a daily, weekly and even monthly basis, independent of the average level of trading activity for a company. Such observations suggest that there may be a self-similar, fractal organization in the sequence of ITT over a broad range of time scales. To test this hypothesis we apply the de-trended fluctuation analysis (DFA) method [43,44]. The DFA method can accurately quantify fractal features in ITT, as it permits the detection of long-range correlations embedded in nonstationary time series, and avoids the spurious detection of apparent long-range correlations that are an artifact of trends in the data [45].
The DFA method consists of the following steps. We first integrate the ITT series to construct the profile where IT T is the series mean. Next, we partition the profile Y (k) into nonoverlapping segments of length n (number of consecutive intertrade intervals) and fit the local trend in each segment with a least-squares polynomial fit. We then detrend the profile Y (k) by subtracting the local polynomial trend in each segment of length n, and we calculate the root mean square fluctuation F (n) for the detrended profile. For order-l DFA (DFA-1 if l = 1, DFA-2 if l = 2, etc.) a polynomial function of order l is applied for the fitting of the local trend in each segment of the profile Y (k). This procedure is repeated for different scales n. A power-law relation F (n) ∼ n α indicates the presence of scaling in the ITT series. Thus the fluctuations in the ITT can be characterized by scaling exponent α, a selfsimilarity parameter that quantifies the fractal powerlaw correlation properties of the signal. The scaling or correlation exponent α is related to the autocorrelation function exponent γ (C(n) ∼ n −γ when 0 < γ < 1) and to the power spectrum exponent β (S(f ) ∼ 1/f β ) by α = 1 − γ/2 = (β + 1)/2 [43,46]. A value of α = 0.5 indicates that there are no correlations and the signal is uncorrelated (white noise). If α < 0.5 the signal is said to be anti-correlated, meaning that large values are more likely to be followed by small values. If α > 0.5 the signal is correlated and exhibits persistent behavior, meaning that large values are more likely to be followed by large values and small values by small values. The higher the value of α, the stronger the correlations in the signal.
Before performing the DFA analysis we pre-process the data by excluding all outliers in the ITT series exceeding ten times the standard deviation above zero. This naturally excludes large ITT values caused by unusual closures inside a trading day, as well as data entry errors. This procedure results in the removal of less than 0.06% of all data points. In addition, the split transactions that arise when the volume of an order must be matched by several opposing orders often results in a number of transactions having an execution time separated by less than a second. Given the one-second resolution of the recordings, these transactions result in between 4 − 16% zero intertrade intervals for individual company datasets, with a mean value of 7.3% for the whole database. Removal of all outliers and all zero intertrade times does not significantly affect the results of the DFA analysis for positively correlated signals [47].
We find that the ITT series for all companies exhibit long-range power-law correlations over a broad range of time scales from several trades to hundreds of thousands of trades characterized by a correlation exponent α > 0.5 (Fig. 3, Table I). This is consistent with the empirical observation that long segments of high trading activity (small values of ITT) may follow long segments of less active trading (large values of ITT) (Fig. 1b). We find that this scaling behavior is independent of the specific company and its market capitalization, the average level of trading activity and the industry sector. To confirm  (Table I). The ITT series of all companies exhibit systematically weaker correlations over time scales less than a trading day (small values for the scaling exponent α1), and stronger correlations over time scales above one trading day (larger values for α2). Group averages and standard deviations are shown to the right of the panel.
the presence of such strong persistent behavior we shuffle the data and obtain white noise behavior with exponent α = 0.5, significantly different from the behavior of the original ITT series (Fig. 3a). For all companies we observe two scaling regimes, one at short time scales ranging from several trades to a few thousand trades within a trading day, followed by a second regime ranging from thousands to hundreds of thousands of trades corresponding to time scales from days to almost a year (Fig. 3a-c). These two scaling regimes are separated by a bump in the scaling curve F (n) due to the periodic daily pattern in trading activity ( Fig. 1  and Fig. 3). Such periodic trends superposed on powerlaw correlated signals do not affect the value of the DFA scaling exponent [45].
Since different companies exhibit daily patterns in the ITT series characterized by a different number of trades per day, we align the scaling regimes for all companies by normalizing the scale n by the total number of trades in each series (Fig. 3b,c). Remarkably we find that all companies have common scaling behavior characterized by a correlation exponent α 1 = 0.64 ± 0.02 (group mean ± std. dev.) at time scales within a trading day, and by correlation exponent α 2 = 0.94 ± 0.05 at time scales larger than a trading day (Fig. 4). Furthermore, we find that a higher value of α 1 for a given company is usually accompanied by a higher value of α 2 , resulting in a systematic difference between the scaling exponents of α 2 − α 1 = 0.30 ± 0.05 (group mean ± std. dev.).
This correlation behavior of the ITT series is also surprisingly reminiscent of the scaling features of the absolute price return series [48]. For each company both series show (i) two scaling regimes separated by a crossover at time scales corresponding to one trading day, (ii) positive correlations within a trading day (α price 1 = 0.59 ± 0.01, group mean ± std. dev.), and even stronger correlations (α price 2 = 0.77 ± 0.06), over larger time scales, and (iii) very similar values of the DFA correlation exponents in the respective scaling regimes (Fig. 3a,d). Such paral- , for the magnitude series of the increments ∆ITT for companies Boeing (BA) and AT&T (T) obtained using DFA-2 analysis. Both series exhibit similar scaling behavior to that found for the ITT series (Fig. 3 a), with a crossover from lower to higher correlation exponent centered at the average daily number of trades for each company (vertical dashed line). In contrast, the magnitude series of the surrogate signal obtained by Fourier-phase randomization of the ITT series is uncorrelated with exponent α = 0.5 as observed for the shuffled ITT series. This change in the scaling (after Fourier-phase randomization) suggests that the magnitude series carries information about the nonlinear properties of the ITT [49]. Curves are vertically shifted for clarity. (b) Scaling of the sign series of ∆ITT. Strongly anti-correlated behavior at short time scales is followed by uncorrelated behavior over larger time scales. This scaling behavior remains unchanged after Fourier-phase randomization of the ITT, suggesting that the sign series relates to the linear properties of the ITT series. We take sign(∆ITT=0)=0, and we integrate the sign series before DFA analysis to accurately quantify strong anti-correlations [45,47]. To account for this integration we measure the slope of F (n)/n. lels in the scaling of ITT and absolute returns at both short and long time scales suggest an intrinsic relation between trading activity and stock price formation on an individual company basis.
To better understand the temporal organization of trading dynamics and the nature of the observed power-law scaling, we decompose the ITT series into a magnitude and sign series of the increments ∆ITT in the consecutive intertrade intervals. Since underlying market interactions determine the magnitude (|∆ITT|) and direction (sign(∆ITT)) of the ITT fluctuations, we separately analyze the correlations in the magnitude and sign series. Previous work has demonstrated that signals with identical long-range power-law correlations can exhibit different time ordering for the magnitude and sign series [50].
We find that for all companies the magnitude series exhibits long-range persistent behavior (Fig. 5a) with practically identical correlation exponents to the original ITT series -α mag 1 = 0.68 ± 0.02 (group mean ± std. dev.) over short time scales within a trading day and α mag 2 = 0.94 ± 0.06 over large time scales. Correlation in the magnitude series indicates that an increment with large magnitude is more likely to be followed by an increment with large magnitude (Fig. 1d). In contrast we find that the sign series for all companies is strongly anticorrelated over short time scales with α sign 1 = 0.04 ± 0.02 (group mean ± std. dev.) and is uncorrelated over large time scales with α sign 2 = 0.50 ± 0.01 (Fig. 5b). Thus our results suggest an empirical "rule" for the temporal organization of ITT fluctuations: a large positive increment in intertrade interval is followed by a large negative increment, and this holds over a broad range of time scales.
We next demonstrate that the scaling features of the magnitude and sign series are independent of those of the ITT series. We perform a Fourier transform on the ITT series, and preserve the Fourier amplitudes but randomize the Fourier phases. Then we take the inverse Fourier transform to create a surrogate signal. This procedure eliminates nonlinearities, preserving only the linear features (i.e., power spectrum) of the original ITT series [51]. The surrogate (linearized) signal has the same twopoint correlations as the original ITT series with practically identical correlation exponents α 1 and α 2 indicating long-range correlations (Fig. 3a). We find that the sign series derived from the surrogate signal shows scaling behavior virtually identical to that of the sign series derived from the original ITT series (Fig. 5b). However, the magnitude series derived from the surrogate (linearized) signal exhibits uncorrelated behavior -a significant change from the strongly correlated behavior we find for the original magnitude series (Fig. 5a). Thus the increments in the surrogate signal exhibit different time ordering for the magnitude, and do not follow the empirical rule observed for the increments of the ITT series, although the surrogate signal follows a scaling law identical to the original ITT series. Further, our results suggest that the ITT series has nonlinear properties encoded in the Fourier phases and represented by the long-range correlations in the magnitude series. In contrast, the sign series relates to the linear properties of ITT.
In summary, we present an empirical study of intertrade time dynamics for a diverse group of stocks listed on the NYSE. Our findings suggest that a single, possibly universal, functional form defines the probability density of the intertrade times of each company. Further, we find a common scaling behavior in the temporal organization of trading, characterized by long-range power-law correlations within a trading day and by a crossover to even stronger correlations over scales of days, months and years. These scaling patterns appear independent of level of trading activity, market capitalization or industry sector, and thus may be inherent to the trading process. The two scaling regimes in the ITT and |∆ITT| series may be a consequence of the time scales over which news is absorbed [28]. Since trading activity is influenced by information, there will be less coherence between intraday trading as information takes time to disseminate, thus leading to a lower value of the correlation exponent α. Over time scales greater than a day more information is available to investors, resulting in a transition to more coherent and thus more persistent behavior with a higher value of α. The universality of this behavior and our observation of a parallel with the crossover in the scaling of price fluctuations for each individual stock support the hypothesis that the dynamics of transaction times may play a role in the process of price formation, and may have implications for financial modeling based on continuous time random walks [40,52,53,54], stochastic subordinated-processes [37,55,56,57,58] and agentbased modeling [59,60,61,62] of market behavior.