Wall Street stocks rose solidly for the second straight session on Wednesday, easing the losses from a bruising month following good employment data and mostly solid earnings.
The Dow Jones Industrial Average ended up one percent at 25 115.76.
The broad-based S&P 500 gained 1.1% to 2 711.73, while the tech-rich Nasdaq Composite Index won 2.0% to close at 7 305.90.
The rally lifted most industrial sectors, especially financials and technology companies. But it did not significantly dent earlier losses from the month, leaving the S&P 500 off nearly 7% for October.
"For believers in equity market seasonality, October did not disappoint with equities experiencing one of their worst drawdowns since the global financial crisis," Nathan Thooft, senior managing director at Manulife Asset Management, told AFP.
"The month was full of tricks and nightmares but seems to be ending with a treat."
Stocks have been under pressure due to a variety of factors, including worries over higher US interest rates, trade war fallout and, most recently, a potential Democratic takeover in Congress in next week's midterm elections.
But the pullback throughout the month also created conditions for bargain hunting, with stocks "oversold" following the rout, analysts said.
Facebook was a big winner, gaining 4% after reporting a 9% jump in quarterly profits to $5.1bn following much higher revenues.
Other large technology companies also advanced, including Amazon, up 4.4%, Apple, up 2.6%, and Google parent Alphabet, up 3.9%. Apple will report earnings of its own on Thursday.
General Motors surged 9.1% after reporting third-quarter profits of $2.5bn in results that bested analyst expectations by a wide margin thanks to strong operating profits in North America and China.
But Kellogg dived 8.9% after cutting its profit outlook due to higher spending on investments.