A year ago, Macy's (M 1.44%) told investors that it would devote more effort to extracting cash from its vast portfolio of real estate going forward. Many investors have been skeptical about whether the company was serious, though. Macy's stock lost a third of its value in the six months after it began examining its real estate portfolio.

M Chart

Macy's Stock Performance data by YCharts.

However, investors are now starting to see the cash. In just the past two weeks, Macy's has announced three major real estate deals that will bring in combined proceeds of $350 million -- and there are plenty more to come. A steady stream of lucrative real estate sales could drive Macy's stock much higher in the next few years.

Macy's sells a handful of stores

Two weeks ago, Macy's revealed that it had sold several stores to mall owner General Growth Properties for $46 million during Q3. In connection with this deal, Macy's has already closed one store. It will close three more in early 2017. The last (and most valuable) store will remain open on a short-term lease, while General Growth decides how to redevelop the Tysons Galleria mall in Virginia.

Macy's also recently signed a deal to sell its men's store in San Francisco, following several months of negotiations. This will become the first of Macy's "flagship" real estate assets to be redeveloped. The sale price was a hefty $250 million, albeit somewhat less than what seemed possible based on other recent real estate deals in the frothy San Francisco market.

Finally, Macy's sold its downtown store in Portland, Oregon, for $54 million during Q3. It will close the store next spring. This appears to have been a case where the store was still profitable, but wasn't making enough money to justify passing up the chance to cash out.

In total, these three deals brought in $350 million. That's a substantial sum, considering that Macy's stock had a total market value of less than $11 billion just two weeks ago.

Macy's is starting to sell off stores in conjunction with its downsizing plan. Image source: The Motley Fool.

A new real estate partnership

The $350 million in value that Macy's extracted from its real estate last quarter is just a drop in the bucket compared to its potential. On Thursday, Macy's revealed a new strategic alliance with Brookfield Asset Management (BN 1.92%) that could help it monetize even more real estate.

Under the terms of the agreement, Brookfield Asset Management will have an exclusive right to create "pre-development" plans for about 50 Macy's properties. These are primarily stores in malls not controlled by major mall owners. The sites also span a wide range in terms of quality, according to Macy's CFO Karen Hoguet.

The partnership with Brookfield Asset Management could be an attractive way for Macy's to monetize some of its less valuable properties, particularly where there isn't a major mall owner to step in and spearhead a redevelopment project. For example, Hoguet suggested that Brookfield could (hypothetically) redevelop a smaller Macy's furniture store into a mixed use retail and mid-rise apartment building.

Plenty of other deals in the works

Macy's plans to close about 100 stores in early 2017. Many of these will be locations where it owns or has a ground lease for the store building. This will lead to a steady stream of real estate sales over the next several months. Most of these deals will be relatively small, but they could add up to a billion-dollar windfall, further boosting Macy's stock.

Macy's is also still working on plans to extract value from its flagship stores in New York, Chicago, and Minneapolis. It may already be closing in on a deal to sell the Minneapolis store. At the other end of the spectrum, Hoguet warned that it will take time to finalize a plan for the Manhattan store, which is by far Macy's most valuable asset.

It could take years for Macy's to monetize its Manhattan flagship. Image source: The Motley Fool.

Between the near-term sale of stores that will close in early 2017, the medium-term opportunity to monetize the remaining flagship stores, and the long-term development prospects from Macy's partnership with Brookfield Asset Management, Macy's shareholders can look forward to a steady stream of cash from real estate sales and partnerships.

This will allow Macy's to return billions of dollars to shareholders in the next few years. There's still time to buy Macy's stock and profit from its massive real estate opportunity.