With the yellow stuff climbing more than 12% last year, gold investors, in general, had reason to rejoice. Usually, the movements in gold-oriented companies' stocks are highly correlated. There are always outliers, though -- gold stocks that far exceed (or lag) the price of gold. And in 2017 it was no different.

Shareholders of several companies -- royalty and streaming companies like Franco-Nevada Corp. (NYSE:FNV), and gold miners like Kinross Gold (NYSE:KGC), Gold Fields Limited (NYSE:GFI), B2Gold (NYSEMKT:BTG), and IAMGOLD (NYSE:IAG) -- had portfolios that ended 2017 a little more lustrous than when the year began.

A gold bar lies next to a stack of gold coins.

Image source: Getty Images.

Breaking records and beating expectations

The strong performance of B2G's stock in 2017 can be traced back to the beginning of the year, when the company reported its fiscal 2016 earnings. For one thing, the company reported record annual consolidated gold production of 550,423 ounces. Breaking more records, it reported an all-time-high consolidated gold revenue of $683.3 million on record sales of 548,281 ounces; furthermore, there was a record $412 million in operating cash flow for the year.

Later in the year, unexpected good news about the Fekola mine in Mali reinvigorated investors' enthusiasm. Commencing commercial gold production one month ahead of schedule, the Fekola mine exceeded management's expectations for the amount of gold produced. Whereas the original forecast for fiscal 2017 gold production at Fekola was for 45,000 ounces to 55,000 ounces, management announced, in December, the expectation that production would be between 100,000 ounces and 110,000 ounces.

BTG Chart

BTG data by YCharts.

No shovels required

Franco-Nevada keeps the lights on by providing up-front payments to gold-mining companies; in exchange, it receives the rights to purchase the mined metal at present prices, or to receive a percentage of mineral production from a mine. This leaves Franco-Nevada less susceptible than gold miners to the significant capital costs of sustaining operations at a mine.

The company had no blockbuster announcements during the year that helped to drive shares higher. To the delight of shareholders, however, 2017 marked the 10th consecutive year in which Franco-Nevada has increased its dividend. This distinguishes the company from its peers, since many gold-oriented companies offer either nominal dividends or none at all.

During the year, the company also mitigated risk by further diversifying its portfolio. Although gold accounts for about 70% of its revenue, Franco-Nevada is making increasing investments in oil and gas assets. Spending about $300 million in fiscal 2017, the company acquired three royalties related to oil and gas.

Out of Africa

Located in South Africa, Gold Fields Limited operates eight mines in Peru, Ghana, Australia, and South Africa. The company suffered several blows in the first quarter: There were two deaths and several falls of ground (the unexpected and uncontrolled release of debris and rock) at the South Deep mine. The company, consequently, faced restricted access to high-grade areas and haulage infrastructure. But, reporting earnings for the first half of the year, Gold Fields indicated that operations were back on track. Management, moreover, affirmed fiscal 2017 gold production guidance of 315,000 ounces.

Gold nuggets on a wooden table

Image source: Getty Images.

During the H1 2017 earnings report, management affirmed other aspects of the company's fiscal 2017 guidance: attributable equivalent gold production of 2.1 million ounces to 2.15 million ounces, and all-in sustaining costs (AISC) between $1,010 per gold ounce and $1,030 per gold ounce.

Investors were also encouraged through the second half of the year as Wall Street took kindly to the stock, which received upgrades from analysts at Goldman Sachs and Deutsche Bank.

Looking for the yellow stuff in the Great White North

Highlights for IAMGOLD in 2017 included the development of projects in the company's pipeline. In June, management announced the results of a prefeasibility study for its Cote Gold project in northern Ontario. According to the study, the project has proven and probable gold reserves of 5.9 million ounces, and is estimated to achieve annual gold production of 320,000 ounces over a mine life of 17 years. Further supporting the optimism around the project, Cote Gold is forecast to have AISC of $689 per gold ounce and an after-tax internal rate of return of 14%.

Addressing other organic growth prospects, IAMGOLD provided a reserve and resource update for the Rosebel mine. Whereas the mine had 2 million ounces of attributable reserves at the end of 2016, it has 3.5 million ounces -- an 80% increase -- as of the end of the third quarter.

Learning more about Mauritania

Beating analysts' earnings expectations, Kinross Gold delighted investors in May -- shares climbed 27% in the month -- when it released first-quarter earnings. But the most notable news from the company in 2017 was about its organic-growth projects. In September, Kinross announced its decision to proceed with the Phase Two expansion of its Tasiast mine in Mauritania. Combined with the Phase One expansion, the Phase Two expansion is expected to result in average annual gold production of 812,000 ounces, at AISC of $655 per ounce. Phase One and Phase Two are expected to begin production in Q2 2018 and Q3 2020, respectively.

In addition to the Tasiast, Kinross announced its intent to pursue development of the Round Mountain Phase W project in Nevada. Among other things, Phase W includes construction of a new heap leach pad and the relocation of some existing infrastructure. The project is expected to add gold production of 1.5 million ounces over the life of the mine, and has an estimated internal rate of return of 13%.

Gold investors: take care

Soaring more than 30% through 2017, these five companies -- B2G, Franco-Nevada, Gold Fields, IAMGOLD, and Kinross Gold -- all exceeded the 12% rise in the price of gold in 2017. Besides the increased price of the yellow stuff, a number of other factors benefited their stocks. But even though these stocks gleamed brighter than their peers, investors must exercise extreme caution before considering any positions, since investing in gold is fraught with risk.

Scott Levine has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.