What happened

The oil market is in rally mode today. Crude oil rose more than 1.5% the day after a closely watched report from the U.S. government showed a significant drop in oil storage levels. That fueled optimism across the energy sector, sending most stocks soaring. The biggest gainers were Cimarex Energy (NYSE:XEC), Antero Resources (NYSE:AR), Nabors Industries (NYSE:NBR), Noble (NYSE:NE), and Oasis Petroleum (NYSE:OAS), which were all up by double digits by midafternoon.

So what

The Energy Information Agency reported a 10-million-barrel decrease in U.S. oil storage levels this week. That was the biggest decline in the last five weeks, and was much more than the 4.7-million-barrel reduction most analysts expected. According to an analyst with Again Capital, "it was an incredibly bullish report, one of the more bullish we've had in a while." That's because it suggested that demand was higher than supply, which is good news for the oil market.

Two oil pumps with a bright rising or setting sun on the horizon

Image source: Getty Images.

Among the biggest beneficiaries of today's rally are the energy sector's most-beaten-down stocks. Even with today's double-digit rebound, shares of upstream oil and gas producers Cimarex Energy, Antero Resources, and Oasis Petroleum are still down more than 30% on the year. That's because oil and gas prices have been very volatile over the past year, which has impacted their profitability. Cimarex Energy, for example, reported awful second-quarter results earlier this month, as its earnings missed analysts' expectations by $0.33 per share. The main culprit was weaker pricing: Its realized price for natural gas plunged 70% year over year while oil was down 11%.

Antero Resources has also struggled with weaker pricing, which caused it to report a larger-than-expected loss during the second quarter. Despite the pricing issues, Antero plans to keep drilling because it has expensive pipeline commitments to fulfill.

Oasis Petroleum, meanwhile, has been under pressure due not only to weaker commodity prices but also to infrastructure issues. Because of that, the company reduced its full-year production outlook. Worse yet, it boosted its 2019 spending plan. In other words, it's spending more money but producing less oil, which is making matters worse since crude prices are so volatile.

Oilfield service stocks like Nabors Industries and Noble are also bouncing back along with higher oil prices today. That's because improving oil market conditions increase the probability that producers will spend more money to drill additional wells. That would boost the profitability of service companies like Nabors and Noble.

Now what

Struggling oil stocks are getting a boost from some bullish data today. That's because investors hope that prices will continue rallying, which would help these companies since they've struggled with the weaker prices this year.

However, at the same time some producers are struggling, others are thriving because they have much stronger operations. Investors shouldn't chase today's biggest movers, which would quickly give back those gains if crude makes another downward move. Instead, they should focus their attention on the sector's top stocks, since those are able to make money in both good times and bad.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.