Kensho Stats

Your investing playbook for a slow-growth economy

The economy is growing at a much slower pace than expected, but certain types of stocks have a history of thriving in such mediocre environments.

CNBC PRO used Kensho to study all the periods since 1981 where GDP increased at a pace between 0.5 percent and 1.5 percent. That's where we are now after Friday's Commerce Department report showed 1.2 percent annual growth in the second quarter and a 0.8 percent rate in the first period of the year.

Among major benchmarks, mid-cap stocks were the stars during slow-growth environments, according to Kensho.

The S&P Mid-Cap 400 index posted an average gain of nearly 3 percent during slow-growth quarters, while the S&P 500 and the small-cap barometer Russell 2000 declined, on average, according to Kensho.

The mid-cap benchmark has almost doubled the return of the S&P 500 this year, up 12 percent.

Here are the best-performing sectors during these sluggish periods...

Consumer staples, which you can buy as a basket with the Consumer Staples Select SPDR ETF, were far and away the best play during these environments because of their steady earnings growth and hefty dividends. Surprisingly, stocks tied to the commodities market did decently well.

Here are the worst sectors, according to Kensho.

Technology and telecom stocks did not do well during these weak growth periods, knocking a theory many investors hold that these high-growth parts of the market can buck the trend of the overall economy. Bank stocks were also notable weak performers.

— CNBC parent NBCUniversal is a minority investor in Kensho.