What happened

The stock market was having a rather strong day on Thursday, with all major averages in the green on hopes that a stimulus deal is likely to be reached soon.

And apparel retail giant Gap (GPS 0.41%) was a major standout, up by 13.5% for the day.

Family shopping in a mall.

Image source: Getty Images.

So what

Typically, when a retailer has announced widespread store closures, it isn't necessarily a positive catalyst for its stock price. But that's exactly what we're seeing with Gap today.

The company announced plans to close about 350 of its stores, particularly in malls, and anticipates closing about 30% of its Gap and Banana Republic locations by the end of its 2023 fiscal year, with the majority of the closures being completed by the end of fiscal 2021.

But it isn't just because Gap is closing stores that is driving the stock higher, it's why.

Specifically, Gap is shifting its focus to e-commerce. By the time its planned store closures are complete, Gap says that 80% of its revenue will come from e-commerce and non-mall locations. And the company says that this move will return the business to "profitable growth" by next year. That explains why investors are having such a positive response to the news.

Now what

This is just the latest bold move Gap has announced. In June, it announced a deal with Kanye West to develop an exclusive apparel line. And its Athleta and Old Navy brands are doing quite well already. So if the pivot to e-commerce and the investments in exclusive and trendy clothing lines can help bring the flagship brand back to profitability, it could be a major tailwind for the stock over the long run.