The stock market seemed directionless on Thursday, continuing the malaise seen in the previous session. Investors were concerned about lawmakers' ability to raise the debt ceiling ahead of a coming deadline, as well as the Trump administration's prospects for advancing its policy initiatives. Yet even as major benchmarks failed to move far from breakeven, some stocks still managed to post solid gains. Dollar Tree, Inc. (DLTR -1.23%)Abercrombie & Fitch Co. (ANF -3.67%), and The Michaels Companies, Inc. (MIK) were among the best performers on the day. Below, we'll look more closely at these stocks to tell you why they did so well.

Dollar Tree bucks the retail trend

Shares of Dollar Tree rose 5.6% after the company announced financial results that exceeded investors' expectations. The dollar-store retailer reported sales grew 5.7% over the prior-year period, led by same-store sales that improved 3.9% at its Dollar Tree-branded stores, and a 1% increase at Family Dollar locations. Progress in cost-cutting measures contributed to a 36.1% jump in profits.

CEO Bob Sasser commented on the quarter: "Both Dollar Tree and Family Dollar produced positive same-store sales, our enterprise operating margin improved 80 basis points and earnings per share exceeded the high end of our guidance range. Consumers continue to view Dollar Tree and Family Dollar as stores that provide great value and convenience." The results seemed to temporarily allay investors' fears about the ongoing challenges in the retail environment. 

Rising stock chart superimposed over digital map of world

Image source: Getty Images.

Abercrombie finds its fashion footing

Abercrombie & Fitch stock surged 17% following the company's release of second-quarter earnings that weren't as bad as investors had feared. The teen clothing retailer reported a loss of $0.16 per share, less than half the per-share loss of $0.33 expected by those who follow the stock. The bright spot was the Hollister store concept, which increased sales 5% at stores open for at least a year, though sales at its namesake stores fell 7%, resulting in an overall decline of 1% in comps. This was "the third consecutive quarter of sequential comparable sales improvement," CEO Fran Horowitz noted. The company continues to apply the lessons learned from the success of the Hollister brand.

Horowitz seemed upbeat in the face of challenges, stating, "[W]e expect to see benefits from the continued improvement in product assortment, our strategic investments in marketing and omnichannel, and our ongoing efforts to optimize productivity across all channels." Investors will be looking for signs that A&F can continue to build on these encouraging results. 

Michaels crafts a record quarter

Finally, Michaels Companies saw shares jump nearly 24% before settling to a 8.5% gain. The arts and crafts retailer posted record results that were better than the company forecast and analysts had expected. Revenue increased by 1.2% compared to the prior-year quarter, primarily the result of opening a net 10 new stores, while sales at stores open at least a year increased by 0.6%. Increases in expenses weighed on profitability, and net income was flat compared to the year-ago quarter.

Chairman and CEO Chuck Rubin commented: "Our efforts to create a more experiential, omnichannel shopping experience, improve our value perception, and leverage our customer analytics are gaining traction earlier than we initially expected. As we begin the second half of the year, we believe these efforts will continue to deliver profitable growth and enable us to further expand our leadership in the arts and crafts channel." In the face of ongoing struggles in the retail industry, investors seemed to breathe a sigh of relief.