The fourth quarter of 2018 was an ugly one for oil prices. Crude crashed 40% over the final three months of the year, putting them down 19% overall. In one particularly brutal stretch, oil lost value for 12 straight days, which wiped out 12 months of gains.

Crude prices, however, have quietly reversed course, rising for the last nine consecutive trading sessions. That's oil's longest winning streak in nine years. Overall, the price of WTI, the U.S. benchmark, has risen about 18% from the bottom -- which, incidentally, is just shy of starting a new bull market -- and was recently over $52.50 a barrel. That's a key pricing level for oil stocks, which is why investors should take notice.

An oil pump with the sun shining behind it.

Image source: Getty Images.

Why are oil prices in rally mode?

Oil prices tumbled late last year after market sentiment did a complete 180. After worrying that there wouldn't be enough crude to meet demand, oil traders started fretting that there would be too much after the U.S. granted waivers to most of Iran's key customers that allowed them to continue buying its oil even after the Trump administration imposed new sanctions.

However, oil prices have started bouncing back from that drubbing due in part to actions by members of OPEC, which agreed to cut their production beginning in 2019. In addition, Canada also mandated a production cut to help ease that country's pipeline capacity shortage. Meanwhile, the U.S. and China are reportedly making progress on their trade dispute, which has been weighing on the global economy and weakening demand for oil. As a result of these actions, oil supply levels have started coming down, easing concerns that there would be a gusher of crude sloshing around the market.

Oil pumps in motion at night.

Image source: Getty Images.

What the improvement in oil price means for oil stocks

$50 oil is seen as a key level for the U.S. oil industry because many companies use that price point to set their budgets. For example, oil giant Anadarko Petroleum (APC) plans to invest $4.3 billion to $4.7 billion on developing new oil and gas projects in 2019, which it can fund on the cash flow it expects to produce if oil averages $50 a barrel. Overall, the pricing level would provide Anadarko with enough money to grow its oil production by 10% as well as pay its dividend. An oil price above that level, in the meantime, would enable Anadarko to generate excess cash flow, with the company able to produce $1.6 billion in free cash if crude averages $60 a barrel this year. That would give it more money to buy back its stock above the $1.5 billion left on its current authorization that it intends to fund with cash on hand.

Check out the latest Anadarko Petroleum earnings call transcript.

ConocoPhillips (COP -0.43%), likewise, set its budget to run on the cash flows it can produce at $50 a barrel. The company can generate about $8.5 billion in cash at that oil price, which is enough to fund its $6.1 billion capital budget as well as its $1.2 billion dividend outlay with room to spare. ConocoPhillips plans to use its excess cash as well as cash on its balance sheet to repurchase another $3 billion in stock this year. Though if oil prices rise, the company could ramp up either growth spending or cash returns to shareholders as it did last year.

Check out the latest ConocoPhillips earnings call transcript.

Occidental Petroleum (OXY -0.09%) is also taking a very flexible approach to capital spending in 2019. The oil company set its base budget at $50 oil, which will provide it with enough cash to fund its high-yielding dividend and the new wells needed to boost its output 8%-10% this year. However, at $55 oil, the company can increase spending to grow at a faster 10%-12% rate while further accelerating its growth rate to 11%-13% at $60 a barrel. If oil rallies above that level, Occidental would likely boost its share buyback authorization, which it's currently funding with cash built up from higher oil prices and asset sales from 2018.

Check out the latest Occidental Petroleum earnings call transcript.

Prepared to handle whatever happens next

While the overall market sentiment is starting to become more optimistic, there's a significant amount of uncertainty in the oil market these days, which is why prices have been so volatile. That's why most large U.S. oil companies set their expectations low by aiming to run on the cash flows they can produce at $50 oil. That way, they have the flexibility to either increase spending or the cash they return to shareholders if crude prices rally. But if prices fall, most large producers can still fund their operating plans since they have large cash balances built up from a combination of asset sales and higher oil prices last year.

That strategy made ConocoPhillips a big winner in 2018's turbulent oil market and could do the same for that company and those like Anadarko and Occidental, which are following in its footsteps in 2019.