NEW YORK -- Strong earnings from a pair of technology giants helped the stock market recover some of its losses Friday, a positive end to Wall Street's worst week in five months.

Microsoft and Google both beat earnings expectations, yields of government bonds ticked up and copper -- a key industrial metal -- continued its fall, losing 2 percent.

Microsoft gained 3 percent to $29.76, leading the Dow Jones industrial average higher. The software giant reported earnings late Thursday that beat analysts' forecasts and showed solid results from its Office, software tools and Xbox divisions.

Google's stock climbed 3 percent to $799.87. The leader in Internet search boosted prices for ads distributed to smartphones and tablet computers.

The Standard & Poor's 500 index rose 13.64 points to 1,555.25, an increase of 0.9 percent. The Dow rose 10.37 points to 14,547.51, a gain of 0.1 percent. The Dow spent most of the day down, pulled lower by disappointing results from IBM.

The Nasdaq composite index climed 39.70 to 3,206.06.

Traders, like everyone else, were following the news out of Boston, where police were hunting for one of two brothers suspected to be behind Monday's Boston Marathon bombings. One brother was killed in a gun battle with police overnight. But the news had no impact on markets, traders said.

Friday's slight gains couldn't overcome a tough week for the market, when both the S&P 500 and the Dow lost 2.1 percent. That's their biggest weekly drop since last November.

"Compared to the rest of the week, it looks like we're going to slide into the weekend on a quiet note," said Jim Baird, of Plante Moran Financial Advisors

By many measures, the financial markets have endured a rough five days. News that economic growth had slowed in China set off a plunge in commodity prices on Monday, leading the stock market to its worst day of the year. Gold dropped below $1,400 an ounce for the first time in two years.

The stock market bounced back the next day, then fell again on Wednesday, its third worst day this year.