If you've been in or around the market for a while, you've likely heard the adage "sell in May and go away." It's advice rooted in the idea that so little happens between the beginning of May and the end of September that you may as well sit these months out. And, there's a bit of mathematical support for the premise. On average, the summer and early fall months are lethargic ones for the market.

Be careful about blindly following the well-intended tip, however. Sure, the average returns during this period could be better. But a few really, really rough summers for stocks are weighing down what's otherwise a bullish time of year.

The rest of the "sell in May and go away" story

The S&P 500 gains -- on average -- about two-thirds of a percent between the end of April and the end of September. Any gain is always better than any loss. But, let's face it, that's nothing to write home about.

The S&P 500's average performance between May and September isn't particularly strong.

Data source: TradeNavigator, Thomson Reuters. Chart by author.

As another adage reminds us though, there's always more to the story.

Check out the related chart below. Once again it's an average full-year performance of the S&P 500, but in this instance, the performance is split into two categories. The first of these is the average cumulative annual performance in years that the S&P 500 index logs a gain. The second is the index's average cumulative performance for years in which the index suffers a full-year loss. Note that in bullish years (i.e., bull markets), the S&P 500 dishes out a gain of nearly 5.3% during the time frame in question. When it's bad, however, it's really bad. In losing years, the S&P 500 falls an average of 9.3% between early May and late September.

During bull markets, "Sell in May and go away" is bad advice. The S&P 500 typically rallies between May and September in strong environments.

Data source: TradeNavigator, Thomson Reuters. Chart by author.

So how is it that the S&P 500's overall average summer/early fall return is, well, at least not terrible? Because summertime sell-offs are actually rather rare. Going back over the past 50 years, the index has only lost ground in 11 of them. The other 39 years were bullish ones that, on average, would have driven solid gains between May and September.

That means if we're in a bull market, you want to stay in the market even during the middle of the year. There are plenty of gains to be reaped then, too.

That's not the only reason you might not want to bail out of stocks simply because you turned your calendar to the month of May, however.

Plenty of exceptions to the rule anyway

No one knows how 2023's going to end. While stocks tend to end the year how they started it, there are always exceptions to the market's tendencies. This year may well be one of them.

Even if you suspect the market's going to collapse this year despite its strong start, though, there's another matter to consider. That is, this sort of timing mindset can cost you.

Sure, on average the market stops rallying in May and doesn't begin rallying again until October. Even in net bullish years, there's a clear pre-slowdown surge in April and then another lull in the month of September. You could conceivably use these ebbs and flows as exit and entry points if you were so inclined.

The trouble is, there's no assurance this particular year (or any particular year) will closely align with the long-term averages. Stocks could rally through June. The market may tumble all the way through October. That's the thing about averages based on 50 years' worth of data. There's the occasional outlier, and some of the outliers can be well removed from the norm. Take 1979, 1983, and 1989 as examples. In 1979 and 1989, the S&P 500 soared all the way through summer, only to crash in October. In 1983, stocks did pretty well in late summer into the early fall but underperformed from September on.

There are enough exceptions to the "Sell in May" axiom to ignore the advice.

Data source: TradeNavigator, Thomson Reuters. Chart by author.

The point is, the market readily dishes out unexpected results in defiance of calendar-based averages. It can certainly happen again. Indeed, it can happen over and over again. Since you can't predict the unpredictable, your best bet is usually just sticking with stocks and keeping your eyes on the long-term prize.

Don't try to predict the unpredictable

None of this is to suggest the summer and early fall of 2023 will be another lethargic one for stocks. It might be. Or, it might not be. Nobody knows.

What most veteran investors do know is there are enough exceptions to every rule of thumb to shrug them off when it feels right to do so. That's particularly true in the case of the "sell in May and go away" mindset. A deeper dive into the underlying math only further calls the idea into question.

In other words, just do your thing. Don't sweat what's allegedly supposed to happen to stocks this time of year. Things may not pan out anything like what the adage suggests.