The S&P 500 flirted with bear-market territory earlier this year. Although it has mostly recovered, plenty of companies are still dealing with issues that have led to poor performances. Some of them have excellent prospects, though, making their current situations a great opportunity for investors to buy their shares at a discount.
Let's consider two stocks that meet these criteria: Alphabet (GOOG 1.74%) (GOOGL 1.69%), and Merck (MRK -0.92%). Here is why these corporations are worth investing in at current levels.

Image source: Getty Images.
1. Alphabet
Alphabet's problem isn't its financial results; in that department, the company is performing well. First-quarter revenue rose 12% year over year to $90.2 billion, while earnings per share came in at $2.81, almost 49% higher than the year-ago period.
Some of Alphabet's issues come from regulators. Due to an antitrust lawsuit in the U.S., the company risks losing its popular Chrome browser. While that would harm its financial performance, there's still no guarantee that the loss will happen.
And even if it does lose Chrome, you can expect a deeply profitable company like Alphabet -- which generated a massive $74.9 billion in free cash flow over the trailing-12-month period -- to navigate around that issue.
Meanwhile, the tech giant has several important growth avenues, including cloud computing, artificial intelligence, and streaming (thanks to its YouTube platform). Alphabet's cloud computing and YouTube businesses ended 2024 with a combined annual run rate of $110 billion, matching management's guidance. That accounted for about 31% of the company's revenue in 2024.
So these segments grant Alphabet significant growth opportunities. Furthermore, the company has a strong moat due to both the network effect and switching costs.
The stock's forward price-to-earnings (P/E) ratio is 18, compared to the 18.9 average for communication services stocks. Although that makes it seem like Alphabet is reasonably valued, I believe a company of this stature is worth a hefty premium given its growth opportunities, strong moat, and consistent earnings and cash flow.
At current levels, the stock appears to be a steal.
2. Merck
Merck's shares have declined significantly over the past year. The market is worried that its crown jewel, cancer medicine Keytruda, will finally meet its match. Keytruda has earned scores of indications across many different types of cancer, and reigns supreme in non-small cell lung cancer, where it's approved to treat patients with a PD-L1 protein overexpression.
New market entrants, particularly Summit Therapeutics' ivonescimab, could challenge Keytruda. The market has factored that risk into Merck's share price, and then some: Its recent forward P/E is 8.8, a bit over half the healthcare industry's average of 15.8.
The good news for investors is that Merck's stock looks like a no-brainer at these levels. For one thing, it will be a little while before ivonescimab hits the market in the U.S., and even longer before it earns enough indications to match Keytruda's.
Elsewhere, Merck is already looking for its next oncology star -- a way for the company to mitigate the threat from ivonescimab. In November, it signed a licensing deal with China-based LaNova Medicines for LM-299, a promising cancer medicine. Like ivonescimab, LM-299 is a bispecific antibody, an area of the oncology market that seems to be growing rapidly.
Merck has plenty of candidates of its own. It boasts more than 80 programs in phase 2 or phase 3 studies. Even with a 25% success rate for these, that should translate to plenty of brand-new approvals or label expansions in the coming years.
Finally, Merck is an excellent dividend stock. It has increased its payouts by 88.8%, and offers a forward yield of 4.1%. That makes Merck a strong choice for value and income investors who are willing to hold onto its shares for an extended period.