To see how changing consumer habits are disrupting the retail world, drop by the Florida Mall, an upscale complex in Orlando owned by mall giant Simon Property Group spg . A few years back, with traffic declining at its “anchor” department stores, the shopping center converted a Lord & Taylor into three separate, smaller shops. Then, three years ago, a Nordstrom was repurposed as a Dick’s Sporting Goods after its lease expired, while a former Saks Fifth Avenue became a food court.
Robb Paltz, a structured-finance analyst at Moody’s Investors Service, sees the Orlando complex as a case study in the evolution of shopping. “Department stores do not create the same draw as anchors that they did 10 to 15 years ago,” Paltz wrote in a recent note. And places like the Florida Mall are looking to other retailers to fill the vacuum.
It’s no secret that brick-and-mortar retail has been struggling. The S&P Retail Select index has been anemic for three years, falling an average of 1% annually. Over 2017 through mid-December, even as total bankruptcies fell 37%, eight big retailers, including Toys “R” Us, filed for Chapter 11, according to BankruptcyData. And despite a holiday shopping season in which spending is expected to rise sharply, 2018 could be worse, says Garrick Brown, a retail and real estate analyst at Cushman & Wakefield—with department stores high on many pessimists’ watch lists.
More from FORTUNE
Conventional wisdom depicts this slump as the result of a zero-sum contest between online and in-person shopping, where Amazon amzn and its ilk unstoppably siphon money away from stores. The reality is more nuanced. In-store shopping is hardly disappearing—Forrester Research estimates that 87% of retail sales in 2017 took place in stores. But shoppers are shifting their loyalties, seeking out retailers who can compete for their time with low prices and online options in the era of Jeff Bezos’s “everything store.” Those trends are creating daunting challenges for retailers—but they offer opportunities for investors who take a chance on what are now some very inexpensive stocks.
Just because a retailer is profitable today doesn’t mean it’s poised for success. Department stores still produce a tremendous amount of cash, enabling them to endure for “decades as a zombie retailer,” says Bill Dreher, an analyst at Susquehanna. Macy’s m , the nation’s largest department store chain, runs that risk. This fall its stock jumped after the chain reported that it had boosted free cash flow 26% through the first nine months of the current fiscal year. But it obtained those results in part by arranging to close about 100 stores—15% of its total fleet—in the face of a long-term sales decline. And Macy’s balance sheet could become the tinder that burns down its clearance racks. The chain has a 27% debt-to-sales ratio, high enough to pose problems if its revenue decline accelerates. Citi analyst Paul Lejuez says the company will likely need to cut its dividend—it currently yields 5.85%—in order to pare down that debt.
For investors bargain hunting in the beleaguered sector, industry analysts recommend a relatively simple formula: Seek out companies that have low debt, that are growing their omnichannel presence (the term that is used to describe retailers’ ability to serve customers either in-person or online), and that didn’t expand too fast during the mall boom of the 1990s and 2000s.
By these measures, Seattle-based Nordstrom jwn looks competitive (despite its setback at the Florida Mall). It’s one of the few retailers still growing store count, through its off-price brand Nordstrom Rack, which is helping it reach discount-conscious shoppers. The chain currently has 117 full-size stores and 216 Rack stores. Nordstrom has also aggressively invested in online shopping: E‑commerce now accounts for more than 20% of sales companywide, giving Nordstrom an “opportunity for a future,” says Dreher. The stock has fallen 21% in the past year, after a failed attempt by the founding family to take the chain private. But at 15 times its estimated earnings for next year, it’s trading at an attractive discount.
The stumbles of department stores are creating openings for the giants that anchor strip malls. Five years ago, investors weren’t sure electronics retailer Best Buy bby would survive. But after cutting prices, beefing up its omnichannel presence, and reducing expenses, it has become an investor darling. Although its growing reliance on e‑commerce has eaten into margins, its stock is up 75% over the past three years. Best Buy offers a “good blueprint” for other struggling retailers, says Citi analyst Kate McShane. It recently laid out plans to increase revenues 9% over four years—which counts as a robust pace in bricks and mortar. And its price-to-2018-earnings ratio remains 29% below the S&P 500’s.
Target tgt has looked sluggish compared with Walmart, in part because of its slow growth in fresh groceries. But its online sales have risen nearly 30% annually over the past two years. Target has also been focusing on wooing the customers nearby malls lose. It’s remodeling stores and building smaller, easily navigable shops in densely populated neighborhoods, and it has scored wins with in-house brands like kids’ clothing line Cat & Jack. McShane says she’s waiting to see store traffic grow at a steady, sustainable pace before buying in, but she sees Target making the right moves for the new retail era. “They’re very focused on being the right omnichannel retailer for their customers,” she says.
A version of this article appears in the Jan. 1, 2018 issue of Fortune with the headline “Filling Retail’s Empty Spaces.”