Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI
Shrewd'm.com Merry shrewd investors
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week! | How To Invest
Search MI


Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (1) |
Post New
Author: lizgdal   😊 😞
Number: of 5822 
Subject: NHNL using intraday prices
Date: 06/26/26 7:11 PM
Post Reply | Report Post | Recommend It!
No. of Recommendations: 10
There are slightly different ways to calculate the NHNL signal. I tried out some variations, and the results were similar. The outlier was using closing prices with a Loose comparison, with about 5% lower CAGR. Changing the cutoff to -0.6 brought the results using Loose close to the original BCC.

The standard GTR1 [NHNLDiff] uses a strict comparison (as defined by rgearyiii in a 2015 post):
Strict is: Price > maximum over previous 251 daily prices
Loose is: Price = maximum of 252 daily prices

GTR1 [NHNLDiff] uses closing prices, but can be changed to use intraday prices. P123 can use Close, Open, High, Low, or Volume. barchart uses intraday prices to calculate NHNL. borisnand posted in 2022 that using barchart data: "dates are close to the gtr1 [NHNLdiff] signal."

BCC uses a Strict comparison and closing prices. I made 3 new versions of BCC:
NHNL using intraday prices
NHNL using Loose comparison
NHNL combining these two changes

All 4 versions of NHNL use the optimized cut-off value of -0.40%:
if(NHNLDiff>-0.4,1,0)

The results were close when these modified BCC were applied to S5T and S5TE (using BCC=0 signals). GSD and MDD were very similar. The results starting on 3 different dates, all to 20251128:

    Screen CAGR      19951229  19581231  19251231         Screen Sharpe     19951229  19581231  19251231
S5T 10.5 10.7 10.3 S5T 0.55 0.46 0.44
S5T_BCC0 12.2 12.2 12.4 S5T_BCC0 0.76 0.63 0.63
S5T_BCC0intra 12.3 12.1 12.4 S5T_BCC0intra 0.76 0.62 0.63
S5T_BCC0loose 11.8 11.9 11.8 S5T_BCC0loose 0.73 0.61 0.60
S5T_BCC0looseintra 12.6 12.3 12.0 S5T_BCC0looseintra 0.78 0.64 0.61
___ ___
S5TE 11.0 11.9 11.4 S5TE 0.54 0.49 0.44
S5TE_BCC0 13.0 13.7 13.6 S5TE_BCC0 0.76 0.66 0.60
S5TE_BCC0intra 13.1 13.6 13.7 S5TE_BCC0intra 0.76 0.66 0.60
S5TE_BCC0loose 12.4 13.1 12.8 S5TE_BCC0loose 0.72 0.63 0.57
S5TE_BCC0looseintra 13.4 13.5 13.1 S5TE_BCC0looseintra 0.78 0.66 0.59


LooseClose is the outlier, with slightly lower results (both CAGR and Sharpe are about 5% lower than the other versions). StrictClose, IntraClose, and LooseIntra have similar CAGR and Sharpe.

The average values explain why LooseClose has lower results. On average, [NHNLDiff] is about 0.20 higher than [NHNLDiffLoose]:

       From    [NHNLDiff]  [NHNLDiffLoose]  diff
avg 19951229 0.36 0.18 0.19
avg 19261230 1.30 1.10 0.20


Because of the lower average values, LooseClose needs a lower cutoff. NHNLloose2 changes the cutoff to -0.6:
if(NHNLDiffLoose2>-0.6,1,0)
if(NHNLDiff>-0.4,1,0)

Results using BCC0loose2 are similar to the original BCC:

    Screen      CAGR  GSD  MDD  Sharpe   AT     From
S5T_BCC0loose2 12.4 15 -34 0.77 0.57 19951229
S5T_BCC0 12.2 15 -34 0.76 0.60 19951229

S5T_BCC0loose2 12.2 14 -34 0.64 0.55 19581231
S5T_BCC0 12.2 14 -34 0.63 0.69 19581231

S5T_BCC0loose2 12.1 16 -50 0.62 0.76 19251231
S5T_BCC0 12.4 16 -44 0.63 0.85 19251231


===== GTR1 NHNL links ========
NHNLDiff uses ratio(gprc(1),hgprc(2,251))>1
https://gtr1.net/2013/?~NHNLDiff:lf-1lp-1h1::iflt%...

