Maybe the Exits are More Important…

If you've made a mistake with a trade, there's no shame in finding the exit.
Yes I’ve used this image before on my blog, but a) I shot it and b) it seems appropriate to this post, no?

As traders, we spend a lot of time thinking about our entries into a trade. What stock, commodity or currency to choose, when is the best timing, etc. But what if the entries don’t matter? What if trading is all about the exits?

Ok, that’s a really simple-minded statement, but I’m a little simple-minded, so stick with me and let’s see where this goes. I wanted to see what it would look like to pick stocks randomly, and exit with a trailing stop.

I’ll lay down the parameters for you:

• The period of time is January 2000 to June 2016. January 2000 was a painful time to start investing, since it was near the top of the market.

• We start with an account of $100,000.

• We pay $4.95 each way on commissions, because trading costs money.

• We work with a maximum of 10 positions at a time, with the position size (upon entry) never being more than 1/10th our current equity. We stay in the market all the time, unless we’ve exited and there’s no entry possible (which happens in later rounds, as you’ll see).

• We have a trailing stop of 20% ** below the highest open since we started trading. We exit at the next day’s open if our stop is hit the previous day.

• We trade only members of the S&P 100 (at the time of the trade, so no survivorship bias). Why S&P 100? Because I’m doing 30 runs at a time, and using a larger set of candidates slows things down considerably on my computer. I have to output each run manually and combine them later. Remember, I’m doing this for free, so this is all you get. You want me to test the Russell 3000 with 500 random runs, I’ll send you an address and an invoice!

• We enter randomly.

WTF? Yes, randomly. When one stock stops out, we pick another one from the S&P 100 randomly. That’s just stupid.

Screen Shot 2016-06-23 at 2.09.02 PM

That bowl of graph spaghetti represents 30 random runs. The red lines are the equity curves that ended up being below buying and holding SPY, and the green ones end up above. The heavy black line is SPY buy-and-hold.

Slightly fewer than 50% of the runs beat the market over the long term. Hardly impressive, but I must admit, I thought it would be worse (especially since there are fees involved).

Now let’s add an incredibly simplistic filter to our entries. The stock picks are still random, as long as the stock’s closing price is in the upper third of the last year’s price range. Or more specifically, I’m calculating the 250-period position-in-range, and only considering those stocks that with a value >.66 at the time of the trade.

Screen Shot 2016-06-23 at 2.09.16 PM



As you can see, there’s a whole lot more green in this chart. But before you get too excited, note that green indicates the ending point. Many of these runs did very poorly in the bull market of 2003-2007. Why? No flippin’ idea.

Let’s trash that whole PIR thing and try something different. Back to completely random entry. The only caveat is that we cannot enter a new trade if the S&P 500’s close is below its 120-day moving average. We still only sell when stocks hit their 20% trailing stop. This market-timing mechanism only filters the entries. Here’s what we get:

Screen Shot 2016-06-23 at 2.09.26 PM

That’s more like it! Most of these runs are above the buy-and-hold line throughout the entire time span. Even several of the ones that ultimately under-perform, manage to outperform the market most of time.

You can see a couple of straight horizontal lines in the graph. These are near the bottoms of the bear markets, where all trades have stopped out, and the market-timing filter is preventing new trades.

“But Matt, you’re not being fair! Why can’t we just time the market the same way? You’re not comparing apples to oranges.” Excellent point!

Screen Shot 2016-06-23 at 2.40.25 PM

Let’s “time” SPY the same way. We exit with a 20% trailing stop, and only reenter when the close is over the 120-day moving average. That performs better during the crash of 2008, but performs worse during the slow bleed of 2000-2003. The black line is still buy-and-hold, and the blue line uses the entry/exit plan. We’re still ahead with our random system. Only one additional random equity curve ended up below the blue line.

So don’t feel bad if you always seem to pick the wrong stocks. It might not matter. If you manage your exits, and have a simple market filter, you’re likely to outdo the overall market. What I’ve described above is not a system. But hopefully it makes you pay attention to the back end of your trades, not just the front end.

Update 06/24/16: Reader ‘Tonio’ asked why I didn’t compare these to the S&P 100 index, rather than the S&P 500 (since I’m picking stocks from the S&P 100 index). Partly the answer is because…well, I compare everything to SPY! The corresponding ETF for the S&P 100 (‘OEF’) didn’t start trading until October 2000. So you couldn’t start doing a buy-and-hold at the same start date.

I threw in the buy-and-hold results for OEF to compare, using a $100k account to start just slightly later. It doesn’t seem to have made much difference, and OEF underperforms SPY in later years. Which just means the random entry system is even better, I suppose. Here’s a chart. The shocking-pink line is OEF and black is SPY.

Screen Shot 2016-06-24 at 4.58.53 PM

** Why 20%? This is the only “optimization” I’ve done on this random system. I first tried it with 15% and didn’t get very good results . . . stocks got stopped out too early. So I just picked 20% instead. That’s the extent of my fine-tuning.




5 thoughts on “Maybe the Exits are More Important…”

  1. HI very nice artically which empirically proves exit matters with proper filter and the image is appropriate to this post 🙂

  2. But Matt, you’re not being fair ;)! Why use S&P500 as a benchmark instead of S&P100? Does it make any difference anyway?

    1. Tonio, yes that’s a good point. I thought about that briefly but my reasoning is this: people use the S&P 500 as a benchmark more than they do the S&P 100. Ok that’s probably not a good enough reason. I’ll take a look at how this compared to OEF (the S&P 100 ETF), and report back if there’s any substantial difference.

    1. Hi Alex. Yes, sharpes and drawdowns are important, but it would have taken significantly greater time for me to calculate them. But really this is just an exploration of the subject, and certainly not a trading system! There’s plenty for the reader to investigate further. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.