What happened

Shares of Macy's (M 3.99%) were up 12% as of 12:16 p.m. ET on Thursday after the department store surprised investors with better-than-expected earnings in the third quarter. The stock is down 15.5% year to date, which is outperforming the S&P 500 index. 

Not only did Macy's outperform expectations, but management mentioned its inventory position is at "appropriate levels" heading into the holidays. 

So what

The stock has been steadily rising in recent months, as investors are seeing encouraging signs that Macy's turnaround strategy is working. Management said its brand position resonated with customers. 

While management sees the company operating from a position of strength, the company is still struggling to deliver positive top-line growth. Comparable sales were down 3% year over year, compared to a 37% increase in the same period last year and a 1.5% decrease in the previous quarter.  

Moreover, adjusted earnings per share (EPS) of $0.52 were well below the $1.23 in the same quarter last year, but earnings were still above management's guidance, which was good enough for the market today.  

Now what

What boosted the stock was the disciplined inventory management and upward revision to previous guidance. Management is now calling for adjusted EPS to land between $4.07 to $4.27, up $0.07 from the previous outlook. This is largely a function of keeping inventory in line with demand, something that not even world-class retailers like Target and Walmart have managed to accomplish this year.

Macy's is a tempting value. The stock pays an above-average dividend yield of 2.79%, supported by the company's profitability, and trades at a cheap valuation of about 5 times expected 2022 earnings. The only downside is that weak top-line growth could limit upside, so investors should keep their expectations for returns in check.