U.S. stocks posted their best week since Christmas, even with a mixed finish on Friday after comparatively strong earnings reports from tech bellwethers IBM and Intel Corp. contrasted with a relatively weak report from Google Inc.

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 Jones Industrial Average gained 2.4 percent and the Standard & Poor's 500 rose 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 Eurozone 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, Vt.

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, has gained about 2 percent in each of the last two weeks.

IBM 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 slid 8.4 percent to $585.99. The Internet search giant's quarterly profit and revenue missed expectations on declining search-advertising rates.

For the day, the Dow gained 96.50 points (0.76 percent) to 12,720.48, the S&P 500 inched up just 0.88 of a point (0.07 percent) to 1,315.38, and the Nasdaq Composite dipped 1.63 points (0.06 percent) to close at 2,786.70.

Nasdaq Rises Almost 3% for the Week

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

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

Intel advanced 2.9 percent to $26.38, while Microsoft rose 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 as much as 70 percent on 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 Eurozone.

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 almost 3-to-2, while on the Nasdaq, about three stocks rose for every two that fell.

(Reporting by Caroline Valetkevitch; Editing by Jan Paschal)