Last month, Kenneth S. Rogoff, a Harvard economist and co-author of the book, This Time Is Different: Eight Centuries of Financial Folly, shared his opinion of the current financial crisis with The New York Times, saying: 

This is already shaping up as the deepest dive on record for the global economy for over 100 years. Everything depends on how long it lasts, but if this goes on for a long time, it's certainly going to be the mother of all financial crises.

Rogoff's perspective of the current state of the global economy is, of course, sobering. Already, millions of workers in the U.S. have lost their jobs or have seen their hours reduced because of the pandemic. 

A looming global recession is certainly scary for many reasons, but it doesn't mean you should stop investing in the stock market. As long as it's financially feasible for you to do so right now, putting money in the stock market is still a great way to build wealth.

The key is to find a few companies that have the strength and long-term perspective to weather a major downturn. Here are just a few reasons that Microsoft (NASDAQ:MSFT), Mastercard (NYSE:MA), and Roku (NASDAQ:ROKU) meet those standards and should come out of a recession stronger than before.

A man sitting in front of a computer and holding a tablet with a stock chart displayed on it

Image source: Getty Images.

1. Microsoft

Microsoft's revenue grew by an impressive 15% in the third quarter of 2020, and diluted earnings per share were up 23% from the year-ago quarter, to $1.40. This is clear evidence of the company's resilience even during the current economic turbulence, and it's mostly due to the company's focus on its cloud computing businesses.

Revenue from the company's Commercial Cloud segment popped 39% to $13.3 billion, and sales from Azure, its cloud infrastructure service, popped 59% from the year-ago quarter.

Cloud computing is proving to be a resilient market as companies are moving their services online more than ever before. Current cloud computing growth estimates show it growing from a $266 billion market right now to $355 billion just two years from now. 

Microsoft already holds the No. 2 spot (behind Amazon) in the public cloud computing market, and its laundry list of collaboration and cloud-based productivity services mean its dominance in this market is more important than ever. 

2. Mastercard 

During a recession, household spending tends to slow down, but it won't stop entirely. And with social distancing likely here to stay for a while, online shopping is the best way for many consumers to safely get what they need.

That's where Mastercard comes in. The company is the second-largest credit payment company in the world, and even during the pandemic, Mastercard has a few key opportunities. For one, digital transactions are skyrocketing, and in the most recent quarter, these "card-not-present" transactions accounted for half of the company's switched payment volume, an increase of 40% year over year.

More importantly, it's likely that this digital payment trend is just getting started. E-commerce was already expected to grow from 12% of all online U.S. sales in 2020 to 16% by 2023, even before the pandemic forced many of us to stay at home.

Investing in a payment processing company may seem counterintuitive during a recession, but investors should remember that spending doesn't stop -- not even in an economic downturn -- and Mastercard's massive payment platform puts it in a great position to benefit from e-commerce's continual rise over the coming years.

3. Roku

Roku's business has grown into a massive TV video streaming platform. Consider that nearly one-in-three smart TVs sold in the U.S. have the company's platform built into it. 

Roku's dominance in the TV platform space became even more apparent when it revealed that streaming hours for in its first quarter increased by 49%, to 13.2 billion hours. Additionally, Roku's incremental active accounts jumped 37% in the quarter, to 39.8 million.

That user and streaming growth translated to a revenue increase of 55% in the first quarter to $321 million and gross profit growth of 40%. The company is also making more money per user than before as ARPU increased $28% year over year, to $24.35. 

Roku's resilience during the current pandemic should continue as Americans leave their homes less and spend more time watching TV and movies.

Keep this in mind

There's still a lot of uncertainty in the market and the economy, and that's not likely to change for at least the next few months. The important thing for investors to do is to keep a long-term perspective on their stock purchases and not panic during market fluctuations.

The above companies have already shown resilience and the ability to grow during the current crisis, and they should continue to grow as the economy eventually turns around.