Iran jitters helped push oil prices higher but a broader stabilization of crude futures near 3½-year highs can be tied to several big, prevailing trends. Strong global oil consumption has come up against a 1½ -year-old deal led by OPEC and Russia to manage crude supply among producers. And while U.S. drillers are slowly and steadily increasing their output, Venezuela's production continues to drop amid its economic crisis.
Investors have also been encouraged by a rotation in the market that has benefited energy stocks, healthy mergers and acquisitions activity in the oil patch and positive first-quarter earnings.
An earlier plunge in energy stock prices whittled away at the energy sector's weighting in the S&P 500. It recently fell to about 5.4 percent compared with 7 percent to 12 percent between 2005 and 2014, the year oil prices tanked, according to energy-focused investment bank Simmons & Company.
The fact that energy stocks are outperforming other sectors is the biggest factor in fueling the breakout, in Simmons's view.
"Happy days have seemingly returned for energy as relative stock price performance has been impressive and has galvanized an indifferent buyside into greater levels of participation," analysts at Simmons & Company said in a research note this week.
Energy stocks have also benefited from the technology sector's loss of momentum at times this year. While the sector is still the biggest winner this year, its stumbles have pushed some investors into energy stocks, said Jay Hatfield, co-founder and president of Infrastructure Capital Advisors.
"The momentum in the tech stocks was so powerful last year, it took the change in the calendar year to slow that down because of tax considerations," said Hatfield.
"There was a pretty huge macro trade where macro hedge funds were long growth and short value. Basically that means being long tech and short energy," he said.
While energy and tech stocks appeared to be negatively correlated recently, they are now on the same upward path. That leads Hatfield to believe the trade has once again flipped, with investors now going long riskier names and short defensive stocks like utilities and real estate investment trusts.