NEW YORK ( TheStreet) -- The energy sector has been the worst performer in the S&P 500 over the past year, but the sector's recent struggles could be giving way to a buying opportunity for long-term investors.

The Energy Select Sector SPDR (XLE) - Get Report is the largest equity-based energy ETF. After falling 8.7% last year, the worst performance among the nine sector SPDR ETFs, the XLE fund is up 4.3% in the past month. Based on the fund flows data, investors are either remaining devoted to XLE, or see value in the energy sector -- or both. XLE, for example, has added $1.18 billion in new assets this year.

Among the nine sector SPDRs, only the Health Care Select Sector SPDR (XLV) - Get Report has seen greater 2015 inflows at $1.25 billion, according to data.

XLE and rival energy ETFs, such as the Vanguard Energy ETF (VDE) - Get Report and the Fidelity MSCI Energy Index ETF (FENY) - Get Report, give off the impression of being value plays because of their massive allocations to Dow components Exxon Mobil (XOM) - Get Report and Chevron (CVX) - Get Report. Exxon and Chevron, the two largest U.S. oil companies, combine for nearly 29% of XLE's weight.

"We favor energy ETFs such as XLE that have large-cap companies such as Chevron and Exxon as those have stronger balance sheets, a history of consistently strong earnings and dividends, and sport above-average yields. The S&P energy sector now has a 3% dividend yield that is 50% higher than the broader market. While this is the result of declining valuations, we believe both companies have ample room to support dividends," said Todd Rosenbluth, S&P Capital IQ Director of ETF and Mutual Fund Research, in an interview with TheStreet.

An energy ETF is suitable for investors looking to mitigate single-stock risk and those looking to bolster portfolio diversification.

Other analysts see the energy sector as overpriced. In fact, falling stock prices combined with deteriorating earnings have the energy sector looking richly valued.

"Profit expectations have fallen dramatically--though the pace slowed recently--which in turn has pushed the sector's P/E ratio much higher even as stock prices have declined. Obviously momentum isn't in the Energy sector's favor, but stocks appear attractive in terms of valuation if--and this is a big if--the depressed profitability (Return on Equity) forecast for this year and next is temporary, rather than a 'new normal' reflecting abundant new supplies from shale," said AltaVista Research in a recent note.

Image placeholder title

TheStreet Recommends

AltaVista, which has a neutral rating on the $12.84 billion XLE, estimates the ETF's 2015 P/E ratio will be 29.7, or more than double that of the equivalent financial services ETF. That despite the fact that the energy sector's EPS growth is expected to contract by nearly 60% this year, according to AltaVista data.

Rosenbluth sees opportunity for patient investors.

"We think that investors with patience to look past 2015 should see, by early 2016, the stirrings of production growth, a meaningful drop in non-discretionary capex, and positive free cash flow generation," he said.

Risk-tolerant traders can play an oil price recovery with a more volatile ETF, such as the SPDR S&P Oil & Gas Exploration & Production ETF (XOP) - Get Report. Just remember that this added volatility cuts both ways. XOP is up 7.9% over the past month, better than double XLE's showing over the same period.

However, XOP's 77 holdings have a weighted average market value of $16.2 billion, well below the $111.2 billion found on XLE's 43 constituents. That underscores the tighter correlation to oil prices found with XLE. So does XOP's 2014 tumble of almost 30%.

As an equal-weight ETF, none of XOP's holdings account for more than 1.6% of the fund's weight, according to issuer data. That diminishes single-stock risk, but XOP tilts away from the higher-yielding energy giants found in XLE, meaning investors make a yield sacrifice in exchange for XOP's potential to outperform when oil rallies. XOP's dividend yield is just under 1.4% compared to 2.5% on XLE.

We have an underweight ranking on XOP. We see many of the companies inside to be overvalued and risky based on a historical basis such as PDC Energy (PDCE) - Get Report and Carrizo Oil & Gas (CRZO) - Get Report. Relative to XLE, XOP has more exposure to smaller-cap companies and thus has greater volatility," adds Rosenbluth.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.