Crude oil
CLX7, +0.00%
is bouncing around the $50 mark, placing it down about 14% from where it started the year. A host of energy stocks have been seeing similar trouble, with the popular Energy Select Sector SPDR Fund
XLE, +0.22%
down more than 9% since Jan. 1.

Yet while the long-term trend of the energy sector is unpleasant, there have been signs of life in the oil patch since its August lows. After bottoming out around $42 a barrel, crude oil prices have rallied nicely as of late, all things considered. And some of the biggest energy names have firmed up, including oil major Chevron
CVX, +0.81%
which is up about 8% in the past 30 days.

Is this just another short-term uptrend before trouble returns, or are energy stocks looking like a good play here now that the dust has settled? I think it’s the latter. Here’s why, and how to play this comeback in oil:

Not all energy stocks are hurt by storms: There was a lot of talk about energy stocks being hurt by recent weather woes. The damage from Hurricanes Harvey and Irma obviously disrupted many parts of the American economy, and caused significant downward revisions to GDP forecasts in part because of energy disruptions. But savvy investors noticed that refinery shutdowns in the South greatly benefitted operators elsewhere, as the spread widened between oil and gas prices to boost margins. Stocks like Valero Energy
VLO, -0.85%
, which operates refineries in California, Tennesee, and Canada in addition to its Southern operations, were net winners— as evidenced by a 15% rally for Valero shares in the past six weeks or so. Now that the dust has settled, disruptions don’t look as bad as once feared.

Rig counts recover: Big drawdowns in capital spending, as seen in 2015 and 2016, seem to be over. Just consider a record run of 23 straight weeks of slow and steady expansion in North American rig counts through summer. While the more recent pace has slowed, the count year-to-date is 80% higher than a year ago. And more recently, there is talk of both higher booking and day-rates specifically for deepwater rigs. Given the persistently hostile environment for energy stocks, it is telling to see a reversal in exploration spending. Companies simply wouldn’t invest in operations like this if they were in a tight spot.

Easy access to new debt: As I wrote recently, the junk bond market is crazy right now, with investors willing to loan to less credit-worthy companies without much of a risk premium. While this could be dangerous for bond holders, it’s undeniably great for energy companies that need ready access to capital. In fact, new debt is so cheap that many energy companies are racing to re-issue bonds and lock in lower rates. This may provide a much-needed shot in the arm to capital-intensive energy stocks that need ready access to capital.

Potential cartel cuts: Talk needs to materialize into action, but there remains a concerted effort among OPEC members to link arms and work together to curtail oil output. Right now, 24 member-states are working to restrict production, and this week Venezuela announced efforts to pull another 10- to 12 nations into the cutback scheme. OPEC has made progress in keeping output in check, and seems serious about taking these moves to the next level rather than easing off the brakes.

Potential demand increases: A September report by the International Energy Agency revised up global oil demand forecasts, in part thanks to robust economic growth in the first half of 2017. That’s unsurprising, since the Organization for Economic Cooperation and Development recently increased its 2017 global growth forecast to 3.5% from 3.0% in 2016. Similarly, the International Monetary Fund increased its growth outlook to 3.5% last spring and recently reaffirmed that target. That bodes well for global energy consumption, and could tighten the oil market as a result.

Weak dollar to support pricing: Forget the notion that tighter monetary policy should be propping up America’s currency. Despite recent moves from the Federal Reserve, the U.S. Dollar Index
DXY, +0.14%
has declined by more than 10% from its highs at the start of the year. Historically there is an inverse relationship between the dollar and oil, and a persistently weak greenback should help provide a floor under crude prices.

Bargain valuations:To be sure, there’s no rule that says a “cheap” stock can’t drop even further. But it’s important to remember that the forward price-to-earnings ratio of the S&P 500 is around 19 at present while many energy stocks trade at significant discounts to that. Valero, for instance, trades at about 14 times forward earnings; driller W&T Offshore
WTI, -1.61%
trades at a forward P/E of less than 9.0 If you’re concerned about overbought stocks, this is a sector to watch.

What’s the trade: If you believe in these broader dynamics for the energy sector in general, then you’ll want a truly broad-based play on oil stocks. Check out the Guggenheim S&P 500 Equal Weight Energy ETF
RYE, +0.15%
. As the name implies, this fund doesn’t bias towards a single company over another and instead attempts to hold an equal position in every energy name within the S&P 500, rebalancing regularly to keep that makeup. In contrast, the most popular sector ETF, the Energy Select Sector SPDR Fund, is market cap weighted – and accordingly has a staggering 23% of its entire portfolio in oil giant Exxon Mobil
XOM, +0.49%
and another 17% in Chevron. That may work out if those names rise, but doesn’t seem the safest way to play the sector broadly. The Guggenheim ETF offers a more balanced approach.

Intraday Data provided by SIX Financial Information and subject to terms of use.
Historical and current end-of-day data provided by SIX Financial Information.
All quotes are in local exchange time. Real-time last sale data for U.S. stock quotes reflect trades reported through Nasdaq only.
Intraday data delayed at least 15 minutes or per exchange requirements.