Stocks climbed for the second day in a row Wednesday at the end of a brutal month for the global market. Investors applauded strong quarterly results from companies including Facebook and General Motors, but U.S. stocks still finished with their worst monthly loss in seven years.
Markets in Europe, Asia and the U.S. rallied following better-than-expected results from various companies and continued hiring by U.S. businesses.
Many of the biggest gains Wednesday came from technology and internet companies and retailers, which plunged early in October as investors worried about rising interest rates and the U.S.-China trade dispute.
The Standard & Poor's 500 hadn't risen for two consecutive days since late September. It finished October with a loss of 6.9 percent, its worst since September 2011. The third quarter of this year was the best in five years for U.S. stocks, but those gains were wiped out this month. The S&P 500 is now up 1.4 percent for the year.
Stocks began sinking on Oct. 3 as interest rates rocketed higher. Even after those gains eased, investors kept selling stocks as they worried about the trade dispute and other factors that could also hurt economic growth and company profits.
Investors are that much more nervous because corporate profit growth is already expected to slow in 2019 after it jumped this year, a big portion of which stemmed from the one-time corporate tax cut.
Schroders Investment Strategist Marina Severinovsky said several different factors could help stocks over the next few weeks: corporate stock purchases are expected to increase, and U.S. President Donald Trump and China's Xi Jinping could meet next month, an opportunity for progress in U.S.-China trade talks.
"If there's any kind of movement, even a stay of execution (on tariff hikes), could be a positive for the market," she said. Severinovsky added that whatever the outcome of next week's midterm elections, stocks will probably rise once they are over.
"Markets tend to rally on certainty," she said.
The S&P 500 index rose 29.11 points, or 1.1 percent, to 2,711.74. The Dow Jones Industrial Average gained 241.12 points, or 1 percent, to 25,115.76. The NASDAQ composite jumped 144.25 points, or 2 percent, to 7,305.90.
The Russell 2000 index of smaller companies edged up 4.78 points, or 0.3 percent, to 1,511.41. Smaller and more U.S.-focused companies did even worse than the rest of the stock market in October.
Facebook had a mixed third quarter, with better-than-expected earnings and disappointing revenue. But after the company's recent losses, even that was a relief to Wall Street. After a 2.9 percent gain Tuesday, the stock rose 3.8 percent to $151.79.
Other high-flying internet and tech stocks did better. Netflix jumped 5.6 percent to $301.78 and Amazon soared 4.4 percent to $1,598.01. Apple, which held up much better than the broader stock market this month, gained 2.6 percent to $218.86.
Facebook has plummeted 30 percent since reaching a record high in late July. That same month, the social network reported weaker-than-expected user growth and said it's spending more on security, moderation and product development.
Investors worry that companies like Facebook will be subject to more regulation following several data privacy scandals as well as online election meddling from outside the U.S. Facebook is also facing harsh criticism that its platform is being used to inflame ethnic and religious conflict in Myanmar. On top of all that, high-tech stocks like Facebook have stumbled this month as investors looked for safer, steadier options.
Amazon fell 20 percent for the month, wiping out around $200 billion in market value. The tech-heavy Nasdaq skidded 9.2 percent, its biggest one-month loss since November 2008.
General Motors also did far better than expected in the third quarter as it raised prices in North America and its China division held up well. The company also moved to cut costs by offering buyouts to about 18,000 white-collar employees in North America. The stock jumped 9.1 percent to $36.59.
Bond prices dropped. The yield on the 10-year Treasury note rose to 3.14 percent from 3.11 percent.
Stock indexes overseas also tumbled in October. The Hang Seng, Kospi, CAC 40 and Mexico's Bolsa all did worse than the S&P 500. U.S. stocks had done far better than all of those indexes this year.
"The U.S. was showing extraordinary outperformance to the rest of the world, and it wasn't necessarily justifiable," said Severinovsky, of Schroeders.
The last winning streak for the S&P 500 was a three-day string of gains that ended on Sept. 20, the day of its latest record high. That was 28 trading days ago. According to Ryan Detrick of LPL Financial, that's one of the longest gaps since the Great Depression: the S&P 500 also went 28 days without a winning streak in 1970, 1994 and 2015.
Benchmark U.S. crude fell 1.3 percent, to $65.31 per barrel, in New York. Brent crude, used to price international oils, shed 0.6 percent, to $75.47 per barrel, in London.
Energy companies have lagged the market as U.S. crude has fallen 10 percent this month.