Image source: Getty Images.

Gold-mining stocks have been hot commodities this year. The stock of leading gold miner Barrick Gold (GOLD 1.44%), for example, has more than doubled since the start of the year. It is just one of many gold producers up by triple digits this year. Many of these producers, however, have fallen on hard times recently, with Barrick and fellow gold producers Silver Wheaton (WPM -0.51%) and Hecla Mining (HL 0.95%) down sharply since peaking:

SLW Chart

SLW data by YCharts.

The recent beating could be a buying opportunity if gold prices rebound. That said, if gold has farther to fall, then these stocks could continue to give back their gains. Here's a look at the bull and bear case for the price of gold and what these scenarios could mean for gold stocks. 

The bear case

After peaking at more than $1,350 an ounce earlier this summer, gold has lost its luster, falling more than $100 an ounce. Driving this sell-off is the growing consensus that the U.S. Federal Reserve will raise interest rates before the year is out. According to a recent survey, traders priced in a 70% chance that the Fed will raise rates at its December meeting, up from 66% the prior week. This belief that the Fed will boost rates is driving the U.S. dollar higher and pushing gold lower.

If that forecast comes true, then it is entirely possible that gold could continue to drop as short-term investors abandon their gold positions. That would push gold producers lower because they stand to make less money on their production going forward. For example, last quarter Silver Wheaton's average cash cost per ounce of gold was $401 while it sold its gold at $1,267 per ounce, netting it a margin of $866 per ounce. If the price of gold continues to sink, it will cut into that margin, putting more downward pressure on the stock.

The bull case

While a growing number of traders bet that the Fed will raise rates, it is possible that it could surprise by standing pat. Any of several catalysts could emerge and force it to hold rates steady, including a string of disappointing economic and employment numbers, surprising election results, or a significant sell-off in global markets. Also, even if the Fed does raise rates, it could signal that it is reluctant to raise rates much further in the future, which might cause gold prices to rally. 

A rebound in the price of gold would be just the fuel gold producers need to restart their stock price rallies. That is because these companies would also benefit from internal factors such as rising production and falling costs. Silver Wheaton, for example, reported record gold sales last quarter due to ramping production at its Salobo mine. Overall, its gold production was up 40% while its realized gold price was up 6%, which when combined with other factors, drove its cash flow up 23% year over year. With Silver Wheaton recently increasing its stake in Salobo, it gives it even more upside if gold goes higher.

Hecla Mining, likewise, benefited from the duel fuels of rising gold prices and production last quarter. Its gold production surged 41% to a new record thanks to the addition of the San Sebastian mine. That rising production when combined with a 5% increase in its realized gold price and other factors helped drive Hecla Mining's adjusted EBITDA up a remarkable 164% last quarter. The continuation of those two catalysts could push its earnings up even higher in the future.  

Barrick Gold, on the other hand, is working hard to drive its costs lower to boost its margins. After initially aiming for all-in sustaining costs between $775 to $825 an ounce for 2016, the company now expects its costs to fall to an average of $750 to $790 an ounce. Because of that, Barrick Gold would see its margins expand even more if gold resumes its rally.

Investor takeaway

For gold bulls, there's reason to believe that the recent slump in gold prices could be a buying opportunity in Barrick Gold, Hecla Mining, and Silver Wheaton. That is because it is possible that the market could get the Fed's next move wrong, which would reignite a rally. That said, if gold continues to slump, all bets are off because these producers would likely continue to sink even though their falling costs and rising production would mute some of the impacts of a weaker price.