Updated from 4:10 p.m. EST

The Nasdaq Composite broke a three-day losing streak and closed higher Friday, but a decline in IBM ( IBM) left the Dow Jones Industrial Average in negative territory.

The Dow gave up 2.40 points, or 0.02%, to 12,565.53, while the Nasdaq, sharply lower the last two days, was up 8.10 points, or 0.33%, to 2451.31. The S&P 500 rose 4.13 points, or 0.29%, to 1430.50.

For the third day in a row, a technology stalwart saw its shares sell off. This time it was IBM, whose stock fell 3.3% after its latest earnings report following the close Thursday.

Software was a bright spot as IBM beat analysts' profit estimates for the fourth quarter, but hardware and microelectronics disappointed some company watchers. Revenue, like earnings, was stronger than expected at $26.3 billion, but that didn't prevent a selloff after hours.

All told, the Dow was higher for the week by 9 points. The Nasdaq, meanwhile, lost 52 points, or 2.1%, and the S&P 500 was fractionally lower.

Roughly 2.86 billion shares changed hands on the New York Stock Exchange. Advancers beat decliners by a 2-to-1 margin. Volume on the Nasdaq reached nearly 2.08 billion shares, with winners outpacing losers 3 to 2.

"The markets finished the week on a generally positive note," said Michael Sheldon, chief market strategist with Spencer Clarke LLC. "More stocks gained ground than lost ground, which is a positive. Trading has been difficult so far this year as investors have looked for the latest leadership group to emerge. Next week, we'll continue to get a large number of earning reports, which should help determine investment returns for much of 2007."

Big tech names had led the market lower the past couple of sessions. Earlier this week, it was declines in Intel ( INTC) and Apple ( AAPL) that dragged stocks lower.

Marc Pado, U.S. market strategist with Cantor Fitzgerald, said the market couldn't have asked for any better news on Thursday, even as tech tumbled, oil stocks fell and banks were flat.

"It's a perfect world and the market couldn't get anything going," said Pado. "If earnings aren't going to do it, a solid economy isn't helping, benign inflation means nothing, cheap oil fails to inspire, and an honest and open Federal Reserve chairman can't move the market, what will?"

Although the Philadelphia Semiconductor Sector Index finished the session higher by 0.5%, the index lost 5.3% during the week. Elsewhere, the Philadelphia Oil Service Sector Index ended higher by 3%, and the Dow Jones Transportation Average gained 0.8%.

Elsewhere, another big tech name, Motorola ( MOT), was out with its results, matching analysts' lowered fourth-quarter estimates and providing an in-line outlook for the first quarter. Sales in the latest quarter rose to $11.79 billion from $10.04 billion a year ago. Motorola rose 57 cents, or 3.1%, to $19.28.

Financial-services giant Citigroup ( C) also posted its numbers, and even though fourth-quarter earnings sank more than 20% year over year, they still edged past estimates. Revenue of $23.8 billion climbed 15% and topped analysts' consensus target. Citigroup tacked on 11 cents, or 0.2%, to close at $54.50.

Fellow Dow component General Electric ( GE) reported fourth-quarter earnings that were in line with estimates. Shares slipped 2.8% to $36.95, however, after GE restated its earnings going back six years to fix its accounting for interest rate swaps, wiping $343 million off earnings going back to 2001. The restatement had no effect on the fourth quarter.

Away from stocks, energy prices rebounded. Crude oil futures, which have plunged roughly 17% since the end of 2006, gained $1.51 to $51.99 a barrel. Natural gas and gasoline were also rising.

Gold rose $8.30 at $636.40 an ounce, and silver jumped 23 cents at $12.92 an ounce.

Treasuries were losing ground. The 10-year note was down 7/32 in price and yielding 4.77%, and the 30-year bond was losing 11/32, yielding 4.86%. The dollar was little changed against most other major currencies.

On the economic docket, the University of Michigan said the preliminary read on its consumer sentiment survey came in at 98.0. EST. Economists expected a reading of 92.

Overnight in Asia, Japan's Nikkei eased 0.4% to 17,310, while Hong Kong's Hang Seng was higher by 0.3% to 20,327. In Europe, London's FTSE 100 was up 0.5% to 6238. Germany's Xetra DAX was gaining 0.9% to 6747.