Stocks rose for a third day on Wednesday, hitting fresh 2009 highs in a broad-based rally following economic data that suggested a stronger-than-anticipated global recovery.

Energy and manufacturing companies were among the strongest, benefiting from data indicating improved industrial demand and a falling dollar, which makes American exports more competitive in world markets.

Shares of multinational companies gained, including General Electric Co , up 6.3 percent at $17, while shares of Exxon Mobil Corp rose 1.2 percent to $70.34. Financial companies also were top gainers, with the S&P financial index <.GSPF> up 3.4 percent.

U.S. industrial output advanced for a second consecutive month in August, while a government report showed a bigger-than-expected drop in crude inventories last week, indicating higher demand.

The economic data added to optimism about a recovery, a day after Federal Reserve Chairman Ben Bernanke said the recession was very likely over.

This is a shot in the arm for recovery. This is what we're looking for, Jack Ablin, chief investment officer at Harris Private bank in Chicago, said.

The Dow Jones industrial average <.DJI> was up 108.30 points, or 1.12 percent, at 9,791.71. The Standard & Poor's 500 Index <.SPX> was up 16.13 points, or 1.53 percent, at 1,068.76. The Nasdaq Composite Index <.IXIC> was up 30.51 points, or 1.45 percent, at 2,133.15.

The benchmark S&P index is now up 58 percent since hitting 12-year lows in early March and is up 18 percent since the start of the year. The dollar <.DXY>, meanwhile, fell near one-year lows against a basket of currencies.

The dollar continues to get pounded. That translates into higher commodity stocks, and industrials continue to be a beneficiary, of the dollar's weakness, said Michael James, senior trader at regional investment bank Wedbush Morgan in Los Angeles.

Adding to the positive tone was the latest sign that merger and acquisition activity was picking up. Adobe Systems Inc said it plans to pay $1.8 billion for Omniture Inc , whose software analyzes Web traffic. Adobe, the maker of Photoshop and Acrobat software, is looking to turn around declining sales.

Adobe was down 6.4 percent at $33.35, while Omniture advanced 26.3 percent to $21.88.

Shares of healthcare companies advanced after Democrat Senator Max Baucus said his healthcare overhaul plan can pass the Senate. A healthcare company index <.HMO> was up 2.2 percent.

On the New York Mercantile Exchange, oil futures rose 2.2 percent to $72.51 a barrel. December gold in New York hit 18-month highs, finishing at $1,020.20 an ounce on the COMEX division of the New York Mercantile Exchange. Mining company Freeport-McMoran Copper & Gold Inc gained 1.2 percent to $72.15.

Volume was above average on the New York Stock Exchange, with 1.58 billion shares changing hands, above last year's estimated daily average of 1.49 billion, while on the Nasdaq, about 2.76 billion shares traded, higher than last year's daily average of 2.28 billion.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of 5 to 1, while advancing stocks beat decliners on the Nasdaq by about 9 to 4.

(Additional reporting by Edward Krudy; Editing by Kenneth Barry)