No. of Recommendations: 1
Read an article in my newsfeed saying the 3 month and 10 year treasuries had inverted. The classic indicator for future recession.

Got me thinking, this is intraday not close of trading. Does it matter from a predictive viewpoint?

JLC
Print the post Back To Top
No. of Recommendations: 0
I am currently reading several "hot off the presses" articles on this. I admit to never really following things like this in the past.

Just how good an indicator is this? How strong is the correlation between yield curves inverting and the predictability of an ensuing recession?

Is there a "power factor" involved? e.g. slight inversion=weak predictive value /
big inversion= "you can bet on it" probability of recession? And does it portend the severity of any recession?

Amateur questions, I admit.
Print the post Back To Top
No. of Recommendations: 9
U.S. Treasury Yield Curve Inverts for First Time Since 2007 This was a headline posted by Bloomberg shortly after the market opened today. https://www.bloomberg.com/news/articles/2019-03-22/u-s-treas...
https://www.bloomberg.com/news/articles/2019-03-22/u-s-treas...

Well, maybe. Here is a graph from the same article (as the link may be deleted at some future time. https://imgur.com/a/w88lNZ6

To these old eyes, it appears that the curve is touching the zero line (perfectly flat), and this could change by the end of the day. But that's besides the point - let's just assume it is a valid crossing.

Here are some stone cold truths.

1. The 3 mo - 10 year spread has correctly predicted the last 7 recessions. https://imgur.com/a/hTKdVK5
2. There will be another recession at some point in time.
3. It has been more than 10 years since the start of the last recession (a very long time by historical standards), and by June we will match the longest period of time since the end of the a recession. https://en.wikipedia.org/wiki/List_of_recessions_in_the_Unit... (third table in the article)
4. Any current prediction of a recession will eventually be correct (like a broken clock).

To me, just another signal flashing caution.

But maybe, just maybe, this time is different. But before you concur, check out This Time Is Different : Eight Centuries of Financial Folly, by Carmen M. Reinhart and Kenneth S. Rogoff. As you might guess from the title, "This time is different" hasn't worked out well with national economies. (Some would say 'This Time is Different' is always wrong).

Looking back over my old posts dealing with cautionary signals, maybe I should change my screen name to Chicken Little.

Charlie
Print the post Back To Top
No. of Recommendations: 0
Thanks.

To me, just another signal flashing caution.

That's about how I see it. I don't set my watch by any of this kinds of signals but I have one eye on things more these days based on the things you've listed. Longest time without a recession, torrid, relentless bull rise, yield curve appearing to be inverting or threatening to. I am the kind of person who really cannot just "fire-and-forget."
Print the post Back To Top
No. of Recommendations: 3
This is not a hair trigger indicator. There's plenty of time to see it evolve. Generally an inversion anticipates a recession in the next two years or so. But remember that the stock market itself is usually a leading indicator for recessions. So if you think a recession is likely in the next two years, it's also reasonable to expect that the market will head down before that two year horizon.

As for the current situation, it seems that the media is front running the news a bit. As of yesterday, the yield curve was still positive by five basis points - 0.05%. Let's see what the Fed site says at the end of today.

Elan
Print the post Back To Top
No. of Recommendations: 7
The yield curve is a surprisingly accurate predictor, with few false positives.

Some research uses the 10 year - 6 month, some uses 10 year - 3 month.
Both are now definitely negative.

But note also that from the time it turns negative to the onset of a recession is normally 6-24 months.
The recession doesn't usually start until the term spread has bottomed and turned up again, often already positive again.
So, don't lose too much sleep.

Yet.

Jim
Print the post Back To Top
No. of Recommendations: 4
This is not a hair trigger indicator. There's plenty of time to see it evolve.

Amen. That's one thing that keeps popping up, that tops are generally rounded and not shaped like an inverted "V". There's plenty of time to get out.

Although today's 460 point drop doesn't give anyone a warm and fuzzy feeling.
(OTOH, after that drop the DOW is at 25,500---and just a couple weeks ago I remarked that Trump oughta be happy because the DOW was almost crossing above 25,000.)

Anyway...I just got an emailed link to a Ken Fisher podcast from a week ago, where he talked about thisvery point. What caught me eye in the email was the title. "Ken Fisher on the Bull Market’s 10th Anniversary" An issue that I and probably a lot of people have been thinking about, and concerned about--longest bull market ever? Aren't we ready to crash then? https://www.fisherinvestments.com/en-us/marketminder/market-...

Too bad there's not a transcript, here's a few things he said.
08:45 – How much longer can the bull market go?
"We haven't got to euphoria yet."

"Bull markets die because they've hit euphoria or because a big bad unexpected thing comes along and knocks a chunk out of global GDP."

"As long a the economy keeps plugging along without too much optimism it can go a long long long time. Normally what happens--which hasn't happened in this cycle--is that before very long people start to get wild and crazy.....That hasn't happened...they get a little bit optimistic..and then they pull back and get cautious."


My own opinion is that the reason that we are seeing these big & medium down days is that lots of people are jittery and on a hair trigger and they've got one foot out the door. And then when the world doesn't blow up as they feared, they pull back from the mad dash to the exit.

I remember the events back before the dot-com crash, and people were just buying every piece of cr*p company that put "com" in their name, expecting the double their money overnight. Euphoria on steroids. Not seeing that now.
Print the post Back To Top
No. of Recommendations: 14
There's an article in Barron's by the guy who says he developed the yield inversion criteria in a dissertation 30 years ago. He uses 3mo / 10yr rates and says it has to be inverted for a quarter before it counts as a signal.

https://www.barrons.com/articles/what-the-yield-curve-invers...
Print the post Back To Top
No. of Recommendations: 2
https://www.treasury.gov/resource-center/data-chart-center/i...

according to US Treasury the 1 mo, 3 mo, 20 yr, 30 yr curves did not invert today. It was only the oddball 10 year yield that inverted.
Tempest in a teapot unless it spreads to other maturities and persists.
Print the post Back To Top
No. of Recommendations: 22
Speaking of inversions, my wife, who has zero interest in investing or economics, and who sees mostly Australian news headlines, asked me in Google Hangouts today if I knew about the yield curve inversion (with a link to https://www.news.com.au/finance/markets/world-markets/invert...). In a contrarian inversion of the proverbial barber-asking-if-you-own-Worldcom-in-2000 bubble indicator, I take this as a bullish signal that recession is still a ways off yet.

Robbie Geary
Print the post Back To Top
No. of Recommendations: 5
according to US Treasury the 1 mo, 3 mo, 20 yr, 30 yr curves did not invert today. It was only the oddball 10 year yield that inverted.
Tempest in a teapot unless it spreads to other maturities and persists.


This is not accurate. As of today, the 1 mo, 2 mo, 3 mo, and 6 mo yields are all higher than the 1 yr, 2 yr, 3 yr, 5 yr, 7 yr, and 10 yr yields.

Some of the inversions are just 1 or 2 basis points, but they are there.

Elan
Print the post Back To Top
No. of Recommendations: 4
But note also that from the time it turns negative to the onset of a recession is normally 6-24 months.
The recession doesn't usually start until the term spread has bottomed and turned up again, often already positive again.
So, don't lose too much sleep.


I don't know about not losing sleep - by the time the recession begins, stocks will already have been decimated.
IIRC, the massacre begins at least half a year before the recession begins.
When you look at the 2001 recession, the Nasdaq started falling a full year before the official beginning of the recession.
Print the post Back To Top
No. of Recommendations: 5
by the time the recession begins, stocks will already have been decimated.
IIRC, the massacre begins at least half a year before the recession begins.
When you look at the 2001 recession, the Nasdaq started falling a full year before the official beginning of the recession.


I think this is probably a "wet streets cause rain" error. The market falls lots of time when there isn't a recession.
You know the joke that goes "Economists have predicted 9 of the last 3 recessions."

But anyway...this comment prompted me to look at the Growth Trend Timing indicators that use data from FRED. I always get a bit paranoidically concerned when someone says that the thing I use to protect myself from a bear market is wrong.

So...my FRED indicator signaled a possible recession for Dec 2000, not for Jan 2001, then yes for Feb 2001 thru May 2002. This signal is a gate for the SMA sell signal, which tells you whether to obey or ignore the SMA sell signal.

Now to look at the SMA signals.
The 10 month (actually 43 week) SMA first signalled a sell at Sept 2000. This was blocked by the FRED indicator until Jan 2001, at which time the sell signal was to be obeyed.
S&P500 was 1320.28. (The S&P500 at the Sept 2000 signal was 1436.52)
The next SMA buy signal was Dec 2001. S&P500 was 1172.51.

The next few months had a couple of whipsaws, then OUT until April 2003, Got back in at S&P500 898.81.

If I am reading it right, the official recession was March 2001 to November 2001.
Print the post Back To Top
No. of Recommendations: 3
This is only one model. Combining forcasts from multiple models works better. So, look for confirmation from another model.
http://portfolio.du.edu/downloadItem/311879

Daily Treasury Yield Curve Rates
  Date     1 mo  2 mo  3 mo  6 mo  1 yr  2 yr  3 yr  5 yr  7 yr  10 yr  20 yr  30 yr
3/22/2019 2.49 2.48 2.46 2.48 2.45 2.31 2.24 2.24 2.34 2.44 2.69 2.88

https://www.treasury.gov/resource-center/data-chart-center/i...

Yield Curve and Predicted GDP Growth, this gets updated once a month:
https://www.clevelandfed.org/our-research/indicators-and-dat...

During an economic expansion, the Fed normally tightens its monetary policy stance by gradually raising short-term interest rates. The central feature of the business cycle is that expansions are at some point followed by recessions. Long-term rates reflect expectations of future economic conditions and, while they move up with short-term rates during the early part of an expansion, they tend to stop doing so once investors’ economic outlook becomes increasingly pessimistic. A flatter yield curve also makes it less profitable for banks to borrow short term and lend long term, which may dampen loan supply and tighten credit conditions.
https://www.frbsf.org/economic-research/publications/economi...

The Term Structure as a Predictor of Real Economic Activity
Estrella and Hardouvelis, 1991
http://hardouvelis.gr/wp-content/uploads/2017/12/JF_June_199...
Print the post Back To Top
No. of Recommendations: 15

The market falls lots of time when there isn't a recession.


That is true, but what is also true is that whenever there is a recession, the stock market declines.
If valuations are high, it invariably declines A LOT (like 40+%).

And since WWII, there has been only a single instance of a large decline (>30%) which was not recession-related (from 8/25/1987 to 12/4/1987, the SPX declined by 33.5%).
All other large declines overlapped/encompassed a recession.

The historic record is very clear.
There has not been a single case where high valuations met a recession and the results where anything less than calamitous.
Print the post Back To Top
No. of Recommendations: 0
So...my FRED indicator signaled a possible recession for Dec 2000, not for Jan 2001, then yes for Feb 2001 thru May 2002. This signal is a gate for the SMA sell signal, which tells you whether to obey or ignore the SMA sell signal.

Rayvt

Does this mean that the FRED signal from June 2002 meant that timing should not be used and that the market should be entered in June 2002?

Thanks

Craig
Print the post Back To Top
No. of Recommendations: 3
Does this mean that the FRED signal from June 2002 meant that timing should not be used and that the market should be entered in June 2002?

No.

The GTT (signal from FRED) rule is that you not sell on the SMA signal when the FRED signals disconfirm a recession. That's it.

It doesn't say to ignore the SMA signals---it says when you are allowed to sell.

You are allowed to sell if _either_ the IPG or RRS-G are saying that perhaps maybe it looks like we may be in a recession. The Growth Trend Timing paper explains it all, but it's an 80 page paper.

It's kind of hard to grasp because it's a negative thing, and our minds have a hard time dealing with negatives. Classic example is from firefighting. The command is "Leave that door closed." not "Don't open that door." Another more recent example is credit card readers. Lots of time people yank their card out when the screen changes to "Do not remove card." They read it as "{something} {something} {something} REMOVE CARD."

Think of the FRED signal as a gate for the SMA sell. If the gate is open, the sell signal is allowed to pass. If the gate is closed, the sell signal is blocked. OTOH, there is no gate on the SMA buy signal. Those area always allowed.
Print the post Back To Top
No. of Recommendations: 0
Rayvt

I am not sure which article you are referring to for page 80, but I did look at http://www.philosophicaleconomics.com/2016/01/gtt/

and it says:

If, at the close of the month, the growth signals for the prior month are unanimously positive, then go long or stay long for the next month, and ignore the next step.

If, at the close of the month, the growth signals for the prior month are not unanimously positive, then if price is above the 10 month moving average, then go long or stay long for the next month. If price is below the 10 month moving average, sell or stay out for the next month.


To me, this means the gate works on both sell and buy. Coming out of the recession, don't wait for the SMA to confirm the trend, just look at growth.

Craig
Print the post Back To Top
No. of Recommendations: 4
To me, this means the gate works on both sell and buy. Coming out of the recession, don't wait for the SMA to confirm the trend, just look at growth.

Well, actually the SMA *is* the trend. Just because we are coming out of a recession doesn't necessarily mean that stocks are immediately trending up.

My backtest of S&P500 (SPX):
All rolling 43-week periods, 1950 to 2016 (no slippage):

SMA alone:
9.2% CAGR
-28% MaxDD
1.30 Sortino
10% stdev
Trades-> 197
In % -> 70%


GrowthGate on sell (only):
11.8% CAGR
-26% MaxDD
2.03 Sortino
12% stdev
Trades-> 59
In % -> 84%


GrowthGate on both sell & buy (per the GTT paper):
11.3% CAGR
-26% MaxDD
1.54 Sortino
13% stdev
Trades-> 75
In % -> 87%


Buy&Hold:
11.1% CAGR
-51% MaxDD
1.01 Sortino
15% stdev
Trades-> 1
In % -> 100%

The overall thrust of the paper as I understood it was "It's good to use the price trend (read: SMA) to decide when to be in & out of the market, EXCEPT that you only want to be out if the economy appears to be in a recession. It the economy is NOT in a recession, you don't want to get out. Because "the truth will out" -- a good economy is on the whole good for stocks."

I considered it like the difference between "necessary" and "sufficient". Just because you want to be out when the economy is bad and stocks are trending down does _not_ neccessarily say anything about what you should do when the economy is not bad. That needs to be tested. AFAICT, the paper did not mention or test that.
When I tested, the CAGR was slightly higher and the Sortino Ratio was substantially high if you bought whenever stocks were going up, regardless of the GTT indicator.

Which makes sense to me. Because the reason that timing works is that you sidestep the large losses on the downside. On the upside, you can't do any better than the market, so you oughta be in when the market is going up.

Looking closer at the differences by date:
From 11/5/56 to 4/29/57 the SMA was negative.
The joint GTT was "possible recession" from 10/8/56 until 12/3/56, and then it turned to "disconfirm recession".
So from 12/10/56 to 5/6/57, the "ignore SMA when recession is disconfirmed" strategy was IN while the "only buy if SMA is positive" was OUT.
Same thing for 2/8/60 to 5/31/60, and a few other times. But it can go _years_ where these 2 variations do not differ in the IN/OUT signal. Easy to miss it in a backtest.

All that may be rationalization and special pleading, though.

---------------------------
I hate the discussions about GTT. It's just so darn confusing.
Yes, that's the paper. I was wrong, it's not 80 pages, it's only 51 pages long. With the web page printed to a PDF.

It is not clear what granularity they used in their charts. I use rolling 43 week (10 month) periods. Most papers seem to use end-of-month periods. Rolling is better.

p. 47: "a growth signal might go negative, but nothing will happen unless the market also happens to be in a downtrend. What are the odds that a negative growth signal and a price downtrend will both occur by coincidence, when everything else in the economy is just fine? Very low,"

p. 51: "The following chart shows GTT’s performance using the two metrics in a combined growth signal from January 1960 to November 2015. If either is negative, the strategy turns its timing function on. Otherwise, it stays invested:" ---- which is what you quoted.

Ah, p. 43: "If, at the close of the month, the growth signals for the prior month are unanimously positive, then go long or stay long for the next month, and ignore the next [SMA] step." So they use one month granularity for their backtest.

But that's funny, because they also say "But Growth-Trend Timing dramatically reduces the number of unnecessary trades, filtering them out with the growth signal. It can therefore afford to check prices and transact on a daily basis."

They say you can check daily, but they only backtest with monthly.

Aaaaand...that doesn't make sense. The FRED data only comes out once a month. So the FRED indications *cannot* change on a daily basis. The only thing that can change on a daily basis is stock prices and therefore the SMA.

p. 49: there is a chart for January 1960 to November 2015.
For that period, I get:
GrowthGate on sell (only):
10.9% CAGR
-26% MaxDD
1.96 Sortino
12% stdev
Trades-> 46
In % -> 83%

and
GrowthGate on both sell & buy:
10.3% CAGR
-26% MaxDD
1.37 Sortino
13% stdev
Trades-> 62
In % -> 87%
Print the post Back To Top
No. of Recommendations: 5
If you want to see how someone else interpreted GTT AllocateSmartly independatly bactested
it from 1970. They cite their logic and show results for Growth-Trend, Price Trend only,
Econ. Ind. RRSFS Only, and Econ Ind IndPro Only.

Their Strategy rules tested:
At the close on the last trading day of the month, calculate the year over year change in Real Retail and Food Services Sales (RRSFS, a measure of economic consumption) and the Industrial Production Index (INDPRO, a measure of economic production) as of the end of the previous month. The one month lag is required due to the delay in the reporting of these numbers.

If the YOY change in both indicators is positive, go long the S&P 500 (represented by SPY) at the close. In other words, no recession is signaled, so turn trend-following off.

If the YOY change of either indicator is negative, compare the S&P 500 (SPY) to its 10-month moving average. If the S&P 500 will close above the average, go long SPY at the close, otherwise move to cash. In other words, possible recession is signaled, so rely on price to confirm. Note that this is the same trend-following rule used in Meb Faber’s classic GTAA.


Hold positions until the final trading day of the following month.

https://allocatesmartly.com/philosophical-economics-growth-t...

RAM
Print the post Back To Top
No. of Recommendations: 0
Rayvt

Thanks for checking all the options on the combinations of growth and SMA.

Craig
Print the post Back To Top
No. of Recommendations: 0
I don't think it makes a whole lot of difference.

I believe that Elan once said that 11.8% and 11.3% are essentially identical, the difference just represents statistical noise. (Maybe I'm paraphrasing here.)

A 1 week difference in the start date will have more difference in the overall result than whichever of the rule variants you use. Although, in fact, when I tried several different date ranges, my rule (always buy on the SMA signal) always had a better result than the paper's "official" rule.

Probably it's like the differences in the rules for Antonacci's GEM. That one is kinda funny, because he wrote each version in his book, just a few pages apart. The backtested difference in CAGRs was, like here, in the fractional decimal place.
Print the post Back To Top
No. of Recommendations: 0
Rayvt

I just re-read what you posted and am wondering if I understand.

You are showing more trades (75) with the buy and sell compared to just the sell (59).

The buy and sell rule has a shorter duration for following the SMA rule (only allowed when growth is negative) compared to the duration from growth turning negative until sometime after the groth turns positive.

I am wondering if the results are reversed, or I need more understanding??


GrowthGate on sell (only):
11.8% CAGR
-26% MaxDD
2.03 Sortino
12% stdev
Trades-> 59
In % -> 84%


GrowthGate on both sell & buy (per the GTT paper):
11.3% CAGR
-26% MaxDD
1.54 Sortino
13% stdev
Trades-> 75
In % -> 87%


Craig
Print the post Back To Top
No. of Recommendations: 2
Craig,
Good question.

Did I mention that I hate to revisit GTT because it's so darn conceptually complex?

Now you've got me questioning my backtest, so now I need to take another close look at it. Some of the problem is that this thing started out simple and just got more and more complicated as I added new things and new parameters.
Print the post Back To Top
No. of Recommendations: 2
Craig,
Nope, I thought my spreadsheet was wrong. But I was wrong, I was right.

Using the GTT sell rule always, just changing the buy rule,
It is better to buy according to the SMA rule (buy when current price is >= SMA), than to ignore timing when the economy is ok and buy regardless of the SMA.

The figures I gave the other day still hold.
GTT paper's buy rule:
Trades-> 74
9 <-Whipsaws
In % -> 87%
11.3% CAGR
10.9% Slope
-26% MaxDD
1.54 Sortino
13% stdev
When IN 13.0%
When OUT -1.2%

My rule, buy according to the SMA, regardless of ecomony:
Trades-> 58
8 <-Whipsaws
In % -> 84%
11.8% CAGR
11.5% Slope
-26% MaxDD
2.03 Sortino
12% stdev
When IN 14.1%
When OUT -3.9%


There's a lot more trades with the official GTT rule, which seems counterintuituve.
Upon examination, this is because there are a few times when we are OUT and then the economy metrics turn from bad to good. So we buy even though the SMA is negative.
This happened in Dec 1956. the SMA was bad and getting worse but the econ metrics were up, so it forced a buy several months before the market turned upward and the SMA became positive.

Then in 1957, the SMA turned negative on 8/16/57 but the econ metrics held up (thus forcing us to stay in) until 11/4/57 at which time they turned bad and _finally_ allowed a sell. Meanwhile, the S&P500 dropped from 45.83 to 40.37. A 12% loss.

This happened a number of times, where the GTT economy metrics forced us to stay in when the SMA signal wanted to sell, but was ignored. The difference in the "In %" shows that, 87% of the time vs. 84% of the time.

You can also see that the returns when IN are lower for the official rule. This is due to being forced to stay in when the SMA said to be OUT.
Print the post Back To Top
No. of Recommendations: 0
Rayvt

Thanks for re-checking.

Craig
Print the post Back To Top
No. of Recommendations: 7
In the early parts of the paper it says:

"GTT spends roughly 87% of the time invested."

"GTT systematically does what any human trend-following market timer would have to do in order to be successful–distinguish between negative price trends that will give way to large downturns that support profitable exits and reentries, and negative price trends that will prove to be nothing more than short-term noise, head-fakes that quickly reverse, inflicting whipsaw losses on whoever tries to trade them. My reason for introducing the strategy is not so much to tout its efficacy, but to articulate that task as the primary task of trend-following, a task that every trend-follower should be laser-focused on, in the context of the current negative trend."

"GTT respects price and re-enters the market whenever the trend goes positive, no matter what the growth signals happen to be saying."




but later, in the implementation part of the paper ("An Improved Trend-Following Strategy: Growth-Trend Timing") it says:
"Growth-Trend Timing takes various combinations of high quality monthly coincident recession signals, and directs the moving average strategy to turn itself off during periods when those signals are unanimously disconfirming recession, i.e., periods where they are all confirming a positive fundamental economic backdrop."

"The purple bars at the bottom show periods where real retail sales growth is declaring “no recession.” In those periods, the strategy turns itself off. It stops timing altogether"

These are a MIS-STATEMENT.
The MA doesn't get turned off completely. It only gets turned off for the sell signal. The MA buy signal stays on.


What do you call it when you do something wrong according to the rules, but accidently do it right?
The way I coded it up was according to the early part. Good economy blocks the sell signal, and good SMA is a buy signal regardless of the economy signal.
Further confirmation that this is right and is what the paper meant is that it matches the 87% of the time being IN.


When I fixed it to be in in accordance to the later part, (completely turn off MA timing when the economic signals are all good), the return goes to pot. It's IN only 75% of the time (contra 87%) and the CAGR is only 7.9%.

**************
So, now that I know that I have coded in correctly....my conclusion still stands.
It is better to buy on the SMA signal alone, regardless of the economy growth signal.
Print the post Back To Top
No. of Recommendations: 2
When I fixed it to be in in accordance to the later part, (completely turn off MA timing when the economic signals are all good), the return goes to pot. It's IN only 75% of the time (contra 87%) and the CAGR is only 7.9%.

Well this discussion has certainly encouraged me to read the article more than once!

Ray, I think you are saying

If you are long the market when all growth signals are positive, and use SMA timing only when there is not unanimous agreement on growth, you are in the market 75% of the time.

For your variation of only re=entering the market when unanimous agreement on growth AND price above SMA, the time in the market must be less than 75% as sometimes you are entering the market later than the growth signal change. Can you help me understand how getting back in the market later (price above SMA) increases time in the market to 87%.

Thanks

Craig
Print the post Back To Top
No. of Recommendations: 3
For your variation of only re=entering the market when unanimous agreement on growth AND price above SMA, the time in the market must be less than 75% as sometimes you are entering the market later than the growth signal change. Can you help me understand how getting back in the market later (price above SMA) increases time in the market to 87%.

It's often hard to explain the workings of a bug in code. That was true when I was an embedded systems programmer and writing Excel formulas is just another type of code. With a bug, there are interactions that just don't make logical sense. After awhile, programmers stop trying to understand the details of how & where the bug (mis)works.
Similar to what Tolstoy wrote, "Happy families are all alike; each unhappy family is unhappy in its own way."

In this case, what happens is that the bug has you IN at times when you should be OUT. But that has an interaction with the next signal. Those interactions can have ripple effects far downstream.


In english, the (wrong) code in the spreadsheet was:
if ((SMA says to buy) OR (checking for ECON_OK && not (econ_is_ok)))
then BUY.

This could justifiably be considered the rule, based on the discussion in the paper.

In the middle of the night, however, I realized that this was not "ECON_OK turns timing off", as the paper stated

The correct coding of that would be:
if ((SMA says to buy && NOT (checking for ECON_OK) OR (checking for ECON_OK && not (econ_is_ok)))
then BUY.

That is, ECON_OK turns off all timing.

(The complexity of the formula is because I parameterized everything, so that I could try different workings by simply changing a parameter.)

Based on a couple of things, I believe that my first interpretation is what the paper backtested.

I glanced at a few of the places where the signals were different, enough to verify that the fixed code properly implemented that (wrong) rule. Then I it reverted back. In fact, I will soon remove all the looking at ECON_OK in the BUY rule. I don't want to carry around wrong code.

There are 3450 rows in my spreadsheet, and I have no time or interest in figuring out just exactly how the bug screws up.
Print the post Back To Top