Stocks trimmed early gains on Wednesday to trade little changed as enthusiasm over earnings from the financial sector and Apple were tempered by caution ahead of testimony from Federal Reserve Chairman Ben Bernanke.

Not all quarterly results were strong, however. The Nasdaq fared the worst of the major indexes, weighed by shares of Gilead Sciences Inc , which missed expectations, and Yahoo Inc , which reported weak revenue.

The Dow Jones industrial average <.DJI> dipped 8.55 points, or 0.08 percent, to 10,221.41. The Standard & Poor's 500 Index <.SPX> was off 0.64 points, or 0.06 percent, to 1,082.84. The Nasdaq Composite Index <.IXIC> lost 8.55 points, or 0.38 percent, to 2,213.94.

(Reporting by Leah Schnurr; editing by Jeffrey Benkoe)