Shares of Macy's (NYSE:M) plunged to a new multiyear low last week after CFO Karen Hoguet warned investors that the company's gross margin outlook had deteriorated since the beginning of the year. Macy's now has a market cap of less than $7 billion and an enterprise value of a little more than $12 billion.

This rock-bottom valuation seems irrationally low given that Macy's still generates nearly $1 billion of free cash flow annually. It makes even less sense in light of Macy's large portfolio of valuable real estate assets. As Macy's makes progress on extracting value from its real estate, the stock is likely to rebound in a big way.

Macy's has great real estate

Two years ago, Macy's stock soared beyond the $70 mark after activist investor Jeffrey Smith of the Starboard Value hedge fund highlighted the company's real estate value. In early 2016, Starboard Value estimated that Macy's real estate was worth more than $20 billion.

The Macy's flagship store in Manhattan

Macy's real estate could be worth about $20 billion. Image source: Macy's.

Smith's activist approach clearly influenced Macy's. By late 2015, the company had begun talking about real estate extensively during its earnings calls. It also added a real estate expert to its board of directors in March 2016 and quickly followed that up by hiring Doug Sesler for a newly created role as executive vice president for real estate.

At Macy's recent investor meeting, Sesler confirmed Starboard Value's contention that Macy's has a lot of valuable real estate. Indeed, Macy's has realized nearly $1 billion of asset sale proceeds in the past two years by selling off just a fraction of its real estate portfolio.

The strength of Macy's real estate portfolio has also been confirmed by external sources. Most notably, prominent real estate companies including Tishman Speyer and Brookfield Asset Management (NYSE:BAM) have been eager to partner up with Macy's for real estate ventures.

The depreciating asset myth

Notwithstanding Starboard Value's bullish view of Macy's real estate value, the hedge fund dumped all of its Macy's stock earlier this year after management didn't move as quickly to monetize its real estate as Starboard Value had wanted. Since then, a number of pundits have concluded that Macy's has squandered its opportunity to monetize its real estate.

This notion is built upon two myths. First, it assumes that Macy's could have gotten fair value for hundreds of properties within a short period of time. That's not the way "fire sales" generally work.

Second -- and more importantly -- it is based on the belief that falling mall traffic has dramatically impaired the value of Macy's store fleet. This contention isn't supported by the evidence, though.

For example, Macy's has sold three stores at desirable malls in the past year for prices in the $40 million-$50 million range. Lower-quality malls may be losing value, but those properties were never especially valuable.

The exterior of a Macy's store

Macy's stores at top malls are still very valuable. Image source: Macy's.

Even stores in lower-quality malls can be valuable if they can be redeveloped for other uses. That's where Macy's partnership with Brookfield Asset Management comes in. Between now and the end of 2018, Brookfield will create "pre-development" plans for about 50 sites. This could entail small changes like adding restaurants to a store parcel to create a new income source and traffic driver. However, it could also involve building office space, residential units, or hotels on land owned by Macy's.

Lastly, while most of Macy's real estate is located in malls, about 40% of its real estate value (as estimated by Starboard Value) comes from non-mall properties, especially its flagship store in Manhattan. These properties aren't affected by mall traffic trends.

Macy's is taking action

As noted above, Macy's has already reaped nearly $1 billion of proceeds from real estate sales in the past two years. It has numerous more deals in the works right now. At last week's investor conference, Hoguet (Macy's CFO) said asset sale gains would probably exceed the company's original target for fiscal 2017.

Macy's also continues to work on longer-term value-creation projects. These include selling the upper floors of its Chicago flagship store, bringing in "alternative uses" at its Manhattan store, and the partnership with Brookfield Asset Management to redevelop select properties.

Macy's stock hasn't plunged because its real estate opportunity disappeared. Instead, the issue lies with short-term traders who were hoping to make a quick buck and have now dumped the stock. But for patient investors, real estate still makes Macy's stock quite attractive -- particularly at its current bargain-basement price.

Adam Levine-Weinberg owns shares of Macy's. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.