Image source: Getty Images.

On the one hand, Whiting Petroleum's (WLL) second-quarter report was pretty bad. Oil prices are so weak that the company is not even generating enough cash to maintain its production, which declined nearly 17% year over year after adjusting for an asset sale. Meanwhile, even on an adjusted basis, the company lost $158.7 million, which was a far cry from the $9.2 million profit it earned in the year-ago quarter. Those negatives aside, the company had three big surprises for investors this quarter.

1. Surprise! We signed another well-participation agreement

Last quarter Whiting Petroleum announced that it agreed to a participation agreement whereby its partner would pay 65% of the costs to earn a 50% working interest in 44 wells Whiting was drilling in 2016. By signing that agreement, Whiting will be able to drill an additional 44 wells this year, which will boost its production without any changes to its capital expenditures budget.

This quarter the company announced another well-participation agreement, this time for 30 wells, but with similar terms as the prior agreement. As a result, the company will be adding a drilling rig in October to get started on this program.

2. Surprise! We are adding $50 million to the capex budget

While oil prices remain weak, they have vastly improved since the first quarter. As a result, Whiting's cash flow is rising, which is putting it in the position to boost its capex budget by $50 million, to a total of $550 million. That extra cash will be used to complete an additional 12.5 wells that the company drilled but left uncompleted. While that capital will not provide much of a boost to production this year, it is expected to help stabilize production in the fourth quarter to give the company momentum heading into 2017.

In expanding its capex budget, Whiting Petroleum joins a growing list of producers that are increasing their budgets for 2016. Leading independent producer Devon Energy (DVN -0.17%), for example, recently added $200 million to its capex, bringing it up to a range of $1.1 billion to $1.3 billion. As a result of that additional capital, Devon Energy, likewise, will see a boost heading into 2017.

3. Surprise! We sold our North Ward Estes properties

The biggest surprise of them all, at least monetarily, was Whiting's announcement that it sold its North Ward Estes property in western Texas for $300 million plus a contingency payment of up to $100 million. The future price of oil will ultimately determine the contingency payment, with the buyer paying Whiting $100,000 for every penny the price of oil is above $50 a barrel on June 28, 2018, up to the $100 million maximum.

The North Ward Estes property produces about 8,600 barrels of oil equivalent per day, or roughly 6.4% of Whiting's production. However, it was a unique property that used enhanced oil recovery techniques to coax more oil out of a legacy field, which are quite different from the horizontal extraction techniques Whiting uses in its core shale plays. That made it a non-core asset, and therefore expendable, with Whiting planning to use the cash proceeds to repay debt.

The sale of non-core properties for debt repayment has become a noteworthy trend in the sector over the past year. Devon Energy, for example, just finished its non-core divestiture program, selling $3.2 billion of assets. Devon planned to use two-thirds of that cash to bolster its balance sheet and use the rest of the capital to reinvest in its core properties. The recent $200 million capex boost is part of that plan.

Investor takeaway

Conditions were so bad in the beginning of the year that Whiting Petroleum initially planned to stop completing any additional wells by the end of the first half. However, as a result of its two well-participation agreements and the incremental cash flow from improving oil prices, the company is starting to ramp back up slowly. While its oil and gas activities are still a far cry from the peak, at least Whiting is taking a step back in that direction.