Stocks have taken us on a wild ride this year. Every time the market looks to be recovering, it drops again. This back and forth could last for several more weeks or months as we're still dealing with various problems, including geopolitical tensions. It may be discouraging, but having a long-term outlook helps. 

In 10 years, all the issues we currently face won't even be in the rearview mirror anymore. And if history is any guide, the stock market will be substantially up by then. That's why it pays to hold on to shares of solid companies in the meantime. Let's look at two stocks worth sticking with for the coming decade: Regeneron Pharmaceuticals (REGN 0.63%) and Jazz Pharmaceuticals (JAZZ 1.63%)

REGN Chart

REGN data by YCharts

1. Regeneron Pharmaceuticals

Regeneron's second-quarter performance did not impress. The biotech's revenue decreased by 44% year over year to $2.86 billion. However, that was entirely due to its coronavirus antibody cocktail, REGEN-COV. Regulators in the U.S. restricted the use of REGEN-COV because they deemed it unlikely to work against what has now become the most widespread variant in the country, omicron.

Excluding REGEN-COV, Regeneron's revenue increased by 20% year over year. The company's two key assets, Eylea and Dupixent, continue to perform well; Regeneron shares the rights to these products with Bayer and Sanofi, respectively. Worldwide net sales from Eylea, which treats an eye disorder called wet age-related macular degeneration, came in at $2.5 billion, 9% higher than the prior-year quarter.

Global sales of Dupixent, an eczema treatment, jumped by 40% year over year to $2.1 billion. Dupixent has earned three new indications in the U.S. this year alone, including as the first and only treatment for a skin disorder called prurigo nodularis. Dupixent's sales will continue to improve as it earns more label expansions, which is good news for Regeneron.

It's worth noting that Eylea's patents start expiring next year, meaning Regeneron could face generic competition soon. But solid new data from a phase 3 clinical trial may allow Regeneron to earn label expansions for Eylea at higher doses. The high-dose formulation of its prized medicine could help extend patent protection beyond next year.

Further, Regeneron has many other programs -- an important thing for any biotech company -- including 11 in its late-stage pipeline and many more in phase 1 or 2 clinical trials. Although Regeneron's revenue may continue to drop due to factors related to REGEN-COV, the company is building a solid lineup that should allow it to post solid financial results consistently post-pandemic. That's why it is worth holding onto its shares for the next 10 years. 

2. Jazz Pharmaceuticals 

After an over-reliance on Xyrem, a medicine for excessive sleepiness in narcolepsy patients, Jazz Pharmaceuticals recently rejuvenated its lineup. First, there is Xywav, also a treatment for excessive sleepiness in narcolepsy patients, which was first approved in 2020 and is set to replace Xyrem. One of the key differences between the two is that Xywav contains substantially less sodium.

Since sodium is linked with an elevated risk of various illnesses, including strokes, Xywav is a better option for the target market. During the second quarter, Xywav's revenue jumped by 89% year over year to $235 million. Xyrem's revenue dropped by 19% year over year to $269.4 million as a result of patients switching to Xywav.

Jazz Pharmaceuticals' newer lineup also includes cancer drugs Zepzelca and Rylaze, first approved in 2020 and 2021, respectively.

Then there is Jazz Pharmaceuticals' portfolio of cannabidiol-based approved medicines and candidates, including Epidiolex, which treats seizures associated with two rare forms of epilepsy, Lennox-Gastaut syndrome and Dravet syndrome. This medicine was first approved in 2018 and since then has earned a label expansion as a treatment for seizures associated with tuberous sclerosis complex.

During the second quarter, the company's total revenue increased 24% year over year to $932.9 million. Jazz Pharmaceuticals has 17 ongoing clinical trials. Even a modest 33% success rate should allow the company to strengthen its lineup further with new approvals or label expansions. Jazz Pharmaceuticals' products and candidates will enable it to drive solid top-line growth for many years to come.