Kensho Stats

Here's what beats the market when inflation starts rising like it is now

Industrial Worker welding
Spencer Platt | Getty Images

Wednesday morning the Labor Department said the consumer price index increased by 2.5 percent in the 12 months through January, the biggest annual gain since March 2012. History tells us technology and industrial stocks beat the market when inflation pressures build like they are now.

Using hedge fund analytics tool Kensho, CNBC PRO found 32 periods going back to 1981 when CPI annual growth was between 2 and 3 percent. Here were the best-performing S&P 500 sectors, on average, during those periods of varying time lengths along with the performance of the S&P 500.

Here were the best-performing members of the Dow Jones industrial average, on average, during those periods:

Bottom line: History suggests investors should by energy and industrial stocks, which benefit from higher commodity prices, and shares of technology companies, which have pricing power during periods of rising inflation.

(Note: The periods of inflation tracked had varying time lengths. Some were just one month, while others were six months or more.)

Disclosure: NBCUniversal, parent of CNBC, is a minority investor in Kensho.