Market downturns can be challenging for investors, but a great way to cope is to gain some perspective by zooming out. Equities may be in the red for the year, but they are up a good deal since the early days of the pandemic and even more so over the past five years.

For those with a long-term investing timeline, the future will look much like the past. Stocks will continue to climb. To benefit from that, it helps to buy individual stocks that can also perform well over long periods. Biotech giants Amgen (AMGN -1.73%) and AstraZeneca (AZN -0.48%) are great options. 

1. Amgen

In the second quarter, Amgen's revenue increased by an unimpressive 1% year over year to $6.6 billion. What's to blame for the company's seemingly poor performance? Part of the answer is that the company is dealing with increased competition -- sometimes of the biosimilar variety -- for some of its legacy products such as neutropenia (lack of white blood cells) treatment Neulasta and immunosuppressant Enbrel.

It's not uncommon for biotechs to deal with patent cliffs or other challenges that increase competition for their products. Amgen's long-term prospects partly depend on its ability to get new therapies to replace older ones. In early August, the drugmaker announced the acquisition of ChemoCentryx -- a rare-disease-focused biopharmaceutical company -- in an all-cash transaction valued at roughly $3.7 billion; the acquisition should close in the fourth quarter.

The key asset in this deal is Tavneos, a medicine that helps treat a rare form of vasculitis (blood vessel inflammation) and first earned approval in the U.S. in late 2021. Tavneos is also approved in Europe and Japan. Amgen's CEO, Bob Bradway, praised the therapy as "the first innovation in this space in more than 10 years and very much needed given the harsh side effects of the older treatments and the seriousness of the disease."

Amgen also thinks that thanks to its broader reach in the market, it can help facilitate and accelerate the ongoing launch of Tavneos. ChemoCentryx's management sees blockbuster potential in Tavneos in this first indication, not to mention the medicine's potential label expansions in two other rare illnesses and the fact that ChemoCentryx boasts a couple of other candidates.

Of course, Amgen hasn't relied only on acquisition to boost its lineup. In the past 18 months, it earned important approvals, including for Tezspire (which it developed in collaboration with AstraZeneca), a novel therapy for severe asthma, and Lumakras, a treatment for some forms of lung cancer.

The former addresses a dire need in an otherwise competitive market for asthma treatments, as many existing options are inadequate. Meanwhile, Lumakras was the first cancer treatment to target a mutation present in 13% of the eligible patient population. In other words, these medicines also have bright futures ahead. Amgen's recent efforts to revamp its lineup show its ability to remain relevant despite challenges to its existing products.

As a longtime leader in the biotech industry, the company is well positioned to continue innovating, improving its revenue and earnings over time, despite recent challenges. And in addition, Amgen is also a great dividend stock, adding one more reason why it is a great long-term bet. 

2. AstraZeneca

U.K.-based AstraZeneca seems to be performing well. In the first six months of the year, the company's revenue soared by 43% from the prior-year quarter to $22.2 billion. But there is one crucial caveat. These results partly reflect AstraZeneca's July 2021 acquisition of rare disease specialist Alexion Pharmaceuticals in a cash and stock transaction valued at $39 billion. Even with that asterisk, AstraZeneca is in a good place.

The company's oncology and cardiovascular, renal, and metabolism divisions -- which predate the Alexion acquisition -- saw their first-half revenues jump by 18% and 14% year over year respectively. AstraZeneca's rare disease portfolio grew its revenue by 5% compared to the year-ago period.

AstraZeneca will continue to record strong sales growth, especially as it expands its lineup. The company currently boasts 184 programs. Many are existing products seeking label expansions, but the company is also working on brand-new medicines. AstraZeneca features 17 new products in its late-stage pipeline. That is partly thanks to the Alexion acquisition.

Back in 2020, Alexion's management predicted 10 launches by 2023 and said that the company's pipeline at the time had a peak annual potential of more than $10 billion. Based on these projections and AstraZeneca's current lineup and pipeline, it is difficult to imagine sales going anywhere but up in the next few years. Beyond that, AstraZeneca will continue developing new clinical compounds and earning new approvals.

The company's top-line growth may look less impressive in the coming quarters as proper year-over-year comparisons become the norm again, but it remains an excellent drugmaker to buy and hold through our turbulent times and beyond.