"It wasn't doing much of anything until October," said Ryan Lewenza, a senior vice president and portfolio manager with Raymond James, a St. Petersburg-based financial firm. "But then it broke out, and now it's outperforming the index."
The sector's strong numbers shouldn't come as a surprise. Consumer staples, one of the most defensive industries, typically does well in periods of volatility. These are drugstores, grocery chains, personal-product makers and soda operations—companies that sell goods that people will buy, regardless of where the economy stands.
What is a shock, though, is just how much the staples sector has outperformed. Historically, the industry trades at around 16 times earnings, said Lewenza. It was trading at 18 times at the start of 2014, and it's now trading at 20 times earnings.
Read MoreThe top-performing sectors of the US stock market
"This is the peak," he said. "This is where it traded at in 1991 and 2007. Valuations are expensive."
Investors who own staple stocks, or those who are thinking about following the crowd, need to be careful. While there's still a lot of uncertainty in the market—not just from slower global growth but also from the end of quantitative easing and other factors—once the recovery continues and people become comfortable with the market and the economy again, those returns could reverse.
"The outperformance will continue for at least the next six months as the Fed gets us through the tightening process, but after that, hold your breath," said Scott Mushkin, managing director and senior staples analyst at Wolfe Research, a New York-based investment research firm.