Stocks surged on Tuesday, with the S&P 500 and the Nasdaq up more than 2 percent, as buyers emerged before a highly anticipated address by Federal Reserve Chairman Ben Bernanke later this week.

Technology and other growth stocks drove much of the market's gains, with the S&P Information Technology Index <.GSPF> up 2.4 percent.

A weaker-than-expected reading of the U.S. housing sector was the latest in a string of discouraging data that has raised expectations the Fed will take measures to prop up the economy.

New U.S. single-family home sales fell more than expected in July to hit a five-month low.

People are putting money on the Fed saying something and buying stocks ahead, said King Lip, chief investment officer at Baker Avenue Asset Management in San Francisco.

The Dow Jones industrial average <.DJI> was up 205.22 points, or 1.89 percent, at 11,059.87. The Standard & Poor's 500 Index <.SPX> was up 23.50 points, or 2.09 percent, at 1,147.32. The Nasdaq Composite Index <.IXIC> was up 59.04 points, or 2.52 percent, at 2,404.42.

Some have speculated Bernanke could unveil measures to revive the struggling economy, though others say he is most likely to outline gradual actions, which would fall short of a third round of quantitative easing.

Shares with historically high growth rates or expected to show strong growth were among Tuesday's leaders after getting hit hard in recent weeks, analysts at Credit Suisse said in a note. Big percentage gainers on the S&P included tech shares Nvidia and JDS Uniphase .

Growth stocks that recently have been hurt the most are doing quite well today, which is encouraging, since in a tough correction or a bear market, growth stocks with higher valuations typically tend to decline more so than the market, Lip said.

Even financials, which had been knocked lower early, turned positive, with the S&P Financials Index <.GSPF> up 1.9 percent.

UBS AG shares trading in the United States advanced 4.5 percent to $13.78. The bank said it plans to slash around 3,500 jobs in a cost-cutting measure.

But Bank of America Corp remained under pressure, with shares down 2.2 percent to $6.28, the biggest loss on the Dow, on fears of possible write-offs and the need for capital.

A lot of people are watching it now, said Joe Saluzzi, co-manager of trading at Themis Trading in Chatham, New Jersey.

People have been looking to the financials for the past couple of weeks as a sign, Saluzzi said. They've been lagging pretty much for the past couple of weeks... I think as long as there's pressure in the economy, there's going to be pressure on financials.

(Reporting by Ashley Lau; Editing by Kenneth Barry)