What happened

The price of gold rallied about 1% today, closing at a nearly one-month high of $1,484 an ounce. That uptick sent most gold stocks soaring. Leading the way were Harmony Gold (HMY -1.65%), Sibanye-Stillwater (SBSW), and Coeur Mining (CDE -2.30%), which all rallied around 10% on the day.

So what

The main factor driving up the price of gold today were comments by President Trump on the status of the trade agreement with China. He said that it might be better to wait until after the election to conclude a trade deal. Those comments spooked the market, increasing concerns that the countries might not reach an agreement. That caused investors to flock to safe-haven investments like gold.

Gold nuggets on top of cash.

Image source: Getty Images.

With the price of gold rising, it boosted the value of gold mining companies since they stand to make more money on their output. That was certainly the case for Coeur Mining during the third quarter. The company realized an average of $1,413 per ounce of gold it sold, which was an 11% improvement from the prior quarter. Add that to a 16% increase in volumes, and the gold and silver miner generated $11.3 million in free cash flow during the quarter, double its level in the prior quarter. Given that gold is even higher now after today's rally, Coeur Mining's free cash flow could continue surging during the fourth quarter, which is why its stock is rallying.

Harmony Gold also benefited from higher gold prices during its fiscal first quarter. The company received an average of $1,449 an ounce, well above the $1,315 it sold its gold for during the prior quarter. That surging price helped boost Harmony's revenue by 20% in that period.

Sibanye, likewise, is benefiting from higher gold prices. That's not only increasing its earnings but also helping reduce the company's leverage. Its EBITDA rocketed 240% during the third quarter due in part to a 26% year-over-year improvement in the price of gold. Because of that, it's on track to hit its leverage target of less than 1.0 times net debt to adjusted EBITDA if gold prices remain around that level. That could potentially allow Sibanye to reinstate a dividend in the second half of next year.

Now what

A delay in the trade deal between the U.S. and China could cause economic growth to slow next year. Those concerns are driving up the price of gold, benefiting gold stocks. If those fears continue growing, the sector could keep rallying.