The U.S. economy officially entered a recession in February as growth slowed during the early days of the COVID-19 pandemic. Stocks have been volatile since March, logging both sharp spikes and brutal declines tied to investors' changing ideas about the length and severity of that slump.

It's possible that the economy will jump right back into a new expansion as quickly as it exited the last one. But cautious investors might want to hope for the best while preparing for the worst.

With that idea in mind, here are three attractive businesses that are positioned well for the next few years, even if that period is dominated by recessionary selling conditions.

People share a pizza.

Image source: Getty Images.

Domino's has the goods

The pandemic has pushed Domino's Pizza's (DPZ -0.03%) growth trends to new heights, with same-store sales gains reaching over 20% during some weeks in April and May. That success confirms that the pizza chain is a favorite during trying economic times.

But what's even more impressive about this business is its long-term track record of gobbling up market share from its casual dining and eat-in fast-food rivals. As of late 2019, Domino's accounted for 29% of all consumer spending in the massive pizza category, up from 17% a decade earlier.

Domino's got help from its ultraefficient operating model during that time. And that approach has easily translated into big international markets, too. The chain's leading tech position has also been a major competitive advantage.

Both these assets could help Domino's to continue adding to its international store base and fortifying its home turf over the next few years. And investors don't have to be too worried about it closing many locations, as has happened with rivals like Yum! Brands' Pizza Hut. Its tiny footprint has allowed the chain to close just a small portion of its 17,000 global locations in any given year while posting consistently strong net store growth.

McCormick should thrive

The COVID-19 crisis pushed consumer spending away from restaurants and toward at-home food preparation. In that way, it mimicked the impact that a recession can have on the two industries as income pressures change spending priorities.

McCormick's (MKC -0.95%) last earnings report covered only the period through late February, but the spice and flavorings giant still gave investors several reasons to be bullish about its business. Sales volumes spiked as high as 65% in early March, management said. Some categories, like broths and vanilla flavoring, more than doubled as people filled their pantries.

CEO Lawrence Kurzius and his team have predicted that demand might stay elevated for some time as schools and major employers continue stressing work-from-home approaches through 2020. Investors will find out if that forecast played out when the company announces fiscal second-quarter results on June 25. But McCormick has enough attractive characteristics, including ample cash flow, market-leading profit margins, and a growing dividend, to make it a good purchase even during cyclical downturns.

TJX Companies will recover

TJX Companies (TJX 0.61%) gave investors several reasons to feel pessimistic about its business in its latest earnings report. Sales dove by more than 50% as its stores remained closed for most of the quarter. The off-price retailer also posted a brutal operating loss, in part thanks to inventory writedowns.

That stressful situation created a cash crunch that threatened the company's 24-year streak of consistent dividend raises. However, it has also made the stock cheaper relative to the broader market.

Investors who believe TJX can recover its footing will find some good reasons to buy its shares, including the fact that merchandising opportunities will be ample as full-price retailers trim inventory in any prolonged downturn. Its value focus, at the same time, should make TJX a popular shopping outlet for consumers looking to stretch their apparel and home goods budgets.