Image source: Encana Corporation.

What happened

August was a pretty good month for oil stocks, thanks in part to the fact that crude oil rallied 7.5% last month. Those higher oil prices are giving producers the confidence to start drilling more wells to increase production. That optimistic outlook led several analysts to upgrade their favorite oil stocks during the month, adding more fuel to the rally. This proved to be a powerful combination and drove double-digit rallies in Encana (NYSE:OVV), Devon Energy (NYSE:DVN), Oasis Petroleum (NYSE:OAS), Pioneer Natural Resources (NYSE:PXD), and Clayton Williams Energy (NYSE: CWEI):

ECA Chart

ECA data by YCharts.

So what

Shares of Texas-focused driller Clayton Williams Energy bounded higher in August after the company reported its second-quarter results. While the company's financial performance was not all that appealing, the outlook was promising. Driving that view was the company's decision to restart its drilling program, with it expecting to complete 10 wells this year. This marks a turn for Clayton Williams Energy, which spent the bulk of the downturn bolstering its balance sheet to ensure its survival. The move to restart its drilling program prompted analysts at Wunderlich to upgrade Clayton Williams' stock from sell to hold while raising its price target from $15 to $35.

Bakken-focused Oasis Petroleum's August rally had similar catalysts. The company reported solid second-quarter results, with its production remaining basically flat for the seventh quarter in a row. Normally, that would not be great news, but considering that the company cut capital expenditures by 75% since 2014, it is a remarkable feat. In fact, Oasis Petroleum's production is coming in ahead of forecast, leading the company to increase its full-year guidance. That won it the support of analysts at Williams Capital, which initiated Oasis Petroleum's stock with a buy rating at the end of the month.

Canadian shale driller Encana did not have any news-driven catalysts last month. Instead, the company continued to rally as a result of news in late July. Not only did it report strong second-quarter results, but it closed the sale of its Gordondale and DJ Basin assets, bringing in $1.1 billion of cash. That gives Encana the financial flexibility to accelerate its drilling program in 2017.

Shale driller Devon Energy reported excellent second-quarter results in early August, led by its guidance-beating production. Overall, production out of the company's core assets averaged 545,000 barrels of oil equivalent per day (BOE/d) during the quarter, which was 6,000 BOE/d above the midpoint of its guidance. Analysts loved the news, with Bank of America Merrill Lynch adding the stock to its US 1 List and boosting its price target from $56 to $60. Deutsche Bank likewise increased its price target on Devon Energy, though it was not quite so bullish, with its target only going up from $45 to $55.

Analysts were the primary fuel driving Permian Basin leader Pioneer Natural Resources' August rally. Credit Suisse added the stock to its US Focus List because it has better leverage metrics than its peers and superior debt-adjusted cash-flow-per-share growth through 2018. Deutsche Bank also has a very positive view on the stock, which is why it raised its price target from $180 to $210. Finally, Williams Capital added Pioneer Natural Resources to its buy list last month due to its prime position in the Permian Basin.

Now what

Oil producers are sending a clear signal: The worst of the downturn is in the rearview mirror. That is evident by the fact that drillers are no longer focused on survival, but on drilling more wells. This shift has analysts growing optimistic about the eventual rebound, which they see fueling an even bigger rally in these oil stocks. 

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.