Fears about a possible recession are growing as interest rates rise and inflation keeps raging. While the economy has been performing well, investors wonder if a downturn could be on the horizon.

One way to recession-proof your portfolio is to look at outperforming stocks in the Great Recession, which took place from December 2007 to June 2009.

Three stocks that not only beat the S&P 500 during that time but generated double-digit returns were Vertex Pharmaceuticals (VRTX -0.52%)Ross Stores (ROST 1.00%), and Netflix (NFLX -9.15%). And while plenty has changed since then, these stocks could continue to be good buys if the economy slips into a recession again. Here's a look at their performance in the Great Recession:

^SPX Chart

^SPX data by YCharts

1. Vertex Pharmaceuticals

Vertex Pharmaceuticals was an unprofitable business a decade ago, and its net losses in 2008 and 2009 totaled more than $1 billion. Today, the healthcare company easily posts profits, and its net margin last year was 31%. It's also generating tons of money, with free cash flow topping more than $2 billion for two straight years and it carries no long-term debt.

Those characteristics highlight Vertex's stability, even if interest rates rise. The stock could be one of the safest places for investors' money amid a downturn. Its financials could help it generate sales growth without resorting to dilution in order to raise money for new opportunities.

Speaking of new initiatives: its gene-editing therapy CTX001 is a multi-billion-dollar opportunity that aims to treat sickle cell disease and beta-thalassemia. Not only would the treatment drive Vertex's financials, but it would diversify the company beyond cystic fibrosis, its core business.

Long-term growth prospects coupled with excellent financials could make Vertex a hot buy despite a downturn.

Three people look at a phone

Image source: Getty Images.

2. Ross Stores

Ross Stores runs more than 1,950 discount stores under two brands: Ross Dress for Less and dd's Discounts. That's almost double the 1,055 stores it operated in January 2011. The business has a history of doing well when consumers are cash-strapped and looking for ways to save money.

Here's a quick rundown of how it did in the years around the Great Recession.

Fiscal Year (Period Ending) Revenue Sales Growth Comparable-Store Sales Growth
2010 (Jan. 29, 2011) $7,866,100 9.5% 5%
2009 (Jan. 30, 2010) $7,184,213 10.8% 6%
2008 (Jan. 31, 2009) $6,486,139 8.6% 2%
2007 (Feb. 2, 2008) $5,975,212 7.3% 1%

Data source: Ross Stores SEC filings. 

Not only did Ross generate strong growth in fiscal 2008 while the recession was in full force, but it became a big benefactor once it ended, with sales continuing to rally afterward. 

The company is still growing today, with sales this past fiscal year (period ending Jan. 29) reaching $18.9 billion and the company's net profit coming in at $1.7 billion. And with Ross planning to grow by 100 stores this fiscal year, it will be able to reach more consumers and keep creating long-term value. 

Ross has consistently reported free cash flow of more than $1 billion in each of its past five fiscal years, and has notched a profit during that time, with a net margin that's typically at least 9% of revenue. The discount retailer also pays a modest dividend yield of 1.2%, which is only slightly below the S&P 500 average of around 1.4%. For conservative investors, this can be an ideal stock to invest in if you are worried about a recession.

3. Netflix

Netflix's business is another one that looks much different from where it was a decade ago. But it's even more recession-proof than it was back then. In 2009, the company's revenue was $1.7 billion, which had more than doubled in just four years. At the time, it had 12 million subscribers, and it was still shipping 2 million DVDs to customers daily, back in the early days of streaming.

Today, its subscriber base is more than 220 million, and its revenue was just under $30 billion last year.

Investors have been panicking since Netflix announced Wednesday that it lost 200,000 subscribers during the first three months of the year and it projected that it will lose 2 million more customers in Q2. But its business remains sound; its top line increased 10% from the prior-year period to $7.9 billion and it still posted a healthy profit margin of over 20%.

Even though the company recently raised its prices, the streaming service can still be an affordable option for people looking to cut cable and keep costs down in a recession. At $15.49 per month, its standard HD plan is still cheaper than cable, where even basic service can cost customers more than $25 a month and larger packages can rise much higher. Netflix also added mobile games to its service last year.

And there could still be more growth opportunities ahead as Netflix is talking about cracking down on password sharing and considering introducing cheaper plans with advertisements. Both moves could lead to stronger subscriber numbers in the future. With the sell-off this week, this growth stock has become an even better buy, as it is now trading at prices not seen since 2018.