This year has been a wild ride, to say the least. Nearly 5 million Americans have been infected with COVID-19, more than 54 million workers have filed initial unemployment claims since March, and the Commerce Department revealed that the U.S. economy experienced its worst performance ever during the second quarter of the year.

It's understandable, then, that Americans are feeling pessimistic. The Wells Fargo/Gallup Investor and Retirement Optimism Index plummeted by 134 points, the single biggest drop since the index began in 1996 (with a baseline score of 100). The index has ranged from +152 in January 2000 to a low of -81 in February 2009. Wells Fargo also found that many people are pessimistic about the stock market's outlook, with nearly half saying that the worst is yet to come.

Man sitting on a couch looking out a window with a laptop on his lap

Image source: Getty Images.

Nobody knows whether another downturn is on the way or when it might happen. But no matter what the future holds, it's good to be prepared. There's one smart move that could help you build a stronger retirement fund, and only about a third of Americans are taking advantage of it.

Saving during uncertain times

Around 35% of Americans say that current stock market conditions make it a good buying opportunity, according to the Wells Fargo survey. Investing when the market is volatile can be nerve-racking, and it may feel like you're simply throwing your money in the fire if another downturn is coming. However, it could actually be one of the smartest investing moves you make.

If the market takes a turn for the worse, stock prices will drop. That's not necessarily good news for your portfolio, but it is a good opportunity to invest more. Because prices are lower, you can get more for your money during a market downturn. The stock market is essentially on sale, and you can load up on great stocks at a fraction of the price. Then once the market recovers, your investments will skyrocket in value.

If you're feeling uneasy about the wild ups and downs your investments may experience during periods of volatility, remember that the stock market has always bounced back from even the worst crashes. Even when the market took a nasty fall earlier this year, it recovered remarkably quickly. So if another downturn is on the way, remember that it isn't permanent. As long as you're investing in solid companies and diversifying your purchases properly, your investments should be able to ride out the storm.

What if you can't afford to invest right now?

There's one caveat to investing in the stock market: Invest only what you can afford. Times are tough for millions of households, and if money is tight, it might not be the right time to invest. Approximately half of those in the Wells Fargo survey said they plan to simply hold their investments for the time being, and that may be a wise approach in many cases.

Before you invest, make sure you have a robust emergency fund. The last thing you want is to invest every last penny you have, then be forced to withdraw your money from the stock market if you lose your job or are slammed with an unexpected expense.

Whatever you do, try your best to avoid withdrawing your investments. If you withdraw your savings from your 401(k)plan or traditional IRA before age 59 1/2, you're generally hit with a 10% penalty and income taxes on the amount you withdraw. While the penalty is waived for now under the CARES Act, you'll still be responsible for income taxes. And if your finances are already stretched thin, that's an added expense you don't need.

Investing in the stock market is one of the best ways to build a robust nest egg, and saving more during a market downturn can be a smart strategy to grow your investments. By investing what you can afford and keeping as much money in the stock market as possible, you'll be one step closer to retiring more comfortably.