Stocks rose more than 1 percent on Tuesday, primed by a market that was oversold on a technical basis and better-than-expected retail sales data that helped trigger a relief rally.
The move put the S&P 500 on track for its best daily percentage gain since mid-March, though analysts said the market's recent weakness could be far from finished.
U.S. retail sales declined for the first time in 11 months in May, but the fall was less than forecast, giving some respite from recent weak economic data. China data also helped to ease worries about global growth.
The market gained broadly after six weeks of declines, though the S&P retail index <.RLX> , up 2.2 percent, outperformed other areas. Energy also outperformed, with the S&P energy sector <.GSPE> up 2 percent as oil prices rose.
Strategists said the bounce reflected technical conditions that signaled the market was oversold on a short-term basis.
It's like pressing down on a spring. You can only press it down so far before you get a bounce back, said Jeffrey Saut, chief investment strategist for Raymond James Financial, in St. Petersburg, Florida.
Since 1995, the S&P has gone down six straight weeks in a row only six times. After every one of them, there has been a very strong, throwback rally from a very oversold, compressed S&P 500.
The Dow Jones industrial average <.DJI> was up 142.70 points, or 1.19 percent, at 12,095.67. The Standard & Poor's 500 Index <.SPX> was up 18.06 points, or 1.42 percent, at 1,289.89. The Nasdaq Composite Index <.IXIC> was up 40.99 points, or 1.55 percent, at 2,680.68.
Expectations for further selling this summer remained high among some investors.
Many investors are eyeing a retreat in the S&P 500 to its March low near the 1,250 level. The index closed flat on Monday after hitting a near three-month low last Friday.
That level could be seen as a near-term bottom and attract additional buyers, analysts have said.
The S&P 500 is down about 7 percent from its high in early May as recent weak data sparked worries about the sustainability of an economic recovery.
On the Nasdaq, Bruce Zaro, chief technical strategist, Delta Global Asset Management in Boston, looked for a break below the March low of 2,620, though he said the index could test the 2,460-2,480 range in the months ahead.
In a sign that individual investors may be losing confidence in the stock market, customer trading slowed substantially last month, with more clients money moving into cash and out of stocks and other areas, according to brokerage Charles Schwab Corp
In China, inflation was still a concern after consumer prices rose at their fastest pace in almost three years, but industrial output grew from a year ago, in line with forecasts. China's central bank increased the reserve requirement ratio for commercial lenders by 50 basis points.
People that were saying 'hard landing for China'-- so far the numbers don't show that, Saut said.
Options expiration this week also could generate more volume and amplify stock moves as traders adjust their hedges. Such dynamics can lead to pinning where a stock or index closes at or around its corresponding at-the-money option strike.
(Reporting by Caroline Valetkevitch; Editing by Leslie Adler)