Image source: Getty Images.

What happened

Shares of Whiting Petroleum (NYSE:WLL) rocketed higher in September, ending the month up nearly 23%:

WLL Chart

WLL data by YCharts.

That was despite a pretty quiet month with no company-specific, news-driven catalysts.

So what

In fact, the only thing related to Whiting Petroleum was that an analyst at FBR Capital initiated its stock with a market perform rating. The analyst was not overly bullish on the company's prospects, setting just a $8 price target. Overall, analysts have a relatively lukewarm view on the company, with the average rating between buy and hold and the average price target at just over $8 per share.

That said, the market's view grew much more optimistic at the end of the month after reports that OPEC had agreed to cut and cap its output. That news sent oil prices soaring, taking Whiting Petroleum and other troubled producers along for the ride. The reason Whiting's stock spiked on the news is that it needs oil prices to stabilize at a higher level to maintain, let alone grow, its output. That is evident by the fact that its production is down 11% so far this year because the company reduced drilling in the Bakken and stopped drilling in the Niobrara altogether.

Whiting needs oil price stabilization more than its larger rivals. For example, leading U.S. producer EOG Resources (NYSE:EOG) has managed to keep its oil production roughly flat over the past two years because it has the financial resources to do so. Furthermore, EOG Resources has taken advantage of the downturn to invest more than $2.8 billion on acquisitions to bolster its ability to grow when conditions improve. Contrast this with Whiting, which spent the bulk of the past year improving its balance sheet by completing several transactions to reduce debt by $1.15 billion. Because EOG Resources was better positioned to weather low oil prices, it is ready to return to growth mode next year, while Whiting still has to get back to even.

Now what

The potential OPEC deal could finally provide the stability Whiting needs to move forward. That is why investors drove its stock up last month. But if the OPEC deal falls through, it could take Whiting's stock down with it.

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.