The stock market is often a story of price swings, especially in the short term. There are subtle swings, price corrections, and in more extreme cases, bear and bull markets. A bear market is defined as a drop of at least 20% in the stock market within a short amount of time. The opposite is true for bull markets.

As the stock market tries to make its way out of the bear market that defined 2022, here's a valuable lesson investors should never forget.

A brown bear in front of a stock price graph showing a decline.

Image source: Getty Images.

History tends to repeat itself

Past results don't guarantee future performance, but history does tend to repeat itself. And history has shown that bear markets are virtually inevitable in the stock market. Since 1928, the S&P 500 (which is used to gauge the stock market's performance) has experienced 27 bear markets. That's well over a quarter of the years.

Here are the past 10 S&P 500 bear markets leading into this year:

Start and End Dates Decline Percentage
11/29/1968 to 5/26/1970 (36.1%)
1/11/1973 to 10/3/1974 (48.2%)
11/28/1980 to 8/12/1982 (27.1%)
8/25/1987 to 12/4/1987 (33.5%)
3/24/2000 to 9/21/2001 (36.7%)
1/4/2002 to 10/9/2002 (33.7%)
10/9/2007 to 11/20/2008 (51.9%)
1/6/2009 to 3/9/2009 (27.6%)
2/19/2020 to 3/23/2020 (33.9%)
1/3/2022 to 12/31/2022
(19.9%)

Data source: Ned Davis Research. Percentages rounded to the nearest tenth. 

Investors, for the most part, don't like bear markets. That's understandable. However, I'd argue that bear markets are a necessary evil in the stock market. 

Without bear markets, we could find ourselves in a position where stock prices only increased. If stock prices only increased, investing would essentially be risk-free. The less the perceived risk, the more investors are willing to pay for shares because they feel like they won't lose money either way.

That might not sound bad at first, but this situation sets off a domino reaction: Stock prices keep increasing because investors are willing to pay more, price-to-earnings ratios keep rising, and potential long-term future returns fall drastically. It's not an ideal cycle for investors.

The rain doesn't last forever

Although bear markets are frequent, they're usually much shorter than bull markets. The average length of the 27 bear markets experienced by the S&P 500 is 292 days (around 9.7 months), according to Hartford Funds. The average length of the 27 bull markets the index has experienced is 992 days (around 2.7 years).

That should encourage investors to view bear markets through a glass-half-full lens -- especially if time is on your side. Instead of viewing bear markets as a negative, view them as a chance to grab great stocks at "discounted" prices.

Here's roughly how much the S&P 500 has gained since the above bear markets:

Start and End Dates Decline Percentage Gains Since
11/29/1968 to 5/26/1970 (36.1%) 5,840%
1/11/1973 to 10/3/1974 (48.2%) 6,510%
11/28/1980 to 8/12/1982 (27.1%) 3,920%
8/25/1987 to 12/4/1987 (33.5%) 1,740%
3/24/2000 to 9/21/2001 (36.7%) 320%
1/4/2002 to 10/9/2002 (33.7%) 430%
10/9/2007 to 11/20/2008 (51.9%) 440%
1/6/2009 to 3/9/2009 (27.6%) 500%
2/19/2020 to 3/23/2020 (33.9%) 80%
1/3/2022 to 12/31/2022
(19.9%)
7%

Data source: YCharts. Decline percentages rounded to the nearest tenth. 

Investors who took advantage of bear markets as recently as three years ago have seen notable gains since then. You can't guarantee that individual companies will bounce back from down periods, but you can be all but certain the stock market will as a whole.

Consistency is what matters 

In the grand scheme of things, the relatively short durations of bear markets are just bumps in the road for long-term investors. Remaining consistent through the ups and downs is what's important.

If you have the financial means and a ways to go until retirement, you should stick to business as usual when a bear market happens (or up your investing to take advantage). Being too reactive to short-term swings could put you in a position where you're always trying to time the stock market.

Timing the stock market is hard to do once, but it's virtually impossible to do consistently over the long term.

Money is already an emotional topic for many people. Giving too much weight to short-term happenings could lead to more stress than good. Know that bear markets are inevitable and trust that the long-term results will be there.