Sometimes you have to be willing to look past an occasional disappointment or two if you're going to stick with a stock. Oil, gas, and chemical producer Occidental Petroleum (NYSE:OXY) missed analyst expectations for the second time in three quarters, but the longer-term outlook seems to still be intact.

Revenue climbed 29% in the quarter and topped out over $3.5 billion. Revenue from oil and gas rose 32% (to $2.4 billion), while revenue from the chemicals business climbed 24%.

Oil and gas did reasonably well despite a downturn in production for the quarter. Relative to year-ago levels, first-half production slipped about 2% to 560,000 barrels a day as production in the Gulf of Mexico was hampered by weather issues. Excluding a contract settlement charge, core earnings from oil and gas climbed about 38%; the higher rate of activity is leading to better margins and efficiency.

For chemicals, results were helped by ongoing strength in chlorine, caustic soda, and polyvinyl chloride. With strong margins in these product categories, segment earnings climbed by over 144% relative to the year-ago quarter.

The outlook for Occidental is naturally tied to the future price of oil and natural gas (and to a lesser extent, chemicals). Right now, though, there is a very large spread in estimates for oil prices over the next couple of years (ranging from $30 to as much as $100 a barrel). The good news, such as it is, is that if $30 a barrel proves to be the bottom, companies like Occidental can still make money over the long haul.

One underappreciated aspect of Occidental's business is its relatively low finding costs and historically strong reserve replacement. In plainer English, Occidental has done a good job of finding new oil at a competitive price relative to many of its peers.

Occidental could see some volatility due to the conditions in the countries in which it operates. Countries like Ecuador and Albania can be a bit volatile, and Occidental is still working with the Libyan government to get its operations in that country up and running again.

Occidental's stock price will be heavily influenced by the day-to-day moves in the price of oil. Should oil stay high or go higher, the shares should do well assuming there are no further production problems. If oil prices fall, even the company's low finding costs won't offer a complete cushion to the stock.

Oil may be expensive, but Foolishness is free:

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).