A sharp rebound in the price of oil has not been enough to offset a long-standing reluctance on the part of investors to hold energy companies after prices collapsed in 2014. Energy companies in the S&P 500 are down 13% over the last year, while the broad index is up 10%. Over the last 5 years, energy companies have sunk 31%, while the S&P 500 as a whole is up nearly 60%.

Weak gasoline and petrochemical margins along with record U.S. crude production have weighed on refiners and integrated oil companies this year, yet fund managers and analysts say that energy stocks must also jump the high hurdle of negative investor sentiment before they can catch up to or even lead the broad market higher.

"There's still an overhang from investors feeling like they have been burned in this cycle before," said Trip Rodgers, a portfolio manager of the Hennessy BP Energy fund. "There's only so many times you can get caught off-guard before you start to feel skeptical that higher prices are here to stay."

That sense of trepidation on the part of investors has helped extend the disconnect between the price of oil and the performance of energy stocks, he said.

Oil prices are up by more than 35% since the start of the year, due in part to higher-than-expected global demand, production cuts from OPEC and the effect of U.S. sanctions on Venezuela. Economists expect the price of both Brent crude and U.S. light crude to stay above $60 for the rest of this year, according to the latest Reuters poll.

Yet energy companies continue to lag the broader market, with the S&P 500 energy sector down 3.6% since the start of the quarter. The S&P 500 is up nearly 3% over the same time, and notched a new record high on Wednesday.

Investors will need to see consistent oil prices above $60 a barrel and more "capital discipline" on the part of energy companies before they start to move back into the sector, Rogers said. As a result, he has been focusing on companies that are improving their balance sheets and keeping their costs low despite the gain in the commodity price, he said. Energy Transfer LP, Diamondback Energy Inc, and Parsley Energy Inc are among his largest positions.

Noah Barrett, an analyst who works on several funds at Janus Henderson Investors, said the outsized gap between the gain in oil prices and the muted performance of energy stocks may help fuel a "catch-up trade" later this year. Yet for that to happen, companies must prove to investors that they can keep a lid on spending, he said.

"Particularly among the larger-cap companies, you're hearing this message of 'Trust us, we're focused on generating free cash flow and giving a portion of that back to shareholders instead of plowing it back into the field,'" Barrett said. "That's a good message but it's something they can only say for a quarter or two. Because of the history of this industry, this is something that will take multiple quarters, if not years, for investors to believe."

Overall, institutional investors appear to be taking a slightly more bullish stance on energy stocks than retail investors. Global fund managers have a 3% overweight to the sector, well below the overweights of 10% or more that fund managers held through much of 2017 and 2018, according to Bank of America Merrill Lynch.

The growth of alternative energy and the popularity of electronic vehicle makers like Tesla Inc are contributing some to the subdued performances of energy companies, said Adrian Helfert, director of multi-asset portfolios at Westwood Holdings Group. Yet those concerns will likely fade if oil prices can sustain these relatively high prices, proving to investors that they will not be once again fall victim to a false rally, he said.

"Energy stocks are still pricing in a risk premium, even though energy prices are ramping up," he said.

(Reporting by David Randall; editing by Jennifer Ablan and Phil Berlowitz)

By David Randall