US stocks rose in a volatile session on Wednesday, led by a rebound in biotechnology stocks, putting the S&P 500 on track for its sixth day of gains out of the last seven.
Materials shares were higher, helped by rising gold and silver prices.
Investors' focus is slowly turning to earnings, and Yum! Brands was the S&P's biggest loser after reporting weak sales out of China, which accounts for more than half of its revenues.
Yum! slumped 19 per cent, while McDonald's, which also has a large exposure to China, fell 0.5 per cent to $101.12.
The S&P health index, up 1.1 per cent, was the biggest gainer. A selloff in healthcare and biotech stocks had weighed on the market on Tuesday.
"On days where investors are looking for fallen angels, healthcare helps fill that equation today," said Art Hogan, chief market strategist at Wunderlich Securities in New York.
Healthcare was led by Regeneron Pharmaceuticals and Amgen, both up more than 4 per cent. Express Scripts said it reached deals to cover two costly new cholesterol drugs produced by the two companies.
The S&P materials index rose 1 per cent and the S&P energy index was up 0.5 per cent even after US crude settled down 1.5 per cent.
Gold and silver futures have been climbing in recent sessions and are up since the end of September, giving a boost to materials shares.
Gains in US indexes, even after the reversal of an oil rally, suggest that the worst might be over for commodity prices hit by concerns about China's economy, said Warren West, principal at Greentree Brokerage Services in Philadelphia.
"We're not so worried about commodities, we think they're finding a bottom here," West said.
The Dow Jones industrial average rose 0.44 per cent to 16,864.12, the S&P 500 gained 0.51 per cent to 1,990.03 and the Nasdaq Composite added 0.63 per cent to 4,778.49.
S&P 500 companies are now expected to report a 4.4 per cent fall in third-quarter profit, the biggest decline in six years, according to Thomson Reuters data.
Twitter jumped 7 per cent after Saudi Arabian billionaire Prince Alwaleed bin Talal and his investment firm raised their stake to more than 5 per cent.
Advancing issues outnumbered declining ones on the NYSE by 2,222 to 799, for a 2.78-to-1 ratio. On the Nasdaq, 2,020 issues rose and 771 fell.
The S&P 500 index showed eight new 52-week highs and no new lows, while the Nasdaq recorded 42 new highs and 29 new lows.