Given his wide recognition as one of the world's greatest capital allocators, it's no surprise that individual investors love to look at Warren Buffett-led Berkshire Hathaway's gigantic $364 billion portfolio for stock ideas.

Among the top holdings is tech giant Apple (AAPL -0.35%), which makes up a whopping 43% of the entire portfolio. The Oracle of Omaha first purchased this FAANG stock in early 2016, and since the start of that year to March 8, it has skyrocketed 375%. This is undoubtedly one of Buffett's most lucrative bets.

Investors can gain insights by figuring out the factors that led to Apple's prominent place in Berkshire's portfolio.

A screaming buying opportunity

While we can't read Buffett's mind, we know that he appreciates high-quality businesses first and foremost. Apple certainly fit the bill in 2016.

A key part of its economic moat is the powerful brand. Apple is a technological and cultural icon, thanks to its incredibly popular hardware devices, the most notable of which is the iPhone. This single product generated $201 billion of sales in fiscal 2023.

Look through Berkshire's top holdings, and it's obvious he appreciates strong brands. Coca-Cola and American Express are two large positions whose brands resonate mightily with consumers.

Apple's brand holds so much weight that it allows the business to flex its pricing power, another trait Buffett likes to see. People have no problem paying up for expensive products, often just to upgrade to the latest version. Add on Apple's growing services offerings, and the company is able to keep its users engaged and loyal.

In fiscal 2015, the year before Buffett scooped up the stock for the first time, Apple reported a gross margin of 39% and an operating margin of 30%. This was and still is a ridiculously profitable enterprise, generating $81 billion of operating cash flow that year.

Sound financial performance is something the Oracle of Omaha wants from his businesses. Apple's pristine balance sheet also reduces the risk that the company will ever run into money troubles. That probably explains why Buffett was so comfortable letting the Apple holding become such a huge position in the portfolio.

We can't ignore valuation as a critical factor. During the first three months of 2016, Apple shares traded at an average price-to-earnings (P/E) ratio of just 10.6. Investors were worried about something that caused such a depressed valuation. But based on all of its impressive qualities, it was clear that the market got it wrong.

With the benefit of hindsight, adding Apple to Berkshire's portfolio eight years ago looked like a no-brainer decision for Buffett.

Should you buy Apple stock right now?

Apple has been a fantastic investment. And because Berkshire still owns a sizable stake, investors probably want to buy the stock right now.

But because the shares have performed so extraordinarily well, they aren't cheap anymore. In fact, I believe they are now overvalued. The stock trades at a P/E multiple of 26.6 today. That's much higher than what Buffett paid in 2016.

If Apple was staring at tremendous growth opportunities in the years ahead, then maybe one could justify paying that steep of a valuation. However, I don't think that's the case anymore. This is a very mature company. Revenue declined 2.8% in fiscal 2023. And Wall Street analysts believe sales will increase at an annual pace of just 4.2% during the next three years.

Apple is one of the world's most outstanding businesses. No one will argue with that. But it's no longer a solid investment candidate.