Shopify (SHOP 0.79%) has experienced a wild ride this week. A resetting of expectations led to massive selling in Shopify, but it reversed course after the company announced its second-quarter earnings.

Still, with the stock losing about 80% of its value this year, this mixed news may leave investors wondering what to do. While anything can happen to Shopify stock in the near term, investors need to take a closer look at both its fundamentals and competitive standing.

Shopify's strategic shift

Two days before its earnings announcement, Shopify issued a press release describing changes to its team. In the report, CEO Tobi Lütke took responsibility for misjudging how e-commerce would change amid the pandemic. During the contagion, he forecast that e-commerce would "permanently leap ahead by five to 10 years." Nonetheless, that leap was temporary, and amid a reversal, Lütke announced Shopify would return to its pre-pandemic growth projections and lay off 10% of its employees.

That announcement sent Shopify shares falling by 14% on the subsequent trading day. However, it announced earnings the next day, and shares traded 11% higher by the end of that day. Even with the lowering of expectations, investors likely have reasons for continued optimism. Research firm Valuates Reports believes the global e-commerce market will reach $20 trillion by 2028, or a compound annual growth rate of 17%.

Shopify's Q2 earnings and financials

The latest earnings report appears to validate that forecast. For the second quarter of 2022, revenue came in at $1.3 billion, 16% higher than in the year-ago quarter. Still, this did not translate into profits as the company's non-GAAP (adjusted) net loss was $38 million versus $285 million in income 12 months ago. A 76% increase in operating expenses led to an operating loss.

While Shopify declined to offer a numerical outlook, it said its merchant solutions segment would grow at more than double the rate of the subscription solutions part of the business. Merchant solutions include Shopify Payments, Shopify Capital, and the Shopify Fulfillment Network, parts of the ecosystem that have helped it stand out above most of its peers.

While this news helped to boost Shopify, investors should remember that it still trades near its March 2020 lows. That brings its price-to-sales (P/S) ratio to 9, also near record lows although much higher than the P/S ratios of competitors Wix and Squarespace.

Effects on Shopify's competitiveness

Admittedly, the higher valuation and recent admission of a strategic error might weigh on Shopify stock. Nonetheless, this change does not negatively affect Shopify's competitive moat. In the U.S., it holds the highest market share among e-commerce platform providers, claiming 32% of the market, according to BuiltWith, more than Wix and Squarespace combined.

Moreover, Shopify continues to invest heavily in IT to ensure a "performance-first mindset." Due to its stated belief that "milliseconds mean millions," the company has emphasized site performance to ensure fast load times for pages so slow speeds will not cost its clients sales.

Furthermore, benefits such as Shopify Payments and Shopify Capital ease the collection of money and the procurement of capital when necessary. Such features also allow merchants to meet most of these needs within the Shopify ecosystem.

Still, the most notable attribute of Shopify's ecosystem may be its fulfillment network. Shopify's willingness to build it shows that the company will transcend its software identity to help merchants package and ship goods to customers. Other than Amazon, none of its competitors offer this service directly, and this factor should widen its competitive moat. 

The state of Shopify stock

Amid the strategic shift and return to losses, Shopify could struggle in the near term. However, Shopify's competitive moat is not only intact but also could expand given its larger and more robust ecosystem. As e-commerce continues to grow, Shopify is on track to make the market share and revenue gains necessary to deliver outsized returns over time.