Shares of Shopify (SHOP 1.11%) were zooming higher in November, as the Canadian e-commerce software company posted strong third-quarter results, gained on improving macroeconomic data, and reported impressive sales over the key Black Friday weekend.

According to data from S&P Global Market Intelligence, the stock finished the month up 54%. The stock popped early in the month on the earnings report and continued to rise from there.

^SPX Chart

^SPX data by YCharts

Shopify wows on the bottom line

Shopify shares jumped 22% on Nov. 2 after it beat estimates on the top and bottom lines, regaining some of the momentum it seemed to have lost in the economic reopening after the pandemic.

Gross merchandise volume (GMV) rose 22% to $56.2 billion, driving revenue up 25% to $1.71 billion, which topped estimates at $1.67 billion. Adjusting for the sale of its logistics business, revenue was up 30% in the quarter.

However, the real surprise was on the bottom line as the company improved its margins across the board, thanks in part to divesting the logistics business. Gross profit rose 36% to $901 million and gross margin jumped from 48.5% to 52.6%. All three of its operating expense line items fell from the quarter a year ago and it reported a generally accepted accounting principles (GAAP) operating income of $122 million, compared with a loss of $346 million in the quarter a year ago.

On the bottom line, the company benefited from a $555 million unrealized gain on equity stakes in companies including the recent IPO Klaviyo, leading to a per-share profit of $0.55, which was much better than the consensus at $0.15.

Over the rest of the month, Shopify gained as the broad market moved higher, and investors began to believe that the Federal Reserve was done raising interest rates and could even lower them soon. The stock jumped another 5% on Nov. 27, as it reported $9.3 billion in GMV during the Black Friday/Cyber Monday weekend, up 24% from a year ago.

Can Shopify keep going higher?

Shopify's guidance for the rest of the year also pleased the market, forecasting revenue growth in the high teens, and it said operating expenses would be down in the low single digits from the third quarter, implying a strong bottom-line performance in the fourth quarter, which is the seasonally strongest quarter of the year for Shopify.

While Shopify stock is expensive, the company is showing its potential for margin expansion and delivering rapid top-line growth. That should drive the stock higher over the long term.