Shares of Occidental Petroleum (OXY -0.15%) have sold off along with oil prices over the past year. The oil giant currently sits more than 20% below its 52-week high, weighed down by a roughly 30% decline in crude oil. 

While many other investors have been selling out of the oil stock, Warren Buffett's company, Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%), has been buying the dip. Berkshire Hathaway recently bought another 2.1 million shares in the oil company. It now holds a quarter of Occidental Petroleum's outstanding shares

Buying shares hand over fist

Berkshire Hathaway has been an active buyer of Occidental Petroleum over the past couple of months. In late June, Berkshire spent $122.1 million to buy over 2.1 million shares at an average price of around $57 per share. Those purchases followed on the heels of buying nearly 4.7 million shares in late May for $273 million and spending more than $200 million to buy about 3.5 million shares earlier that month. 

Buffett's company now owns 224.1 million shares of Occidental Petroleum, or about 25.1% of its outstanding shares. They're currently worth nearly $13.2 billion. That's Buffett's sixth largest holding at 3.5% of Berkshire's stock portfolio. 

Berkshire has already received regulatory approval to acquire up to half of Occidental Petroleum's outstanding shares. While that led to some speculation that Buffett's company would eventually acquire the oil producer, he threw cold water on that idea at Berkshire's annual meeting.  

Why is Buffett buying the dip in Occidental Petroleum?

Given the correlation between crude prices and oil company stock prices, it's safe to assume Buffett is buying the dip in Occidental Petroleum because he believes oil prices will rally. That's a fairly widely held view among oil market forecasters these days.

For example, the U.S. Energy Information Administration (EIA) recently published its short-term energy outlook. In that report, the EIA noted that OPEC plans to keep a lid on global production through next year. Meanwhile, the EIA sees global liquid fuel consumption increasing by 1.6 million barrels per day (BPD) this year and growing by another 1.7 million BPD in 2024.

With demand growing while OPEC holds back supplies, consumption should outpace supplies during the second half of the year, drawing down oil storage levels. This outlook led the EIA to conclude, "We expect these draws will put some upward pressure on crude oil prices, notably in late-2023 and early 2024. We forecast the Brent crude oil spot price will average $79 per barrel (b) in the second half of 2023 (2H23) and $84/b in 2024." That's above the recent price in the mid-$70s. 

Several other Wall Street banks also believe oil prices will rally. While J.P. Morgan recently cut its oil price forecast, it still sees Brent oil averaging $81 per barrel and $83 a barrel in 2024. Meanwhile, Goldman Sachs, which also recently trimmed its oil forecast, sees Brent hitting $86 a barrel by December.

Buffett seems to be betting on this view that oil prices will rise. Higher prices would enable Occidental Petroleum to produce more cash. The company could use that money to repurchase more shares, including preferred stock owned by Berkshire as part of its $10 billion investment in the oil company to support its acquisition of Anadarko Petroleum in 2019. The redemption of those preferreds would save the oil company from paying dividends on that stock (they yield 8% per year, costing it roughly $800 million annually), freeing up more cash to buy back additional common stock. Future repurchases would reduce the company's outstanding shares, which should boost the stock price. 

Betting big on a rebound in oil prices

Buffett is buying the dip in Occidental Petroleum because he believes oil prices will rally. That's not wild speculation, given the expectation that oil demand will soon rise past supplies. Higher prices would enable Occidental to generate more cash that it could return to investors, which should give its stock price a lift. Investors who follow Buffett's bold bet on Occidental could reap a big reward in the future.

However, even though Buffett holds that well-reasoned view, it doesn't mean you should follow him into buying shares of Occidental. Investing in oil stocks isn't for everyone. You'd also need to firmly believe that crude prices will rise. Further, you must be comfortable with the inherent volatility in the oil market. If not, it's better to watch Buffett's dip buying from the sidelines than to follow him into a trade you're uncomfortable making.