Year to date, shares of Macy's (M) - Get Report are up 23% as the company rebounds out of a disastrous year. Can the stock keep up the momentum or is it ahead of itself?

In the past six months, Macy's has exploded 37% higher as the company reported a better-than-expected first quarter in August and unveiled a plan to restructure its real estate portfolio.

In August, Macy's said it earned 54 cents per share, 18 cents better than expected. The results were driven by a higher gross margin and slightly lower expenses offset by a higher tax rate.

First-quarter same-store sales were down 2.6%, which was much better than the consensus estimate of a decrease of 5%. The improvement in comps was due to more favorable weather and an improvement in tourist spending. Management also held discounting to a minimum, which helped to halt the gross margin slide of the recent year. Gross margin at the end of the quarter was 40.9%.

While the results were certainly better than expected, it was the company's plan to restructure its real estate portfolio that got the Macy's bulls excited. The company said it would close as many as 100 underperforming stores (out of 728 total stores) and is in the process of selling its Union Square men's store in San Francisco. Earlier, Macy's announced it would sell its Brooklyn store.

The San Francisco men's store is expected to bring in $250 million, which includes a $235 million gain. The company will lease back the store for up to 3 years.

More stores to be closed will be announced in early 2017. The closures will result in a top line that is about $1 billion less, but will allow management to concentrate on its best-performing locations. Macy's will take a $249 million impairment charge for the changes.

Macy's reported somewhat disappointing third-quarter results on Nov. 10, but investors looked through the results because the company seems to be headed in the right direction. Earnings of 17 cents per share were 24 cents below the consensus estimate of 41 cents. Revenue fell 4.2% to $5.63 billion, vs. the $5.63 billion consensus estimates.

Earnings were hurt by higher costs. Selling, general and administrative expenses rose 3.2%. The jump in expenses was a big surprise. In the first half of the year, the company slashed SG&A by 1.8%.

Comparable-store sales on an owned and licensed basis fell 2.7%, while comp sales on an owned basis were down 3.3%. The difference between the two comps is 41 stores that were closed in fiscal 2015.

The company also announced it had formed a strategic alliance with Brookfield Asset Management to increase the value of its real estate portfolio. Brookfield will have exclusive rights for 24 months to create a "predevelopment" plan for about 50 Macy's locations, with an option for Macy's to add locations to the alliance. Assets in the alliance include complete redevelopment of existing stores or the full development of land adjacent to the company's stores that Macy's may own.

Investors have been trying to get management to unlock the value of its real estate portfolio for years, so the plans were welcome news.

The company is scheduled to report fourth-quarter results on Feb. 21. Analysts think Macy's will deliver revenue of $8.7 billion and earnings of $2.15 per share. For the full year, the consensus is modeling earnings of $3.29 per share and total revenue of $25.9 billion. Next year, analysts are looking for earnings of $3.54, but that estimate is pretty rough considering the extensive restructuring the company is undergoing.

Until investors get more information on the progress of the restructuring and holiday sales, I would simply hold the shares. After a 40% move off the bottom, the good news is probably priced in.

This article is commentary by an independent contributor. At the time of publication, the author held no position in the stocks mentioned.