The department-store industry has been among the biggest losers during the COVID-19 pandemic. Macy's (M 0.10%) has been no exception.

The top U.S. department-store chain had to close all of its stores in March, and many didn't fully reopen for business until the summer. Even after stores reopened, customer traffic remained severely depressed due to COVID-19 concerns, weak demand for apparel, and a massive drop in tourism in the big cities where the company has flagship stores.

Fearing the worst, investors dumped Macy's stock as the pandemic took hold in March. On April 1, the stock closed at a multidecade low of just $4.43. However, since then, Macy's stock has jumped 107%. Much of those gains have come this month, thanks to positive news about two vaccine candidates.

M Chart

Macy's year-to-date stock performance, data by YCharts.

Despite more than doubling since early April, Macy's stock remains well below where it started 2020. Yet after the company reported another quarter of improving results on Thursday, Macy's shares look like they have plenty of room to keep rising.

Another quarter of solid improvement

At first glance, Macy's third-quarter results don't look especially good. Net sales fell 22.9% year over year to $3.99 billion on a 20.2% comp-sales decline. The company lost $91 million under generally accepted accounting principles (GAAP), compared to a $2 million profit a year earlier. Excluding special items, Macy's lost $60 million ($0.19 per share). In the third quarter of fiscal 2019, it had posted an adjusted profit of $21 million, or $0.07 per share.

Considering the headwinds Macy's has been facing, though, these results were quite decent. For comparison, the department-store operator posted massive adjusted net losses of $630 million in the first quarter and $251 million in the second quarter. Macy's Q3 performance was also better than management and most investors had expected. (On average, Wall Street analysts had predicted sales of $3.86 billion and a much wider loss of $0.79 per share.)

Importantly, after burning through $296 million of cash in the first half of fiscal 2020, Macy's generated positive free cash flow last quarter. That was impressive, as Q3 is usually a seasonally weak period for cash generation. Its year-to-date cash burn now stands at just $142 million. The strong cash performance allowed Macy's to end the quarter with $1.6 billion in cash, plus about $3 billion of borrowing capacity on its credit facility.

The exterior of a Macy's store

Image source: Macy's.

The business will come back

As noted above, demand for apparel (especially dressy apparel) is severely depressed right now. Tourism is virtually nonexistent in big cities. Finally, many consumers are still avoiding stores, at least for discretionary items.

All of these pandemic-related factors are weighing heavily on Macy's sales and earnings. However, while there may be some permanent changes in how people live (and shop), most of these headwinds will lift over the next year or two as the pandemic abates.

Macy's ability to slow its year-over-year sales decline to 22.9% last quarter -- compared to a 45.2% drop in the first quarter -- is a great sign that it will be able to recover the sales it lost earlier this year over time.

Indeed, a record number of retail stores are set to close in 2020 (with more likely to follow in 2021). That should allow Macy's to gain market share in the dressy-apparel niche as demand recovers over the next few years. As tourism rebounds, Macy's stores in major cities (especially its flagships in New York, Chicago, and San Francisco) will go back to being major sales drivers. Finally, Macy's will benefit from its strong e-commerce business.

Digital sales grew 27% last quarter, accounting for 38% of total sales. Thanks to new capabilities like curbside pickup and same-day delivery through DoorDash, CEO Jeff Gennette expects digital sales to continue growing at a double-digit rate for the foreseeable future.

Expecting a strong profit recovery

As Macy's regains the sales volume it has lost in 2020, it will benefit from over $2 billion of cost cuts. Most of that savings has already been realized, with the rest coming on line by 2022.

Macy's will reinvest a lot of that savings in various growth initiatives, but it still should be able to improve its profit margin, even compared to pre-pandemic levels. In effect, the pandemic created a greater sense of urgency around cost management that will pay dividends in the long run.

While Macy's stock has more than doubled since April, it would have to double again to reach its early 2020 level. Given that Macy's has a decent shot at surpassing its 2019 earnings within a few years, that seems very doable. Indeed, if management can execute properly on planned cost cuts while getting sales back to around 2019 levels by 2022 or 2023, Macy's stock could have even more upside in the years ahead.