Wall Street edged lower on Wednesday as investors booked profits after stocks hit new 2 1/2-year highs, but strong earnings made it likely the market would continue an upward trend.

Federal Reserve Chairman Ben Bernanke told a congressional committee that the labor market remains sluggish and he continues to believe that inflation will remain subdued. Wall Street's reaction to Bernanke's comments was muted.

Shares of Dow components Coca Cola Co and Walt Disney Co jumped after both reported strong results, helping the index outperform the broad market.

Investors at this point know that they are not going to get a bouquet of flowers from the Fed. His (Bernanke's) language was cautionary as usual, said Joseph Greco, managing director at Meridian Equity Partners in New York.

The primary trend (in the market) is that we are moving up on solid earnings, and a little bit of profit-taking on a small volume only means new bids are coming up.

The Dow Jones industrial average <.DJI> was down 14.98 points, or 0.12 percent, at 12,218.17. The Standard & Poor's 500 Index <.SPX> was down 5.53 points, or 0.42 percent, at 1,319.04. The Nasdaq Composite Index <.IXIC> was down 8.18 points, or 0.29 percent, at 2,788.87.

The market opened lower on profit-taking after the Dow logged its seventh consecutive positive finish and reached another multiyear high above the 12,200 level.

Shares of NYSE Euronext and Deutsche Boerse , two of the world's biggest exchange operators, were both halted amid speculation of a tie-up. Shares of rival exchanges rose, including The Nasdaq OMX Group up 4.6 percent at $27.02 and the CME Group up 2.7 percent to $309.23.

If the New York and German exchanges were to merge it will be good for both of them. We saw from NYSE earnings that while the earnings were good, trading volume was a bit off, so a consolidation is a natural course at this point, Greco said.

Coca Cola Co reported sharply higher quarterly earnings that met Wall Street estimates. Shares of the soft drink company rose 1.5 percent to $63.79.

Walt Disney Co reported after the bell on Tuesday a stronger-than-expected 54 percent surge in profit. Its shares were up 6.7 percent at $43.92.

Weighing on financial shares, Wells Fargo & Co dropped 1.8 percent to $33.48 on news the bank's chief financial officer will retire.

(Reporting by Angela Moon, Editing by Kenneth Barry)