Wheaton Precious Metals (NYSE: WPM) and Pan American Silver (PAAS 3.74%) have a lot in common: They're both precious metals companies, deal primarily in silver, and are among the world's largest silver companies.

Yet, the returns from the two stocks in the past three years are nowhere close: While Wheaton barely managed 7% gains, Pan American shot up nearly 80% during the period. In fact, Wheaton even lagged closest rivals Royal Gold (RGLD 0.86%) and Franco-Nevada (FNV 2.02%) by big margins.

Could Pan American still mint money for investors, or is Wheaton a better bet now?

Why invest in Pan American Silver now

2015 was a transformative year for Pan American as it delivered record silver and gold production, cut costs substantially, initiated expansion at two of its largest mines, La Colorada and Dolores in Mexico, and gave out an encouraging guidance through 2018. The stock took off soon after, more than doubling in value in 2016.

A computer keyboard with a green key saying buy stock.

Image source: Getty Images.

Pan American continued to run higher in early 2017 on the back of another strong earnings report for fiscal 2016, but the euphoria didn't last long. Perhaps because the stock had run up too much too fast, and investors were wary of some production hiccups that came to light as the year progressed.

Investors missed a crucial point though: the consistent drop in Pan America's consolidated all-in sustaining costs per silver ounce sold (AISCSOS). AISC is a comprehensive measure of costs used in the precious metals industry.

In fact, Pan American has done a tremendous job of bringing its costs down in recent years, slashing its AISCSOS by more than half since 2012. What matters is that the miner sees a potential for further reduction even as it ramps up silver production over the next three years.

A chart showing Pan America's guidance for production, costs, and capital expenditures from 2018 to 2020.

Image source: Pan American.

There's another thing I like about Pan American: its balanced capital allocation. So since 2010, the miner has returned $402 million of its cumulative cash to shareholders in the form of dividends and share buybacks and reinvested $472 million into growth projects. In February, the miner increased its dividend by a whopping 40%.

Why invest in Wheaton Precious Metals now

The precious metals industry can be broadly divided into two categories: traditional miners like Pan American that own and operate mines to extract metals, and streaming and royalty companies such as Wheaton Precious Metals, Royal Gold, and Franco-Nevada that don't dig mines but buy metals from miners in exchange for funding them up front. Miners give these streamers the right to purchase metal "streams" or royalties at low prices.

Streaming and royalty is a lucrative model for two reasons: It doesn't require the kind of capital and spending that mining does, and low purchase costs translate into strong margins. Why, then, has Wheaton underperformed Pan American? The business model, ironically, could be the answer.

A silver bar standing out amid a stack of bars.

Wheaton Precious Metals isn't just a silver company anymore. Image source: Getty Images.

Mining companies have good scope to boost production and cut costs which, if followed rigorously, reflects in their bottom lines and share prices. Pan America is an example. Wheaton, on the other hand, depends on third-party miners for production, and there's not much room for cost reduction as its purchase costs are pre-determined and it doesn't incur heavy operating expenses associated with mining. Wheaton is, therefore, unlikely to spring huge surprises for shareholders.

That, in no way, means you can undermine Wheaton's potential. Wheaton is the world's largest precious metals streaming company, has agreements with top miners, is a solid cash flow generator and dividend payer, and is now increasingly diversifying into gold to boost its margins further.

That last bit could propel Wheaton to new heights in coming years as gold has historically outperformed silver, which also explains why Royal Gold and Franco-Nevada -- both of which have a larger exposure to the yellow metal -- have outperformed Wheaton in recent years.

WPM Chart

WPM data by YCharts

Wheaton's gold push and a recent deal with First Majestic Silver could boost the company's cash flows substantially in coming years, as I discussed in detail here.

And the silver stock that stands out is...

For a precious metals company, cash flows matter more than net income. Wheaton generated its second-highest operating cash flow and highest free cash flow last year in the past five years. Yet, the stock has largely remained out of favor with investors and is trading at a big discount to both, Royal Gold and Franco-Nevada at 17 times price-to-cash flow.

Pan American's trailing-twelve-month cash from operations are at multi-year highs, but the stock's trading well below its five-year average P/CF at 11 times. 

Going by the visibility in growth catalysts, Pan American still looks like a better buy now, though I see a fair chance you'll make good money if you park some cash in Wheaton now for the long term as the company diversifies.