What happened

Shares of Shopify (SHOP 1.61%) were bucking the broad-market trend today and gaining two trading days after it posted better-than-expected third-quarter results and a day after rival Amazon missed the mark badly in its fourth-quarter guidance.

Though there was no company-specific news out on Shopify today, investors seemed to be growing optimistic that the worst has passed for the e-commerce software stock.

As of 10:54 a.m. ET, Shopify stock was up 3.8% while the Nasdaq had lost 1.4%.

So what

Shopify's gains today appear to be an extension of its momentum from its earnings report last Thursday when the stock jumped 17%, and investors may be taking a closer look at the stock after Amazon plunged on weak guidance.

The company posted solid top-line growth with revenue up 22%, though gross merchandise volume was only up 11%. Shopify did not give specific guidance for the fourth quarter, but said it expected to report an adjusted operating loss for the full year, and that it didn't expect as much of a seasonal surge in fourth-quarter revenue as is typical. It also reported a narrower-than-expected loss in Q3 and said operating expenses would decline sequentially in Q4, which elicited cheers from investors.

Considering the stock is down roughly 80% from its peak last year, that report was enough to give it a boost. Shopify stock also seems to be getting a second wind after the disappointing earnings report from Amazon last week.

The weak guidance from Amazon indicates that Shopify is still taking market share from its larger rival, and that Buy with Prime is unlikely to be a serious threat to Shopify as Amazon is preparing for near-stagnant growth in its e-commerce division in the fourth quarter.

Now what

While Shopify still faces macro-level headwinds, a hangover from the pandemic boom, and challenges as it integrates its Deliverr acquisition, the recent gains in the stock seem to indicate investors believe the worst is behind it. 

The stock isn't cheap at a price-to-sales ratio of 9, but it's much more reasonably priced than it was at the height of the pandemic boom, especially considering it still has an ample growth opportunity ahead of it.