Shares of Shopify (SHOP 3.91%) have skyrocketed recently. The stock is up about 90% year to date and more than 115% over the last year. Some shareholders of the e-commerce platform provider are likely sitting on big gains, so this begs the question: Is it time to take profits?

The growth stock's recent gains seem to be fueled by a combination of momentum in tech stocks and hype surrounding artificial intelligence (AI). As a result, this may be one of those times when it makes sense to sell into exuberance.

Not only is the valuation questionable, but the company's operating loss is moving in the wrong direction. With shares trading at about $66 as of this writing, the bull case is becoming too difficult to justify.

Disappointing business economics

When Shopify went public in 2015, many investors likely expected the company would be unprofitable for some time. With that said, it's unlikely investors expected that the company would still be reporting significant operating losses into 2023.

Sure, revenue has surged from $205 million in 2015 to $5.9 billion over the trailing 12 months. But the company's trailing-12-month operating loss has increased substantially over this period, growing from about $18 million in 2015 to about $549 million.

To be fair, Shopify's operating loss has improved as a percentage of sales during this period. But at the end of the day, Shopify has failed to show investors that its business can generate any meaningful profits consistently. Even worse, the stakes for Shopify to do so are now incredibly high, given the company's staggering market capitalization of $84 billion.

Operating losses haven't just increased between 2015 and 2023. Trends didn't look good in the company's most recently reported first quarter, either. The first-quarter operating loss was $193 million, or 13% of revenue. This compares to $98 million, or 8% of revenue, in the year-ago period. 

Fortunately, Shopify is doing things to address the poor economics of its business. Alongside its first-quarter results, the company announced that it was reducing its workforce by 20%. This should help it make material progress toward profitability. But it could be five to 10 years before profits live up to Shopify's gargantuan market capitalization, which is marching toward one-tenth of a trillion dollars.

None of this is to say that Shopify is a bad business. It's just difficult to justify an $84 billion market capitalization, given the underlying fundamentals.

There may be better stocks to buy

Given the hype surrounding artificial intelligence and the Nasdaq Composite's 31% year-to-date gain, it would be difficult to argue against the idea that some of the recent gains in tech have been more about momentum and fear of missing out than fundamentals. It makes sense, therefore, for investors to scrutinize their portfolios to see where exuberance may be the dominating sentiment.

Shopify's frothy valuation looks like it could be the byproduct of some of the hype in tech and AI, making it a good time for investors to consider selling their entire positions or at least trimming them a bit. After all, with tech stocks leading the market's rally recently, there may be some stocks beyond tech that are more attractive at this point.