What happened

Extending the 8% rise that they experienced in July, shares of Pretium Resources (NYSE:PVG), a global leader in gold mining, climbed more than 21% last month, according to data from S&P Global Market Intelligence. In addition to the company's glittering Q2 earnings report, the rise in the price of gold through August moved investors to pick up shares of the midtier gold producer.

So what

With revenue of $113 million and adjusted earnings of $0.09 per share in the second quarter, Pretium Resources beat analysts' estimates on both the top and bottom lines. But these headline figures were hardly the only two ways in which the company shined.

For one, the company reported gold production of 90,761 ounces. Investors familiar with the company may find this disconcerting considering it reported gold production of 111,340 ounces in Q2 2018. However, the drop in gold production didn't stem from an operational misstep but a decline in grade.

Gold nuggets on a wooden table.

Image source: Getty Images.

Whereas Pretium reported an average grade of 14.9 grams per metric ton (g/t) in Q2 2018, it reported an average grade of 8.9 g/t in the recently completed quarter. Management, however, insists that the grade will improve through the second half of the year, and it reaffirmed 2019 gold production guidance of 390,000 to 420,000 ounces. Should the company report at the midpoint of this range, it will represent a 7.7% increase over the 376,012 ounces that the company reported last year.

In regard to costs, Pretium reported all-in sustaining costs (AISC) of $940 per gold ounce in the second quarter. While this is higher than management's 2019 AISC forecast of $775 to $875, the company remains optimistic that the higher grade that will be mined in the second half of the year will help achieve its cost guidance.

And since there is a strong correlation between movements in the price of gold and the stock prices of gold-mining companies, we'd be remiss to not acknowledge the 7% rise in the price of gold during August -- a notable uptick considering its price inched 1.3% higher in July.

Now what

While Pretium's optimism regarding gold production and the management of costs through the rest of 2019 moved shareholders last month, I'll be paying close attention to the company's ability to generate strong cash flow and improve its financial health, two feats that management predicts it will accomplish in the coming quarters. On the conference call, for example, Tom S.Q. Yip, the company's CFO, stated the company's belief that, "For the remainder of 2019, with higher production, we will continue to generate significant cash to enable debt repayments ahead of schedule."