The Energy Select Sector SPDR (NYSEArca: XLE), the largest exchange traded fund dedicated to energy equities, has been the worst performer among the sector SPDR ETFs this year, but XLE rebounded nicely in July, posting a gain of almost 3.1%.

While XLE would need to gain more than 11% just to be flat for the year, there is rising optimism that the energy sector could finally be ready to shake out of its 2017 slumber.

iven the historical sensitivity of exploration and production names to oil prices, it would stand to reason that lower oil output would benefit the industry. While the Organization of Petroleum Exporting Countries (OPEC) has moved to trim output, U.S. shale producers are boosting production as highlighted by the rising rig count in the U.S.

While OPEC is cutting back to alleviate price pressures, U.S. fracking companies could jump to capitalize on the windfall as crude oil prices jump back above $50 per barrel – according to some estimates, shale oil producers can get by with oil at just over $50 per barrel due to advancements in technology and drilling techniques that have helped cut down costs.

“These potential headwinds don’t make a good case to buy into energy, but the case for buying a diversified holdings of oil majors, as with the Energy Select Sector SPDR ETF, is attractive. Through better management of their balance sheets, more restrained frackers, and a less combative OPEC, the headwinds are still favorable to buy into oil majors,” according to a Seeking Alpha analysis of the energy sector.

Related: OPEC a Threat to Oil’s Rally

Some analysts believe the energy sector can deliver upside for investors later this year. Energy is one of a small amount of sectors that still trades at a noticeable discount relative to long-term averages. Additionally, the energy sector is usually among one of the largest sector weights in value ETFs, underscoring the point that the group is attractively valued relative to some defensive sectors, which trade at lofty multiples.

“On average, the oil sector — which we can get exposure to through XLE — is going to be more cautious going forward. Many of the companies are very strict about their dividends and will do a lot (including taking on more debt) to sustain them in the short term. With a yield of 2.59% attached to an inflation-resistant sector, XLE provides a great yield regardless of the Fed and subsequent inflation changes,” according to Seeking Alpha.

For more information on the oil market, visit our oil category.