Recessions are a fairly common occurrences, yet it can still be a harrowing experience if you're not mentally prepared. Since 1929, the U.S. economy has dipped into recession 15 times, or roughly once every six years. Yet even as nerve-racking as a recession can be, having a portfolio stocked with companies that can weather these inevitable downturns as well as thrive during prosperous economic times can help investors endure the uncertainty.

With that in mind, let's look at three stocks that have proven their mettle during the recent downturn, but also offer tremendous growth opportunities in the months and years to come.

A relaxed man with his hands behind his head slightly smiling at a laptop.

Image source: Getty Images.

Apple: The poster child for recession resistance?

Even as the 2020 recession savaged many technology companies, Apple (AAPL -1.22%) was one of the few that wasn't hit as hard. The resilience of its customer base and the ongoing expansion of its services segment helped buffer the company's results during the downturn.

Even at the height of the economic uncertainty, the iPhone maker was able to modestly increase its revenue, while many companies saw sales plummet. This was driven by an all-time record from its services segment and a quarterly record for wearables. The recurring nature of its services revenue will help insulate Apple during any future recession. 

That's not all Apple has going for it. Even as the company works toward its well-publicized plans to be cash neutral, Apple still has one of the biggest cash hordes around. The company boasted nearly $193 billion in cash and marketable securities on its balance sheet and roughly $99 billion in debt to close out its most recent quarter. 

Finally, we have the benefit of hindsight to judge the performance of Apple's stock since the stunning market decline that occurred between mid-February and late March. From its peak, the iPhone maker's shares declined just 31%, while other tech stocks were ravaged, losing half or even two-thirds of their value. From their bottom, Apple shares have come roaring back, climbing 132% as of this writing.

As a result of its soaring stock price, the dividend yield has slipped to 0.63% (as of this writing), but since Apple funds the quarterly payments using just 25% of profits, the payout is still among the safest out there.

Given the many things working in its favor, it would be difficult to find a more fitting stock than Apple to buy during a recession.

Couple wearing wool socks huddled on the couch watching television or streaming video.

Image source: Getty Images.

Roku: Future recessions will be streamed

One of the undeniable consequences of recessions is unemployment, and with fewer people in the workforce, more people are at home. When those unfortunate folks are not out looking for a job, many will likely be killing time watching streaming video.

That's where Roku (ROKU -3.05%) comes in. The channel-agnostic platform provides access to more than 10,000 channels on its namesake streaming devices. That's not all. Roku's connected TV operating system (OS) is a top choice among television manufacturers, and is found in 38% of sets sold in the U.S. and 31% of those sold in Canada -- making it the No. 1 selling smart TV OS in both countries.

Those looking for proof that the company will not only survive, but thrive during a recession need look no further than last year, which provides ample evidence of Roku's resilience. During the first quarter of 2020, Roku's active accounts climbed 37% year over year, while streaming hours on its platform jumped 49%. The average revenue per user (ARPU) increased 28%, helping drive revenue 55% higher. Those trends continued into the second quarter, as active accounts were up 41% and streaming hours soared 65%. That pushed ARPU up 18%, while revenue climbed 42%.

These metrics helped Roku's stock recover from an early drubbing. While its lost more than half its value in the early days of the recession, Roku has since been one of the market's star performers, gaining more than 550% from its bottom in mid-March.

Roku is at a tipping point, on the verge of being consistently profitable as it leverages its growing base of viewers. Additionally, with nearly $1.05 billion in cash on its balance sheet and just $407 million in debt and operating lease liability, Roku has plenty of resources to weather any storm. 

Cloud computing icons over a blurred background.

Image source: Getty Images.

Microsoft: A port in the storm

Microsoft (MSFT -1.27%) is a technology and enterprise systems stalwart, but it was the diversity of its business during the recent recession that helped the company maintain its growth. In Microsoft's fiscal third quarter (ended March 31, 2020) revenue grew 15% year over year. At the time, two statements in the company's financial release stood out. 

First, CEO Satya Nadella noted, "We've seen two years' worth of digital transformation in two months." That's a sentiment we've heard echoed throughout tech circles in the months since. This reality plays right into Microsoft's strengths, as one of the undisputed leaders in cloud computing.

Second, in the company's earnings release was this simple statement (emphasis mine): "In the third quarter of fiscal year 2020, COVID-19 had minimal net impact on the total company revenue." This helps to illustrate that during one of the most significant economic upheavals in modern history, Microsoft emerged virtually unscathed.

During the company's fiscal fourth quarter (ended Jun. 30, 2020), its growth continued unabated, with revenue that increased 13% year over year. It's worth noting that even as growth from the company's productivity and business systems segment slowed, it got a boost from cloud computing and gaming. This shows how the diversity of its business will help sustain its growth in tough times. 

Recession fears initially drove the stock down 26% between February and March, but from their bottom, Microsoft shares have rallied 56% as of this writing.

The company maintains a respectable dividend yield of about 1%, and with a payout ratio of 33%, this dividend is as sure as they come. Microsoft also has a rock-solid balance sheet with nearly $138 billion in cash and short-term investments, nearly double the $71 billion in debt and operating leases.

Given the company's numerous advantages, Microsoft is a must-own stock in the face of economic uncertainty.

AAPL Chart

Data by YCharts

A final note

While each of these companies proved to be recession-resistant during the recent downturn, it's important to separate the business performance from the stock price. While each company continued to grow, as illustrated by their improving financial metrics, that didn't stop the stocks from experiencing the massive volatility that is part-and-parcel in an economic downturn.

This helps to illustrate one of keys to successful investing: focusing on the underlying business long enough for the stock price to catch up with reality.

In investing, like in life, there are simply no guarantees. However, given the performance of each of these companies during the recent unpleasantness, it's even more likely that they'll come through future recessions with flying colors.