{'fraction_non_alphanumeric': 0.037853632620533935, 'fraction_numerical': 0.010846947359100367, 'mean_word_length': 4.788826242952332, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Predicting market instability: New dynamics between volume and volatility

Econophysics and econometrics agree that there is a correlation between volume and volatility in a time series. Using empirical data and their distributions, we further investigate this correlation and discover new ways that volatility and volume interact, particularly when the levels of both are high. We find that the distribution of the volume-conditional volatility is well fit by a power-law function with an exponential cutoff. We find that the volume-conditional volatility distribution scales with volume, and collapses these distributions to a single curve. We exploit the characteristics of the volume-volatility scatter plot to find a strong correlation between logarithmic volume and a quantity we define as local maximum volatility (LMV), which indicates the largest volatility observed in a given range of trading volumes. This finding supports our empirical analysis showing that volume is an excellent predictor of the maximum value of volatility for both same-day and near-future time periods. We also use a joint conditional probability that includes both volatility and volume to demonstrate that invoking both allows us to better predict the largest next-day volatility than invoking either one alone.


INTRODUCTION
It is common knowledge among investors that trading volume is strongly connected to price change [1, 2], and the price-volume relationship in financial markets has been a popular research topic for economists for a long time. Although studies agree that there is a correlation between absolute price change (volatility) and trading volume [3], many indicate that the correlation is weak [4] and their analyses of time-lag correlations produce a variety of contradictory results [5][6][7][8][9][10][11][12]. The subtleties of the relationship between volume and volatility remain unclear [13] and disagreement persists. For example, Brailsford et al. report a significant cross-correlation between overnight return and trading volume [14]. Brooks indicates that including lagged volume may lead to modest improvements in forecasting performance [15] while Clark shows a nearly parabolic functional relationship between volume and volatility [16], and a popular model developed by Clark holds that volatility could be modeled as a subordinated random process, in which volume, insofar as it affects trading times, accounts for the majority of observed volatility clustering and leptokurtosis (i.e., heavy tails). On the other hand, several studies report that volume is only nominally useful in predicting volatility. Koulakiotis et al. report a negative relationship between volatility and trading volume [17]. Lamoureux and Lastrapes show that ARCH effects tend to disappear (i.e., volatility persistence is lost) when volume is included in the variance equation [6]. Sharma et al. even suggest that price returns of the NYSE are best described by the GARCH model in the absence of volume as a mixing variable [18]. Recently, Gillemot et al. demonstrated that the subordinated random process developed by Clark accounts for, at most, only a small fraction of observed volatility clustering and leptokurtosis [19].
In order to uncover the underlying relationship between volume and volatility, we focus on the most fundamental features of these two quantities, starting by examining the probability density function (pdf) of each, as well as the volume-conditional pdf of volatility in our dataset. Based on these elementary analyses, we show that the pdf for volume-conditional volatility is actually invariant under volume change when the units of volatility are scaled appropriately, in close connection to similar work carried by out Yamasaki et al., who reported a universal scaling function for return intervals of volatility [25]. We then propose a new probability density function which links the occurrence of volatility and volume. We further investigate the highest portion of volatility distribution in certain volume regimes and propose a quantity we refer to as "local maximum volatility" (LMV), which we show is closely related both to a given day's volume, as well as the volume of days previous.

DATA AND METHODS
We analyze the 30 stocks comprising the Dow Jones Industrial Average, using daily values from the 17-year time period from April 1990 to June 2007, for a total of 130,410 data points. We avoid data after June 2007 due to the potential for high non-stationarity in the volume time series associated with the world financial crisis, although further analysis indicates that our results do not change when post-2007 data is included.
For each of the 30 stocks i, we calculate the daily logarithmic change, commonly referred to as the return, of price p i (t) and also the daily normalized logarithmic trading volume Q i (t), calculated from the trading volume Q i (t) as for a given stock i, where Y i represents a least-squares linear fit of ln Q i [20], which removes the global trend over the entire 17-year period. For each different stock, we define the normalized volatility g i (t) and normalized logarithmic volume v i (t) from the raw returns and raw logarithmic volume by and where · · · denotes a time average over the period studied.
Here σ R = R 2 − R 2 and σQ = Q2 − Q 2 are the standard deviations of R(t) andQ(t), respectively. Note that the volatility is expressed in terms of absolute value while the logarithmic volume can be both positive and negative. In this paper, the volume indicates the normalized logarithmic volume v i (t), and volatility indicates the normalized volatility g i (t).

ANALYSIS
We begin by examining the probability density function (pdf) of the normalized logarithmic trading volume, which we find in Fig. 1(a) to be in excellent agreement with a unit Gaussian. The normal curve is often a null model for various econometric quantities. For example, Wang et al. [21] have shown that a normal curve is also a good fit for trading values. However, the pdf of volatility is widely known to be more leptokurtic (i.e., fat-tailed) than a normal fit, which we show in the inset picture in Fig. 1(b) as a log-log plot. The solid red line is the pdf of volatility, the tail of which we observe roughly matches a power-law distribution, as was pointed out in Ref. [22]. We also find the distribution of returns to be leptokurtic as well, being better fit by a Laplace distribution than a Gaussian, in agreement with work by Podobonik et al. on NYSE stocks [23].
The tendency of trading volume and price change to move together has important implications in the prediction of financial risk. Recent studies have revealed the long-term crosscorrelation of volume changes with price changes [24], and also the positive correlation of price changes with volume [4,26]. As the absolute value of return, volatility should be a better indicator for market fluctuation and so we investigate the pdf of volatility given a specified volume. As shown in Fig. 1(b), the conditional volatility distributions for various volumes seem very similar, which leads us to search for scaling features that unify these distributions. We draw inspiration from the work of Yamasaki et al., who analyzed the distribution of return intervals τ between volatilities larger than a specified threshold q [25]. They found that the distributions for different q across seven stocks and currencies all collapsed to a single curve when plotted in units scaled by the mean return interval, dependent on q. We investigate here whether a similar scaling parameter exists that could unify these distributions. This scaling parameter should incorporate volume dependence the same way τ incorporates q dependence in Yamasaki's work.
Redrawing the conditional volatility distributions using the scale parameter v ′ , where v ′ ≡ v + 4.5, results in all conditional distributions collapsing onto the same curve, regardless of the value of volume, as shown in Fig. 1(c), meaning that all conditional volatility distributions are unified, differing only by a factor of the volume chosen, very similar to Yamasaki's findings on volatility return intervals. We have chosen the offset in a volume of 4.5 to avoid singularities and unphysical values, since normalized volume as defined in Eq. 4 can be a non-positive quantity.
We next investigate what unified pdf these distributions follow. In Fig. 1(d) the volume-conditional pdfs are offset for better visibility. We notice that the tails of these distributions are too curved to fit power-laws. After investigating such distributions as log-normal and stretched exponential, we find the best fit using power-law distributions with exponential cutoffs.
Thus the distribution of volatility given a certain value of volume should be Using fitted values for α, β, a, b, we show the contour plot for the probability density function of Eq. 6 to fit the data seen in Fig. 1(b). We show that either decreasing g(volatility) or increasing v(volume) results in monotonic increases in the probability density. Higher volatilities are far more localized in their range of volumes than low volatilities, leading to the possibility that higher volatilities may be predicted from volume.
However, as Fig. 1(c) shows, the above pdf can be scaled in v ′ (v ′ ≡ v + 4.5), which leads us to add volume as a variable of the conditional volatility distribution function. Thus we assume ξ = αv + a and ς = βv + b, making Eq. 5 Using a maximum likelihood estimation for the data shown in Fig. 1(b), we find α = 0.4, β = −1.23, a − 2.5, and b = 3. We draw a contour plot using these parameters with Eq. 6 in Fig. 2, showing that g (volatility) and v (volume) increase concurrently given a certain probability density value. Specifically, we note that while low volatilities can occur over the entire range of volumes fairly regularly, higher volatilities have a strong tendency to occur only with larger volumes, meaning that high volatilities may be predictable from volume, although low volatilities cannot.
As a consequence, we restrict our analysis to the days comprising the largest portion of volatilities-which is appropriate, given that days of high volatility are the ones of greatest interest to traders and market researchers. To do this we introduce the quantity "local maximum volatility" (LMV), which, because it is closely related both to a given day's volume and the volume of previous days, allows the possibility of making predictive statements. We define the LMV parameter, denoted by g LM , by partitioning the range of observed trading volumes into bins u 1 , u 2 , u 3 , . . . u n . Then LMV is the maximum volatility observed in a given range of trading volumes, i.e., the volatility of the most volatile day a given trading volume has co-occured with. Although correlation between volatility and logarithmic volume is weak, we find that, in general, LMV and logarithmic volume are highly correlated. We demonstrate this in Fig. 3(a) using the example of the Boeing Company (BA). For BA, we observe that while the correlation coefficient between same-day volume and volatility is only 0.5, the correlation coefficient between volume and LMV is 0.93. We further investigate the correlation between volatility and volume using the scatter plot of volatility against volume in Fig. 3. A characteristic triangular shape can be seen in both the scatter plot of (a)volatility vs. the same-day volume and (b)volatility vs. the previous day's volume. The volume ranges used to define LMV are delimited by defined bins as is shown in Fig. 1(a) (30 bins evenly divided from −3 to 3). As defined in Eq. 7, we use the highest volatility in each given bin. In both cases, the maximum volatility matching a given volume is shown in red triangles and a linear regression fit is shown in solid black, visually confirming the calculated correlation. Because it is possible that the volatilities used in LMV could originate in a narrow, unusually volatile time window (e.g., one week), and thus be giving spurious results, we investigate the timing of the high volatility days used. Figures 3(c) and 3(d) show that these high volatility days do indeed occur throughout the span of the time period under consideration, which ensures the universal representativeness of LMV.
We now generalize the analysis shown in Fig. 3 for sameday and one-day offsets to variable time offsets up to 16 days. Our results are shown in Fig. 4. In the figure, we show the mean correlation coefficient against time-lag for the 30 DJIA stocks. The figure shows that while the correlation between volume and volatility quickly drops to zero for almost any nonzero time-lag, the correlation between volume and LMV retains significant value (≈ 0.4) at a one-day lag and remains noticeable (≈ 0.2) even with a 4-day time-lag, indicating significant potential for predicting days of potential largest volatility, and therefore largest risk, which is extremely important in protecting investments during a financial crisis [27].
The fact that the possible volatility is closely tied to the same-day trading volume is intuitive, as the extent to which the price can change is a function of quantity of trading that has transpired in a given day. The connection between volume and future volatility is more interesting. Because volatility is already widely known to correlate with its own values in the immediate future, this result may seem trivial. We later present evidence (see Fig. 5) that our findings go beyond this obvious result, that the inclusion of volume really does add non-redundant information into the prediction scheme. Additionally, as has been shown by Gillemot et al. the tendency for volatility to cluster is not a simple volume effect resulting from reductions in average trading time [19]. Figure. 5(a) and (b) show the conditional distribution of P (v(t)|g 0 (t + 1)) and P (g(t)|g 0 (t + 1)). Here g 0 (t + 1) represents the subset that contains the highest 1% or lowest 1% of volatilities. Fig. 5(a)shows the quintile distribution of the volume today, given a specified volatility tomorrow while Fig. 5(b) shows the volatility today, given a specified volatility tomorrow. In the absence of memory effects, Figs. 5(a) and 5(b) would be completely flat distributions, in both highest and lowest volatility cases. Instead we clearly see memory effect in highest cases. 20% of volumes account for roughly 40% of the days preceding the highest (top 1%) volatilities. This effect is monotone across the quintiles and the most extreme example of underrepresentation being that the lowest 20% of volumes account for approximately 10% of the highest volatilities. For the lowest 1% of volatilities we find no such effect. The distribution of days preceding low volatility is statistically the same as a flat distribution across volume. That low volatility days do not have a statistically different distribution in volumes agrees with earlier observations seen in Fig. 2 that low volatilities have a broad range across vol-  Figures (a) and (b) show the conditional distribution of P (v(t)|g0(t + 1)) and P (g(t)|g0(t + 1)), averaged over all 30 stocks. Here g0(t+1) represents the subset containing largest (closed symbols) or smallest (open symbols) 1% of volatility observed. The volatility g(t) and normalized logarithmic volume v(t) are divided into quantiles. The error bars show ± standard deviation. Figures  (c) and (d) show P (g(t + 1) ∈ g0|vn(t), gn(t)), the distribution by quintile (n=1...5) for v and g values of today given that tomorrow will have the (c) smallest or (d) largest 1% of volatility, where n is increasing with size and g0 denotes the set of the (c) smallest 1% of day volatilities or (d) the largest 1% of day volatilities. The radius of the circle is proportional to P (g(t + 1) ∈ g0|vn(t), gn(t)) = 1%, the unconditioned probability that the next day's volatility will be in the smallest or largest 1% of volatility. umes, and hence are not predictable from volumes. We observe similar results when considering the distribution a day's volatility, knowing that the next day will have a particular high or particularly low volatility. Again, days prior to high volatility are overrepresented in the highest quintile of volatility, but days prior to low volatility have a distribution that is essentially flat across quintiles in volatility.
In summary, Fig. 5(a) and (b) show not only that high volatility tends to follow high volatility, but also high volatility tends to follow high volume. No such significant effects can be observed for low volatility.
Extending this analysis, we include both volume and volatility in order to better predict next-day volatility. Figure 5(c) and (d) give P (g(t + 1) = A|v n (t), g n (t)), the distribution of the days preceding the highest or lowest 1% of volatilities according to preceding volatilities and volumes broken up into quintiles (n = 1 . . . 5). The probabilities are given in units of P (g(t + 1) = A), the unconditioned probability of a defined volatility (top or bottom 1%) day, which is equal to 1%. Figure 5(c) and (d) therefore divide the 1,304 data points (1% of all data points) into 5 × 5 = 25 equal-sized sets of approximately 52 points each. Figure 5(c) shows the relative probability of that one particular set of data points to precede a high volatility day with probability proportional to circle radius. Essentially, Fig. 5(c) and (d) are heat maps with bubble size being used in lieu of color intensity.
Were there no next-day memory effect, all bubbles would be of equal size. However, in Fig. 5(d) we find that the joint conditional probability for the top quintiles P [g(t + 1) = p|v 5 (t), g 5 (t)] is approximately three times the size of the unconditioned probability P (g(t + 1) = A), indicating that days with the top quintiles of both volatility and volume are overrepresented in the days preceding high volatility by a factor of three. In contrast, the probability for the bottom quintiles P [g(t + 1) = p|v 1 (t), g 1 (t)] is only half that of the unconditioned probability, meaning that days with the bottom quintiles in both volatility and volume are underrepresented in the days preceding high volatility by a factor of two. We compare this to the results yielded from the investigation in Fig. 5(a) and (b), where the greatest overrepresentation by quintile is approximately only a factor of two. This indicates that the volume and volatility combined are a more powerful predictor of upcoming high volatility than either volume or volatility alone. The variation of results by both row and column also indicates that there is information potentially important for volatility prediction embedded into both quantities. We confirm this by applying a simple multiregression model predicting next-day volatility from either volatility alone or volatility and volume together. We find an average 6% increase in the R 2 value when volume is included.
By contrast, Fig. 5(c) shows the distribution by quintile of volume and volatility for days preceding the very lowest volatility days. The variation in bubble size is considerably reduced compared to that of Fig. 5(d), showing that days preceding low volatility are far more evenly distributed in volatility and volume. Additionally, there are no clear pronounced trends across row or column that would indicate a clear effect of either volume or volatility on the next day's volatility value.

CONCLUSION AND FURTHER DISCUSSION
We have examined the relationship between trading volume, volatility, and LMV using correlation and time-lagged correlation, conditional probability distributions, as well as joint conditional probability analysis, and distribution fits we have proposed. We find that while the same-day correlation between the logarithmic volume and volatility is fairly week, the same day and time-lagged correlation between logarithmic volume and a quantity we introduce as "local maximum volatility" (LMV) are both very strong. This finding may help explain the inconsistency between investors intuition about market stability during high volume days and the empirical fact that the relationship is not strong. Although it is essential that a trader understands the effects of trading volume [1, 2], the weak correlation coefficient (≈ 0.2) is unable to explain the importance of trading volume [37]. While humans often interpret correlations to be stronger than they are (i.e., illusory correlation [29]), in the case of volume-volatility correlations there are obvious mechanisms indicating their reality. Thus, we further investigate and find out that through the strong correlation between volume and LMV, a trader's interpretation may be justified. We believe LMV to be a more accurate representation of an investor's memory than the actual volatilities themselves. The cognitive bias in which humans disproportionately focus their attention on negative experiences and threats over positive experiences and aid is well-documented in cognitive psychology and termed the "negativity bias" [30], summarized by Baumeister et al. [31] as "bad is stronger than good." The manifestation of negativity bias in trading in the form of volatility asymmetry-wherein negative price changes cause a market to become more volatile than positive price changes-has been observed in many different countries [32][33][34][35][36]. Thus our findings using LMV match the behavior of investors because LMV is a more important quantity when it comes to human perception. An investor may thus be justified in having an negative attentional bias because (s)he does not know the next-day volatility level in advance and must treat the "risk of risk" as the relevant quantity.
Our findings also indicate that high volatility tends to follow high trading volume, although low volatility is largely unaffected by volume. Because we observe that high volatility strongly affects trading volume, we posit that volume can be used to predict future volatility, especially on days of highest volatility. Based on the new dynamics we provided and the empirical analysis, we determine the predictive ability of volume in estimating near-future high volatility. Our analysis shows that volume is as useful in predicting future volatility as volatility itself and using both volume and volatility in the prediction is better than using either of them alone. Further, we have introduced the functional form that gives the tail of the volume-conditional volatility distribution and shown that