Wall Street racked up its biggest one-day gain in four years on Wednesday as fears about China's economy gave way to bargain hunters emboldened by expectations the Federal Reserve might not raise interest rates next month.
Led by Silicon Valley stalwarts Apple, Amazon and Google, the surge put the brakes on a six-day losing streak that saw the S&P 500 surrender 11 percent.
In a sign that a faltering Chinese economy and slumping global financial markets could affect US monetary policy, New York Fed President William Dudley said the prospect of a September rate hike seemed "less compelling" than it was just weeks ago.
All 10 major S&P 500 sectors jumped, led by a dizzying 5.3 percent jump in the technology index, its largest one-day rise since 2009.
Some of the late-day rally was driven by short-term traders, including many who had bet the market would fall and rushed to cut their losses, said Michael Matousek, head trader at US Global Investors Inc in San Antonio.
A strong rally on Tuesday had evaporated in the final minutes of trading and turned negative.
"A lot of people were anticipating the last half of the day would roll over and fall off and that hasn't happened," Matousek said. "You could see the buying accelerating at mid-day and people saying 'I'm wrong', and starting to cover their shorts."
The Dow Jones industrial average finished 3.95 percent higher at 16,285.51.
The S&P 500 gained 3.9 percent to 1,940.51 and the Nasdaq Composite added 4.24 percent to end at 4,697.54.
Data earlier on Wednesday appeared to strengthen the case for a rise in interest rates at a Fed policy meeting on Sept 16-17.
Durable goods orders rose 2 percent in July, compared with analysts' average forecast of a 4 percent fall. Orders for core capital goods, a proxy for business investment, rose 2.2 percent in the biggest gain in 13 months.
Following weeks of concerns about demand in China for iPhones, Apple shares provided the biggest boost to the S&P 500 and Nasdaq composite index, jumping 5.73 percent to $109.69.
Up to Tuesday's close, the Dow had lost 10.71 percent in the past six trading days and the Nasdaq composite had shed 11.5 percent.
The S&P is now down 5.8 percent in 2015.
"We're still in a period of searching," said Kurt Brunner, a portfolio manager at Swarthmore Group in Philadelphia, Pennsylvania. "You have more people taking advantage of upside. But we're in for some sloppy trading and I don't think it's over today. I don't think it's a straight shot up."
The recent pummeling in US shares reduced valuations some investors had seen as pricey. The S&P 500's valuation was down to about 14.8 times expected earnings, compared to around 17 for much of 2015 and below a 15-year average of 15.7, according to Thomson Reuters StarMine data for Tuesday, the most recent available.
Google surged 7.72 percent after Goldman Sachs raised its rating to "buy" from "neutral." Amazon jumped 7.38 percent.
NYSE advancing issues outnumbered decliners 2,474 to 646. On the Nasdaq, 2,136 issues rose and 713 fell.
Underscoring the market's frailty, the S&P 500 index showed no new 52-week highs and 28 new lows, while the Nasdaq recorded five new highs and 142 new lows.
Volume was heavy, with about 10.5 billion shares traded on US exchanges, far above the 7.6 billion average this month, according to BATS Global Markets.