Fears of a recession are mounting as the Federal Reserve continues its attempts to desperately curb rising inflation. Investors looking to shield their portfolios in this worrisome environment, may find protection in stocks that have performed well during previous recessions and when economic growth is negative. In recent months, economists at major banks have upped the chances of a recession and investors got fresh GDP data on Thursday which showed the economy contracted for a second time last quarter. Two consecutive quarters of declining GDP is viewed by many as a sign of a recession, although the National Bureau of Economic Research uses multiple other factors to determine an official one . To find the most recession-proof companies, CNBC Pro used FactSet data to screen for names that averaged solid returns and gained in value during each of the last three recessions. We then looked for companies with at least a $5 billion market capitalization that are currently beating the market this year. The search brought back a slew of companies with solid businesses that tend to hold up even in a downturn. Here are some of the names that made the cut: Walmart made headlines when it trimmed its guidance earlier this week as inflation takes its toll on shoppers. But the retailer has nonetheless been a strong performer during the last three recessions and continues to outperform the market this year. Since the beginning of 2022, Walmart shares are down more than 11%, relative to the S & P 500 which has fallen about 16%. In the most recent recession, the retailer posted a 13.4% return and a 5.1% return during the Great Recession. Southwestern Energy saw the greatest average return (59.8%) and the largest return in the most recent recession and the Great Recession, when it gained 127.5% and 39.4%, respectively. The natural gas producer also made a recent CNBC Pro screen for stocks that historically outperform the bear market. Southwestern’s stock has skyrocketed more than 48% this year as natural gas prices soar. Cereal maker General Mills is another strong performer during a downturn. The stock is trading up 10% this year and recently hit a fresh high on the back of strong quarterly results. During the last recession, General Mills gained more than 23%. Other stocks that made the list included Amgen , O’Reilly Automotive and J.M. Smucker Company .