Stocks were mixed on Wednesday, with the Dow Jones Industrial Average (DJINDICES:^DJI) closing at a record, the S&P 500 (SNPINDEX:^GSPC) losing ground, and the tech-heavy Nasdaq Composite (NASDAQINDEX:^IXIC) plummeting.

Today's stock market

Index Percentage Change Point Change
Dow 0.44% 103.97
S&P 500 (0.04%) (0.97)
Nasdaq (1.27%) (87.97)

Data source: Yahoo! Finance.

Though the tech sector got hammered, retail shares rallied: The SPDR S&P Retail ETF (NYSEMKT:XRT) jumped 2.5%.

As for individual stocks, two beleaguered retailers made impressive moves. Macy's (NYSE:M) rose on growing optimism about the holiday season, and Rite Aid (NYSE:RAD) jumped after reporting some stores sales. 

Bull and bear figurines facing off.

Image source: Getty Images.

Investors warm up to Macy's

Traditional department stores are in decline as mall traffic falls and people shop at Amazon, and therefore the stocks are terrible investments, right? Well, don't look now, but some of the most beaten-down stocks are staging a comeback, as Macy's has been showing investors. Shares jumped ahead 8.2% today and are up 37% since hitting their 52-week low less than a month ago. What's going on here?

For one thing, news about the opening days of the holiday shopping season has been very positive, a rising tide lifting a lot of retail boats. Online sales -- and particularly sales from mobile devices -- have been strong. Salesforce retail intelligence reported that digital sales on Black Friday were up an astounding 32% over last year, and Adobe reported that Cyber Monday sales were up 17%. Survey results from the National Retail Federation issued yesterday said that of the 174-million-plus Americans who shopped last weekend, 64.6 million shopped both online and in stores, and 51.6 million shopped only in stores. ShopperTrak found that Black Friday store visits fell less than 1%. Reports have said average spending is up overall.

Macy's in particular turned in a very good quarter for profit recently, despite falling sales, and has steadfastly maintained its guidance throughout the year as it focuses on getting inventory under control, sprucing up its stores, and investing in a mixed online-and-physical-store model. Earlier this week, the company announced a tender offer for $400 million of its bonds, following through on its stated intention to retire its debt.

Macy's stock had simply been beaten down so far that all it took was a little positive news and some evidence that plans are on track to get investors in a buying mood.

Rite Aid reports store sales finally under way

Shares of Rite Aid rose from the ashes today, soaring 14.3% on news that wasn't really...well, all that new. The pharmacy operator announced closing on the sale of 97 stores to Walgreens Boot Alliance, the first installment of a deal finalized in September to transfer 1,932 stores for an all-cash purchase price of $4.375 billion. The company's stated goal is to complete the transfers in the spring of 2018.

The gain today was huge in percentage terms, but it simply returned the stock price to roughly where it was at the beginning of last month. In the Sept. 28 conference call, company officials said that proceeds from the sales would start to appear in October. When the first of the sales finally happened in late November, the stock basically just recovered lost ground.

Rite Aid still has a lot to prove to its shareholders after getting through the process of selling off stores to its rival. Whether the remaining stores can reverse the company's sales decline is still very much in question.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Jim Crumly owns shares of AMZN and Salesforce.com. The Motley Fool owns shares of and recommends AMZN. The Motley Fool recommends ADBE and CRM. The Motley Fool has a disclosure policy.