Just when you thought it was safe to plan your retirement and the coronavirus crash was over, the market is getting crazy again.

The S&P 500 fell 5.9% last Thursday as fears of a second wave of COVID-19 infections swept the market. The sudden convulsion was reminiscent of late February and most of March, when the market fell nearly 40% in about a month. Stocks have recovered nearly all of those steep losses, and while that may be a bullish signal for a recovery, it also sets up the market for another sharp pullback, especially if the economic rebound is slower than expected or if infections spike again.

In this environment, it helps to own stocks that will deliver solid results and payouts no matter what happens with the coronavirus or the stock market. And Walmart (WMT 0.57%), Johnson & Johnson (JNJ -1.15%), and Microsoft (MSFT -2.45%) are just the kind of stocks you need to weather another crash. 

A brick-and-mortar lifeline

In addition to being the biggest retailer in the U.S. and the world, Walmart is also the biggest grocer in the country as a majority of its sales come from food and beverage categories. With its reputation for low prices, locations spread across the U.S., and convenient online grocery pickup and delivery, Walmart became a lifeline for many Americans during the crisis.

Two Walmart employees presenting a pick-up tower

Image source: Walmart.

As restaurants closed, Walmart's grocery sales spiked, driving fiscal first quarter U.S. comparable sales up 10% as U.S. e-commerce sales jumped 74%. Despite spending on employee bonuses, supply chain needs, and other related costs, Walmart still managed to grow profits in the quarter, something many of its closest peers could not do.

With the country now officially in a recession, Walmart appears to be in an even better position to capture market share as its reputation for everyday low prices means it can gain shoppers in a down economy with consumers trading down to lower-priced goods. And the requirements of social distancing should keep restaurant visits below normal, leading consumers to spend more of their food budget at supermarkets like Walmart.

Share were rock solid during the first crash, and its role as an essential retailer should keep the stock steady in another sell-off. With a 1.8% dividend yield, investors can get paid while they wait out the volatility.

A healthcare giant

Healthcare has long been a favorite among investors looking for defensive stocks. After all, healthcare companies tend to generate wide profit margins, and their businesses function regardless of the strength of the greater economy as people need healthcare whether there's a recession or not.

For a reliable healthcare stock, there are few better options than Johnson & Johnson, a diversified conglomerate that operates in consumer products like Tylenol and Band-Aids, pharmaceuticals, and medical devices. Like Walmart, Johnson & Johnson is a Dividend Aristocrat as it has raised its dividend every year for 49 years. In fact, at the height of the crisis, J&J rewarded shareholders with a 6.3% dividend hike to $1.01 per share. That's good for a 2.9% yield as of this writing. And Johnson & Johnson is just one of two companies in the U.S. to have perfect a AAA credit rating from Standard & Poor's.

The healthcare titan hasn't escaped the pandemic completely unscathed, as it dialed down its guidance for the year moderately due to a delay in elective surgeries from COVID-19 that affected sales of its medical devices. Nonetheless, we're unlikely to see that repeated as hospitals in most of the country had sufficient capacity for COVID-19 patients during the lockdown period.

J&J's other two segments posted double-digit revenue growth in the first quarter, and the company just moved human trials of its coronavirus vaccine up to July, giving the stock significant upside potential if it turns out to be successful.

The king of enterprise tech

Enterprise technology may not be normally thought of as recession-proof, but during the pandemic, the sector has proven to be one of the more unflappable as these companies can easily operate with employees working from home. And many of their products are "mission-critical" -- businesses can't function without them. Technology is becoming even more important at a time when face-to-face interactions are frowned upon and remote work is becoming the norm.

Microsoft has dominated enterprise tech for a generation, and the Windows maker shows no signs of easing up. Guided by CEO Satya Nadella, the company has made smart acquisitions of complementary businesses like Linkedin and Github, in addition to developing its cloud juggernaut, Azure, into a worthy rival to Amazon Web Services.

In its most recent quarter, Microsoft saw revenue increase 15% with a 25% jump in operating income, and COVID-19 had minimal net impact on the company's performance. Some products, like Teams, Azure, and Virtual Desktop saw increases in usage, while demand for personal computing and gaming devices also surged during the pandemic.

A screen cap of four people chatting on a Microsoft Teams video call

Image source: Microsoft.

Alternatively, it saw headwinds in transactional licensing, particularly for small and medium-sized businesses, and in advertising on Linkedin. In its guidance for the current quarter, management expects most of those trends to continue with a forecast for sequential revenue growth.

Adding to its stability, Microsoft is sitting on a mountain of cash with $137.6 billion including short-term investments, and its credit is also rated AAA. Today, the stock offers a modest 1.1% dividend yield, but the tech giant has consistently grown its dividend by about 10%, and that should continue regardless of what happens with the pandemic and the global economy.