NEW YORK (MarketWatch) -- U.S. stocks reversed early losses to trade higher on Thursday, with gains in energy and technology shares helping the market overcome concerns about the economy, while congressional testimony on the Bear Stearns bailout continued.
"The market has been holding up pretty in the face of negative employment data this morning, which is taking away a potential negative surprise on the jobs report tomorrow," said Ken Tower, chief market strategist at Covered Bridge Tactical.
The market slumped Wednesday, after Federal Reserve Chairman Ben Bernanke told Congress the U.S. economy might be in recession for the first half of the year. Investors remained nervous Thursday as Bernanke and regulators answered questions on why the Fed intervened to prevent investment firm Bear Stearns from collapsing. .
"It appears that senators recognize this was an extraordinary situation and that's reassuring to the market," Tower said.
After slumping in early trade, the Dow Jones Industrial Average was up 41 points to 12,655, with 17 of its 30 components trading higher. The Dow's gains were fueled by Alcoa , Merck and financials such as Citigroup , J.P. Morgan Chase and Bank of America .
The S&P 500 declined 6.45 points to 1,374, while the technology-laden Nasdaq Composite rose 10 points to 2,371.
Leading the gains among S&P 500 sectors were energy shares, up 1.3%, followed by materials and information technology, both up 1.2%.
With the dollar losing earlier gains, crude-oil prices and commodities advanced boosting related stocks. Technology shares also gained, helped by Research In Motion's better-than-expected results.
Volume on the New York Stock Exchange topped 1.1 billion, and declining stocks ran ahead of those advancing about 4 to 3. On the Nasdaq, 612 million shares exchanged hands, and decliners edged past advancers 3 to 2.
The market had opened under pressure after the Labor Department reported first-time applications for state unemployment benefits climbed last week, hitting levels last seen in mid-September 2005. .
But stock indexes pared losses after the Institute for Supply Management's March reading of the services sector proved better than forecast, with its non-manufacturing index rising to 49.6% in March, above the 48.5% reading analysts had expected.
"Today's report is consistent with our view that the economy has decidedly slowed and has likely fallen into only a mild recession," said Lehman Brothers analyst Michelle Meyer.
The airline sector came under fire after privately held ATA Airlines closed operations and filed for bankruptcy, with the Amex Airline Index falling 0.9%. .
A downgrade of technology bellwether Cisco Systems Inc. earlier weighed on investor sentiment, with UBS expressing concern over the networking giant's orders growth in switching its recommendation to neutral from buy.
Shares of Cisco fell 2.4%.
Shares of eBay Inc. were higher, reversing earlier losses after the online auctioneer drew an upgrade to buy from neutral from Merrill Lynch.
On the New York Mercantile Exchange, crude and gold futures gained, with the oil contract up 19 cents to $105.02 a barrel and the metal contract rising $11.80 at $907.0 an ounce.
The dollar index, which measures the U.S. currency against a handful of rivals, was virtually flat at 72.22 vs. 72.24 late Wednesday. .
By Kate Gibson