In this post I’ll share part of an analysis I’m doing on a volume based indicator.
I wanted to examine the correlation between a stock’s volume and its price movement. From published research (e.g. this paper) I knew there should be a relationship. Before using it in a model though I do my own analysis to understand not only what the relationship is, but also how reliably it holds up over time.
There are many ways to construct a volume based indicator, for this post I’m only going to cover one.
For a given stock, the indicator is based on the past 15 days’ worth of trading data. For each day, the stock’s trading volume is multiplied by the percentage change in its closing price from the previous day. E.g., if 10,000 shares of the stock was traded on a given day, and it’s price went down 1% that day, the contribution from that day would be 10,000 * -0.01 = -100. If 10,000 shares of the stock were traded on a given day, and it went up 0.5% that day, the contribution from that day would be 10,000 * 0.005 = 50. This value is calculated for each of the past 15 trading days.
We now have 15 values for the stock. Each value is multiplied by a weighting factor. The weighting factor is 15 for the prior day’s value, 14 for two days prior, etc. The weighting factor for 15 days prior is simply 1. We then take all of the weighted values that are positive (i.e., values from days the stock went up) and sum them together. We do the same for all of the values that are negative (i.e., values from days the stock went down).
We’re down to two values, a positive value (from days the stock closed up) and a negative value (from days the stock closed down). Either value could also be zero, of course, if the stock went up or down all 15 days. The indicator for this stock on this particular day is the sum of these two values divided by the difference between these two values:
indicator = (positive value + negative value) / (positive value – negative value)
Don’t forget that the ‘negative value’ is, indeed, negative, so the above equation corresponds to the difference between two numbers divided by the sum of the same two numbers. Thus, the indicator as constructed will always have a value between -1 (if the stock went down all 15 days) and +1 (if the stock went up all 15 days).
There are multiple ways to use an indicator, for this post I’ll examine how it’s related to the relative change in stock price over the next 5 trading days.
I chose 29 dow stocks for this analysis, for the years 2005 – 2015. To be precise, I used the stocks that were members of the Dow Jones Industrial Average at the beginning of 2016, excluding Visa (which wasn’t publicly traded for the entire time frame).
We want to see if high or low values of the indicator, relative to the other stocks, are correlated with outperforming those other stocks over the next five trading days.
For each day over the study period, we rank the 29 stocks according to their indicator values (0 through 28, with 0 being the stock with the highest indicator value). We then find the three stocks that had the best performance over the following five days. We look up the indicator rank of those three stocks, and increment counters corresponding to their ranks. For example, if the three stocks that did the best over the next five days have ranks 0, 26, and 28, we increment counters corresponding to ranks 0, 26, and 28. There are a total of 29 counters, one for each rank position.
The above process is repeated for every day over the eleven year period. A graph of the results is below:
The correlation between volume indicator rank and stock price change over the following five days certainly doesn’t look strong from this graph. It appears to be random numbers centered on 275. In fact, if the samples were evenly distributed each rank would have occurred 286 times.
If you look carefully, though, you’ll see that ranks 24 through 28 are all above 300 occurrences. It turns out that, over this study period, stocks that had one of the five lowest indicator ranks were 14% more likely to be among the best three performers over the following five trading days. I.e., more down volume is somewhat correlated with a greater likelihood of the stock outperforming over the following week.
That isn’t a very strong indicator. There are better indicators out there, and it’s possible that with different parameters there’s a volume based indicator better than this one, too. There’s a good enough correlation with this indicator though that it’s worth investigating further.
An important question is whether or not this is a reliable indicator. I won’t put the details here, but it turns out that over the study period this indicator was correlated to stock price change about 50% of the years. I.e., in five of the years this volume indicator was correlated to a rise in the stock price over the next five trading days (2005, 2007, 2008, 2009, 2013), and in the other six years it was not. Again, that isn’t great, but with some research it may be possible to find a better version of this indicator. It’s interesting to note that it was not correlated to outperformance in most of the bull market years after the 2008 crash.
There were a lot of places in this post where I said I would include results from just one of many possible ways to analyze volume / stock price change correlation. In future posts I’ll analyze variations of the volume indicator presented here.