Stocks posted their best week since Christmas, even with a mixed finish on Friday after strong earnings from tech bellwethers IBM <ibm.n> and Intel <intc.o> contrasted with Google's <goog.o> disappointing report.

The market heads into the most hectic week so far in this earnings season after a mixed start, with some worries over revenue and growth offset by sharp cost-cutting to protect the bottom line.

For the week, the Dow rose 2.4 percent and the S&P 500 gained 2 percent as investors showed some relief that earnings didn't reflect the worst elements that battered the market in the last year, especially given the problems in the euro zone that have been weighing on investor sentiment.

For the time being, investors are pretty much taking earnings in stride. They knocked Google down this morning, but the general feeling in the marketplace is (stocks) are very undervalued at these levels, even given the marginal misses they're making in earnings, said Paul Mendelsohn, chief investment strategist at Windham Financial Services in Charlotte, Vermont.

Indeed, investors in recent weeks have been heartened by improving economic data, even though progress has been uneven. Reflecting improved economic sentiment, the Dow Jones Transportation Average, an indicator of the economy's strength <.DJT> has gained about 2 percent in each of the last two weeks.

IBM <ibm.n> lifted the Dow a day after it offered a strong outlook and results from several big-tech names signaled they were shaking off nervousness about economic growth and boosting technology spending. IBM's stock rose 4.4 percent to $188.52.

On the flip side, Google Inc <goog.o> slid 8.4 percent to $585.99. The Internet search giant's quarterly profit and revenue missed expectations on declining search advertising rates.

The Dow Jones industrial average <.DJI> gained 96.50 points, or 0.76 percent, to 12,720.48 at the close. The Standard & Poor's 500 Index <.SPX> inched up just 0.88 of a point, or 0.07 percent, to 1,315.38. But the Nasdaq Composite Index <.IXIC> dipped 1.63 points, or 0.06 percent, to close at 2,786.70.

NASDAQ UP ALMOST 3 PCT FOR WEEK

For the week, the Nasdaq climbed 2.8 percent, making this its best week in seven.

General Electric Co <ge.n> was unchanged at $19.15 after the conglomerate's revenues missed consensus forecasts. Fellow Dow component American Express Co <axp.n> fell 1.8 percent to $50.04 as it set aside more money to cover bad loans.

Intel Corp <intc.o> rose 2.9 percent to $26.38, while Microsoft Corp <msft.o> advanced 5.7 percent to $29.71. Both reported results late Thursday.

Still, in what could be seen as a more bearish sign for the earnings period, 60 percent of the S&P 500 companies that have reported results so far this earnings season have beaten profit expectations, below the 68 percent that beat estimates at this point in the reporting cycle for the third quarter and well below the 78 percent that exceeded estimates in the second quarter, according to Thomson Reuters data.

That's based on results from just 14 percent of the S&P 500 companies. But strategists say it could be a sign of what's in store for the rest of this earnings season and perhaps future quarters.

During the session, investors also kept an eye on Greece, where a bond-swap deal between the cash-strapped country and its private bondholders appeared to be close, according to sources. An agreement was deemed possible heading into the weekend. Creditors could lose up to 70 percent of the loans given to the fiscally troubled nation.

Hopes are an agreement would prevent the nation from spiraling into bankruptcy and bring some stability to the debt-strained euro zone.

Volume totaled about 7 billion shares traded on the New York Stock Exchange, the NYSE Amex and the Nasdaq, above the daily average of 6.68 billion.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of not quite 3 to 2 while on the Nasdaq, about three stocks rose for every two that fell.

(Reporting By Caroline Valetkevitch; Editing by Jan Paschal)