NHNLDiffLoose uses ratio(gprc(1),hgprc(1,252))>=1
https://gtr1.net/2013/?~NHNLDiffLoose:lf-1lp-1h1::...

NHNLDiffIntra uses ratio(ghigh(1,1),ghigh(2,251))>1
https://gtr1.net/2013/?~NHNLDiffIntra:lf-1lp-1h1::...

NHNLDiffIntraLoose uses ratio(ghigh(1,1),ghigh(1,252))>=1
https://gtr1.net/2013/?~NHNLDiffIntraLoose:lf-1lp-...

====== GTR1 links =======
The 4 different versions of NHNL applied to S5T and S5TE:
https://gtr1.net/2013/?~S5T:h1::trp%281,1%29ne-999...
https://gtr1.net/2013/?~S5T_BCC0:h1::trp%281,1%29n...
https://gtr1.net/2013/?~S5T_BCC0loose:h1::trp%281,...
https://gtr1.net/2013/?~S5T_BCC0intra:h1::trp%281,...
https://gtr1.net/2013/?~S5T_BCC0looseintra:h1::trp...
https://gtr1.net/2013/?~S5T_BCC0loose2:h1::trp%281...

https://gtr1.net/2013/?~S5TE:h1::trp%281,1%29ne-99...
https://gtr1.net/2013/?~S5TE_BCC0:h1::trp%281,1%29...
https://gtr1.net/2013/?~S5TE_BCC0loose:h1::trp%281...
https://gtr1.net/2013/?~S5TE_BCC0intra:h1::trp%281...
https://gtr1.net/2013/?~S5TE_BCC0looseintra:h1::tr...

=== links ===

Author: rgearyiii
Subject: NASDAQ NH/NL and Tick Size
Date: 8/20/2015
"... here are backtests comparing the Loose (10) and Strict (11) NASDAQ NH/NL Ratio where daily High/Low values are used instead of closes. That is, by the loose definition, a stock is at a new high if its high for the day is equal to the maximum daily high over 252 market days, whereas by the strict definition, a stock is at a new high only if its high for the day is strictly greater than all daily highs over the previous 251 market days; and similarly for loose and strict new lows. ... A similar long-term advantage for strict definitions of new highs and new lows is seen using the intra-day high/low data, and interestingly, daily high/low data (where it is available) does not appear to offer any advantage over close data."
https://yorickm.com/Message.php?pid=31878464

Author: rgearyiii
Subject: Bear Catcher II Bug Fix
Date: 3/27/2016
"... Trading ZY100 with BCII (param0% cut-off), Zero Lag, 19261230-20160324 ... The top row in bold gives results for buying and holding ZY100 with no timing. The other row in bold shows where I believe the sensibly optimized cut-off value is, namely -0.40%. ... lohill can use whatever cut-off he wants for his BCC reports by adjusting it in the field definition ..."
https://yorickm.com/Message.php?pid=32177298

Author: rgearyiii
Subject: Re: Recent BCC Signals
Date: 7/29/2019
"... My Bear Catcher II uses strict new 252-day highs and lows by closing g-price. See http://boards.fool.com/Message.asp?mid=31878464 and http://boards.fool.com/Message.asp?mid=32177298 . Naturally, I made the choices I did based on backtesting, which revealed fully-adjusted (including dividends) and closing prices to work better. ..."
https://yorickm.com/Message.php?pid=34261158

Author: borisnand
Subject: Re: Recent BCC Signals
Date: 3/28/2022
"... I downloaded 2 years of barchart $MADQ price history, and found the signal dates when a 9 day simple moving average changed sign. The dates are close to the gtr1 [NHNLdiff] signal."
  gtr1           barchart     days
Date NH/NL Date difference
20211118 Bear 20211118 0
20211013 Bull 20211019 6
20211004 Bear 20210920 -14
20210825 Bull 20210830 5
20210817 Bear 20210816 -1
20210721 Bull 20210730 9
20210716 Bear 20210716 0
20201103 Bull 20201105 2
20201030 Bear 20201030 0
20200930 Bull 20201005 6
20200923 Bear 20200928 5
20200417 Bull 20200420 3

https://yorickm.com/Message.php?pid=35082113
Print the post


Post New
Unthreaded | Threaded | Whole Thread (1) |


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