Shares of Shopify (SHOP 0.28%) stock sank 13.5% in October according to data provided by S&P Global Market Intelligence. The e-commerce platform stock had investors nervous before the most recent earnings release as macroeconomic and geopolitical factors predicted a bleak retail landscape. However, Shopify reported better-than-expected earnings, and the stock has already completely recovered and climbed even further.

Why did Shopify stock sink?

Shopify operates a popular e-commerce platform that millions of merchants use to power their online presence. Although its core product is geared toward small businesses, it has pivoted to targeting enterprise customers with a large range of packages, including single services. These solutions are even more potent for Shopify, since enterprise customers spend more, and expanding its overall business allows it to reach more clients.

Although its basic package is based on turnkey websites with everything ready to bring merchants into the world of e-commerce, it now offers all kinds of payments solutions and services that integrate physical stores with e-commerce functions.

Recently, it launched an arrangement with Amazon called Buy with Prime that allows customers to use their Prime accounts at checkout with Shopify merchants, many of whom also sell on Amazon as third-party retailers. This is a natural partnership that further expands Shopify's business, and it's a great way to impress shareholders with broad thinking.

Shopify has demonstrated robust sales growth throughout the difficult inflationary period, but it stumbled last year when it began to develop a logistics infrastructure and invested to heavily in growing the business. E-commerce took a step backward after soaring early in the pandemic, and management recognized that now wasn't an auspicious time to build out this much. Net losses increased, and Shopify began to cut costs and scrapped the logistics plan.

Leading up the earnings report, investors soured on retail stocks considering a continued inhospitable environment, with stubbornly high inflation and interest rates.

Shopify stock is already rallying again

Investor fears are unwarranted, for now, and Shopify stock was rocking last week after beating Wall Street expectations. Adjusted earnings per share of $0.24 were way ahead of the consensus estimate of $0.15, and sales increased 25% over last year, also beating guidance.

Another highlight was free cash flow, which came in at $276 million, the fourth consecutive quarter of positive free cash flow.

Shopify stock soared 26% after the report and is up 77% this year. The valuation is a bit rich at the price, at 12 times trailing-12-month sales. But Shopify seems to be one of those stocks that always trades at a premium.