Pension funds show the biggest increase in their combined stake in the quintet, which comprises Facebook Inc., Apple Inc., Inc., Netflix Inc. and Google parent Alphabet Inc., according to data compiled by Bloomberg. The group raised its share of holdings by about a fifth of a percentage point this year, while hedge funds sold.

Owning these five stocks could make the difference between beating a benchmark or trailing it in 2017, after the shares returned four times the S&P 500 Index. The foray into the high-flying names reflects the urge by pension funds to boost returns at a time when fixed-income yields are stuck near record lows and underfunded plans are growing.