99 day, the story so far

I just thought I’d check in on the original 99 day signal, from post 212586

That post was 13.91 years ago.
That has so far been made up of 12.0 years of bullish state, and 1.88 years not tagged as bullish.

SPY
During the bullish state
12.0 years, 86.5% of the time, total return 326%, CAGR 12.92%/year

During the not-bullish state
1.88 years, 13.5% of the time, total return 5.2%, CAGR 2.22%/year

Used as a long/cash timing signal, it would not have left you richer. Buy and hold did better…by a pretty negligible amount.
But I guess I would consider that a success, as timing systems typically go post discovery.
Almost no net return for the broad index, and a whole lot of angst and other opportunities, took place during the “bad” stretches.
And it has certainly been quite good overall for the main use I intended: spotting those times that it’s generally safe to go in the water.
The returns in the times tagged as bullish have been tremendously better than the returns in the other times.

In this short post-discovery period 12 years is short for a signal this rare), it would have worked better with a longer timeout.
For example, if you had used “no fresh 99 day high in the last N days” for almost any number N of 114 or more trading days, the total return would have beat buy-and-hold.
This is consistent with the observation long ago that market cycles have been much more broad and smooth in the last few decades compared to the markets long ago (1930-1970, say).
The 99 day figure was designed to handle a wide variety of conditions for robustness, back to the depression.
If you tune only for (say) the last 50 years, a longer timeout works better.

Incidentally, this is how the same signals would have worked in the same date range for QQQE (the Nasdaq 100 equal weight).
Signals constructed on the S&P 500 index series, but looking at returns on QQQE.

QQQE
During the bullish state
12.0 years, 86.5% of the time, total return 483%, CAGR 15.91%/year

During the not-bullish state
1.88 years, 13.5% of the time, total return 5.8%, CAGR 2.93%/year

Jim

45 Likes

“no fresh 99 day high in the last N days” for almost any number N of 114 or more trading days…"

Can stockcharts be set up for (say) N of 115?

https://stockcharts.com/h-sc/ui?s=$SPX&p=D&yr=1&…

Tails

In this short post-discovery period 12 years is short for a signal this rare), it would have worked better with a longer timeout.
For example, if you had used “no fresh 99 day high in the last N days” for almost any number N of 114 or more trading days, the total return would have beat buy-and-hold.
This is consistent with the observation long ago that market cycles have been much more broad and smooth in the last few decades compared to the markets long ago (1930-1970, say).
The 99 day figure was designed to handle a wide variety of conditions for robustness, back to the depression.
If you tune only for (say) the last 50 years, a longer timeout works better.

And there is the elephant in the room. Given the current political trend the market cycles are changing. The next 10y plus performance will not be the same(worse?) if the bullish phase of 12 years turns to fewer periods. Not a good time to revise the holding period.

GD_

Yes, change the 99 to 115.

“no fresh 99 day high in the last N days” for almost any number N of 114 or more trading days…"

Can stockcharts be set up for (say) N of 115?

Yes, it can. :slight_smile:

https://discussion.fool.com/ot-comment-on-99-day-rule-32242435.a…

1 Like

From comorgan link from Jim’s post
If it were the 114 day rule, or any bigger number, it would still be bearish (“> 114 days since most recent trailing 114 day high”).
It would also still be bearish if you used the rule “> 99 days since most recent trailing 114 day high”.
For those with a visual bent, this is what that would look like http://stockcharts.com/h-sc/ui?s=%24SPX&p=D&yr=2&…

From KBGlenn
Yes, change the 99 to 115.

If the 99 is set to 115, then what’s displayed is “no fresh 115 day high in the last 115 days”, correct?

And from comorgan’s link of Jim’s post, “> 99 days since most recent trailing 114 day high”, that sounds like the reverse of what Jim mentioned in the OP of this thread - “no fresh 99 day high in the last N days” for almost any number N of 114

So that all leaves me still a bit confused about the rule set, and whether the intended rule set can be displayed on StockCharts.

Tails

Will the early years/decades repeat?

Wendy-

These Macro trends suddenly reversed during and just before the Covid pandemic. They will have long-term inflationary impacts.

https://discussion.fool.com/trend-change-lasting-inflation-35157…

Look out below.

1 Like

“no fresh 99 day high in the last N days” for almost any number N of 114 or more trading days…"

Can stockcharts be set up for (say) N of 115?

Yes and no. Literally.

It’s not immediately obvious, but the 99 in the signal is used for two entirely different things.
The test is whether there was a fresh recent high lately. Both “recent” and “lately” have to be defined, and can be different.
The original test is whether or not, at any time in the last 99 trading days, it was true to say on
that day that the price was the highest in 99 days just ending.

If you change the number on that chart form, it changes the number for both purposes.

For my post above, I happened to test “no new trailing-99-day-high in the last 115/120/125… days”.
Stockcharts won’t let you have the two numbers different in any easy way.
So “yes” you can change the timeout, but “no” you can’t change just the timeout.

As it turns out, that’s mostly just a technicality–
the time-out since the high is much more important than “new high price in the last X days” test, so it’s not a big deal.
For example, a fresh 6-month high in the last 99 days works about as well as a fresh 99 day high in the last 99 days.
But you might want to be aware of what you’re testing.

Jim

14 Likes

Stockcharts won’t let you have the two numbers different in any easy way.
So “yes” you can change the timeout, but “no” you can’t change just the timeout.

I suspected that was the case. But you can set up two different price channels, one at 99 days, and one at 115 (or whatever). Then you could do some pretty close eyeballing.

https://stockcharts.com/h-sc/ui?s=%24SPX&p=D&yr=1&am…

