According to Moody's, the chances of a recession hitting within the next 12 to 18 months are "awfully high." The International Monetary Fund has reduced its global economic growth forecast estimate for 2019 to the lowest level since the last financial crisis, citing the fallout of the protracted U.S.-China trade war. A survey of 200 economists carried out by the National Association for Business Economists in August revealed that more than 70% believe that there will be a recession within the next two years.

These doom-and-gloom predictions indicate that the next recession could be a matter of when and not if. And when a recession actually arrives, the stock market will go into a tailspin as companies find growth hard to come by on account of weak spending by consumers, corporations, and the government. But the likes of Palo Alto Networks (NYSE:PANW) and Netflix (NASDAQ:NFLX) could buck the trend. Let's see why.

A bear in front of a declining stock chart.

Image Source: Getty Images.

1. Palo Alto Networks provides a critical service

Recession or no recession, everyone needs to protect their critical data and systems from bad actors. A study by the University of Maryland has found that a hacker attack takes place every 39 seconds on average. More than half a billion personal records were stolen last year, and 95% of data breaches take place in three arenas: retail, technology, and government.

Not surprisingly, Cybersecurity Ventures predicts that global cybersecurity spending could top $1 trillion by 2021. Palo Alto Networks is one of the top cybersecurity stocks you can buy to take advantage of this trend.

The cybersecurity specialist is in aggressive expansion mode and seems quite confident about delivering long-term growth despite the looming cloud of a potential recession. That's evident from the fact that Palo Alto recently issued a three-year outlook and a strong one at that.

The company expects to hit $5 billion in revenue in fiscal 2022, a substantial jump from the $2.9 billion revenue it has generated in the past 12 months. Palo Alto expects free cash flow to hit $4 billion at the end of the forecast period as compared to $924 million over the past 12 months. And it won't be surprising if the company manages to deliver on this ambitious guidance.

Palo Alto has made a string of acquisitions in recent years, entering fast-growing niches of the cybersecurity industry. For instance, the company has acquired five cloud security-related companies since March 2018, going after a corner of the cybersecurity market that's expected to clock $13 billion in revenue by 2022 (as compared to $6 billion in 2016).

More importantly, Palo Alto's acquisition-driven growth strategy seems to be paying off; the company reports that it has been winning business from its rivals.

In the end, it can be said that Palo Alto Networks provides a critical service that will continue to attract spending even when there is a recession. This is why it makes sense for investors to consider this stock for their recession-proof portfolio, especially considering that it trades at a relatively cheaper 42 times forward earnings as compared to the five-year average multiple of 70 times.

2. Why Netflix could thrive in a recession

Don't be surprised to see Netflix feature in a list of recession-proof stocks, as the video streaming giant has already proved its mettle. While the broader market was clobbered during the last recession, Netflix stock delivered terrific returns.

NFLX Chart

NFLX data by YCharts.

You might be wondering why Netflix -- whose services are not a necessity for survival in difficult times such as a recession -- could do well during a financial crisis. The answer to this question lies in an economic concept known as the "lipstick effect."

While consumers cut down their spending on big-ticket items during a recession, they still like to indulge themselves in small luxuries that don't burn a hole in the pocket. For instance, you might want to go see a movie, have a good time, and escape the reality of a recession without hurting your already-limited finances, since this is a small-ticket luxury.

The average price of a movie ticket in the U.S. and Canada stood at $9.11 last year, according to third-party estimates. An average American family consists of just over three persons, so the cost of tickets would be closer to $30. Add the cost of fuel, parking, and consumables, and an average family could easily spend much more than just the $30 cost of tickets -- to see one movie.

The advantage with Netflix is that a family of three can have a good time for a lot less. For almost $16 a month, a customer can buy Netflix's premium plan to watch an entire library of movies and shows in ultra-high definition. If you prefer the old-school method, Netflix can send you unlimited Blu-ray DVDs a month for just $12 (though you can rent two discs at once).

Of course, you won't get the latest box office hit on Netflix immediately, but it is a great way to save a lot of money and get entertainment on demand.

Consumer confidence in the U.S. has started dipping. September retail sales fell for the first time in seven months as households cut their spending on vehicles and building materials. But Netflix's U.S. subscriber growth returned last quarter. The company added 520,000 new U.S. subscribers in the quarter after losing 130,000 in the previous one, indicating that a lipstick effect could be around the corner.

With a global base of nearly 160 million subscribers and plans to bring more users into its ecosystem through lower-priced plans, Netflix could keep doing well even in a recession. This is why you can add it to your list of top stocks that could recession-proof your portfolio.