It's been a painful year for Shopify (SHOP -2.77%) and its shareholders. The company's coronavirus tailwind came to a screeching halt, leading to financial results that haven't been up to par. The e-commerce specialist's 10-for-1 stock split did little to improve its stock market performance; as things stand, Shopify is currently hovering near its 52-week low.

However, Wall Street has faith in the tech giant, and analysts' average price target of $79.45 is close to triple its $27.85 share price as of this writing. Is the Street right about Shopify?

What's wrong with Shopify?

Shopify has been the victim of various market-wide headwinds. Among these are interest rate increases that can impact the value of corporations. In an environment with higher interest rates, borrowing -- one of the main ways companies raise money -- becomes more expensive, and businesses tend to do less of it, leading to reduced investments and lower future earnings. 

Knowing this, investors are less likely to invest in stocks, especially those speculative growth stocks with high valuation metrics that aren't consistently profitable. That description fits Shopify to a T. Its net loss in the second quarter came in at $1.20 billion, compared to the net income of $0.88 billion reported during the year-ago period.

The company's current forward price-to-earnings (P/E) ratio is 220.5. Even given the premium growth stocks often enjoy, that seems too high. The S&P 500's forward P/E is just under 17. In that context, Shopify's performance on the market over the past year isn't too surprising, especially when you factor in company-specific issues. Notably, Shopify's revenue growth rates have slowed as well.

SHOP Revenue (Quarterly YoY Growth) Chart

Data by YCharts.

Perhaps that isn't a "problem" -- at least not in a vacuum. Shopify benefited from the accelerated switch to e-commerce in the early days of the pandemic, and year-over-year comparisons were always going to be difficult as those tailwinds subsided. Still, when added to the overall challenging macroeconomic environment, that's not what investors want to see. 

Moreover, Shopify will likely continue to struggle, at least for a little while. There will probably be more interest rate increases in the near future. Shopify's stock performed exceptionally well between its initial public offering in May 2015 and the end of last year -- an environment marked by historically low interest rates. Moving forward, it will be harder for the tech giant. 

Are there any reasons to be optimistic?

Solid long-term prospects

There is more context to Shopify's relatively disappointing second-quarter financial results. As already mentioned, the slower top-line growth was partly a product of the company's abnormally strong performance in 2020 and 2021, when people were stuck at home and practically forced to shop online. This activity decreased somewhat once pandemic restrictions eased.

There is also more color to Shopify's red ink on the bottom line. For instance, in the second quarter, much of the tech company's net loss was due to unrealized losses in various equity investments. That includes Shopify's holdings in Affirm Holdings and Global-e Online. That's not ideal, but at the very least, it reflects less poorly on Shopify's day-to-day operations.

The company's adjusted net loss during the second quarter -- which ignores the impact of unrealized losses and other items -- came in at $38.5 million, down from an adjusted net profit of $284.6 million in the year-ago period.

Importantly, Shopify's long-term prospects remain strong. There is still plenty of room for e-commerce to grow; as long as it does, merchants will look to open online storefronts. Some analysts see the industry expanding at a compound annual growth rate of 14.7% through 2027. It won't stop there. E-commerce penetration in many developing countries lags what it is in the U.S.

In my view, online shopping will continue growing for decades. Shopify's strength is that it gives merchants all the essential tools they need to run an online store. As a result, the company benefits from high switching costs. Building and customizing an online storefront is hard enough, and attracting loyal customers to it is even more challenging.

But having to restart the entire process from scratch is not something anyone wants to do unless necessary. That's why Shopify's merchants won't want to jump ship. As of last year, Shopify was No. 2 among companies with the highest retail e-commerce market share in the U.S. That, coupled with an estimated $160 billion addressable market and its solid competitive advantages, strongly suggests Shopify can turn things around.

Don't lose perspective 

Will Shopify meet Wall Street's expectations within the next 12 months? Probably not. But more importantly, the company still has solid prospects, especially when you put its recent struggles in context. For those focused on the long game, Shopify is worth holding onto. The company will likely deliver solid returns in the next decade and beyond.