Jim Cramer, host of CNBC's "Mad Money" and Investing Club, often says "there's always a bull market somewhere" — a reminder that good investing opportunities always exist in the stock market, even when it's down.
This is true even in a recession, Cramer says, which is an extended downturn in economic activity that can last months or more. It's not yet clear if the U.S. economy will fall into a recession, but it sure feels like it for people who have recently lost money in the stock market.
The S&P 500 has lost nearly 18% of its value since it peaked in January, as uncertainty in Ukraine, high inflation and looming interest rate hikes continue to create turmoil in the stock market.
"Lots of people are worried; they think we're headed toward recession. I totally get that," Cramer tells CNBC Make It. "People then say, recession: I better go to cash. No — wrong."
While there's always a risk that stocks will lose value, they also tend to perform very well over time. The average annualized return of the S&P 500 since 1926 has been 10.49%. If you put that cash in a high-yield savings account, you'd only be gaining 0.5% on those funds every year, based on the current interest rates.
Instead of dumping your stock during a recession, Cramer suggests changing your mix of stocks.
"What you need to say to yourself is, 'What companies have historically done well in a recession?'" says Cramer, adding that economic activity doesn't stop when the economy shrinks.
"When you go down the supermarket aisles, what are you buying no matter what? Do you brush your teeth in a recession? Yes. Do you wash your hair in a recession? Absolutely," says Cramer. "We're talking about things called staples. And staples are things that you need regardless of the economy."
He advises sticking with stocks of companies in sectors that can weather a recession. Cramer has mentioned a few examples on his show, including banks, food and drug companies.
"Procter & Gamble, which just increased its dividend for — I don't know — 60 years, does great in a recession. Coca-Cola, did you know [its] sales don't go down in a recession?" says Cramer.
And, "beer goes up in a recession, so there's Constellation Brands," he adds, referring to the company that produces Modelo and Corona.
Of course, it's important to remember that past performance does not necessarily predict future results. There's always some risk involved when investing in stocks.
What you invest in is one thing. How much and whether you want to put more money into the market during a downturn is something else to consider, says Cramer.
Since 1978, his investing philosophy for his 401(k) and IRA has been to make contributions every month, but he's also held off on making those payments when the stock market has looked bad.
That said, he will make catch-up payments if the market improves, to ensure that he's made 12 months worth of contributions before the end of the year. The bottom line is that you should only invest what you're comfortable investing.
"A recession should not dissuade you from investing, but it might dissuade you from investing as much money as you would during an expansion," Cramer says. "And I don't think there's anything wrong with that."
To learn more about investing, you can join the CNBC Investing Club with Jim Cramer at a discounted rate.