Stocks jumped on Wednesday, driving the Dow back above the psychologically important 10,000 mark, as Federal Reserve Chairman Ben Bernanke's positive comments about the economy and unofficial data on Chinese exports spurred hopes for a global recovery.

In testimony prepared for delivery to the U.S. House of Representatives Budget Committee, Bernanke said the economic recovery appeared to be on solid footing and that while a double-dip recession can never be entirely ruled out, he expects the economy to continue growing.

Bernanke is more positive about the economy than the consensus is, at a time when some people are starting to question whether we could get a double dip, said Carl Birkelbach, chairman of Birkelbach Investment Securities in Chicago.

Chinese exports surged about 50 percent in May from a year earlier, sources told Reuters. The sharp gain would suggest the risk of a Chinese economic downturn is very small. The report, which will be officially released on Thursday, fueled a rise in global markets.

The U.S. economy is becoming more solid compared to the rest of the world, but China is still the most solid in a lot of ways, Birkelbach said. To a certain extent, rising tides there will help lift us here.

The Dow Jones industrial average <.DJI> was up 114.95 points, or 1.16 percent, at 10,054.93. The Standard & Poor's 500 Index <.SPX> was up 14.52 points, or 1.37 percent, at 1,076.52. The Nasdaq Composite Index <.IXIC> was up 36.37 points, or 1.68 percent, at 2,206.94.

The Nasdaq was helped by tech after Texas Instruments Inc said second-quarter earnings and revenue would be at the high end of its forecast on strong broad-based demand, particularly from industrial customers.

The stock gained 2.6 percent to $24.51 while the PHLX Semiconductor index <.SOXX> rose 2.9 percent.

Energy shares advanced after data from the Energy Information Administration showed that crude oil inventories fell more than expected in the last week, a positive sign for demand.

July U.S. crude futures shot up 4.1 percent, or $2.97, to $74.96 per barrel, while the S&P energy index <.GSPE> gained 2 percent.

Ciena Corp jumped 8.2 percent to $14.98 after the communications equipment maker said its second-quarter loss was narrower than expected and noted that customer spending was recovering.

In deal news, Allscripts-Misys Healthcare Solutions Inc agreed to buy Eclipsys Corp in a $1.3 billion deal. Eclipsys shares rose 2.2 percent to $18.92, while Allscripts fell 8.6 percent to $16.83.

The Fed's Beige Book summary of economic conditions around the United States will be released at 2 p.m. EDT.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)