Apple (AAPL -0.90%) stock made an improbable run to all-time highs in 2023. The tech giant's shares approached $200 by mid-December, translating into an over 50% rally on the year.

That spike came even though Apple posted declining sales for the fiscal year that ended in late September. In contrast with big tech peers like Microsoft (MSFT 0.47%), Apple is generating lower annual profits right now as well. So why is Wall Street so optimistic about this stock heading into 2024? Let's take a closer look.

Apple is getting back to growth

Apple's revenue declined 3% in fiscal 2023, the company revealed in early November. That decline stands in contrast with Microsoft and Meta Platforms, which are both growing sales at a healthy clip.

Yet a few big factors paint a more encouraging picture than this headline trend might suggest. Apple is setting records where it counts, including in the core iPhone business and in the size of its global pool of tech device owners.

The services segment is growing at a robust 9% rate, too, rising to $85 billion in 2023 from $78 billion last year. Finally, its range of hardware products on sale over the holiday season puts the company on track for a rebound ahead. Most Wall Street pros see Apple's sales rising by about 4% this fiscal year.

Apple is highly profitable

Apple has among the strongest financial footings of any company on the market. It generated $110 billion of operating cash flow in the past 12 months, translating into nearly 30% of revenue. Net earnings held steady at about $100 billion in that period, too, despite weaker sales and more spending on growth initiatives like research and development.

You can find more profitable companies in other parts of the tech industry, to be sure. Apple's 30% operating profit margin is modest compared to the over 40% rate generated by both Nvidia and Microsoft.

A big part of the bullish thesis for Apple stock, then, rests on the prospect for profit margins to rise over the next several years. There's a good chance of that happening as new products launch to its bigger customer base and as the business tilts more toward services sales.

Cash returns and value

Two final factors make this tech stock look attractive despite its nearly $200 price tag. The first is cash returns, which were a blazing $25 billion in the past three months alone. Apple pays a modest and steadily growing dividend, but management also pairs that cash stream with aggressive stock buyback spending. That's a key factor behind Apple's 13% boost in earnings per share last quarter.

Then there's Apple's valuation, which remains reasonable. Sure, you'll have to pay more than the 6 times sales that investors were paying in early 2023 for the stock. But Apple's price-to-sales ratio of 8 today still seems reasonable compared to that of other tech giants like Microsoft.

On the other hand, you likely already have exposure to Apple stock if you own things like total stock market funds. As one of the biggest profit generators on the S&P 500 index, Apple features prominently in most large index funds. Investors should keep in mind that risk of overexposure when considering Apple stock today. But it has room to extend its positive momentum into 2024 even from this high price level.