It would have helped out a little during the early 2020 Covid correction by keeping you in the (rebounding) market a little longer:
https://schrts.co/EzWHvXug

Thanks for the clarification.

Tails

2 Likes

Used as a long/cash timing signal, it would not have left you richer. Buy and hold did better…by a pretty negligible amount.

What was the GSD fo the two? IF buy and hold had twice the GSD as the timing signal, might be worth it to some people. Much like the QTAA, using the signal gives same return as S&P 500 but much less GSD.

JLC

1 Like

What was the GSD of the two?

Monthly GSD isn’t a meaningful measure of risk.
And most especially not a meaningful measure of risk when considering timing systems…
there is no volatility when you’re in cash, so more than anything else it’s measuring the percentage of time out of the market.
If you try to minimize GSD as your goal in building the timing system, it will always leave you in cash most of the time.

That’s why I proposed the DDD3 metric…it doesn’t penalize short term volatility much, only rolling years that don’t meet a minimum return hurdle.
Upside volatility is in effect rewarded rather than penalized…one fantastic day a year is fine!

For a portfolio starting summer 2006 to date, the DDDD3 risk metric for buy and hold has been 10.84%.
For a long/cash strategy with the classic 99 day signal it has been DDDD3 risk 6.77%.
So, about 62% of the risk in that particular date range.
For the long/cash version, I assumed no trading costs and zero interest from cash.
In that specific date range the trading system was ahead by a bit, CAGR difference 0.24%.

Jim

11 Likes

For a portfolio starting summer 2006 to date, the DDDD3 risk metric for buy and hold has been 10.84%.
For a long/cash strategy with the classic 99 day signal it has been DDDD3 risk 6.77%.
So, about 62% of the risk in that particular date range.
For the long/cash version, I assumed no trading costs and zero interest from cash.
In that specific date range the trading system was ahead by a bit, CAGR difference 0.24%.
t
Jim

What is the definition of DDDD3?
I did try to find the definition myself with the search engine, but could not because of the many times it listed.
Thanks in advance.

What is the definition of DDDD3?

Just my own particular flavour of the Downside Deviation metric, combined in a particular way.
The DD itself is more or less as proposed by Mr Sortino.

DDD3 means double downside deviation, triple weight on the longer term. Calculated with monthly balances.
DDDD3 means same thing, but “daily double downside deviation”, calculated using daily balances.

The two inputs are:

Short term number, A:
Downside deviation, rolling three month periods, minimum acceptable return 0%.
i.e., the RMS of the amounts by which any three returns were zero. (all positive months assessed at zero shortfall).
sqrt(average(if(rolling three month return negative,rolling three month return,0)^2))

Longer term number, B:
Downside deviation, rolling one year periods, minimum acceptable return 10%/year.
i.e., the RMS of the amounts by which any on year return fell below 10%/year. (all returns > 10% assessed at zero shortfall).
sqrt(average(if(rolling 1 year return <10%, 10%-rolling year return,0)^2))

DDD3=average(A,B,B,B)
i.e., triple weight on the longer term concern.

For a sense of the number you’ll get:
15+% is a very painful ride.
12-13% not uncommon for an index.
7-8% looking very much nicer, you might even give up 1%/year in returns to have that.
3-4%, you should open a hedge fund immediately.

The idea is this:
It assumes you want your strategy to make 10% year, or you’d just buy an index.
Any rolling year you aren’t making 10% a year, you have realized more risk than you were willing to accept.
Any shortfall below that is given a squared penalty: the bigger the shortfall, you REALLY don’t want it.
So, it’s the RMS of shortfalls below 10%/year.

The same idea on rolling three month returns breaking even is in there just to recognize the fact that short term negative portfolio changes, though not important at all, are unpleasant.
They are given only 1/4 the total weight because, well, they don’t ultimately matter.
A strategy that fluctuates wildly by month or by quarter but always returns at least 10% in any rolling year would be a very find strategy…but would feel bad.

Very short summary:
DDD3 (or DDD3) is at heart a probability of doing badly.
With a squared penalty on the size of the shortfall below the required threshold.
(doing badly defined mainly as less than 10% profit after a year, secondarily as less money after 3 months)

The number for a short term result can’t be annualized to convert it into a long term result, or vice versa.
Some investment strategies have low probability of short term loss but high probability of long term loss. (selling volatility, say)
Other strategies are the reverse.
The whole idea behind the metric is that you have to measure the portfolio return interval that really matters to you.
I chose “mostly one year, but a little bit of three months”

Note, since the metric has the very strong goal of making 10%/year, you can tune a strategy to minimize risk and you won’t end up with something in cash all the time.
“Cash all the time” is not a zero risk strategy if you need to make a profit over time.

If I’m tuning a spreadsheet, I find this works pretty well:
Tune for the lowest possible risk. Remember that number.
Then, tune for the highest possible return that isn’t more than 5-10% more risk.
e.g., if absolute lowest risk tuning is DDD3=5%, tune for highest return with DDD3<5.25% or DDD3<5.5%
That’s because sometimes giving up just a small amount on the risk side (relative to the absolute lowest) can improve the return side quite a lot.

Jim

22 Likes

Short term number, A:
Downside deviation, rolling three month periods, minimum acceptable return 0%.
i.e., the RMS of the amounts by which any three returns were zero. (all positive months assessed at zero shortfall).

Ooops, typo.
It should say

Short term number, A:
Downside deviation, rolling three month periods, minimum acceptable return 0%.
i.e., the RMS of the amounts by which any three month returns were below zero. (all positive months assessed at zero shortfall).
{sqrt(average(if(rolling three month return negative,rolling three month return,0)^2))}

Jim

4 Likes