Editor’s Note: Paul R. La Monica is a digital correspondent for CNN Business. He writes daily about the markets and blue chip companies and also appears regularly on CNNI’s business programs. The opinions expressed in this commentary are his own.

Many people are scratching their heads about the stock market’s stunning rebound since March. How can Wall Street be doing so well at a time when many consumers have lost their jobs during the Covid-19 crisis and are struggling economically as a result?

The rally is mystifying. Few experts would have expected stocks to recover this quickly.

Heck, the S&P 500 and Nasdaq are just below all-time highs and the Dow is close to its peak level from February – even though it’s been bumpy again lately and stocks took a particularly nasty tumble Thursday and fell again Friday.

But what this comeback shows is that average investors who hold on to stocks for the long haul with goals like saving for a young kid’s college tuition, growing a nest egg to buy a bigger home or retiring should not panic when the market suffers a big slide.

“Those who ran with their emotions and moved out of the market have been blindsided by how fast it has recovered and missed the gains,” said Tom Stringfellow, president and chief investment officer of Frost Investment Advisors. “You can’t really time the market.”

Bear markets are inevitable. According to data from Hartford Funds, anyone that has the wherewithal to keep money in the market for 50 years (i.e. from your first job all the way through your golden years) can expect to see about 14 bear markets over that period.

Bear necessities

The key is to not let the occasional downturns overwhelm you – and to be willing to buy more, even when the headlines are all about economic doom and gloom.

Just look at what’s happened to the market in the past few decades.

The infamous Black Monday crash of October 1987, in which major market indexes plunged more than 20% in one day, turned out to be just a brief blip in the 1980s bull market. Stocks soon resumed their rally – which didn’t end until the dot-com bubble burst in 2000.

The market drop of 2000 was painful, but that bear market was over by 2003. And remember when the S&P 500 plunged to a low of 666 in March 2009 during the height of the Great Recession. The index was back at an all-time high by March 2013

Stock market vs. the economy

There has been a lot of talk about how only the wealthy are benefiting from the rally since they can afford to buy stocks. Many say that Wall Street wealth isn’t trickling down to Main Street, and the market is not the same thing as the economy.

Although the wealthy have benefited most from this rally, and Main Street is really hurting, the stock market is tied more closely to the economy than many think.

Keep in mind that the market is now dominated by a handful of tech stocks – the so-called FAANGs – Facebook (FB), Apple, Amazon, Netflix and Google owner Alphabet (GOOGL) – as well as Microsoft (MSFT). Many of those companies are doing well in part due to changes in consumer spending resulting from the Covid-19 pandemic.

Amazon (AMZN) is, among many other things, a giant retailer. And it’s near an all-time high as people shop even more online. Netflix (NFLX) offers a monthly streaming subscription service that people continue to pay for even in this recession.

Microsoft’s Xbox gaming revenue soared 65% in its most recent quarter. And people are still buying Apple’s (AAPL) iPhones and signing up for things like Apple Music and iCloud storage.

“It may have seemed like the world was coming to an end. But a lot of people are still working from home. The economy has moved on. It just looks different,” Stringfellow said.

Think of it this way: If you can find the cash to keep spending to use these companies’ services, why not take a couple of bucks a month to also invest in their stocks – or an S&P 500 or Nasdaq-100 ETF that owns big positions in these companies?

The rise of low-cost exchange-traded funds, tax-efficient Roth IRAs and upstart discount brokerages like Robinhood, Betterment and Acorns (not to mention big powerhouses like Schwab (SCHW) and Fidelity) have made it easier for anyone to stash away at least a little of their money into stocks.

It also goes without saying that if you work for a company that offers a 401(k) savings plan, it behooves you to use that to invest in stocks for your retirement – especially if the employer provides a generous match.

So try not to freak out if a Covid-19 second wave causes a stock market drop, or if other negative headlines about the upcoming presidential election scare Wall Street in the next few months. If you can, the best thing to do is to sit tight.