In the face of a slowing economy, companies with low operating leverage should outperform, according to Goldman Sachs.

Such companies tend to have higher costs associated with more sales, but they have lower fixed costs to cover each month. So when companies are experiencing a drag on sales from a slowing economy, those with low operating leverage will be less affected, Goldman said in an investor note.

"U.S. economic growth has sharply decelerated since early December. In the current macro environment, we recommend investors own stocks with low operating leverage and sell companies with high operating leverage," Goldman's chief U.S. equity strategist David Kostin said in the note. "Low operating leverage firms are those with the smallest share of fixed costs as a percent of revenue."

Recent weak economic data including retail sales have forced Wall Street analysts and economists to slash their growth forecasts, which have come down at a fast pace. J.P. Morgan economists last week cut their forecasts for first-quarter growth to 1.5 percent while many others see growth holding just above 2 percent. Consensus earnings growth estimates for S&P 500 firms have also been cut drastically as the first-quarter growth forecast has turned negative.

Goldman put together a basket of 50 stocks representing companies with low operating leverage relative to their sector. The bank said the basket has outperformed by 2.5 percentage points in the past two months. The S&P 500 is up more than 11 percent in 2019.

Twenty-four percent of the portfolio is in the tech sector, which includes Apple, Micron Technology, Applied Materials and Nvidia.

Other stocks in the portfolio include McDonald's, Starbucks, Walt Disney and Amgen.

"Stocks with low operating leverage also have attractive fundamentals relative to stocks with high operating leverage," Kostin added. "The Low Operating Leverage basket trades at the steepest P/E discount this cycle relative to our High Operating Leverage basket."