Copper prices rose for the first time in three sessions on Thursday, as investors continued to monitor movements on China\’s volatile stock market.

Copper for September delivery on the Comex division of the New York Mercantile Exchange tacked on 1.5 cents, or 0.61%, to trade at $2.537 a pound during European morning hours. A day earlier, copper dipped 1.3 cents, or 0.53%, to close at $2.521.

The Shanghai Composite tanked as much as 2% after the open before erasing losses to end 0.5% higher. The index slumped 3% on Wednesday despite upbeat economic growth data.

Copper ticks up with China stock market volatility in focus

China’s economy expanded 7.0% in the second quarter, steady with the previous quarter and slightly better than analysts\’ forecasts for growth of 6.9%.

Data on industrial production, retail sales and fixed asset investment all beat forecasts, fueling speculation China\’s economy is regaining strength after a recent bout of weakness.

The Asian nation is the world’s largest copper consumer, accounting for almost 40% of world consumption.

Elsewhere, gold futures for August delivery shed $2.90, or 0.25%, to trade at $1,144.50 a troy ounce, while silver futures for September delivery slumped 5.1 cents, or 0.34% to trade at $14.99 an ounce.

Demand for the dollar continued to be underpinned after Federal Reserve Chair Janet Yellen reiterated Wednesday that the central bank was on track to raise interest rates by the end of the year if the economy continues to evolve as expected.

The U.S. dollar index, which measures the greenback’s strength against a trade-weighted basket of six major currencies, was near six-week highs at 97.58.