Image source: Getty Images.

Over the past decade, the iShares U.S. Pharmaceuticals ETF has risen a stunning 211%, trouncing the broad market S&P 500 benchmark's gain of about 70% over the same period.

However, long-term investors in Big Pharma stocks Merck & Co. (MRK 0.36%), and Eli Lilly (LLY -0.12%) haven't been along for the ride. Both have underperformed the S&P 500 over the same period, and for good reasons. Losses to generic competition for key products kept growth elusive as their respective pipelines struggled to keep up.

As both recently reported second-quarter earnings, however, reasons to remain hopeful have emerged. Let's look more closely at both Big Pharma stocks to see which is a more attractive investment today.

Key products and patents

Merck's single most important franchise is its type 2 diabetes treatment, Januvia. Approved in 2006, this was the first pill of its kind to indirectly stimulate insulin production by inhibiting another enzyme. In the first half, sales of Januvia, and its metformin-combined cousin Janumet, grew just 1.8% over the same period last year to $3.05 billion, or about 15.9% of Merck's total sales for the period. With the main U.S. Januvia patent expiring in 2022, Merck has approximately six years to offset its losses. Given that the franchise's growth has flatlined, this might be possible.

Image source: Merck & Co.

Meanwhile, in the first half of this year, Lilly's top three products -- Humalog, Cialis, and Alimta -- contributed a combined 35.9% of Lilly's total revenue, or $3.69 billion. That's about $4.9 million less than these key products contributed during the first half of last year, and we have reasons to expect the trio will continue falling in the quarters ahead. Major patents protecting Cialis in the U.S. and EU expire next November, and European patents protecting Alimta expired last December, with major U.S. patents to follow next January. Since fast-acting insulin injection Humalog lost patent protection in 2013, its sales have remained surprisingly flat. With a plethora of new options for treating these patients, I wouldn't expect this trend to continue much longer. 

Potential growth drivers

Now that we know what's likely to hold Merck and Eli Lilly back in the near term, it's a good time to see what might offset their impending losses. Merck is pinning its hopes on star cancer therapy Keytruda. Approved for treatment of advanced melanoma in 2014, the first-in-class PD-1 inhibitor that blocks a shut-off switch that tumor cells exploit to avoid immune-system attack, has expanded its patient population to include some lung cancer patients, and an FDA approval for treatment of head and neck cancer could come any day now.

Keytruda's sales have also expanded a whopping 193%, from $192 million in H1 2015 to $563 million in H1 2016, and 300 ongoing clinical trials across 30 tumor types should keep it climbing toward peak annual sales estimates north of $5 billion.

Over at Eli Lilly, its next-generation type 2 diabetes injection, Trulicity, has taken off since its approval in 2014. This year's first-half sales bounded forward 451% over H1 2015, to $344.9 million. 

Looking further ahead for Eli Lilly, Taltz for treatment of psoriasis launched in the U.S. this spring. It's entering a large but increasingly crowded field, and it acts on the same target as Cosentyx from Novartis, which earned FDA approval just two months ahead of Taltz. Lilly's contender could reach annual sales above $4 billion, but you'll want to keep your eyes on this drug's competition in the coming quarters.

Image source: Eli LIlly.

Even further out for Lilly is abemaciclib for treatment of a large, defined group of breast cancer patients. Recently announced results from a phase 2 trial showed an encouraging 19.7% response rate from a group of heavily pretreated patients. With about 230,000 U.S. women diagnosed with breast cancer each year, success with abemaciclib could help the company finally return to growth. You'll want to keep your eyes open for phase 3 data from ongoing abemaciclib trials in the quarters to come. 

Dividends and value

At recent prices, shares of Eli Lilly, and Merck are offering dividend yields of about 2.5%, and 3.1%, respectively. If you're looking for quickly growing income from either, you might be disappointed. Merck's annual payout of $2.04 exceeds trailing earnings of just $1.84 per share. Lilly's distribution isn't much better, with an annual payout of $1.84 equal to about 79% of its trailing earnings.

Analysts are expecting Merck to report earnings of about $3.72 per share for 2016, which puts its forward PE ratio at about 15.8 times this year's estimates. By the same yardstick, Lilly is far more expensive, with its stock trading at about 23.2 times this year's estimates.

If their dividend yields and valuations were equal, I'd be inclined to go with Merck based on its existing products' relatively limited exposure to generic competition as compared to Eli Lilly. When you toss in a lower price, and a larger dividend yield, Merck rises to the top as the better buy.