The past seven years has been riddled with ominous calls.

When stock prices surge during what feels like an unusually uncertain environment, it’s tempting to proclaim the market is peaking and then bail out.

Unfortunately, trading like this can be a money-losing exercise.

There are two reasons why it’s a mistake to trade on what you believe is a market top: 1) It’s incredibly difficult to accurately time the top. Just last week, Jon Boorman of Broadsword Capital tweeted a chart of at least 20 times since 2010 pundits have incorrectly predicted imminent doom for the markets. 2) Some of the best gains to be had in the market occur during the months before the market tops.

Bank of America Merrill Lynch’s Savita Subramanian has done some eye-opening work on this latter point.

“The end of bull markets have been painful to miss,” she said in a recent note to clients.

Sure, it’s hard to watch your portfolio absorb some unrealized losses when the market unexpectedly goes south. But the opportunity cost of selling too early and missing out on significant gains can be devastating for long-term returns.

“History suggests that unless you can pinpoint the peak of the market within a 12-month timeframe, you are typically better off staying invested,” Subramanian continued. “Some of the best returns come at the end of bull markets, and these gains are usually enough to offset the subsequent losses.”

Some of the best gains to be had occur just before the market peaks.

Historically, we’re used to hearing about average annual returns of about 10%. But those averages only compute because of these 25% average returns you earn during the 12 months before the average market peaks.

“Over the last 80 years, the minimum equity market returns achieved in the final two years of a bull market were 30%, with median returns of 45% (vs. 17% preceding the August peak); returns preceding the 1937 and 1987 peaks were particularly strong: 129% and 93%, respectively,” Subramanian observed. “The returns in the last two years have averaged over 40% of the total returns of the cycle. Similarly, the lowest returns achieved in the last 12 months of a bull market were also impressive at 11%, with median returns of 21%. These robust returns suggest the opportunity cost of selling too early is quite painful.”

Story continues

Every investor has different goals and time horizons, so there’s obviously much more to be said about when one should and shouldn’t sell. Having said that, panicking when prices are up is a horrible investment strategy, and predicting market crashes can be rather ironic. It would seem that the most successful investors tend to be the ones who can stay invested.

–

Sam Ro is managing editor at Yahoo Finance.

Read more: