High Low Oscillator
motivated by e-mail from Rick H.

There's this thing called (something like): new Highs Lows Oscillator.
You consider a basket of stocks (like the S&P500 collection) and do this:

  1. You count the number of stocks where (Today's Price) = (52-week High).
  2. You count the number of stocks where (Today's Price) = (52-week Low).
  3. You subtract the latter from the former.
  4. You repeat ...
>Huh? Subtract the latter from the former?
Yes:
High/Low Oscillator = (Number of new 52-week Highs) - (Number of new 52-week Lows)
Each day you repeat steps 1 to 3 so you get a chart of the variation in this number. That's the "oscillator".
If you plot these numbers for the last 30 days or so, you'll get a graph that ... uh ... oscillates.

Unfortunately, it's often difficult (expecially these days) to find stocks that are at their 52-week High.
Indeed, it's likely that there are NONE. In fact, it's possible that ALL stocks are at their 52-week low.
That makes the High/Low Oscillator sorta useless.

So I'd like to fiddle with that to see how many stocks have their current price within X% of the 52-week High.
For example, if X% = 2%, then we'd look for stocks where (Today's Price) ≥ 0.98*(52-week High)
I'd also like to fiddle to see how many stocks have their current price within X% of the 52-week Low.
For example, if X% = 3%, then we'd look for stocks where (Today's Price) ≤ 1.03*(52-week Low)

>And you can play with X%, right?
Right ... so we can get some idea of how many stocks are "in the neighbourhood" of their Highs and Lows (where X defines the neighbourhood).

Further, suppose I told you that there were 5 more stocks "in the neighbourhood" of their 52-week High then were near their 52-week Low.
In other words: Hi/Lo Oscillator = (Number of new 52-week Highs) - (Number of new 52-week Lows) = 5.
Would you say that was a large number?

>Is 5 a large number? I wouldn't think so.
Aah, but if I had just 20 stocks in my basket of stocks, then 5 would be pretty large, but if ...

>But if you had 500 stocks, then it'd be peanuts, eh?
Exactly, so I'd like to fiddle with the numbers so that the number generated is a percentage of the number of stocks in the basket.
To that end, we define:

For a basket of N stocks:

gHL(X) Oscillator = [ (Number of stocks within X% of their 52-week High) - (Number of stocks within X% of their 52-week Low) ] / N


Then if I say gHL = 12%, it'd mean that the percentage of stocks in the basket which were near their High is 12% higher than the percentage near their Low.

>But gHL could be negative, eh?
Yes, indeed.

>So where's the spreadsheet?
Just click on the picture to download the spreadsheet:

You type in a gaggle of stock (up to 500, in column K) and click the get ALL button ... then go for a coffee.
Then a bunch of data is downloaded and the daily gHL is calculated for the past month (roughly).
In fact, gHL(X) is calculated for X = 0%, 1% and 2% (or whatever you specify in cells M2, N2 and O2).

Notes:

  • The spreadsheet (illustrated above) contains a bunch of stocks (identified by their Yahoo symbols) ... mostly selected from the S&P500.
  • If you click that "other" button, you get data downloaded for a single stock ...but the chart don't hardly change (but the numbers in columns M, N & O change).
  • The chart displays the various percentages that are in a Table ... and the Table is changed only when the get ALL button is pressed.
  • All prices used in the calculations are Yahoo's Adjusted Close".
  • There must be something else to say ... but I can't imagine what it is.

Just remembered what I wanted to say.
For the situation depicted in the spreadsheet above, there are about 300 stocks and 156 were at their 52-week Low.
Just one was at its 52-week High ... but I can't remember who he was. **

>And what does gHL stand for?
It means great High Low.

I might also mention that the stocks you specify should have more than a year of Yahoo data.
I might also mention that, if you look at the situation a year ago, you'd get this:

**
Now I remember! In these days of financial stress, where do investors turn?
Guess!!
Shakespeare's comment