Investors are enjoying the ongoing bull run. The S&P 500 and Nasdaq Composite recently hit all-time highs. Though that's pretty exciting, bull markets don't last forever. Equities that can perform well in good times are great. Those that can perform well over the long run, through bull and bear markets, economic peaks and lows, are even better.

Let's look at two excellent stocks that ought to deliver solid returns well beyond the current bull market: Medtronic (MDT 0.62%) and Merck (MRK 0.37%).

1. Medtronic

Medtronic is a leading medical device company. The healthcare giant has a vast portfolio of dozens of products across four main therapeutic areas: diabetes care, cardiovascular health, neuroscience, and medical surgical. Medtronic also does business in more than 150 countries. While diversification can have drawbacks -- it can spread a company's resources too thin -- it also has its perks. Medtronic's diversified operations can allow it to perform reasonably well overall even when certain parts of its business aren't.

During the early days of the pandemic, the volume of elective surgeries dropped, leading to lower sales for some of Medtronic's products. The medical device specialist partly weathered the storm by ramping up the sale of mechanical ventilators that were vital in helping many critically ill patients deal with COVID-19. Still, even the pandemic aside, Medtronic's revenue and earnings haven't been growing particularly fast in recent years.

That's why the company is doubling down on high-growth areas. Diabetes care is one of them. There is a dire need for innovative products to help people manage this chronic health condition. Last year, Medtronic earned approval for the MiniMed 780G in the U.S., an insulin pump with several exciting features, including meal detection technology (the pump adjusts insulin levels as often as every five minutes based on various factors).

According to the company, the MiniMed 780G grabbed the top spot among insulin pumps in customer satisfaction. Medtronic isn't done innovating in this field. As CEO Geoff Martha recently said: "There is definitely more work to be done as we work to bring to market an even more robust ecosystem of differentiated technology for people living with diabetes, including next-generation durable pumps, smart pens, patch pumps, sensors, and algorithms."

There are many other growth areas for Medtronic to capitalize on. And, of course, the healthcare giant remains an excellent dividend stock. The company has raised its payouts for 46 consecutive years. It should become a Dividend King in the next few years. Be it for dividends or stability, Medtronic is an excellent choice considering its solid position in the healthcare industry and its proven innovative qualities.

2. Merck

Merck is going through some changes. The company's most important product, cancer drug Keytruda, was the top-selling drug in the world last year, but it will run into a patent cliff by 2028. Yes, that's still a few years away, and Keytruda's sales should continue growing until then. But replacing a medicine like Keytruda, whose annual sales exceed $20 billion -- a rarity in the industry -- takes considerable planning.

Merck has ramped up its pipeline, partly through acquisitions, to compensate. The company is expecting an important approval this year for sotatercept, a potential treatment for pulmonary arterial hypertension (PAH, high blood pressure in the lungs). Sotatercept has a novel mechanism of action, and unlike other PAH therapies, targets the underlying causes of the disease.

But sotatercept won't replace Keytruda all by itself. Some analysts estimate it will reach peak annual sales between $3 billion and $4 billion. Still, the point is, Merck is planning to add other blockbusters to its lineup. It moved eight brand-new products to phase 3 studies last year. There will be several vital approvals before Keytruda's patent exclusivity runs out. Given the company's innovative potential, Merck's biggest patent cliff shouldn't be a death sentence.

Meanwhile, Merck's financial results should move in the right direction. Last year, the company's revenue of $60.1 billion increased by just 1% year over year, though it was dragged down by a massive decline in sales of the company's COVID-19 therapy, Lagevrio. Excluding this product, revenue rose 9% year over year. The pharmaceutical giant is an excellent dividend stock, too.

Though the future might seem a bit scary because of Keytruda's patent cliff, patience should translate to robust returns for investors who hold Merck's shares for a long time.