What: Triangle Petroleum Corporation (NYSEMKT: TPLM) took its investors on a roller-coaster ride in August. The stock surged, stalled, and then surged again ending the month up 17%. That's despite a report that the company ended the proposed sale of its midstream business. Instead, driving the surge was the oil price, which rebounded sharply at the end of the month.

So what: First, the bad news. In early August Bloomberg reported that Triangle Petroleum and its partner had ended the sale process for Caliber Midstream Partners due to low offers. Triangle, which owns 50% of Caliber's general partner and 28% of its limited partner, was said to be seeking a $1 billion valuation for Caliber. Buyers, however, weren't willing to go that high due to worries that Triangle wouldn't be able to produce enough oil, gas, and water in the future to warrant that valuation given that it is Caliber's main customer. 

That concern is due to the fact that low oil prices have made it harder for producers in the Bakken shale, where Triangle and Caliber operate, to grow. Having said that, Triangle's costs are coming down sharply, which when combined with its solid financial position should enable it to continue growing production even in a weak oil price environment.

Speaking of the oil price, that actually was the main catalyst behind the company's stock price surge at the end of the month. Oil skyrocketed off of its bottom in late August, which reversed Triangle's 17.5% slide and instead fueled a 17.1% gain.

TPLM Chart

TPLM data by YCharts

Now what: The price of oil will continue to be one of the biggest drivers of Triangle Petroleum's stock price because the commodity is a big key to its cash flow and therefore its ability to grow. With oil prices seemingly hitting bottom and rebounding again, there's renewed hope that the downturn might be over and better days could lie ahead.