Anyone who tried to catch a falling knife in the energy sector across the waterfall declines of 2014 and 2015 probably lost a few fingers. As crude-oil prices CLQ7, +1.07% crashed from over $90 in mid-2014 to under $40 at the beginning of 2016, the carnage included a more than 40% decline for oil major BP BP, +1.56%BP., +1.85% and a decline of more than 50% for energy service stock HAL, +0.16%

Then 2016 brought stability. Oil prices edged slightly higher, and OPEC and Russia made efforts at production cuts. Yield-hungry investors stopped shunning the sector and gobbled up energy junk bonds once more. And energy names like Spectra Energy (acquired by Enbridge in a deal that closed this year) and Oneok OKE, +2.40% were among the S&P 500’s top performers in 2016.

It has been a mixed bag so far this year. Oil prices have declined steadily in recent months, and integrated oil giant Exxon Mobil is down by double digits. But there are signs of life in specific picks; large-cap refiner Tesoro TSO, +0.08% is up by 10% since January, and nat gas pipeline play Chenerie LNG, +1.18% has climbed almost 15%.

So what will the rest of 2017 bring for crude oil prices and energy stocks? Will tactical trades succeed, or will energy stocks struggle as a group as they has in previous years?

The good news is that the sector seems to have found its footing. After some brutal year-over-year comparisons in the last few years, energy will finally post some solid results; according to FactSet Earnings Insights, the energy sector will be the largest contributor to second-quarter revenue growth, with the Oil & Gas Refining & Marketing segment and Oil & Gas Equipment & Services segment both set to post top-line expansion of more than 20%.

As for profits, the sector will post a roughly 390% explosion in earnings growth thanks to easier comparison figures and greater stability as companies have adjusted to lower oil prices as the “new normal.”

But it’s important to remember that not all energy stocks are created equal. Just as the energy sector was a gross underperformer during the market rally of the past few years, some of the worst picks in the oil patch could still be money losers in 2017 and 2018 even as we witness the energy sector’s rebirth.

Here’s a look at who’s succeeding and who’s struggling right now:

Success No. 1: Pioneer Natural Resources

This isn’t your grandmother’s energy sector, and the future belongs not to the big oil majors of the past but to the frackers of the future. Chief among them is Pioneer Natural Resources PXD, -0.33% a fast-growing shale oil play that is tracking 30% revenue growth this year and 16% growth next year as it surges back to profitability.

This company is laser-focused on domestic shale oil in the Permian Basin of West Texas. It’s also already one of the lowest-cost producers, and that should continue improving as technology becomes cheaper and more efficient in the future. If you want a stock that will survive when oil is at $40 per barrel and thrive when it’s at $60, this is your best pick. Shares have rolled back largely on valuation concerns, but recent declines have provided a good entry point.

Success No. 2: Enterprise Product Partners

From 2005 through 2015, U.S. dry natural gas production surged about 50% from 18 million cubic feet to 27 million cubic feet, according to the Energy Information Administration. That makes gas pipelines, storage and other infrastructure a great bet in the energy space because they are fee-based businesses based on volume and not tied to commodity fluctuations. Chief among these midstream plays is Enterprise Products Partners EPD, +0.92% one of the largest publicly traded energy partnerships (it isn’t an S&P 500 component).

The company has the scale to succeed and also the access to capital to allow continued investment in its infrastructure for future growth. Consistent cash flows drive a dividend north of 6% right now, and that payout has grown more than 30% in the past five years even as the energy sector as a whole has remained under pressure.

Success No. 3: IHS Markit

We are living in an era of incredible volatility for energy, and incredible upheaval as traditional oil majors look for a path forward amid low commodity prices and a focus on carbon emissions. That means one sure-fire play is to invest in service provider IHS Markit INFO, +1.10% which, like its clever ticker implies, providers a wide array of information and analytics to the energy industry through its Resources segment. This stock, which was added to the S&P 500 in June, is up more than 20% in 2017, and has surged almost 70% in the past 24 months on increased demand for its sophisticated reporting and services. Small wonder, with revenue for the current year tracking 30% growth and a consistent string of earnings beat behind it.

The future of the energy business will be built on information and adaptation — making the services of Markit invaluable for the sector in 2017 and beyond.

Struggle No. 1: Exxon

To say Exxon Mobil XOM, +0.50% is struggling is an understatement. Exxon still is very much locked into an old world of expensive offshore techniques even as domestic shale oil remains plentiful and cheaper to access. Exxon also is in the uncomfortable position of courting a potentially lucrative energy partnership with Russia while political tensions between the U.S. and Russia remain extremely high and even Republicans are pushing sanctions against the nation instead of economic ties.

Dividend growth has all but evaporated, with a measly 2.6% hike in 2017 after a 2.7% increase in 2016. And to top it off, climate change continues to present an existential threat to the company; a recent Carbon Tracker report claims that some 50% of upstream expenses across the next several years could be wasted if global carbon caps are implemented and fossil fuel use is forced down in kind. So … why exactly should I believe better days are ahead for Exxon?

And with roughly 50% of Exxon stock owned by institutions and mutual funds, it’s likely you own this struggling energy company whether you like it or not.

Struggle No. 2: Anadarko

Oil production Anadarko Petroleum APC, +0.16% is perhaps in an even worse position than Exxon because it doesn’t enjoy the same access to capital and is currently pinned down by $15 billion in debt and more than $30 billion in total liabilities. Its bonds were cut to junk status in 2016, but the company rode the rebound in sentiment for the sector and offered up $3 billion in 30-year debt at a whopping 6.6%.

Oil prices remain stubbornly low in 2017, and as a result Anadarko is not going to enjoy the rebound in earnings like some energy stocks; the company isn’t forecast to operate above break-even for another four quarters at best. It is incredibly difficult for a stock like this to succeed if oil remains cheap and its cost of borrowing remains high. That’s why shares are down more than 35% in 2017, and down roughly 60% from their 2014 highs.

Struggle No. 3: Cloud Peak Energy

Cheap oil isn’t just causing havoc for oil stocks. It’s also making things mighty difficult for other pieces of the energy puzzle. After all, why would coal from Cloud Peak Energy CLD, -2.34% be in favor when the energy source is widely seen as dirty and oil and natural gas prices remain so darn cheap?

The “Trump bump” for the stock, which isn’t part of the S&P 500, lasted until February on hopes of a better regulatory environment, but as crude oil rolled back once more, investors have abandoned this energy stock and shares have slumped by more than 30%. The sad reality is that when oil and gas are abundant and cost-effective, it’s hard for other energy sources — from coal to ethanol to solar — to gain favor.