If the stock market were a person, you would not want to be around them very much. Imagine a friend who reacts unpredictably to every major piece of economic news, often several times a day.

One minute they’re on top of the world. The next minute they’re sitting in a dark corner with their head in their hands declaring it’s all over. These are the daily ups and downs of a market that moves with complete unpredictability.

It’s no wonder that investors who try to make short-term gains by predicting the market’s everchanging moods can feel stressed out. They have to constantly ask, “How’s the market feeling today? What is it going to do next?”

When they believe the market seems to be making a significant correction, these active investors often pull their money out of stocks. Their reasoning is that they can cut their losses by avoiding the bottom of a dip, and then jump back in when the indexes are on their way backup.

This would be a valid strategy, except for two things. It’s impossible to tell when the market is going to drop a significant amount. And equally difficult to tell when it might recover that ground.

To explore the implications of this, researchers at J.P. Morgan Asset Management used data from Bloomberg to analyze the daily behavior of the S&P 500 Total Return Index over the past 20 years. (This index is an unmanaged, capitalization-weighted index that measures the performance of 500 large capitalization domestic stocks representing all major industries.)

They found that over the past two decades the market’s best days tend to come right after its worst days. In other words, if you jumped out of stocks during a major slide, you would not have been in position to benefit from their immediate recovery.

The 10 best days, with single-session returns between 6.3% and 11.6%, occurred after the big declines amid the 2008 financial crisis and the 2020 pandemic pullback.

Hypothetically, if someone had invested $10,000 in the S&P 500 on Jan. 1, 2002, and stayed the course through Dec. 31, 2021, they would have a balance of $61,685.

But if during that time they had missed the market’s 10 best days, they would have only $28,260. That’s a difference of $33,425 – over 3 times the original investment!

“We often feel like we can take control of the markets by selling out of them,” said Katherine Roy, chief retirement strategist at J.P. Morgan. “As a result, you lock in those losses and you are likely to miss some of those best days that are going to follow very shortly thereafter.”

The prudent investor will spare themselves the day-to-day drama of their fickle “friend,” and instead stay focused on a long-term plan that doesn’t rely on lucky market timing in the pursuit of success.