The S&P 500 added 26 points, or 1.9%, and the Nasdaq gained 65 points, or 2.2%.

The major indexes are all ended higher for the week. The Dow rose 2% for the week, the S&P added 1.7% and the Nasdaq gained 1.1%.

Friday's rally was driven mainly by "chatter" the European Central Bank will intervene in the bond market to ease borrowing costs for Spain and Italy, said Peter Cardillo, chief market economist at Rockwell Global Capital.

"Stocks are moving higher on the hopes that we finally will see some action to stabilize the situation in Europe," said Cardillo.

French President François Hollande and German Chancellor Angela Merkel said in a joint statement Friday that they are "committed to do everything to protect the eurozone." ECB president Mario Draghi said Thursday that the bank will do "whatever it takes" to preserve the euro.

Draghi will meet this weekend with officials from the German central bank, which has resisted buying bonds in the secondary market, ahead of next week's policy meeting, according to Bloomberg. The wire service said Draghi is pushing a plan to buy bonds, lower interest rates and offer additional liquidity to European banks.

While the report was slightly better than expected, the outlook for growth remains lackluster as the weak job market curtails consumer spending. Many traders expect the Federal Reserve, which also meets next week, to take additional steps to stimulate growth.

"We've learned that you never fight the Fed when they want to get something done and have the ammunition to do it," said Anthony Conroy, head trader at BNY ConvergEx Group.

Economy: The Thomson Reuters/University of Michigan's final reading on the overall index on consumer sentiment fell to 72.3 in July from 73.2 in June. It was the lowest level since December.

Economists had expected the index to remain unchanged in July at 72, according to a survey of analysts by Briefing.com.

Companies: Facebook (FB) shares fell to an all-time low after the social network company's first quarterly earnings release as a public company. Facebook beat analysts' revenue expectations slightly and earnings matched forecasts, but that was apparently not enough for Wall Street.

Merck (MRK, Fortune 500) shares rose after the pharmaceutical company beat earnings and sales expectations and affirmed its outlook for the year.

Del Frisco's (DFRG), a high-end steakhouse chain, raised $75 million in its initial public offering late Thursday, as shares priced at $13, below the range of $14 to $16. The stock finished its first day on the Nasdaq unchanged.