Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd
Search
Shrewd'm.com Merry shrewd investors
Search
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd


The week's question
In December 2024, in the thread "Re: BRK: Why Not XOM?", BreckHutHigh asked the members: "What about the long road trips with kids?" This week it is put to everyone again. The button below opens the small thread re-asking it - read what others have said so far, then give your own answer as an ordinary reply.
Answer this questionContinue to Shrewd'mThis note won't appear again
Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (40) |
Author: elann 🐝🐝 HONORARY
SHREWD
  😊 😞

Number: of 6131 
Subject: Re: My new Program
Date: 01/25/26 9:50 PM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 10
We must be talking about two different things. I'm not interested in that Nasdaq graph. I am trying to reconstruct Robbie's BCC signal which clearly is derived from SPY closing prices. I am currently working on the part that has to do with New Highs and New Lows which GTR1 shows as:

Create [PcntNHC252]: [100*[[Sum [[[Closing g-price; quote_lag=0 days]/[Highest closing g-price over 251 days; lag=1 days]] > 1 ? 1 : 0] at step4]/[StockCount]]]
Create [PcntNHC252WMA9]: [[Weighted Sum of [PcntNHC252] over 9 days (daily weights=9,8,7,6,5,4,3,2,1); lag=0 days]/[Weighted Sum of [1] over 9 days (daily weights=9,8,7,6,5,4,3,2,1); lag=0 days]]
Create [PcntNLC252]: [100*[[Sum [[[Closing g-price; quote_lag=0 days]/[Lowest closing g-price over 251 days; lag=1 days]] < 1 ? 1 : 0] at step4]/[StockCount]]]
Create [PcntNLC252WMA9]: [[Weighted Sum of [PcntNLC252] over 9 days (daily weights=9,8,7,6,5,4,3,2,1); lag=0 days]/[Weighted Sum of [1] over 9 days (daily weights=9,8,7,6,5,4,3,2,1); lag=0 days]]
Create [NHNLDiff]: [1*[PcntNHC252WMA9] - 1*[PcntNLC252WMA9]]

I see I still have to bring the part about [PcntNHC252WMA9] so my nap time revelation as I described earlier is not quite complete.


Larry, I think you're completely lost.

The signal we're talking about looks at new highs and new lows among all Nasdaq listed stocks, as of the latest market day. If let's say there are currently 3000 Nasdaq stocks, and 300 of them hit a new 52 week high today, and 198 of them hit a new low, then NHNL for the day is 300-198=102. You can go back to previous days with the same calculation, which allows you then to produce any desired moving average, for smoothing purposes.

If the signal threshold is exactly zero, that's all you need to do. But if you're going to choose a non-zero threshold, as Zeelotes does, then the "new high count minus new low count" metric creates a problem. As the total number of Nasdaq listed stocks changes over time, the meaning of e.g. a -10 threshold for the signal changes. -10 out of 3000 stocks is not the same as -10 out of 2000 stocks. That's where the percentage calculation comes in. So, instead of calculating a simple difference, you calculate the percentage difference. i.e. 102/3000=3.4%, which is compared to a threshold of e.g. -10/3000=-0.33%.

Once you've got the threshold defined, and today's percentage of NHNL, and the moving average of your choosing, then you know your signal - bullish or bearish. And you can apply that signal to your investment of choice, in this case it's SPY I suppose.

Elan
Post New | Post Reply | Report Post | Recommend It!
Print the post
Members reply directly to elann here — and replies get answered. Reading is free; so is joining the conversation. Join Shrewd'm »
This community has written 6,106 posts about Mechanical Investing. The article-length ones it recommended most:
Dividend investing · 52 recs · 2025
Non-Mag7 screen · 34 recs · 2025
OT - Div yields and returns · 32 recs · 2024
Using AI to generate backtesting programs · 30 recs · 2025
Rankings for 19Dec2022 · 29 recs · 2022
Unthreaded | Threaded | Whole Thread (40) |


Announcements
Mechanical Investing FAQ
Contact Shrewd'm
Contact the developer of these message boards.

Best Of MI | Best Of | Favourites & Replies | All Boards | Followed Shrewds | Open Questions | Moving a community