Stocks bounced on Tuesday with major indexes rising more than 2 percent as investors jumped into the market before a highly anticipated address by Fed 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 1.9 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.

I don't think anybody wants to be too short or negative in front of Bernanke's speech on Friday, said Jim Awad, managing director at Zephyr Management in New York.

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.

The sharp gains follow a rough few weeks of trading in which equities were heavily battered by concerns of another U.S. economic recession and the worsening euro zone debt crisis.

A magnitude 5.9 earthquake centered in Virginia struck the U.S. East Coast, the U.S. Geological Survey said. The tremors were felt on the floor of the New York Stock Exchange, a spokesman said, but business was not disrupted.

The Dow Jones industrial average <.DJI> was up 195.65 points, or 1.80 percent, at 11,050.30. The Standard & Poor's 500 Index <.SPX> was up 22.97 points, or 2.04 percent, at 1,146.79. The Nasdaq Composite Index <.IXIC> was up 62.55 points, or 2.67 percent, at 2,407.93.

Since the selloff stocks have bounced between gains and losses, looking for direction, which many say will be driven by signals from Friday's meeting of central bankers in Jackson Hole.

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 technology shares Nvidia Corp and JDS Uniphase Corp .

It looks like they're forming a bottom here, said Frank Pavilonis, senior market strategist at retail brokerage firm Lind-Waldock in Chicago. Confirmation would be if we (the S&P 500) close above 1,200.

Even financials, which had been knocked lower early, turned positive, with the S&P Financials Index <.GSPF> up 1.9 percent. American Express Co and JPMorgan Chase & Co were the top gainers on the Dow. American Express shares rose 3.1 percent to $45.99, while JPMorgan shares advanced 3 percent to $34.41.

UBS AG shares traded 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 3.1 percent at $6.21 on fears of possible write-offs and the need for capital.

(Additional reporting by Edward Krudy; Editing by Padraic Cassidy)