Stocks close out a strong week

NEW YORK (CNNMoney) -- U.S. stocks moved higher Friday, capping a weekly gain, as upbeat corporate results outweighed a weaker-than-expected report on first-quarter economic growth.

The Dow Jones industrial average (INDU) rose 28 points, or 0.2%, to end at 13,228. Procter & Gamble (PG, Fortune 500) was the biggest drag on the Dow after the consumer staple company lowered its outlook for full-year earnings. The stock fell 4%.

Stocks started the week on a sour note, with a sharp selloff on Monday. But the Dow & S&P 500 have climbed for four days in a row, driven mainly by better-than-expected corporate earnings.

For the week, the Dow gained 1.5%. The S&P 500 advanced 1.8% and the Nasdaq is 2.3% higher for the week.

On Friday, the top performers on both the S&P 500 and Nasdaq were Expedia (EXPE) and Amazon (AMZN, Fortune 500). Expedia surged 23% after the travel booking website reported strong earnings late Thursday. Amazon jumped 15% after its results beat expectations and eased concerns about the online retailer's expansion.

As of Thursday, 300 companies in the S&P 500 had reported earnings, and 70% of them beat estimates, according to Capital IQ.

Overall, Capital IQ expects earnings to grow 6.6% in the first quarter, or 4.5% excluding the profit machine that is Apple (AAPL, Fortune 500).

While that would be down from the fourth quarter, such earnings growth would still suggest that "the world isn't ending," said Jack Ablin, chief investment officer at Harris Private Bank.

"The market is trading at distrust discount, and increased confidence should allow stock prices to move higher, even if earnings don't," Ablin added.

Meanwhile, the U.S. government said first-quarter gross domestic product -- the broadest measure of the nation's economic health -- rose at an annual rate of 2.2%.

The report was weaker than expected. Economists surveyed by CNNMoney forecast that GDP grew at a 2.5% rate in the first quarter, down from 3% in the fourth quarter of 2011.

"While the economy continued to grow in the first quarter, the expansion remains modest in pace and subpar from a historical perspective," said Jim Baird, chief investment strategist for Plante Moran Financial Advisors.

After Thursday's closing bell, the S&P announced that it was downgrading Spain's credit rating from "A" to "BBB+," citing numerous drags on growth and an ailing banking sector that might require further government support.

The drug giant Merck (MRK, Fortune 500) reported that its quarterly earnings jumped 8% to 99 cents per share, excluding certain charges. But the company fell short of forecasts by Thomson One Analytics projecting earnings of $1.03 per share.

Economy: A measure of consumer sentiment inched up to 76.4 in April, roughly in line with estimates. The University of Michigan Consumer Sentiment Index stood at 76.2 in March.