Saturday, March 24, 2007

Tracking Swing Highs And Lows In The Stock Market

My recent post showed how I use a basket of 40 S&P stocks evenly divided among eight sectors to track new highs and lows on an intraday basis. What we found is that intraday divergences between S&P 500 Index price (SPY) and the closing 30-minute new highs minus lows helps us identify short-term turning points. If the underlying principle is valid, however, it should be evident at other time frames. So let's take a look at five-day highs and lows and see if they similarly help us assess swing reversals in the market.

The above chart shows the data from the start of 2007 to the present. The pink line represents the number of stocks in my basket making closing five-day highs minus those making five-day lows. The dark blue line is the daily closing S&P 500 Index (SPY) price. Notice how the five-day new highs minus lows reliably peaks prior to seeing price peaks. We also see at the recent important market bottom that five day new lows were drying up. Those major divergences are marked by the light blue arrows. If you look closely at other price lows, you'll see other divergences. When new highs/lows aren't expanding with market rises/declines, reversal is much more likely. Before stocks start going up, they stop going down and vice versa.

As you can see from the recent market action, new highs minus lows have been steadily rising over the past several days. Even with the range bound action of the last two sessions, we're still seeing many more stocks making new highs than lows on a five-day basis. Until we see meaningful divergences similar to those observed at prior highs, I expect price to be able to grind higher.

In my database, I track everything from 30-minute to 65-day new highs/lows. I post 20-day new highs/lows daily to the Trading Psychology Weblog, and will begin posting the shorter-term data as well. This enables me to see emerging strength and weakness at multiple time frames, which is helpful in framing trades that entail trend-following vs. reversal. Putting the different time frames together into a coherent trading picture is particularly helpful and a topic I hope to tackle shortly.

8 comments:

MidKnight said...

This looks like fantastic info Brett! I'm primarily trading the Nikkei 225 and have been finding it difficult to get this sort of market internal data. I suppose I could manually input OHLC data into excel for a basket of Nikkei stocks in Tokyo at the end of each day. I won't have a rich history so it would take quite a while to get enough data to start mining with. Thanks for showing me how useful this information can be, I must have it.

Best regards,
Matt

Brett Steenbarger, Ph.D. said...

Yes, Matt, I think if you could get that end of day data for a representative basket of Nikkei stocks, that would be very informative. I'm not familiar with data vendors for those stocks, but I'd have to believe those data are available. Do keep me posted on the project; it's fascinating. Thanks for the note--

Brett

MidKnight said...

Yes Brett, I could use esignal for the data on the JASDAQ and Tokyo stocks. I've heard some horror stories about esignal for non-usa data as well as poor customer service so I'm somewhat reluctant. I was hoping DTN IQFeed would eventually offer it but that is not looking too promising :(

One point of clarification please. In this example we are looking at 5 day highs/lows. What exactly are you calling a 5 day high here?
a) Todays high was higher than the high 5 days ago
b) We have been making new highs for the last 5 days
c) The closing price is greater than the high 5 days ago (sorta sounds like this one)
d) The closing price is greater than the close 5 days ago
e) none of the above - you must be crazy

I'm confused because it says "the number of stocks in my basket making closing five-day highs". Initially I would have thought it to be point A above, but maybe you use the close because you want to see it hold onto that gain.

Thanks for your comments in advance.

Kind regards,
Matt

Brett Steenbarger, Ph.D. said...

Hi Matt,

A five day high means that today's closing price was the highest price of the last five trading sessions. We're looking at closing prices only.

Brett

Brandon Wilhite said...

Just a comment on the idea that the same principles hold true on all timeframes....

I'm not saying that is a completely false idea, but I'm not sure that it is completely true either. I believe that to some extent the 'fractal' nature of the markets breaks down, especially when examining different timeframes...In other words, I don't totally buy into the idea that the same chart pattern, for example, will work the same way on all timeframes. The same for other indicators as well.

I suppose I believe this because of my understanding that the human mind wants to comprehend and so we come up with heuristics to fit reality into our own boxes...one such heuristic, I submit, is the idea of the 'fractal' nature of the markets....While for most cases this is true, at points it breaks down. It's kind of like Newtonian physics...very good for the everyday, but when we start getting to the extremes, very large, small, fast, whatever, it doesn't work anymore. Likewise, I would say that 'yes' mostly markets are fractal, but at some points they are not. (Of course my argument is also based mostly on heuristics ;) .

I just throw this idea out there for consideration...It's something I've thought a lot about.

BW

Brett Steenbarger, Ph.D. said...

Hi Brandon,

My bad. I didn't mean to imply that the indicator would work on *all* time frames. There likely is a level of granularity at which things break down. I have found new highs/lows, however, to be very informative on an intraday basis as well as over such periods as several days, 20 days, and 52 weeks. It is quite flexible--

Brett

Brandon Wilhite said...

Brett,

I actually figured as much, you're much more subtle than that in your analysis...I mainly wanted to throw that thought out there for consideration. I believe *most* traders commit this fallacy in some way or another. It's just too tempting for the mind.

Incidentally, this is something I'd like to start tracking myself...once I get my database built.

BW

Brett Steenbarger, Ph.D. said...

Hi Brandon,

Yes, I think it's worth pursuing. I find the new highs/lows to be extremely valuable, esp. in gauging intermediate-term strength and weakness--

Brett