An index that tracks oil and gas stocks is on pace for its best quarter since the final three months of 2011 as U.S. crude hit 3½-year highs on Wednesday.
The SPDR S&P Oil and Gas Exploration and Production fund, better known as the XOP, is up more than 22 percent this quarter. The exchange-traded fund tracks a group of 69 energy stocks, from the drillers that produce oil and gas to the refiners that turn crude into fuel.
U.S. West Texas Intermediate crude futures have rallied $7, or 11 percent, to about $73 a barrel over the last four sessions. WTI has been boosted by investor uncertainty over OPEC's output, a Canadian supply disruption and an intensifying U.S. campaign to remove Iranian barrels from the market.
U.S. crude is up more than 12 percent in the second quarter.
Drillers outside the the nation's biggest shale oil region, the Permian basin in Texas and New Mexico, have largely outperformed their peers there, said Nick Holmes, investment analyst at Tortoise Capital.
The XOP's outperformers include West Coast driller California Resources and Penn Virginia, which plumbs the Eagle Ford shale in southeastern Texas. North Dakota drillers Oasis Petroleum and Whiting Petroleum also sit near the top of the list.
Permian oil production is surging, but the basin doesn't have enough pipeline capacity to bring all the crude to market. That has caused Permian crude to sell at a steep discount to WTI, the U.S. benchmark for oil prices.
"Concerns regarding price realizations and production growth forecasts weighed on Permian producers as differentials blew out at times well over $10 during the quarter," Holmes told CNBC.
Oil refiners positioned to benefit from the discounted crude coming from the Permian region have also boosted the XOP's fortunes this quarter, said Holmes. HollyFrontier and Andeavor were two of the top performing refiners.