Generally speaking, Thursday was an up day for the stock market. But you wouldn't know that from the performance of two veteran companies on the exchange, pharmacy chain operator Rite Aid (NYSE:RAD) and longtime tech stock favorite Oracle (NYSE:ORCL).

The former took a 21%-plus hit to its share price, while the latter closed down 4% on the day. Let's take a look at what happened with the pair, and whether these price declines present buying opportunities.

Large banners on the side of a building highlighting Oracle OpenWorld event.

Image source: Oracle.

Rite Aid: The dangers of an analyst downgrade

One of the biggest stock decliners was Rite Aid, the pharmacy chain operator. Investors scuttled away from the shares after influential Deutsche Bank initiated coverage on the stock.

It probably goes without saying that the investment bank wasn't exactly bullish on the company's prospects. Deutsche Bank's analyst George Hill slapped a sell rating on the stock at a price target of $5.00 per share -- well below its price at market close on Wednesday.

Hill cited a number of factors in his downbeat analysis, including what he considers to be a dubious reliance on regional health plans and pressure from reimbursements for drug prescriptions.

For several years now, the market as a whole has not been bullish on Rite Aid save for a few brief stretches of optimism. A failed merger between it and Walgreens Boots Alliance announced in 2015 devolved into a disappointing sell-off of over 1,900 Rite Aid stores to Walgreens. A subsequent planned acquisition by supermarket chain operator Albertsons also flopped.

So Rite Aid these days is smaller, and lacks the prominence and power of its larger peers. Although some of its operational and financial metrics have risen lately, the company is still struggling to lift its revenue and mop up pools of red ink on the bottom line.

That said, the American populace is getting older. This should have positive knock-on effects throughout the broad world of healthcare. Savvy operators in niches like the pharmacy segment can capitalize on the opportunity.

But as it looks now, Walgreens and other big pharma players in this game are better positioned than the weakened Rite Aid to do so. So perhaps Deutsche Bank's harsh outlook on the stock isn't fully justified, but it highlights numerous sensible concerns about the company. Rite Aid isn't looking like an opportunistic buy even with the steep price fall.

Oracle results, CEO hiatus weigh on sentiment

The overwhelming reason for Oracle's Thursday decline was quarterly results, mixed with some potentially worrying news from the C-suite.

Oracle's Q1 revenue didn't come in quite as high as the average analyst estimate ($9.22 billion was the result, versus the anticipated $9.29 million). The non-GAAP (adjusted) net profit was more or less in line with expectations, however, at $2.76 billion ($0.81 per share).

Perhaps more of a concern was the unexpected news that co-CEO Mark Hurd is temporarily withdrawing from the company because of what the company vaguely described as "health related reasons." Investors tend to favor steadiness and consistency in the performance of their companies, particularly when they've been Big Cheeses in their industry for years. Such is the case with Oracle.

What also doesn't help is Oracle's reliance on big share buybacks, which to some feel like gimmicky and expensive ways to goose per-share earnings. In its Q1 release, the company said it has authorized another $15 billion for the purpose.

Still, the dip feels like an overreaction to these recent happenings. Oracle is still, in my opinion, doing well in its long transition to a provider of cloud-based services. It has made several clever acquisitions in potentially high-growth segments, and it has the capital, experience, and client base to exploit the presented opportunities. I would certainly consider buying Oracle on this slump.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.