“If there’s another recession — and I think there will be soon — everyone gets knocked down,” said Mark Cohen, director of retail studies at Columbia Business School and the former chief executive of Sears Canada. “The strong get back on their feet. The weak don’t recover.”

Analysts say the gulf between the sector’s winners and losers is expected to widen in coming months, as illustrated by the latest earnings season. Walmart, Target and Lowe’s all posted better-than-expected profits in the past week, boosting shares of their stock and reassuring investors that U.S. consumers are still opening their wallets. Target’s stock surged 20.4 percent Wednesday to close at an all-time high of $103 after it posted a 17 percent increase in profits and raised its expectations for the rest of the year.

Not as fortunate: department stores and apparel retailers. Macy’s and J.C. Penney posted disappointing earnings last week, causing their share prices to drop by double digits and dragging down the entire retail sector. J.C. Penney has lost $196 million so far this year and expects sales to dip nearly 10 percent in 2019. The company’s stock — trading at about 60 cents a share — is at risk of being delisted from the New York Stock Exchange. Macy’s shares have fallen 21 percent since last week.