What should I learn from the opposite of trend following?

I have a number of trend-following strategies but to keep this simple I'll share one everyone can relate to. A 10-week MA crossing above a 40-week MA as a buy signal and the reverse for a sell signal. Here, no market regime filter is used. I'll show the code below followed by the major stats. It was applied to the S&P 500 from 2009-2022 with 400 positions possible -- not as a system but to gauge the type of behavior per trade.

NumPos = 400; 	//Number of allowed positions
SetOption( "MaxOpenPositions", NumPos );

// trade on next day open
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice = Open;
SellPrice = Open;

Short_MA = 10;
Long_MA = 40;

Buy = Cross( MA(C,Short_MA), MA(C,Long_MA) ) ;
Sell = Cross( MA(C,Long_MA), MA(C,Short_MA) ) ;

Now if I take the exact same system but switch the buy and sell signals I hope to understand what I'm avoiding by SELLING when the sell signal occurs. Seems reasonable. Those results are listed below.

With the traditional system which has a win-rate of 51%, avg profit % of 16.9%, and avg hold of 48 weeks. In the second system, (the reverse) the "buys" have a win-rate of 80% and an okay avg profit % of 8.2% considering the hold period of 22 weeks. The reverse system is sort of a long-term mean reversion system now.

My question is this -- what should I learn from this? The stats seems to indicate that selling in the first system is a BAD idea if 80% of those exits ultimately generate a profit. Am I missing something? Is this kind of reversal of a system helpful for analysis?

Any input or comments you have would be much appreciated. Good luck to you all out there!

Whether you hit the ball with a forehand or backhand, the ball still has to spend time and travel into the court on the other side of the net to be profitable. More time than it does touching your racket.

Either way, price movement/discovery is also a type of trend, with thge time, length and direction being different.

  • Sorry channeling my inner Ed Seykota
1 Like

In the period you mention, 2009 to 2022, the S&P500 rose some 565% depending on when exactly in both years you take the mark. If you add your trend following result (about 396%) to the mean-reversion result (about 144%) you get about 540% which is very roughly close to the total S&P500 pct rise of about 565%. I wonder if we can learn from this that a buy-and-hold strategy would have been best.
I think buy-and-hold would have added the results of trend following and mean reversion. It seems logical: every sell in trend following is matched with a buy in mean reversion, and vice versa, effectively annihilating both strategies except for the first buy and last sell transaction, ultimately resulting in a buy and hold between 2009 and 2022.

Possibly but this isn't a system exactly so I don't think the comparison you made is a fair one. Main point is to see how the entries and exits behave -- thus 400 positions are allowed at one time. Changing the number of positions to a smaller amount, like 20, produces far better returns.

What I'm really asking is whether or not it makes sense to investigate what happens AFTER a trade is exited? Or should we just focus on expectancy and when looking for new setups and entries/exits?

The buys and sells will not align in both tests even though tested on same stocks.

=> it's not that for every exit you get in the trend following test you will get a buy in the MR one.
Otherwise you wouldn't have 260 trades more in the MR test.

So based on those tests you can't conclude that 80% of the exits in the TF test would result in entering again at a higher price at the next buy signal in that same stock (= a profit for the MR system) because the trades will not "align" so to say.

Also, you are testing in a large bull market which impacts the results and is not a good way to test.
Trading that mean reversion system in a bear market will lead to bigger drawdowns.
And in a bull market that trend following system logically will enter again at a higher price more often.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.