Thursday was mixed on Wall Street as major stock indexes stayed in positive territory for much of the session before losing steam near the end of the day. Investors are starting to prepare for the beginning of third-quarter earnings season next month, but in the interim, there's not much to focus on other than broad-based macroeconomic trends and various political and regulatory moves. Yet despite the fairly quiet day for the market, some stocks saw solid gains. Rite Aid (NYSE:RAD), Enphase Energy (NASDAQ:ENPH), and New Media Investment Group (NYSE:NEWM) were among the top performers. Here's why they did so well.

Rite Aid gets ready for earnings

Shares of Rite Aid picked up 4%, bouncing back from some of their recent declines. The drugstore chain has been under pressure for a long time, especially once it become clear that it would only have a portion of its store base bought by competitors. Rite Aid's main challenges have involved finding a balance between addressing the difficult conditions in the retail pharmacy industry and forging new collaborative relationships with medical professionals and healthcare coverage providers. So far, the company hasn't found the perfect answer. Shareholders might be optimistic today that the drugstore chain will find a way forward, but skeptical investors are waiting for more details on exactly how Rite Aid will accomplish that goal when the company reports earnings next week.

Four store brand products offered by Rite Aid, with text describing them.

Image source: Rite Aid.

Enphase rides the solar wave

Solar microinverter provider Enphase Energy's stock rose nearly 8% following news from the company about a key supply partner. Enphase said that privately held Sunpro Solar has installed as many solar power systems using Enphase microinverter technology in the past 12 months as it had previously since the 2008 founding of the installation company. Sunpro has an exclusive supply agreement with Enphase for microinverters, which are a key component of managing electrical generation from solar panels. Sunpro's installation volume of about 50 megawatts per year is a big deal, but Enphase has similar arrangements with many installers, and that could help keep the stock rising over the long run as interest in renewable energy remains strong.

New Media gets called out

Finally, shares of New Media Investment Group finished higher by 6%. The publishing company got a favorable mention from renowned investor Leon Cooperman in an interview shown on CNBC, highlighting the company's dividend yield. Cooperman acknowledges that many investors are frustrated with low yields from typical fixed-income investments, and that's forcing some to turn to dividend-paying equities for the income they need. Few think newspapers have much of a future, but with a pending merger deal with Gannett, New Media could be a big winner if current financial projections are even close to correct.