Over the past several quarters, Warren Buffett and his team at Berkshire Hathaway have reduced many of their holdings, including selling shares of Apple and Bank of America. However, one stock the conglomerate can't stop buying lately is Occidental Petroleum (OXY -0.09%).

In the second quarter, Berkshire Hathaway purchased 7.3 million shares in the oil and gas producer, bringing its total stake to 255.3 million, worth around $13 billion today. Berkshire Hathaway can't seem to get enough Occidental, but is the stock suitable for your portfolio?

Let's dive into the business and its long-term opportunity to see if an answer presents itself.

Occidental has improved its balance sheet significantly

Occidental took on massive debt in 2019 when it got into a bidding war with Chevron for Anadarko Petroleum. It ended up being one of the largest oil mergers ever as Occidental acquired the company and assumed Anadarko's debt in a deal valued at $57 billion.

As part of the deal, Berkshire Hathaway provided $10 billion in funding in return for preferred Occidental stock that pays Berkshire an 8% dividend yield. It also received stock warrants to purchase additional shares of Occidental. As of June, Berkshire holds warrants to 83.86 million common shares of Occidental Petroleum at an exercise price of $59.624 per share.

The deal helped Occidental increase its foothold in the coveted Permian Basin, but the timing was precarious. In 2020, the global pandemic resulted in widespread shutdowns, travel came to a grinding halt, and oil prices collapsed. The company sold assets and paid Berkshire in stock instead of cash, which helped it weather the challenges of falling oil prices.

Then Russia invaded Ukraine in 2022 and oil prices surged to $120 per barrel. That year, Occidental raked in $23.6 billion in free cash flow. It wisely used its windfall to shore up its balance sheet, pay down $10 billion in debt (which reduced interest and finance charges by $400 million annually), and reward investors with dividends and stock buybacks.

Last year, Occidental redeemed 15% of Berkshire's preferred stock, saving another $120 million in annual preferred dividends. This year, the company reduced its debt by another $3 billion in the third quarter and expects to pay down another $800 million by the end of the fourth quarter. Over the past several years, the oil and gas giant has reduced its debt by 60% from its peak.

OXY Total Long Term Debt (Quarterly) Chart

OXY Total Long Term Debt (Quarterly) data by YCharts.

Oil and gas stocks have faced some headwinds lately

Energy stocks have had a tough go of it recently. Inflation is nearing normal rates, and concerns linger about slowing economies across the globe. Despite resilient demand in the U.S. and OPEC+ extending its production cuts through 2025, oil prices have been trending down.

Over the past year, crude oil prices have fallen from around $90 per barrel to $70 per barrel, which has weighed on the entire oil and gas production sector. Over that same period, Occidental stock has fallen 22% and reached its lowest price since Russia invaded Ukraine.

Occidental's long-term opportunity

The energy sector's headwinds haven't stopped Buffett and his Berkshire team from scooping up Occidental shares. One potential long-term catalyst for the company's earnings and share price is its direct air capture (DAC) technology investments.

DAC enables it to capture carbon dioxide from the air, which it can store underground or use to create clean transportation fuels. It is highly sought after by companies looking to meet their carbon-neutral goals. Microsoft recently agreed to buy 500,000 metric tons of carbon dioxide removal credits over six years, one of the largest ever purchases for a DAC facility.

Emissions coming from large industrial chimneys.

Image source: Getty Images.

This technology, broadly known as carbon capture utilization and sequestration (CCUS), could grow into a massive market over the coming decades as entities look to reduce their carbon footprint. Occidental CEO Vicki Hollub projects that CCUS could grow into a $3 trillion to $5 trillion global market, potentially earning Occidental as much revenue as it currently makes from oil and gas production.

Occidental got some more good news on this front when 1PointFive, one of its subsidiaries, received $500 million from the U.S. Department of Energy to support the development of its direct air capture hub in South Texas. 1PointFive will receive $50 million to continue its work on the hub, and the award could potentially increase up to $650 million if it develops an expanded regional carbon network in the area.

Is Occidental Petroleum stock a buy?

Occidental is a cyclical stock. Factors that affect oil prices, like a recession or waning demand, could affect the company's earnings and share price in the near term. However, ongoing production cuts from OPEC+ and the refilling of the U.S. Strategic Petroleum Reserve could keep a floor on oil prices.

That said, Occidental's balance sheet is strong and getting stronger as the company continues focusing on reducing its debt load. Its long-term opportunity with CCUS is another potential catalyst for the company's long-term growth, and I think the stock is a solid one for investors to buy and hold long-term.