What happened

Shares of Pan American Silver (PAAS 1.88%) are up 12.5% as of 12:00 p.m. EDT today after the company posted better-than-expected revenue and earnings for the second quarter.

So what

Pan American reported earnings adjusted for non-recurring gains of $0.15 per share, which were well above analyst estimates from Zacks of $0.09 per share in adjusted earnings. Pan American's $201 million in revenue also beat expectations of $189 million.

A pile of silver and gold bars

Image source: Getty Images.

Pan American attributed the earnings beat to higher commodity prices and lower selling costs. The two biggest revenue drivers were a 2% and 33% increase in the price of silver and zinc, respectively. Also, the company announced that all-in sustaining costs per silver ounce sold (AISCSOS) declined to $10.73 compared to $11.31 this time last year.

These factors, and expectation-beating progress on the company's mine expansion program, all led management to announce that its 2017 estimates for cash and AISCSOS costs will be 14% and 10% lower, respectively.

Now what

Pan American can't do anything to control commodity prices. What it can do, though, is control costs and effectively allocate capital to development projects. Based on this most recent earnings report, it is doing exactly that. With low AISC, more cash on hand than debt outstanding, and a decent slate of expansion plans expected to become operational by 2019, Pan American looks like it could do well in the coming years.