What happened

Shares of New Gold (NGD) dropped over 22% today after the company announced second-quarter 2018 earnings and updated its outlook for the remainder of the year. While the company received a production boost from the start up of its all-important Rainy River project, the mine is ramping up more slowly than expected and costing more than expected -- a double whammy of bad news.

That forced management to greatly increase the all-in sustaining cost (AISC) guidance for Rainy River for 2018 and to greatly reduce the company's total gold production guidance for the year. As of 1:57 p.m. EDT, the stock had settled to a 17.1% loss.

A finger pointing to a chart showing losses on a touchscreen.

Image source: Getty Images.

So what

Total gold production during the second quarter of 2018 reached 108,000 ounces compared to only 79,000 ounces in the year-ago period. That helped to lift revenue 36% year over year. But the good news stopped there.

New Gold entered the year expecting that the massive new mine at Rainy River would account for no less than 59% of total gold production for the entire year, or 330,000 ounces of the total 560,000 ounces expected at the midpoint. A slower-than-expected ramp up has changed that.

Management now expects annual production at Rainy River to fall somewhere around 230,000 ounces of gold. Total gold production is expected to drop by an equal amount, to roughly 447,500 ounces at the midpoint of the updated full-year 2018 guidance. Similarly, full-year 2018 AISC at Rainy River was increased from a midpoint of $1,040 per ounce to $1,650 per ounce, attributable to lower production volumes.

The sour news from New Gold is also weighing on shares of streaming company Royal Gold (RGLD 0.88%), which was counting on Rainy River to drive a moderate slice of its near-term growth. The streaming company's shares were down 2.7% as of 1:57 p.m. EDT.

Now what

Today's news is a reminder of the difficulty and risks involved in the business models of mining companies. Bringing new mines online is an expensive endeavor that doesn't leave much room for error. The silver lining for New Gold is that these challenges are being encountered at ramp up, which comes with a high degree of variability baked in.

While New Gold had the unfortunate luck of encountering the wrong end of the variability spectrum, correcting the issues at Rainy River should allow the company to live up to its long-term potential in time. Right now, though, it's turning into a big headache for investors.