The stock market has recovered well in 2023 following last year's doldrums when surging inflation and the Federal Reserve's interest rate hikes led investors to press the panic button and move away from equities. The S&P 500 is up 18% this year, while the tech-laden Nasdaq Composite has delivered bigger gains of 34%. The good part is that this stock market rally seems to have legs thanks to a healthy jobs market, the receding probability of a recession, and a marked slowdown in inflation that could eventually lead the Fed to lower interest rates.

Shares of Apple (AAPL -0.87%) and Shopify (SHOP -3.55%) have benefited from the broader stock market surge, logging gains of 50% and 95% year to date. More importantly, both stocks seem capable of sustaining their rallies and delivering more upside to investors.

If you have $1,000 available to invest that isn't needed to bolster an emergency fund, pay off monthly bills, or pay down short-term debt obligations, you might want to put it toward purchasing shares of one (or both) of these stocks. Let's look at the reasons why such an investment could turn out to be a smart move right now.

1. Apple

A $1,000 investment in Apple stock at the end of 2022 is now worth $1,500. There were a few solid reasons to buy shares of Apple at the end of last year, such as the company's growing business and its attractive valuation. For example, Apple stock was trading at 21 times trailing earnings at the end of 2022, and the company was delivering resilient growth despite the slowdown in the smartphone market.

Apple is now trading at a relatively expensive 32 times trailing earnings. However, the stock looks like a solid buy even at these levels, since the tech giant could deliver stronger-than-expected growth once it launches its next-generation smartphone lineup. Wedbush Securities analyst Daniel Ives upped his price target on Apple stock to $220 from $205 last month, pointing out that the company is on the cusp of a major iPhone upgrade cycle.

According to Ives, there are around 250 million iPhones that haven't been upgraded in more than four years. The launch of this year's iPhone 15 is expected to encourage those users to upgrade to Apple's latest smartphones, and more importantly, bump the company's average selling price (ASP) per unit as well. Given that the company has sold an estimated 224 million iPhones over the past four quarters, the company could enjoy a double-digit bump in volumes over the next year if all those 250 million iPhones are upgraded.

Additionally, Ives points out that the improving mix of the higher-priced Pro and Pro Max models in Apple's smartphone sales should give Apple's iPhone ASP a shot in the arm. According to a report from Consumer Intelligence Research Partners (CIRP), Apple's iPhone ASP reportedly increased to $988 in March 2023 from $882 in the same period a year ago.

It is worth noting that a potential increase in the price of the company's next-generation iPhones -- potentially up to $200 as per some analysts -- could push iPhone ASP beyond $1,000. As a result, Apple could enjoy a nice mix of volume and ASP growth once it launches its next series of iPhones. This could help the company outperform Wall Street's growth expectations over the next year and may even help it hit the Street-high price target of $240, which would be a 23% increase from current levels.

So a $1,000 investment in Apple stock could turn out to be a profitable investment thanks to the iPhone catalyst, as well as the other growth drivers that the company is sitting on.

2. Shopify

A $1,000 investment in Shopify stock at the end of 2022 has nearly doubled by now, driven by the company's solid first-quarter 2023 results released in May. Moreover, the company's decision to divest its logistics business and focus on its e-commerce platform seems to have boosted investors' confidence.

The company delivered better-than-expected revenue growth in Q1, with its revenue increasing 25% year over year to $1.5 billion. Shopify's growth rate accelerated from the same period in 2022 when the company had a year-over-year revenue jump of 22%. More importantly, Shopify expects to sustain its healthy momentum in the second quarter as well, with a 25% increase in revenue over the year-ago quarter.

Again, that points toward a significant acceleration when compared to the 16% year-over-year revenue growth the company delivered in Q2 2022. This jump in Shopify's growth this year isn't surprising, given the potential improvement in the e-commerce market's prospects this year.

According to eMarketer, the e-commerce market witnessed a marked slowdown in growth in 2022, as sales grew just 7% following a 17% jump in 2021. This year, e-commerce sales growth is expected to increase by 9%. As a result, the demand for Shopify's e-commerce solutions -- which help merchants bring their businesses online by helping them build a store on the internet, sell their products internationally, find customers through advertisements, collect payments, and get access to capital -- should ideally improve this year.

Analysts anticipate Shopify's top line to jump 20% in 2023 to $6.7 billion, but it won't be surprising to see the company deliver faster growth, considering the trends in the first two quarters. Also, Shopify is sitting on a total addressable market (TAM) worth $160 billion, which means that it could keep growing at a nice pace for a long time. This explains why the company's revenue is expected to increase over the next couple of years.

SHOP Revenue Estimates for Current Fiscal Year Chart

SHOP Revenue Estimates for Current Fiscal Year data by YCharts

However, investors will have to pay a rich multiple to benefit from Shopify's growth. The stock sports a price-to-sales ratio of almost 15. That is substantially higher than the sales multiple of 8 at the end of 2022. But then, Shopify is relatively cheaper compared to its five-year average sales multiple of 30.

The company's stronger growth this year, along with the massive long-term revenue opportunity, suggests that it can justify its rich valuation and deliver more upside, which is why someone with $1,000 of investible cash might consider buying Shopify before it is too late.