Warren Buffett will likely go down as the greatest investor of all time -- and he recently proved just how good he is even at 94 years old. In a last-minute comeback, Buffett's company Berkshire Hathaway beat the broader benchmark S&P 500 yet again in 2024.

Berkshire has now beaten the broader market in three of the last four years. Perhaps even more impressive is that Buffett and Berkshire accomplished this feat in 2024 while hoarding cash and better-positioning the company for a downturn.

Given Buffett and Berkshire's success, it's always a good idea to keep an eye on Berkshire's massive $300 billion equities portfolio for new investment ideas. (Make sure to do your own due diligence and not buy blindly.) Despite their strong track record, Buffett and Berkshire have made some bad picks they've clung to for years. Should you buy Berkshire's three worst-performing stocks over the past decade?

1. Occidental Petroleum -- Down 39%

For this analysis, I looked at the performance of all stocks in Berkshire's current portfolio over the past decade. Buffett and Berkshire have not held all their stocks for a decade, so they may have bought in at better times than indicated. Occidental Petroleum (OXY -0.89%) is one of Berkshire's more recent purchases, but it hasn't panned out yet.

Berkshire took a new stake in Occidental in early 2022 and has continued buying the stock like there is no tomorrow. Berkshire owns more than 28% of outstanding Occidental shares, and Occidental is the sixth-largest position in Berkshire's portfolio. Some suspect Berkshire will eventually acquire the large U.S. oil producer outright.

Occidental has largely struggled due to falling oil prices and a more bearish outlook on oil for next year. However, the company has continued to pay down debt and also completed the acquisition of Crown Rock in 2024, a transaction that is immediately accretive to free cash flow and adds the equivalent of 170,000 barrels of oil per day.

Buffett clearly likes the way management is running the company and may also view domestic oil as a critical resource with geopolitical tensions on the rise.

Occidental is also making significant efforts to combat climate change and is planning to open the largest direct air capture (DAC) facility in the world in 2025 with the potential to capture 250,000 tons of carbon dioxide per year.

The company has an average break-even point on oil production of less than $60 per barrel.

Oil is a good asset to have some exposure to in your portfolio because it can hedge inflation and benefit from rising oil prices, which can create turbulence in the market. You can own Occidental for less than 14 times earnings.

2. Kraft Heinz -- Down 50%

The large consumer food company Kraft Heinz (KHC -0.54%) is well known as one of Buffett's biggest mistakes. In 2013, Buffett teamed up with the Brazilian private equity firm 3G Capital to purchase Kraft, and then the two also financed Kraft's merger with Heinz to create Kraft Heinz in 2015.

Buffett has admitted he paid too much for Kraft, but he still believes in the company. Berkshire owns nearly 27% of the company, and it is the eighth largest position in Berkshire's portfolio.

Once again, Kraft Heinz widely underperformed the market in 2024 and has continually disappointed investors. In the third quarter, net sales fell roughly 3%, and adjusted earnings through the first nine months of 2024 only rose marginally compared to the same period in 2023. The company hasn't been able to reduce long-term debt much since last year, although it has made good progress in recent years.

Kraft Heinz is compensating investors for their time through share repurchases and a large 5.2% dividend yield that will become even more attractive should rates decline more in 2025. The dividend looks sustainable, with free cash flow through the first three quarters of the year exceeding $2 billion while the company paid $1.5 billion in dividends.

The stock will require more patience for the company to execute a turnaround, but this could be a good one for dividend investors.

3. Liberty Latin America -- Down 81%

The worst performer in Berkshire's portfolio over the past decade is Liberty Latin America (LILA -1.71%). Berkshire owns class A and C shares of the company, but they are tiny positions in the portfolio and are currently valued around $25 million together, so it's never been a huge risk.

Liberty Latin America is a telecommunications company providing an array of video, broadband internet, and phone services in Puerto Rico, Costa Rica, the Caribbean including Jamaica, and other parts of Latin America. Most of the company's services are bundled together for customers in their perspective markets.

Telecom businesses can certainly create good shareholder value because internet, phone, and video are more ingrained in today's lives than ever. Everyone needs to have Wi-Fi, and it's likely one of the key bills consumers budget for, creating a consistent stream of recurring revenue that can be built at scale.

However, challenges in the telecom sector include competition and regulation. Latin American markets will also present more new challenges -- and opportunities -- to telecom players than in the U.S. In the third quarter, Liberty Latin America saw declining customers, and analysts seem frustrated by the lack of progress in ramping up certain units, such as Puerto Rico.

Many companies with multiple units like this are valued on a sum-of-the-parts basis, which can present significant upside but also take time for the company to unlock and for the market to digest. Given the complexities of the business and slow progress, I wouldn't recommend more than a small speculative position. This one is likely to take time to play out.