Patients need access to medicine to treat or manage serious health conditions, no matter what state the economy is in. Drugs are effectively a recession-proof business. As a result, most pharmaceutical stocks have proven steady and some have even thrived, amid the economic crisis caused by the COVID-19 pandemic. Although the SPDR S&P Pharmaceutical Index is down by 3.94% this year, the business of medicine is here to stay.

Picking the right stocks in a sector that has little chance of disappearing will pay off in the long run. Merck (NYSE:MRK) and Eli Lilly (NYSE:LLY) are two top pharma companies worth consideration by excited investors. Merck hasn't performed well recently, with its shares down by approximately 9% since the year started. Meanwhile, Eli Lilly's stock is up by over 14% in the same period. Despite moving in opposite directions on the market, here's why you may consider parking both stocks in your portfolio for good.

MRK Chart

MRK data by YCharts

Merck is down, but not out

The COVID-19 pandemic has had a major effect on Merck's revenue this year. During the second quarter, which ended on Jun. 30, the company recorded sales of $10.9 billion, an 8% year-over-year decrease.

Merck's top line of pharmaceuticals has struggled to bring in revenue in part because social distancing measures and shifted medical resources have led to fewer in-person doctors visits and reduced patients' access to products. Sales of the company's vaccines dropped by 29% year-over-year to $1.3 billion. Despite its lapse in revenue, Merck's latest quarterly update included several bright spots.

Merck's GAAP net income rang in at about $3 billion, 12% higher than last year's quarter. The blockbuster drug Keytruda is also performing well. During the second quarter, the cancer treatment recorded $3.4 billion in sales, 29% higher than the year-ago period. The company is working toward earning new Food and Drug Administration (FDA) indications for Keytruda, so that the drug can be marketed to treat more types of cancer. The drug is currently involved in 11 phase 2/3 trials. Keytruda is set to become the world's best-selling drug by 2024, according to the research firm Evaluate Pharma.

Doctor holding a piggy bank.

Image source: Getty Images.

Merck also has exciting drug candidates in its pipeline. In January, the company got its hands on ARQ531, a potential cancer therapy, after acquiring ArQule in a cash transaction valued at $2.7 billion. Let's not forget Merck's other January deal with Taiho Pharmaceuticals and Astex Pharmaceuticals, in which Merck obtained the rights to small molecule inhibitors, which have shown success in treating cancer over conventional chemotherapy.

Merck is positioning itself to remain a leader in cancer drug development and distribution for years to come. I believe that its prudent business, drug acquisitions, and promising pipeline will eventually help the stock rebound from its woes.

Eli Lilly can keep up the momentum 

Unlike Merck, Eli Lilly's stock has outperformed the market this year despite the effects of the pandemic on sales. In their second quarter, the company's revenue of $5.5 billion declined by 2% year-over-year. This less-than-stellar performance stemmed from lower sales volume. However, a few key products have been exceptionally strong. Trulicity, a common diabetes therapy, brought in $1.2 billion in revenue, 20% higher than the second quarter of 2019.

Eli Lilly is one of the leaders in the diabetes market, thanks to Trulicity and other products such as Jardiance, Humulin, Humalog, and Basaglar. The company is projected to hold a market share of 13.8% in this space by 2022, behind only Novo Nordisk (NYSE:NVO) and its market share of 30.7%, according to Evaluate Pharma.

Beyond the diabetes segment, Eli Lilly has a hefty array of products. It boasts Olumiant, a rheumatoid arthritis treatment with sales that grew by 42% to $145 million during the second quarter. Revenue from Taltz, an immunosuppressant, increased by 12% to $395.2 million, and cancer drug Verzenio's sales jumped by 56% to $208.6 million. Eli Lilly is likely to pursue a new indication for Verzenio as a treatment for early-stage breast cancer, given positive results from a pivotal clinical trial the company announced in mid-June. The drugmaker is working to develop its rich pipeline, with more than two dozen clinical trials underway.

While Eli Lilly's stock appears expensive at the moment -- the company is trading at 21 times future earnings -- I believe the company's current valuation will be justified in the long run.

These two are here to stay

Merck and Eli Lilly market drugs that treat life-threatening and chronic diseases, and both own the rights to products with consistently growing sales. These pharma companies also have the ability to continuously add new sources of revenue thanks to their rich pipelines and collaboration agreements. The COVID-19 pandemic may have harmed Merck and Eli Lilly's businesses this year, but both companies possess the qualities that make for a solid long-term investment. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.