Stocks closed higher in thin trading Friday, with all three major indexes log their best weekly gains this year, amid optimism that euro zone leaders would move closer to tackle the region's ongoing debt crisis, including a recapitalization of Spanish banks over the weekend.
“Bipolar markets here," said Alan Valdes, director of floor operations at DME Securities. "Yesterday, the market did not like what it heard from Bernanke. And today, we’re getting rumors out of Europe that Spain may get a bailout, which is lifting the market and the President spoke today begging for some action out of Congress."
“And don’t forget—next week is Quadruple Witching!” he added.
The Dow Jones Industrial Average rallied for a fourth-straight day led by Wal-Mart , which hit a 12-year high earlier in the session.
The S&P 500 and the Nasdaq also ended higher. The CBOE Volatility Index, widely considered the best gauge of fear in the market, dropped near 21.
For the week, the Dow surged 3.59 percent, the S&P 500 jumped 3.72 percent, and the Nasdaq soared 4.04 percent. All 30 Dow components logged gains for the week, led by Home Depot and BofA .
All 10 S&P sectors also finished in the black this week, led by financials and materials.
Facebook rallied to close above $27 a share, but still finished lower for the week. Meanwhile, UBS said its losses on Facebook trading may be as high as $350 millionand the firm is preparing legal action against Nasdaq as a result, sources told CNBC.
Spain will "formulate a request for aid exclusively for banks recapitalization," according to ECB Vice President Vitor Constancio in remarks aired by Portugal's Radio Renascenca, adding that "everything is possible," when asked whether the request may happen Saturday.
The news comes after Fitch downgraded Spain's sovereign ratingby three notches to 'BBB' on Thursday, citing urgent need for bank recapitalization. And an IMF report showed Spain's troubled banks need a cash injection of at least 40 billion euros($50 billion).
European shares fellfollowing a disappointing trade report from Germany and amid jitters over Spanish banks.