If you want to recession-proof your portfolio, look to the things you need: What businesses would still get your money, even if your income plummeted?

These companies' stocks probably aren't the ones you're salivating over during a bull market, because even in good times, demand for their products and services won't change too drastically. But during the next bear market, you'll wish you owned these three stocks.

Workers separate paper and plastic for recycling on a conveyor belt.

Sorting recyclables. Image source: Getty Images.

Waste Management

Even in a bear market, people will keep producing trash, especially in the U.S., where the average person produces about three times as much trash compared to folks in the rest of the globe. No matter how terrible the economy gets, you don't typically see trash piling up in the street.

Waste Management (NYSE:WM) is a favorite recession-proof stock not only because of the relatively noncyclical demand for its services, but also because of its competitive advantages over its rivals. For starters, it was the largest waste collection and disposal company in North America even before October 2020, when it completed its $4.6 billion acquisition of Advanced Disposal, then the fourth-largest waste management company in the U.S. In doing so, it bought itself another 3 million new customers, primarily in the eastern U.S.

Waste Management has 293 active landfills, compared to 190 for its biggest competitor, Republic Services. That's a huge advantage, given that developing a landfill is incredibly complex due to extensive regulatory hurdles and frequent public objection. The company is also well diversified, taking in 23% of its revenue from the public sector, 7% from residential services, and the remainder from a broad mix of private-sector industries.

Yet even Waste Management hasn't been immune to the COVID-19 recession. Revenue fell 10% during the second quarter of 2020 from the previous quarter, with lower commercial and industrial revenue driving much of the decline. Revenue fell by a much smaller 2.7% in the third quarter, with the return of about 70% of commercial volume that was suspended.

Waste Management wasn't insulated from the Great Recession, either, but it fared better than the rest of the stock market. From its Oct. 9, 2007, peak to its March 6, 2009 bottom, the S&P 500 index plummeted nearly 55%, while Waste Management's total returns fell by less than 37%. Plus, with a dividend yield of 1.9%, the stock should also be enticing to dividend investors.

Walmart

During the same period from 2007 to 2009 when the S&P 500 lost nearly 55% of its value, Walmart (NYSE:WMT) actually delivered total returns of 10.57%. Even during a recession, people still need food and other consumer staples, and they're more likely to seek them out from a discount retailer like Walmart in tough times.

But the landscape was a lot different during the last recession, given that the e-commerce revolution was still in its early days, and its battle against Amazon (NASDAQ:AMZN) had yet to heat up. Still, in the COVID-19 recession, Walmart has proved his strength, with total returns of 23% versus 17% for the S&P 500 in 2020. With a current yield of 1.5% and a 47-year history of annual dividend increases, Walmart is on track to reach Dividend King status in 2024.

Even though about 90% of the U.S. population lives within 10 miles of a Walmart store, the retailer still has strong growth potential. Its third-quarter e-commerce sales were up 79%, and its Walmart+ subscription service takes aim at Amazon Prime.

Walmart is clearly determined to push beyond retail. It recently started offering Medicare insurance plans and announced a partnership with Robinhood backer Ribbit Capital to launch a fintech start-up. With a P/E ratio of 21, Walmart looks cheap compared to many of its rivals, like Amazon (95), Costco (37), and Target (24).

WMT Total Return Level Chart

WMT Total Return Level data by YCharts.

AutoZone

Car maintenance and repairs tend to surge during a recession and recovery, as people hang on to their current vehicles instead of upgrading. That's why AutoZone (NYSE:AZO) thrived during the Great Recession, delivering total returns of 24% while the stock market was in a free fall.

The COVID-19 recession has changed the way we travel and how much we'll rely on cars if more jobs become permanently remote. But AutoZone's core customers tend to work in service-economy jobs that they can't perform from home, so they're less likely to have changed their driving patterns significantly. The company's strongest sales growth has occurred during recessions and the periods immediately after: the early 1990s, 2001-02, and 2008-09.

The pandemic has propelled a spike in used car sales, as people avoided carpooling, rideshare services, and public transportation, which could be a boon to AutoZone. These older vehicles will eventually need repairs that mostly won't be covered by a warranty.

Like its rivals O'Reilly Automotive and Advance Auto Parts, AutoZone underperformed the S&P 500 in 2020, with fourth-quarter returns staying relatively flat while the rest of the stock market kept climbing. The current recession has been unusual in that the stock market's recovery began almost immediately, even as millions of people continue to struggle. Many of those people still need cars. In a period of prolonged uncertainty, AutoZone typically benefits as people drive their aging vehicles longer.