This year, the Nasdaq Composite Index has risen by 37% (as of Dec. 8), which is an outstanding gain, especially after the huge decline in 2022.

However, some businesses, like Shopify (SHOP 1.11%), have rewarded investors even more. Its shares have more than doubled in 2023 amid a resurgence in growth-tech stocks.

After the price has skyrocketed so much in such a short period of time, is this top e-commerce stock worth adding to your portfolio right now? Let's take a closer look at what investors need to know before deciding.

Shopify's strong momentum

Shopify has been on a major upswing in the past few weeks thanks to a stellar third-quarter financial report that easily beat Wall Street expectations. The company reported revenue of $1.7 billion, which was up 25% year over year. Adjusted diluted earnings per share (EPS) came in at $0.24. This was a massive improvement compared to the $0.02 loss in Q3 2022.

Moreover, it looked like investors were extremely optimistic about Shopify's guidance. Management expects revenue for the full year of 2023 to be higher by a mid-20s percent.

To be clear, Shopify's growth, while still sizable, is not even close to the gains the business was posting in prior years. For example, in 2020 and 2021, Shopify's revenue soared by 86% and 57%, respectively. Credit goes to the surge in e-commerce activity during that time when consumers were spending more time at home during the worst days of the pandemic.

A sign that Shopify is extracting more revenue from its merchants can be seen by the 3.05% attach rate. This has steadily climbed over the years, indicative of not only the value this business provides for its customer base, but its ability to monetize that activity.

Looking ahead, it's encouraging to know that online shopping still only commands less than 16% of overall retail spending in the U.S. As a leader in the e-commerce platform market, Shopify is poised to continue benefiting from this secular trend.

Profits matter

Growth is a critical part of this company's story, but perhaps a key reason the stock has done so well is because of Shopify's improving profitability. Like many of its tech peers, the business laid off a meaningful chunk of its workforce earlier this year.

This leads to a more efficient organization. Shopify's 7% Q3 operating margin is proof of the changes happening. In the year-ago period, this margin was (25%).

And to rightsize operations, Shopify disposed of its logistics unit, which will free up capital that was previously being tied up in something that wasn't the company's core competency.

In a higher-rate and inflationary environment, investors look to be prioritizing financial soundness and positive net income. This is in stark contrast to most of the past decade when low borrowing costs allowed businesses to spend aggressively and delay profitability. At least we know that Shopify is heading in the right direction in this regard.

Lofty valuation

A thorough investment analysis isn't complete without also considering a company's valuation. On the one hand, Shopify's price-to-sales (P/S) multiple of 14 is still well below its peak of 64, which was set in the fall of 2020 during market exuberance. For those investors who are more growth-oriented, this could be enough of a reason to buy the stock, though.

However, I'm not one of these people. The current P/S ratio is still expensive, in my opinion. In fact, it's about 67% higher than it was at the start of this year, so we can definitely see the optimism pouring in from investors.

I think this valuation prices in a significant acceleration of Shopify's growth and profits in the next few years, and this provides no margin of safety. It's best to add the company to your watch list and wait for a more attractive entry price.