I wanted to see how the stock price and volume relationship is locally.
So I tried ranking both the daily return (at day t) and volume (at day t) base on a 30 day rolling window with historical daily stock data and plotted the distribution as shown in the below figure (top). The ranking is based on sorting values in ascending order, and as you can see, when volume is locally high the price return is either locally low or high.
I have also plotted the distribution of ranking of the next day return (at day t+1) and volume (at day t) to see if this "shape" remains, as shown in the figure (bottom), and it does.
Can anyone explain why this shape still remains for day t+1? This kind of price volume relationship must have been researched extensively... is there some classic papers that you quant experts would recommend?
Thanks. A screen shot of the code is provided here.