Apple (AAPL 1.77%) and Nvidia (NVDA 1.75%) were both beloved tech stocks that lost their luster over the past year. Apple's stock hit an all-time high of $180.96 in January, but it subsequently stumbled back to the $130s. Nvidia's stock closed at a record high of $333.41 last November, but it now trades in the $160s.

Both stocks declined as inflation, rising interest rates, and other macro headwinds drove investors toward more conservative investments. Both companies also grappled with their own specific problems: Apple faced slower sales of iPhones and supply chain disruptions, while Nvidia struggled with the post-pandemic slowdown of the PC market.

Could either of these out-of-favor tech stocks bounce back in 2023 and beyond? Let's review their tailwinds, headwinds, and valuations to decide.

A person talks on the phone while checking a laptop.

Image source: Getty Images.

What happened to Apple?

Apple's revenue and earnings per share (EPS) increased 33% and 71%, respectively, in fiscal 2021 (which ended in September 2021), after it finally entered the 5G market with its iPhone 12 family of smartphones. Its revenue and EPS rose another 8% and 9%, respectively, in fiscal 2022 even after it lapped that launch and faced new supply chain headwinds.

For the full year, Apple's iPhone sales rose 7% and its Mac sales increased 14% (even as the market for Windows PCs slumped), while its Wearables, Home, and Accessories sales grew 7% as it sold more Apple Watches, AirPods, and other peripheral products. Its Services revenue also rose 14% as it locked in more than 900 million paid subscribers across its entire ecosystem. All of those growth engines offset its 8% decline in iPad sales.

But fiscal 2023 will be a lot messier. Apple's main contract manufacturer, Foxconn, grappled with disruptions in November as workers at its largest iPhone plant protested its COVID-19 restrictions and unpaid bonuses. Apple already reduced its annual production target for the iPhone 14 Pro and Pro Max from 90 million to 87 million units to account for those challenges, but future protests could generate more unpredictable headwinds for Apple.

Yet Apple still ended fiscal 2022 with $169 billion in cash and marketable securities, and it bought back a whopping $550 million in shares over the past decade. That strong liquidity should make Apple an appealing investment as long as rising rates continue to crush unprofitable companies with weak cash flows. Apple is also widely expected to launch a new "mixed reality" headset next year -- and that product might just generate a fresh stream of hardware revenue.

Based on those expectations, analysts believe Apple's revenue and earnings will grow 3% and 2%, respectively, this year. Those growth rates are steady, but at 22 times forward earnings, Apple's stock isn't cheap yet.

What happened to Nvidia?

Nvidia controlled 88% of the discrete GPU market in the third quarter of 2022, according to JPR. The remaining 12% was split between Advanced Micro Devices and Intel.

Its revenue and adjusted EPS soared 53% and 73%, respectively, in fiscal 2021 (which ended in January 2021). In fiscal 2022, its revenue rose another 61% as its adjusted EPS increased 78%.

Most of that growth was driven by three tailwinds:

  1. Robust sales of PCs throughout the pandemic as more people worked remotely, attended online classes, and played more PC games.
  2. A growing interest in mining cryptocurrencies with gaming GPUs.
  3. Usage of more powerful GPUs in data centers to process complex machine learning and AI tasks.

But in fiscal 2023, analysts expect its revenue to stay flat and for its EPS to slip by 27%. That slowdown was caused by the post-pandemic deceleration of the PC market, sluggish sales in China amid the COVID-19 lockdowns and tighter gaming restrictions, and the crypto market's decline -- which all offset its robust sales of data center GPUs. The Biden administration's ban on advanced chip sales to China, which impacts its top-tier data center chips, will exacerbate that slowdown.

For fiscal 2024, analysts expect Nvidia's revenue and earnings to rise 9% and 32%, respectively, as those markets gradually stabilize. But at 38 times forward earnings, Nvidia's stock still looks a bit pricey relative to its near-term growth.

But just like Apple, Nvidia still has plenty of cash. It ended its latest quarter with $2.8 billion in cash and equivalents, and it bought back $8.8 billion in shares throughout the first three quarters of fiscal 2023. That ample liquidity gives it plenty of room to develop new chips, expand into new markets, and acquire smaller companies -- even though antitrust regulators killed its proposed $40 billion takeover of SoftBank's Arm Holdings earlier this year.

The obvious winner: Apple

Apple faces a near-term slowdown, but its business is much better diversified and less cyclical than Nvidia's. It's also sitting on a lot more cash, its stock is cheaper, and it arguably has more options for expanding its portfolio of products and services than Nvidia. Therefore, I firmly believe Apple is a better buy than Nvidia in this challenging market for tech stocks.