Flickr/Sean Davis

Shares of Freeport-McMoRan (FCX - Get Report) surged Thursday after UBS upgraded its rating on the U.S.-based copper mining giant's stock.

Freeport's stock price leaped 5.38% to $9.01 a share after analysts at UBS boosted their rating on the mining company to buy from neutral.

UBS contends Freeport's stock has been "oversold," with investors missing the bigger picture of long-term growth potential in favor of a short-term focus on the impact from lower copper prices.

Freeport's stock price took a hit over the summer along with other metals and mining stocks as the trade war between the United States and China escalated, only to rebound to a high of $10.76 on Sept. 13.

Thursday's surge breaks a three-week slide and comes after not just the UBS upgrade, but also renewed glimmers of hope for a potential trade deal or accommodation between the U.S. and China, the world's two-largest economies.