U.S. stocks rebounded on Wednesday, pushing the Nasdaq to its best day in more than a year, as investors snapped up beaten down technology shares, while the energy sector benefited from a surge in oil prices.

A letter from Federal Reserve Chairman Ben Bernanke, in which he said the Fed was prepared to act as needed to ensure credit market troubles do not adversely affect the economy, added to investor speculation for a much hoped-for interest rate cut.

Both the Nasdaq and the S&P 500 rose more than 2 percent. Apple Inc. set the positive tone, rising 5.7 percent on buzz surrounding the expected launch of new iPods.

Shares of energy companies such as Exxon Mobil XOM.N soared as oil prices rocketed to $73.53 a barrel after a sharp drop in U.S. crude and gasoline stockpiles revived supply concerns.

The New York Stock Exchange imposed restrictions on certain automated trading programs 30 minutes before the market close as shares surged, but trading was thin ahead of the long Labor Day weekend.

Anytime you hear something out of the Fed that it is monitoring the situation, that is reassuring as the thought is that they are leaning towards a rate cut, said Bennett Gaeger, managing director at Stifel Nicolaus in Baltimore.

The Dow Jones industrial average was up 247.44 points, or 1.90 percent, at 13,289.29. The Standard & Poor's 500 Index was up 31.40 points, or 2.19 percent, at 1,463.76. The Nasdaq Composite Index was up 62.52 points, or 2.50 percent, at 2,563.16 -- its best day since June 29, 2006.

The rally gathered pace as some investors who had bet the market would fall reversed their positions, a day after worries about the impact of ailing credit markets on the economy triggered Wall Street's biggest slide in three weeks.

Apple gave one of the biggest boosts to both the Nasdaq and the S&P 500 indexes after Goldman Sachs recommended buying the tech bellwether, saying a September 5 company event would bring the almost certain launch of new iPods.

Apple shares climbed 5.7 percent to $134.08 and International Business Machines Corp., another tech leader, gained 2.3 percent to $114.57.

Exxon Mobil shares gained 2.7 percent to $85.23 on the NYSE, while an index of oil shares surged 3 percent.

The Nasdaq outperformed the S&P and Dow, helped by positive sentiment about prospects for technology companies' earnings. Seagate Technology, the world's largest maker of computer hard-disk drives, raised its profit forecast, sending its shares up 3.8 percent to $25.39.

Technology companies have had some pretty good reports so people think they have the chance to do well, and oil's above $73 a barrel so energy stocks are up, said Warren Simpson, managing director at Stephens Capital Management in Little Rock, Arkansas.

A lot of people are on vacation or at the U.S. Open, but luckily there are enough bargain-hunters around today to make the market go up, Simpson added.

But negative headlines trickling out of the credit market continued to unnerve investors. A structured investment vehicle managed by British hedge fund Cheyne Capital Management said it was seeking to restructure after being forced to start selling assets to pay down debt.

Volume was light on the NYSE, with many traders away on vacation. About 1.33 billion shares changed hands, far short of last year's estimated daily average of 1.84 billion, while on Nasdaq, about 1.65 billion shares traded, also well below last year's daily average of 2.02 billion.

Rising stocks were outnumbering falling ones by a ratio of about 7 to 1 on the NYSE and by 3 to 1 on Nasdaq.