Thursday was a strong day for the stock market, as the S&P 500 hit another all-time record high, and the Dow Jones Industrials fell just short of a record of their own. Even as some investors grow concerned about the steep ascent that stocks have made recently, major-market benchmarks show few signs of slowing down, and well-known giants Apple (NASDAQ:AAPL), Altria Group (NYSE:MO), and Rite Aid (NYSE:RAD) were among the stocks that hit their best levels in years today.

Source: Apple.

Apple's nearly 2% gain today brought it back to levels it hadn't seen since late 2012, and just about all of the attention today focused on the tech giant's purchase of Beats. Opinions about the Apple deal, which involves acquiring both the Beats Music subscription service and the company's premium headphone manufacturing unit, range from glowing to intensely critical. Admittedly, the $3 billion price tag pales in comparison to other high-profile acquisitions that some of Apple's peers have made recently. Apple hopes that Beats will enhance not only its iTunes music store and radio services, but also that it could finally lead to long-awaited innovations in the entertainment area. In the long run, Beats likely won't move the needle for Apple, but it could set the wheels in motion for a more influential move down the road.

Altria Group gained 1.3% on Thursday, lifting the tobacco stock to its best levels since spinning off its international tobacco business before the financial crisis. Altria has had to deal with the ongoing threat of traditional cigarette liability and regulatory issues, and the budding electronic-cigarette market has been a growth area that Altria wasn't the first to tap. For most investors, Altria's nearly 5% dividend yield represents the most attractive element of the company's stock, and the capital appreciation that has lifted Altria shares during the years is just gravy.

Rite Aid gained less than 1%, but that was enough to lift the drugstore chain to its best levels since 2001. The No. 3 player in drugstores has surprised its critics by soaring from its financial-crisis lows, as many investors believed that high debt levels would eventually doom Rite Aid to failure. But through a combination of store expansion and remodeling, a successful loyalty program to entice customers into making repeat visits, and building up a lucrative partnership to bring lower-cost generic drugs into its stores, Rite Aid has built up positive momentum, and that could be sufficient to justify even today's lofty price levels.

Dan Caplinger owns shares of Apple. The Motley Fool recommends Apple. The Motley Fool owns shares of Apple. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.