The market is forward-looking, but investors who earn better-than-average returns often look even further into the future and identify opportunities that are currently being overlooked. That means, among other things, buying shares of companies that are lagging the market but can bounce back over the midterm and beyond.

Here are two great examples: Novo Nordisk (NVO 2.60%) and Merck (MRK 1.80%). These two drugmakers have been battered and bruised recently, but they can still deliver competitive returns.

Physician prescribing medicine to patient.

Image source: Getty Images.

1. Novo Nordisk

Novo Nordisk has lost significant market value due to an increasingly competitive landscape in its core therapeutic areas: diabetes and weight management. However, the company has near-term and long-term catalysts that could help it bounce back and perform well during the next 10 years.

Over the next 12 months, Novo Nordisk should earn approval for an oral version of its obesity therapy Wegovy, having already submitted regulatory applications in the U.S.

It could be the first oral GLP-1 to earn the green light as a weight management therapy. This would be meaningful: Pills are easier to store, transport, and manufacture. They are also easier on patients who don't like needles.

A cheaper, more accessible, and less painful option would be a meaningful addition to the market, helping Novo Nordisk's sales move in the right direction.

The pharmaceutical company has also earned approval for Wegovy in treating metabolic dysfunction-associated steatohepatitis (MASH). It became only the second Food and Drug Administration-approved medicine in this indication, where there is a significant unmet need.

Rezdiffra, the first to earn that honor, achieved it last year and is now generating over $200 million in quarterly sales, so it has an annual run rate of nearly $1 billion already for its producer, Madrigal Pharmaceuticals. Wegovy should see similar success in MASH.

Now, for the catalysts that could power Novo Nordisk over the long run: The company has several promising mid- and late-stage programs. These include its investigational triple agonist, or a medicine that mimics the action of three separate gut hormones. None currently exists in the diabetes or weight management market, but this approach could significantly boost efficacy.

The company also has another oral weight-loss medicine in phase 3 studies.

Novo Nordisk's pipeline is deep and should yield some clinical and regulatory success in the next five years, allowing it to generate strong financial results. The company might be down right now, but holding on to it through the next decade is still a great idea.

2. Merck

Merck is facing issues. The company's best-selling product by far, cancer drug Keytruda, will face a patent cliff in the U.S. in 2028. And its HPV vaccines, Gardasil and Gardasil 9, have seen declining sales this year due to weak demand in China.

Those are Merck's two biggest growth drivers, so this hardly paints a bright picture for the company's future. However, the market has factored in those obstacles, and its stock is down significantly over the past 18 months.

The good news is that the drugmaker has a plan to move beyond these problems. Merck is projecting that sales of its vaccines will rebound in the second half of 2025 and will continue growing through the next few years.

As for Keytruda, the company earned approval for a subcutaneous version of the medicine that is just as effective while decreasing active prep and monitoring time for physicians. This newer formulation should attract some of the old version's patients and help smooth out losses from biosimilar competition.

Merck's newer launches will also be important. These include Winrevair, a medicine with a novel mechanism of action for the treatment of pulmonary arterial hypertension. Beyond that, the company has 80 programs in phase 2 or phase 3 studies, and at least a few of those will eventually lead to brand-new product launches.

So Merck might struggle over the next year or two, but investors looking beyond that should seriously consider the stock. It could generate strong returns over the next decade.