Kensho Stats

These stocks beat the market when inflation is rising like it is now

The Labor Department said Tuesday that producer prices came in hotter than Wall Street expected last month. The big inflation report, the consumer price index, is out Wednesday and is expected to show a similar trend.

History tells us certain kinds of stocks thrive during inflationary environments.

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 and most consistent performers in the S&P 500 during those inflationary time periods (of varying time lengths).

Going by these results, it seems the health-care, technology and industrial industries tend to do best during periods of rising prices. Shares of Netflix with its sticky streaming service, perform well also.

For comparison, the S&P 500 posted an average return of 2.75 percent and traded positively 81 percent of the time during those inflationary periods.

(Note that some of the companies did not exist all the way back to 1981, so we used the average performance figures from the inflationary periods that occurred during their lifetime.)

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