Analysis Shows Stock Prices Tend to Cluster | TrendSpider Blog Skip to Main Content

Analysis Shows Stock Prices Tend to Cluster

|
Share on social media

One of my favorite parts of my job is to mess around with market data. Eventually, I found myself with a scatter plot comparing the price versus volume for Walmart Inc. (NYSE: WMT).

This chart was built with two-and-a-half years’ worth of ten-minute candles, with each point representing one candle. The X-axis represents the average price, calculated as [(High + Low)/2], and the Y-axis represents the volume of each candle.

Here’s how it looked:

Scatter plot comparing the price versus volume for $WMT.

Note: The volume axis was cropped by one million on this chart, but that doesn’t matter for the purposes of this analysis.

What is interesting here — and seems to matter — is that price values are clustered.

After creating this chart, I decided to split out older values to see if the clustering is relevant. The transformation made the points semi-transparent with time: the older is the point, the more transparent it would be.

Here’s what the chart looks like after the transformation:

Scatter plot comparing the price versus volume for $WMT with older values split out.

So far so good. Interesting, even.

The clusters to the left (e.g. price less than $70) consist of older values, meaning that WMT has not recently traded within this price range. Clusters after the $80 mark look much “fresher”. The $75 to $80 cluster consists of both older and newer points, which means that WMT has revisited this price range at some point.

At this point, I was getting very excited about the idea of price clustering.

I found myself wondering about whether or not having Volume as the Y-axis actually helps or not. I mean, it looks fine, but Volume axis does not contribute to understanding price clusters. On the other hand, without Volume as the Y-axis, the chart will end up looking like a single, crowded line of values (like the one below), which isn’t all that interesting to look at.

Scatter plot comparing the price versus volume for $WMT with volume as the Y-axis.

If you randomize the vertical placement of the points, using a random number (from zero to 1), you can visualize the data in a somewhat more useful way.

This is the same data as the single line above but scattered at random. The motivation behind this exercise was to focus on prices and clusters alone and to generate a visualization that can paint that information.

Here’s how it would look for WMT (remember that vertical coordinate actually means nothing):

Scatter plot comparing the price versus volume for $WMT with volume as the Y-axis and scattered at random.

Looks interesting!

The dots form stripes and the stripes are of various thicknesses. These stripes are easily visible, and it’s obvious that there are gaps in trading (price ranges where there were little to no trades at all, like $78 to $81).

The next thing to do would be to build a histogram, to see the picture from a slightly different angle.

Histogram comparing the price versus volume for $WMT.

In this visualization, I have calculated (a) number of candles and (b) summary volume traded for each of price ranges.

The picture looks pretty familiar, but now we can compare price clusters directly. For example, one can tell that WMT has traded in price range of $95 to $100 twice as long as the $65 to $70 range.

Here is the same visualization, but this time using 6 months of 5 min candles:

Scatter plot and histogram comparing the price versus volume for $WMT using 6 months of 5-minute candles.

Can you imagine seeing see smaller price clusters inside of these large clusters? Well, that’s exactly what happened in this example!

If one assumes that price tends to hang around the same clusters, and current WMT price is around $102, then one might calculate a profit-loss (P/L) ratio.

There are no recent solid clusters above $102, but there’s a little older strip around $104. The closest obvious cluster from below is $97 to $99.

I don’t really know how valuable this approach is, but it was a lot of fun to play around with. Is it useful? Maybe, but more research is required. For now, I hope you find it as interesting as I did.

Appendix: More Charts

Here are a bunch of scatter plot charts for a dozen randomly chosen symbols for you to explore:

NOTE: Charts below build from 23196 of 10-min candles each (since Tue, Jan. 03, 2017).

KO,10,bucket=0.5

$KO scatter plot and histogram.

IBM,10,bucket=2

$IBM scatter plot and histogram.

WMT,10,bucket=1

$WMT scatter plot and histogram.

AAPL,10,bucket=2

$AAPL scatter plot and histogram.

FB,10,bucket=2

$FB scatter plot and histogram.

AMZN,10,bucket=20

$AMZN scatter plot and histogram.

NFLX,10,bucket=5

$NFLX scatter plot and histogram.

NOTE: 13284 candles, since Tue Jan 02 2018 09:30:00 GMT-0500

MCD,10,bucket=1

$MCD scatter plot and histogram.

CSCO,10,bucket=0.5

$CSCO scatter plot and histogram.

Stay up-to-date: Subscribe to posts like this!

Receive automated updates from the Ruslan's Laboratory category
This site is protected by reCAPTCHA and the Google Privacy Policy and Google Terms of Service apply. Don't worry, we hate spam, too! See TrendSpider Privacy Policy for details.

Latest posts

|

Market Update Into September 7th: Inflation Data Incoming

Markets whipsawed last week as a wave of strong AI earnings hit the tape, crypto caught a bid, and Friday’s jobs report came in far hotter than expected, with 162,000 jobs added against estimates of just 53,000. AI and memory names led the charge as $AVGO, $DELL, and $HPE all crushed earnings, with $SNDK and […]
|

Uber Stock Faces AV Reckoning as Tesla Cybercab Launches

Uber Technologies (UBER) stock kicked off September with a double blow: a 3,300-person layoff (roughly 10% of its workforce) announced on September 2 to flatten management layers, immediately followed by the launch of Tesla’s Cybercab robotaxi service in Austin on September 4. Shares sold off heading into the Tesla event but have stabilized near $75-$76, […]
|

LULU Stock Tumbles After Q2 Earnings

Lululemon Athletica (LULU) stock reported Q2 2026 earnings of $2.92 per share, beating the $1.80 estimate by over 62%, but the headline beat was heavily distorted by an $0.86 EPS contribution from one-time IIPA tariff refunds. Revenue of $2.416B missed the $2.458B estimate, and the company slashed full-year 2026 EPS guidance from $10.95-$11.15 down to […]
|

DELL Stock Soars 15% on Q2 Beat, FY27 Guidance Boost

Dell Technologies (DELL) stock exploded higher after reporting Q2 FY2027 results on September 1 that crushed every major estimate: revenue of $47B (+58% YoY) versus the $45B consensus, and adjusted EPS of $7.04 versus the $4.91 estimate, a 43% beat. The company simultaneously raised its full-year revenue guidance from a $165B-$169B range to $192B and […]