The rally reversed Tuesday's losses, when disappointing U.S. manufacturing data and an escalation in the ongoing trade war between the U.S. and China led to a sell-off that ended a three-day winning streak for the market.
"It was maybe a little bit of an overreaction yesterday to the manufacturing numbers, so that's why we're having a bounce back today," said Karyn Cavanaugh, senior markets strategist at Voya Investment Management. "We had some good news on Hong Kong today, but just in general investors have to get used to the volatility."
The S&P 500 gained 31.51 points, or 1.1%, to 2,937.78. The Dow Jones Industrial Average 237.45 points, or 0.9%, to 26,355.47. The Nasdaq, which is heavily weighted with technology stocks, climbed 102.72 points, or 1.3%, to 7,976.88. The Russell 2000 index of smaller company stocks picked up 12.47 points, or 0.8%, to 1,484.76.
Even after finishing a turbulent August with a monthly loss for only the second time this year, the benchmark S&P 500 index is down less than 3% from its all-time high set in July. Investors have been worried that the trade war and a slowing global economy could tip the U.S. into a recession. But traders set aside those concerns Wednesday, focusing instead on geopolitical developments.
In Hong Kong, the government withdrew an extradition bill that had set off three months of protests in the region. That spurred Asian stock markets to finish broadly higher. The Hang Seng in Hong Kong surged 3.9%, its best day since November. The announcement of the withdrawal came after markets closed but reports that it was in the works sent stocks higher there during regular trading hours.
Stocks in Europe also finished higher as traders welcomed a big step taken by Britain's parliament toward passing a law that could stop Prime Minister Boris Johnson's plan to pull out of the EU on Oct. 31 with or without a withdrawal agreement. Leaving the EU without a deal that covers trade and other issues could result in economic chaos for Britain and complicate trade with member nations in the EU.
Even as the developments in Britain and Hong Kong gave U.S. stocks a lift, investors should keep in mind Tuesday's weak manufacturing activity report as yet another harbinger of an economic slowdown. "Without any sort of catalyst to help turn sentiment around we anticipate that continued weakness in the manufacturing sector is likely to bleed over into the consumer sector, which can then drag down the economy further," said Peter Donisanu, investment strategy analyst at Wells Fargo Investment Institute.
The lingering trade conflict between Washington and Beijing has roiled markets this summer. The economic uncertainty has also become a drag on companies. On Sunday, the conflict escalated as the U.S. imposed a 15% tariff on about $112 billion of Chinese products. China responded by charging tariffs of 10% and 5% on a list of American goods.
The escalation had been expected since early August when the U.S. announced plans for the new tariff measures, prompting China to retaliate. Negotiators from the U.S. and China are supposed to meet in September to continue trade talks.
While the U.S. bond market reflected investors' fears of a recession in August, there were few such signs Wednesday. Long-term bond yields fell below short-term ones in August, a so-called inversion in the U.S. yield curve that has frequently predicted previous recessions. But the long-term bond yields moved back above short-term ones on Wednesday.
The yield on the 10-year Treasury note rose to 1.47% from 1.46% late Tuesday. The yield on the 2-year Treasury note fell to 1.44% from 1.46%. Chipmakers, which have been at the mercy of trade war volatility, did much of the heavy lifting for the technology sector Wednesday. Intel rose 4.1% and Nvidia rose 2.8%. Apple, which relies on China as a key part of its supply chain, rose 1.7%.
Communication services, industrial and financial stocks also notched solid gains. Activision Blizzard climbed 4.8%, Honeywell gained 2.2% and Citigroup added 1.4%. Traders moved away from safe-play holdings, such as utilities and real estate, which lagged the market, as did the health care sector.
Investors hammered Tyson Foods' shares after the meat producer slashed its 2019 profit forecast because of commodity costs and a fire at a beef processing plant. The company and its competitors are all facing higher costs for animal feed such as corn because flooding delayed the planting season. The stock slid 7.8%.
Tapestry climbed 5.1% after CEO Victor Luis resigned from the upscale handbag maker less than a month after it warned investors about a profit slump. The company has been struggling with its Kate Spade brand, which it bought in 2017. It also owns the Coach brand.
Benchmark crude oil rose $2.32 to settle at $56.26 a barrel. Brent crude oil, the international standard, gained $2.44 to close at $60.70 a barrel. Wholesale gasoline rose 6 cents to $1.53 per gallon. Heating oil climbed 8 cents to $1.88 per gallon. Natural gas rose 8 cents to $2.45 per 1,000 cubic feet.
Gold rose $4.40 to $1,550.30 per ounce, silver rose 31 cents to $19.39 per ounce and copper rose 7 cents to $2.58 per pound. The dollar rose to 106.41 Japanese yen from 106.03 yen on Tuesday. The euro strengthened to $1.1032 from $1.0966.
AP Business Writer Damian J. Troise contributed.