Stocks trimmed losses with the S&P 500 briefly turning positive in choppy trade on Thursday as gains in energy and telecom shares offset declines in banks amid persistent worries over the recession-hit economy.

Chevron was the Dow's biggest boost as the price of oil jumped after government data showed a surprise fall in crude inventories last week.

On the downside, banks dragged as investors fretted over the fate of the sector, while technology shares fell after Dow component Hewlett-Packard gave a disappointing outlook.

The Dow Jones industrial average <.DJI> was off 18.56 points, or 0.25 percent, to 7,537.07. The Standard & Poor's 500 Index <.SPX> added 0.49 points, or 0.06 percent, to 788.91. The Nasdaq Composite Index <.IXIC> was down 4.46 points, or 0.30 percent, at 1,463.51.

(Reporting by Leah Schnurr; Editing by Leslie Adler)