Gilead Sciences (GILD 0.39%) has had a great run in the stock market. The 10-year chart speaks for itself:

GILD Chart

And even after that incredible run-up, I think the company is still undervalued -- and for one key reason that the market is overlooking.

Now there are plenty of reasons to think that Gilead might be undervalued: The stock looks cheap from a valuation standpoint, at 13 times trailing-12-month earnings. It's also growing like a weed -- 2014 net income per diluted share, at $7.35, quadrupled 2013 net income per share of $1.81. And management has signaled its shareholder friendliness with a $15 billion planned stock repurchase over the next five years and a recently instituted dividend yielding 1.6%.

But I'm not talking about any of that here.

Nope, it's nothing on the balance sheet or the income statement, nothing in the pipeline or the patents, nothing that you can easily measure.

Gilead's key ace in the hole, the key attribute that could help the company drive value into the future? Management's remarkable ability to buy companies with great drugs -- an ability that, with $14.5 billion in cash, equivalents, and marketable securities on the balance sheet, I expect Gilead to use again to effect a transformation.

An incredible history
When I talk about Gilead's smart capital allocation, you probably assume I'm talking about the 2012 Pharmasset acquisition -- which yielded Sovaldi, the underlying drug for Gilead's $12 billion-plus annual Hepatitis C franchise. And I'll get there in a minute.

But first, let's head back to January 2003, when Gilead Sciences bought Triangle Pharmaceuticals for $464 million. Triangle had a number of drugs in its pipeline at the time, but one stands out: emtricitabine, also known as Emtriva, a nucleoside reverse transcriptase inhibitor used to fight HIV.

Read over Gilead's list of HIV drugs and combos today, and you'll notice most of them have something in common:

Drug Revenue (2014) Contains emtricitabine?

Atripla

$3.5 billion Yes
Truvada $3.3 billion Yes
Complera/Eviplera $1.2 billion Yes
Stribild $1.2 billion Yes
Viread $1.1 billion No

Source: Gilead 10-K

Think about that for a minute. A $464 million acquisition in 2003 yielded a drug present in combinations yielding over $9 billion in sales for Gilead last year. Over their lifetime, Gilead drugs containing emtricitabine have sold about $50 billion in total. Not all of that success is due to emtricitabine, of course, but it was clearly a component of it. Wow.

And it doesn't end there...
OK, I've delayed long enough -- let's talk about the Pharmasset acquisition. As I mentioned earlier, Gilead paid $11 billion for Pharmasset and its Hepatitis C portfolio in 2012, a transaction that many analysts claimed was too expensive. But with the acquisition of Hepatitis C cure sofosbuvir, now known as Sovaldi, Gilead transformed its business model to incorporate a massive Hepatitis C presence. Sovaldi sold $10.3 billion in 2014 -- unheard of for a drug in its first full year on the market. And Harvoni -- a combo pill of Sovaldi and ledipasvir -- sold $2.1 billion in just its first quarter on the market. This new presence in Hepatitis C enabled Gilead to double revenue and quadruple EPS in 2014.

Clearly, Gilead didn't overpay.

And although you're not always going to see home runs like Pharmasset and Triangle Pharmaceuticals, even base hits like the CV Therapeutics acquisition in 2009 have still gone pretty well for Gilead. When Gilead bought CV Therapeutics for $1.4 billion -- won't this sound familiar -- some analysts claimed that the price paid was too high. But the major drug from that purchase, cardiovascular drug Ranexa, has brought in over $2 billion in sales in the roughly six years since the acquisition, including $117 million in the most recent quarter. Not a bad deal by any stretch, even though Gilead didn't get the swift return on investment we all saw with emtricitabine and Sovaldi.

But what about the future?
Gilead is sitting on about $14.5 billion in cash, equivalents, and marketable securities as of the most recent quarter. I believe management will use that money to make another transformative acquisition -- something that will build out an already impressive pipeline even further. There are a few clues as to what sort of deal Gilead is seeking. Here's what President and COO John Milligan had to say at the Goldman Sachs Healthcare Conference earlier in June (quote courtesy of S&P Capital IQ):

So both for cancer and for inflammatory disease, we don't have a cornerstone molecule, the kind of thing that we have with Viread for our HIV program, which will be replaced by TAF as the cornerstone or Sovaldi for the use in HCV. We don't yet have that, so that is the thing that we're looking for. And those things either kind of emerge from the pipeline, as I mentioned, or they can emerge from M&A if that -- we saw that kind of cornerstone product.

And Gilead has recently been particularly focused on developing cancer therapies, as evidenced by the recent FDA approval of Zydelig for a number of blood cancers and Gilead's February deal with Ono Pharmaceuticals to target B-cell lymphomas.

So, there are the clues to watch for. But John Martin, Gilead's CEO, has always managed to surprise -- and so, as a Gilead shareholder, I'm content to sit back and wait patiently, enjoying the dividend, share repurchases, massive growth, and cheap valuation, while management decides what transformative opportunity to go after next.