Warren Buffett has been a net seller of stocks for seven consecutive quarters. He has also built Berkshire Hathaway's cash, cash equivalents, and short-term investments to nearly $277 billion -- the largest cash stockpile in the company's history.

Has the legendary investor thrown in the towel on the stock market? Not completely. Buffett just bought shares in seven stocks. I think one stands out as the best of the bunch.

Adding more

Buffett added to Berkshire's existing positions in five stocks in the second quarter of 2024. I wasn't surprised that Occidental Petroleum (OXY -1.84%) was one of them. Buffett is a big fan of Occidental and the company's CEO, Vicki Hollub. The stock is Berkshire's sixth-largest holding.

Berkshire's purchase of over 1.1 million shares of Chubb (NYSE: CB) in Q2 wasn't a shocker, either. Buffett began buying the insurer last year without revealing the identity of the stock. He has invested aggressively in Chubb in recent quarters. It's now the ninth-biggest position in Berkshire's portfolio.

Buffett's three other additions to existing positions in Q2 share a common denominator. He increased Berkshire's stakes in Liberty Media Corp Series A (NASDAQ: LSXMA) and Liberty Media Corp Series C (NASDAQ: LSXMK). Buffett also bought another 96.2 million shares of Sirius XM Holdings (NASDAQ: SIRI), boosting Berkshire's position in the satellite radio operator by more than 262%. Liberty Media owns over 83% of Sirius XM's outstanding shares.

New positions

Ulta Beauty (ULTA -2.32%) was the biggest new position for Berkshire Hathaway in Q2. Buffett and his team bought more than 690,000 shares of the cosmetics retailer worth roughly $266 million at the end of Q2.

The purchase of Ulta looks like a classic buy on the dip. Ulta stock has fallen around 20% year to date, and the decline has been largely due to the company's disappointing full-year guidance. Ulta CEO Dave Kimbell warned that consumer spending on cosmetics has slowed.

Buffett also initiated a new position in Heico (HEI -3.03%) in Q2, buying more than 1 million shares of the aerospace and electronics company. Unlike Ulta Beauty, Heico has delivered strong gains in 2024 with its stock soaring close to 35%.

Business is booming for Heico. The company reported record revenue and earnings in its fiscal 2024 Q2 results announced in May. Acquisitions continue to be a key growth driver for Heico.

The best of the bunch

If you're an income investor, you might be drawn to Sirius XM's juicy forward dividend yield of 3.6%. The company's dividend payout ratio of 31.5% is also low, indicating financial flexibility that could enable it to increase the dividend.

If you're a value investor, the two Liberty Media stocks could be more to your liking. Both trade at a forward earnings multiple of under 6.3. Analysts surveyed by LSEG also project that Liberty Media will deliver strong earnings growth over the next five years.

However, I think Occidental Petroleum is the best overall stock among Buffett's Q2 buys. The stock is attractively valued with a forward earnings multiple of around 14.5. It offers a modest forward dividend yield of over 1.5%. CEO Hollub predicts an oil supply shortage by the end of next year, and, if she's right, the stock could soar in the not-too-distant future.

Buffett has praised Occidental's pioneering work in developing carbon capture and storage technology. If the company is successful on this front, it could be a big winner for investors for years to come.