With the Nasdaq Composite Index in record territory, you might be thinking that most stocks are also near their all-time highs. But this just isn't the case.

Take Shopify (SHOP 1.04%). As of May 15, the leading e-commerce platform's shares are currently 65% below their peak, which was established in November 2021. It doesn't help that Wall Street hasn't been pleased with the company's recent financial updates.

Does this discount make Shopify a once-in-a-generation investment opportunity right now?

Worried about guidance

Shopify, which sells various hardware, software, and financial services tools that allow anyone to quickly set up an online retailing presence, continues to register fast growth despite macro headwinds. Gross merchandise volume (GMV) was up 23% to $60.9 billion, helping drive a revenue gain of 23% as well. This marks the seventh straight quarter that Shopify posted more than 20% year-over-year sales growth.

So, why did shares tank 19% right after the latest financial update? The market is forward-looking, and management disappointed investors when it forecast "high teens" second-quarter sales growth. While that was in the ballpark of Wall Street consensus expectations, it would represent a slowdown from the past several quarters.

Think about the bigger picture

Investors should zoom out and try to maintain a long-term view when looking at Shopify as a potential portfolio addition. There are some key factors to keep in mind.

Despite what could be a sales slowdown this quarter, it's easy to be optimistic about the business over the next few years and beyond. Shopify benefits from the ongoing growth of online shopping, which only represents under 16% of all retail spending in the U.S. As more commerce is done digitally, the company is set to gain, as it has a 10% global share in the e-commerce platform market.

Growth could be supercharged as it starts to further penetrate the market for enterprise clients. Plus, Shopify is making inroads in offline retail. The downside of this focus is that competition will only intensify, from the likes of Adyen, PayPal, Block, and Stripe.

But it's not hard to believe that Shopify has become a mission-critical service provider for its millions of customers, which rely on it to ensure their operations run seamlessly. This should only be amplified because the business is intensely focused on ongoing product development efforts.

Unsurprisingly, artificial intelligence (AI) is a top priority. With Shopify Magic, merchants can use AI-powered tools to better edit images, write product descriptions, and draft emails. This can lead to better financial success for merchants, which could ultimately boost GMV and revenue potential.

The company has been able to better monetize its platform, as exemplified by a first-quarter attach rate of 3.06% (revenue divided by GMV) that has steadily risen in the past five years. This is a clear sign of the value Shopify provides for its customers.

High expectations

It's not hard to convince someone that this is a quality business that has tremendous growth potential. The issue, though, is that this optimistic perspective is fully reflected in the stock price, even though it's well off its peak.

Shares trade at 10 times sales. While that's down from a price-to-sales ratio of 17 just three months ago, the valuation still tells me that investors have high hopes for the business and the stock. This not only adds risk should Shopify continue to report financial updates that aren't well received, but it also limits the upside for sizable investment returns.

This is not a once-in-a-generation buying opportunity. But if investors do like the business, then it's best to wait until there's a better entry valuation, in my opinion.