It's prime time for holiday shopping and investors should be no exception. In fact, 2022 left many great stocks trading at steep discounts, despite their businesses' long-term strength.

Some stocks saw their prices affected by short-term headwinds while others seem to simply get caught up in the market downturn, through no fault of their own. Here are three stocks that were beaten down this year but are smart buys heading into 2023.

1. Apple is still one of the best businesses in the world

When compared to what analysts were expecting, Apple's (AAPL -2.15%) fourth-quarter results were a mixed bag. The consumer tech company beat estimates for revenue and earnings per share (EPS), but iPhone and services revenue was lighter than what Wall Street was expecting. Management also provided some insights for Q1 that put a damper on expectations.

When analyzing Apple's results, it's easy to forget that even the largest and most successful companies in the world hit bumps in the road -- and that's what this quarter represented. There's nothing to suggest Apple is in bad shape for the future, yet the stock price is down roughly 20% year to date. 

Apple also generates billions in free cash flow and uses it to reward shareholders. While its dividend yield of 0.63% is nothing to write home about, the company has reduced its shares outstanding by 39% over the past 10 years. This reduced share count means each shareholder's piece of the company is larger than it was.

Apple stock is a great anchor for any portfolio and this year's market downturn has given it to investors at a discount.

2. Nvidia's diversification helps with cyclicality

Computer chip designer Nvidia (NVDA -3.54%) also had mixed results in its recently reported quarter. Third-quarter revenue of $5.9 billion declined 17% year over year and earnings per share of $0.27 represented a 72% decrease from the year-ago quarter.

Because Nvidia operates in a cyclical industry, quarters like this are to be expected. In fact, the company's 17% revenue decline actually beat analysts' expectations. While Nvidia is likely to face some challenging quarters ahead, its market diversification should help blunt the impact of a cyclical downturn. 

Segment

Q3 2022

Q3 2023

Change

Data center

$2.9 billion

$3.8 billion

31%

Gaming

$3.2 billion

$1.6 billion

(51%)

Professional visualization

$577 million

$200 million

(65%)

Auto

$135 million

$251 million

86%

Data source: Nvidia.

As the chart shows, while Nvidia's gaming and professional visualization businesses were down due to those markets hitting a downturn, growth in data centers and autos was strong. This is an advantage of Nvidia's business model. Its exposure to these four distinct markets insulates it from a downturn in any one or two of them.

Like many stocks in the tech sector, Nvidia's share price took a hit and is down roughly 46% year to date. Considering its role in a crucial industry, I view the current price as a buying opportunity.

3. Shopify is learning from its pandemic mistake

Once a pandemic darling, e-commerce services provider Shopify (SHOP -0.58%) fell on hard times and its shares are down 73% year to date. Some of this decline came in July when Shopify announced it was laying off 10% of its workforce. In the announcement of the layoffs, CEO Tobi Lütke was up-front about his mistaken assumption that the pandemic-fueled growth would be permanent. In reality, Shopify found itself in line with its original pre-pandemic expectations for growth. 

In the recently reported quarter, Shopify seemed to be slowly heading back in the right direction. Third-quarter revenue of $1.4 billion beat analyst estimates and represented a 22% increase year over year. Gross merchandise volume (GMV), which is the value of all the products sold over Shopify's platform, was up 11% to $46 billion even in the face of macro-environmental challenges as well as a 4% negative impact from foreign exchange rates.

While Shopify's net loss under generally accepted accounting principles (GAAP) worsened compared to the year-ago quarter, the company made progress toward profitability on an adjusted basis. Adjusted gross profit increased 11% to $682 and the adjusted net loss of $30 million was an improvement over the net loss of $103 million in Q3 of 2021. 

At the time of this writing, Shopify has a price-to-sales (P/S) ratio of 9.7, which is near its five-year low of 6.5 seen earlier this year, and it's significantly below its five-year average P/S multiple of 29.6. 

Investors should watch Shopify over the next several quarters to see if its post-pandemic realizations translate to continued revenue and GMV growth as well as improving profitability. However, for those who see the bright spots in the Q3 results as enough of a signal that the business is on the right track, shares look like a good bargain heading into 2023.