Drugstore chain Rite Aid (RAD 5.26%) was clobbered in Thursday's trading after the company reported that fiscal 2015 sales would be hindered by rising drug costs and that guidance was coming down by $0.02 on the top end and $0.01 on the bottom line. In isolation, the market reaction looks like a typical overreaction, and indicates that long-term investors could get in on the stock at a discounted price. Rite Aid has been in turnaround mode for the past couple of years, and the stock has skyrocketed well beyond its dirt cheap valuation in 2012. Does this week's discount give bargain-hunting investors another shot at the stock?

Short story
As an investor in Rite Aid stock, the fact that full-year earnings may come in a bit lower than previously expected is perhaps frustrating, especially if one recently bought the high-flying security. On the other hand, if one views themselves as a long-term part-owner of Rite Aid's business, the fact that drug prices will keep pressure on margins in the near term is of little to no concern for the ultimate success of the company.

The news simply does not affect the long-term value of the company, and says nothing about the operating business. Whether that implies that the shares are on sale is a different story.

A buy?
Rite Aid's return to the good graces of the market is a product of a few trends, mainly the recovery in the company's margins. With such slim operating and profit margins, Rite Aid can make tiny, incremental improvements in its pharmacy and front-of-store business and achieve tremendous gains on the bottom line of its income statement. Over the past several quarters, this has happened along with healthy gains in same-store sales. Management has rightfully focused on improving the store experience and competing more adeptly with the company's larger peers -- CVS Caremark and Walgreen. As a business, Rite Aid looks great and should continue to grow over the long-term with no problem.

The problem here is the market's irrational behavior, as usual. With its huge gain in capital appreciation comes a high hurdle to jump, as Rite Aid is valued at a trailing EV/EBITDA of more than 12 times and a forward P/E of 15.5 times. On the latter, the company is trading on par with CVS and cheaper than Walgreen. Beyond relative valuation, though, the company is priced to grow significantly. The lower-level margins can indeed appreciate quickly if Rite Aid is able to achieve similar margins to its major competitors, but right now that isn't the case. Investors are paying a significant premium for the business that isn't quite warranted, if price is considered paramount.

Rite Aid's business is fine and the market's sell-off over a cyclical event is irrelevant, but investors should not consider the sell-off an opportunity, as the price is still too high.