Macy's (M  ) has had quite the turnaround in 2021. Its positive momentum continued with Q3 earnings which showed the company reporting sales and earnings that topped expectations by an impressive margin. It also raised its forecast for the full year for net income and revenue. The stock ended up 21% higher but gave back a chunk of these gains in the following session.

On a YTD basis, the stock is 208% higher. And the stock is now more than 100% above its pre-pandemic range of around $15 in January 2020. Interestingly, this outperformance is despite some headwinds that have hurt some of its peers like rising costs, an inability to keep inventories fully stocked due to supply or transportation bottlenecks, or hiring which means stores can't stay open.

Inside the Numbers

In Q3, Macy's reported $1.23 per share in adjusted earnings, beating expectations of $0.31 per share. This was better than last year's vs. expectations of $0.31 cents per share. It was also much better than last year's loss.

Revenue also topped expectations at $5.4 billion vs expectations of $5.2 billion and a 35% improvement from last year's $4 billion. Same-store sales growth also beat at 35.6% vs 29.3%.

E-commerce sales were up 19% and 49% on a 2-year basis. This is quite impressive given that many e-commerce companies have seen a share deceleration this quarter. Online sales make up 33% of total revenue.

The company noted a lot of strength in the luxury market through its Bloomingdale's subsidiary. The company has benefitted from the boost in physical traffic to stores and the strong labor market, consumer spending, wage growth, and household finances which are impacting Macy's earnings.

The company also raised its full year outlook for revenue to between $24.12 billion and $24.28 billion, compared with the prior range of $23.55 billion to $23.95 billion. It also hiked full year EPS forecast to between $4.57 and $4.76, up from a prior forecast of $3.41 to $3.75.

The company said it added 4.4 million new customers during the quarter and benefited from an "improved economic environment." Another factor in the stock's price rise was its announcement that its working with consulting firm AlixPartners as activists are pushing the company to spin out its e-commerce division.

Another positive was its announcement that its planning to launch its own digital marketplace next year. The company is also doing fine despite supply chain issues that have affected many other companies and doesn't see any risk of inventory not being fully stocked during the holiday season.

This earnings season we are seeing pullbacks in many of the big winners of the year. Macy's is an exception as this earnings season only validated the stock's gains so far.