What happened

Shopify (SHOP 4.90%) investors trounced a rising market this week. The e-commerce stock jumped 29% through Thursday's trading, according to data provided by S&P Global Market Intelligence, compared to a 3.5% surge in the S&P 500.

The rally just erased a small part of shareholders' latest losses, though, and the stock remains down by about 70% so far in 2022. However, investors are becoming less pessimistic heading into a key earnings update in just a few days.

So what

Shopify's stock-price fortunes were mostly tied to the rising market. The tech-heavy Nasdaq index rallied by 11% through Thursday trading, after all, due to rebounding optimism on Wall Street. Given Shopify's big declines in 2022, it's no surprise that such a shift in sentiment would benefit the stock.

But investors also have some specific reasons to like the stock today. Shopify is set to announce fiscal Q2 earnings results on July 27 and could surpass the low bar that Wall Street has set for the business.

Most investors who follow the stock are looking for sales trends to be weaker for a second-straight quarter before growth accelerates into late 2022. Some tech giants, including Netflix, have reported stabilizing sales trends in recent days, and that factor is driving up hard-hit stocks like Shopify.

Now what

Shopify's sales trends will soon show an immediate benefit from its recent acquisition of Deliverr. But the key metrics to watch in Thursday's earnings update include subscription-based revenue (which is a function of pricing), merchant engagement, and demand for premium software services like Shopify Plus.

Inflation and slowing economic growth rates, combined with pressure from soaring demand a year ago, will likely help slow Shopify's expansion. But this-week's stock-price surge reflects the possibility that this slowdown will stabilize soon.

Shopify stock still has room to rebound if the company can show that investors became too pessimistic about the stock by sending it down so sharply in recent months.