Warren Buffett is known as one of the most successful investors in history. His long track record of outperforming the market backs up the notion. So when he makes a purchase for Berkshire Hathaway's (NYSE: BRK.A) (NYSE: BRK.B) portfolio, it's worth paying attention.

Unfortunately, investors haven't had much to get excited about in Buffett's portfolio recently. During the first nine months of 2023, he was a net seller of stocks. He sold $32.8 billion in stocks for the company, buying just $9.1 billion in new investments.

There were several big investments Buffett trimmed in his company's portfolio last year, but there's one big holding he keeps buying. Here's what investors need to know.

A close up on Warren Buffett's face.

Image source: The Motley Fool.

The three stocks Buffett has been selling

During 2023, Buffett cut significant positions in Activision Blizzard, HP (HPQ -0.46%), and Chevron (CVX 0.37%).

The sale of Activision was predictable. He made a big purchase of the stock in early 2022 following the company's announced acquisition by Microsoft.

It was a classic arbitrage play. Buffett bought the shares below the acquisition price with the expectation that the deal would close and he would profit from holding the shares.

He didn't end up holding on to the shares until the deal closed, selling a large portion in the second quarter and the rest in the third quarter. The deal closed in October of 2023 after he had completely exited his position in the stock. Nonetheless, it worked out well for him.

Buffett's change of heart on HP was a bit surprising. He established a large position, exceeding 10% of the shares outstanding, in the first quarter of 2022. He added to it as recently as the first quarter of 2023. But he started selling shares in September, and the selling continued through November. He's now cut the position by more than half from its peak.

Buffett is never afraid to admit when he's made a mistake, and that appears to be the case with HP. As 2023 went on, it appeared the lasting hangover from the COVID-19 work-from-home boom was cutting into HP's results.

The recovery isn't coming as quickly as expected, and the long-term outlook for HP's two main businesses -- PCs and printer sales -- isn't great. As such, Buffett is cutting his losses and moving on.

His other big sale in 2023 has been a relative success for the Oracle of Omaha. He purchased a huge position in Chevron in the first quarter of 2022 as the conflict between Russia and Ukraine sent oil prices higher.

Chevron managed the ongoing tensions, and the stock's total return -- including dividends -- outpaced that of the S&P 500 through the third quarter last year.

But Buffett is content with decreasing his exposure to Chevron because he's more interested in owning shares of a different oil and gas company. It's the one stock he couldn't stop buying throughout 2023, and it's a good bet he'll keep buying more in 2024.

The stock he keeps buying

Throughout 2023, Buffett consistently added more shares to one of Berkshire's top holdings, Occidental Petroleum (OXY -0.15%).

Berkshire Hathaway established its position in the company when it put up $10 billion in capital to facilitate Occidental's acquisition of Anadarko. In exchange, Berkshire received 100,000 preferred shares of the oil and gas company, paying an 8% annual dividend.

But Buffett established a much larger position in the company at the same time he bought Chevron in 2022. He bought about 15% of the company's shares outstanding at that point, and he has steadily added to that position since.

After its most recent purchase in December, Berkshire Hathaway now controls nearly 28% of Occidental's common stock. In the meantime, though, Occidental is retiring Berkshire's preferred shares, offsetting Buffett's moves to increase exposure to the company.

Occidental is an interesting investment for Buffett. Its balance sheet isn't nearly as strong as competing oil companies, including Chevron. After the acquisition of Anadarko, it faced a challenging environment brought on by COVID-19. It had to suspend its dividend as a result, because cash flow dried up with low oil prices.

But management has been able to keep its debt under control while not being afraid to use debt to expand the business.

For example, its recent acquisition of oil and gas producer CrownRock will result in a lot of debt going onto the balance sheet. Management plans to sell off assets to pay down the debt quickly, just as it did with Anadarko. That makes Occidental a riskier investment, but Buffett has expressed a lot of confidence in CEO Vicki Hollub.

He is particularly drawn to Occidental's position in the Permian Basin. As the crux of Occidental's operations, it makes the stock much more susceptible to swings in West Texas crude oil prices, as a drop in price will make it unprofitable for Occidental to keep drilling. On the other hand, if oil moves higher, the company should be one of the biggest winners in the industry.

With shares trading at an enterprise-value-to-EBITDA multiple of 5.5, they offer a slight discount to Chevron (6.3) with strong upside if oil prices move higher again.