Thus far, calls of a recession have been few and far between. Although the U.S. economy just suffered the second consecutive contraction of its quarterly GDP, many economists are wary of suggesting that this usual indication is, in fact, a recession. Instead, they're pointing to success stories that indicate economic health -- and maybe that's a fair assessment.

However, on the chance that the economy is cyclically too far gone to sidestep a hard landing, here's a trio of stocks to consider that can stand up in any environment. At the very least, you'll want to keep them in your back pocket as long as the specter of a contraction looms.

O'Reilly Automotive

At first blush, it seems as if auto parts retailers would be doubly plagued by economic weakness. Not only do such environments discourage consumers from stepping foot in stores, but people might be particularly hesitant to make the big-ticket investments in maintenance and care that automobiles so often require.

In reality, though, the thinking (and the spending) is the exact opposite. Outlays on auto maintenance remain just as brisk during tough times as they are when consumers are flush with extra cash. Spending might even grow, since keeping a car running is an investment in delaying the future purchase of a new, increasingly expensive vehicle.

That's what fiscal numbers from auto parts retailer O'Reilly Automotive (ORLY 0.15%) indicate, anyway. At no point during the subprime mortgage meltdown and subsequent recession that began in 2007 and lingered into 2009 did O'Reilly report lower year-over-year quarterly revenue. Indeed, not even the shutdowns linked to COVID-19's spread in mid-2020 were enough to disrupt this company's sales growth.

Don't be surprised to see this uptrend persist -- or even accelerate -- this time around, either, should we slip into a recession. Cox Automotive's automobile pricing service, Kelley Blue Book, reports that the average cost of a new car in the United States hit a hefty $47,148 in May, approaching December's record of $47,202.

And that assumes consumers can find a new car they like and can afford. Thanks to still-broken supply chains, Cox says dealers are only sitting on 38 days' worth of inventory right now, down from 86 days at the same point in 2019. People might have little choice but to do whatever it takes to keep their current automobiles in good working order.

Procter & Gamble

Sometimes being big can be a burden. Smaller companies are generally more nimble and somehow find a way to foster better, more intimate connections with customers than larger organizations do. When the economy is tanking, though, all the upsides of being a behemoth start to shine through.

Enter The Procter & Gamble Company (PG -0.46%), parent to familiar brands like Pampers diapers, Tide laundry detergent, Bounty paper towels, Gillette razors, and more. These are consumer staples that not only foster loyalty but are almost comforting purchases when people are worried about bigger things.

But it's not P&G's well-entrenched brand names that make it such a powerhouse play in the event of a recession; it's the company's sheer size and all of the advantages that go along with it. Boasting more than twice the market cap of its nearest competitor, this company simply has more reach through its retailing partners.

It's also got deeper pockets, which it isn't afraid to dig into. Depending on the year in question, Procter & Gamble is often the world's single biggest advertiser, ensuring it keeps its customers close and feeling connected. The company spent a whopping $7.9 billion on advertising alone in its recently completed fiscal year, an outlay in line with recent years. And that's just for advertising. When broadening the category to promotions, marketing, and branding, the annual expenditure moves beyond $10 billion, according to numbers from Ad Age.

This sort of advertising firepower means a great deal when times are tough and competitors are struggling to keep up.

Consolidated Edison

Finally, add utility outfit Consolidated Edison (ED -0.18%) to your list of stocks to consider stepping into before a recession gets going if that's what's in the cards.

Its resiliency profile is similar to those of Procter & Gamble and O'Reilly Automotive, if not better. Consumers might or might not replace a faulty car part with a new one when money is tight, and there are cheaper paper towels than the Bounty brand. But most everybody does whatever it takes to keep their lights on, and in most cases, consumers have no choice as to the company that provides this electricity. They certainly don't in New York City, were Consolidated Edison -- you may know it better as ConEd -- serves 10 million customers.

That's not the key reason you'll want to be holding a piece of this company in a rocky economic environment, though.

Reliable cash flow is always a good thing, regardless of what you're doing with the money. It's particularly beneficial in the midst of circumstances that might crimp other sources of cash flow, however, even if your only goal is building up a cash stash to buy more stocks once a recession has beaten good ones down.

ConEd is a safe, solid name to own in a challenging economic environment because its reliable dividend payouts are built on equally reliable power-bill payments from its customers, both consumers and corporations.

In this vein, not only has Consolidated Edison paid a dividend every quarter for several decades now, but it has raised its dividend every year for the past 48 years to support its current dividend yield of 3.2%.