It's been a great time to be an Apple (AAPL 2.88%) shareholder. The popular consumer tech business has seen its shares soar an impressive 46% this year. And the company now carries a market capitalization that's approaching $3 trillion.

Zooming out, it's obvious that this FAANG stock has been a wildly successful investment, thanks in large part to a strong brand and outstanding financial performance.

But as we look toward the new year, is Apple a smart stock to buy in 2024? Let's examine some important details that investors must consider.

Positive traits abound

Some might view Apple as one of the safest stocks to own. That's because of its superb balance sheet and net cash position of $51 billion. This will allow the company to navigate any recessionary periods with no issues at all, while at the same time investing in marketing and product development initiatives to bolster its competitive standing.

Indeed, many new product and service updates will likely be launched in 2024, regardless of the economic backdrop. Apple's incredibly strong brand, which is estimated by Interbrand to be worth just over $500 billion, is precisely what sets this business apart.

A history of innovation and the creation of in-demand products and services, characterized by the seamless connection of Apple's hardware and software, is viewed by consumers as a necessity for everyday life. I don't think any other company on the planet has the sort of standing with its customers that Apple does.

This adds durability to the business model, raising the chances that Apple will still be a dominant enterprise a decade from now.

But a key factor deserves attention

However, the current setup for investors is an unfavorable one. "Be fearful when others are greedy," Warren Buffett has said. It appears as though Apple shareholders are very greedy right now.

While Apple's gain in 2023 has the stock's bulls cheering loudly, it's interesting to see just where the rise has come from. Surprisingly, the share performance this year can be fully attributed to a higher price-to-earnings (P/E) multiple.

What exactly is a stock's P/E ratio? It's a valuation methodology that takes the stock's price and compares it to its earnings per share. All else equal, a lower P/E multiple indicates a better value for investors.

At the start of 2023, Apple's P/E ratio was under 22. Today, it stands at 31. This sizable multiple expansion matches closely the share price gain this year. In other words, Apple's fundamental performance, things like its revenue or earnings growth, have had no impact on the stock over the past 11 months.

The rise in the share price can all be credited to a higher P/E ratio, which is the result of renewed investor enthusiasm following a down year for the market in 2022.

It's an expensive stock right now

It's a fair assessment to say that Apple's stock is significantly more expensive than it was at the start of the year. And this makes me hesitate to buy shares as we head into 2024. It looks like investor optimism is fully priced in, leaving zero margin of safety at these levels.

What's discouraging about Apple is that its revenue in fiscal 2023 (ended Sept. 30) actually declined 2.8% from the prior fiscal year. This means that investors are being asked to pay a premium valuation for a business that is dealing with a slowdown.

Of course, Apple could start to post accelerating revenue and earnings growth in a more robust economic environment. But it's impossible to predict when this will happen, which increases the downside risk for prospective investors looking to pay this high of a P/E multiple.

Should Apple's valuation drop significantly, then the stock looks like a more attractive buying opportunity. But as we set our sights on the new year, it's best not to add this one to your portfolio right now.