After spending considerable time as this year’s worst-performing sector, the energy patch is looking to end 2017 on firmer footing. For example, the Energy Select Sector SPDR (NYSEArca: XLE), the largest equity-based energy exchange traded fund, is up about 3% over the past week as oil prices are cobbling together one of this year’s best rallies.

The Permian Basin will be a key factor in the growth of U.S. oil production. Of the 940 oil rigs in operation, about 377 are in the Permian Basin. Many oil producers have also decided to drill but not complete wells in the region due to minor transportation constraints, which leaves a lot of untapped potential on the ground.

Investors considering the energy sector should take their cues from the group’s biggest names, including Exxon Mobil (NYSE: XOM) and Royal Dutch Shell (NYSE: RDS-A).

“It’s no secret that Shell has ambitions to overtake Exxon as the world’s number-one oil company in terms of value,” reports OilPrice.com. “It’s actually on track to beat Exxon on cash flow from operations for full 2017. The Anglo-Dutch company is also considering a share buyback at some point in the future as financial performance improves and the company gains confidence that it can cover dividend payouts with cash on hand.”

Current OPEC compliance with production cut plans remains above their historical average, and it usually takes between two to three quarters for inventories to normalize after the cuts. The challenge for energy equities is that some oil market observers see more declines coming for crude. Oil traders are concerned over how fast U.S. shale oil producers will increase production to capture the rising prices.

Related: Oil Rally Sparks Renewed Interest in Big ETF

Additionally, big oil still believes it has a place in the global economy even as more countries push into electric vehicles (EV) in efforts to trim pollution.

“This vector is diversification, as it’s becoming increasingly clear that even if Exxon doesn’t feel threatened by electric cars, they may have another threat to consider,” according to OilPrice. “There is also climate change legislation, which, if implemented without delays, will seriously undercut the demand for fuels that constitutes Big Oil’s main revenue stream.”

Dow components Exxon and Chevron, the two largest U.S. oil companies, combine for about 40% of cap-weighted energy ETFs, such as XLE, the Vanguard Energy ETF (NYSEArca: VDE), iShares U.S. Energy ETF (NYSEArca: IYE) and the Fidelity MSCI Energy Index ETF (NYSEArca: FENY).

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