Signs of recession are looming. With the Federal Reserve issuing the biggest rate hike in over 20 years, Bank of America chief investment strategist Michael Hartnett warning of "inflation shock" leading to "recession shock," and the CEO of JPMorgan Chase saying that recession is "absolutely" possible, it sounds like dark skies are looming ahead for the market at large.

What's a savvy investor to do when signs point to the bears coming in and taking everyone's picnic baskets? The answer to protecting a portfolio against recession might just lie in investing in Big Macs, orange juice, and sodas. As strange as it may seem, fast-food giant McDonald's (MCD 0.47%) and beverage titan PepsiCo (PEP -2.97%) are two top companies that have proven they can weather a recession and come out on top, and they're poised to do it again.

fast food hamburger fries dip drink

IMAGE SOURCE: GETTY IMAGES

Drive-thrus, delivery, and shelf-stock advantages

McD's and Pepsi demonstrate a proven ability to adapt to market conditions. Each of them fared very well during the 2020 pandemic-related recession, and they've made improvements to ensure they're ready for upcoming economic challenges. 

McDonald's benefited greatly from a strong recovery plan for the pandemic recession that worked. After a precipitous drop hit all restaurants, the home of the Big Mac posted year-over-year stock price gains during the 2020 recession. The company amassed cash reserves during that time as a hedge against recession, going from cash holdings of $898 million in 2019 to $4.7 billion cash on hand by 2021. It reinvested much of that cash as the recovery settled in, dropping its cash hoard to $2.3 billion as of March 31. The company invested much of that cash in drive-thru and delivery services, giving it an advantage over its competitors when consumers must stay at home for pandemic or economic reasons. And McDonald's remaining cash pile still offers a strong bulwark against recession. 

PepsiCo brings more to the table than just soda, a market where it shares space with the Coca-Cola Company. Its biggest hedge against recession rests on the shelves of grocery stores, where bottles of soda find themselves alongside other major PepsiCo brands. Remember how the pandemic made shelf-stable goods a virtual cryptid, with people stalking the stores for shelf replenishment? PepsiCo fills those shelves with its Quaker Oats, Rice-a-Roni, Frito Lay, Doritos, Cheetos, Cracker Jack, Cap'n Crunch, Lipton teas, Aquafina, Sabra hummus, and Aunt Jemima pancakes, grits, corn meal and syrup as well as a partnership to distribute Starbucks bottled coffees. The company recently added Rockstar energy drinks to that substantial stable. 

Those shelf-stock brands bolstered Pepsi's profits when restaurants closed their doors.  By the end of 2021, as markets began to emerge from the pandemic recession, PepsiCo had outpaced its biggest soda rival in total revenue (across all brands), with Pepsi delivering $79.47 billion in net revenue versus Coke's $38.7 billion.

Recessions aren't new ground for these two titans

Historically, both of these companies have proven they have what it takes to survive, and even thrive, in a recession. They've done it before.

McDonald's stock maintained much of its value during the 2008 Great Recession, which was the largest contraction in the market since the Great Depression. The burger giant's stock doubled in value between 2008 and 2012, just three years after the recession ended. The pandemic recession of 2020 saw the company fall from previous highs of $215 to a low of $148 before posting recent all-time highs around $268.

PepsiCo saw highs in 2007 of around $77 a share, before plummeting alongside the rest of the market to a low of $48 during the peak of the Great Recession in 2009. The maker of Canada Dry and Dr. Pepper recovered quicker than the market at large, and posted new highs over $80 as soon as 2013. The 2020 recession saw a brief low of $103 before bouncing back quickly to new all-time-highs around $178 in recent months.

The Great Depression itself was a combination of two major recessions in a short span of time. The pandemic recession and the next recession period will also likely be viewed as one major event, though hopefully one less impactful than that of the early 1930's.

Is flipping burgers and selling sodas enough?

These two brands have a place in almost every city in the U.S., and they're household names recognized worldwide. But, there are some dark clouds in a recession that could derail the performance of McDonald's and PepsiCo stock.

McDonald's cash reserves are at risk from rising inflation, the very cause of the Fed rate hike. If inflation were to beat the growth of those cash reserves, it could make them less valuable as a hedge to protect the company's future. Luckily, McDonald's still has plenty of cash on hand, and has proven it can grow those holdings in recession conditions as it did from 2019 to 2021.

PepsiCo stock prices have traditionally taken a big hit at the outset of a recession before demonstrating powerful recovery. Its shelf-stock advantage gave it great buoyancy during the 2020 market dip. The company recovered in a matter of weeks instead of years.

Of course, a recession might not happen. That's a best-case scenario unfortunately made less likely by recent Federal Reserve decisions. But these companies have tools for continued growth for both fertile and barren economic conditions.

I'm loving it because they've got something for everyone

Culturally relevant marketing by both companies is a powerful edge in the current economy. McDonald's continues to improve its popular alternative ordering and delivery services, and the company's marketing arm seeks to stress its value across the brand, positioning itself as an inexpensive alternative to traditional restaurant dining in tough times. PepsiCo has declared customer retention a top priority, focusing their marketing efforts on those likely to struggle in a recession.

As we approach the cliff of recession, it's important to look before you leap. These are two companies that have proven their potential to survive and even thrive in a recession, both historically and during the unforeseen events of the recent pandemic. Buyers are likely to see this as a good time to hop on the Big Mac bandwagon, and Pepsi's recent moves make it a good choice for those looking for an organization likely to weather a potential upcoming storm in the markets and come out ahead.