NEW YORK (CNNMoney) -

A plunge in Facebook's stock didn't faze the broader U.S. market Monday. U.S. stocks bounced back from their worst week of the year on renewed optimism that European leaders would find a way out of the sovereign debt crisis.

The Dow posted its biggest gain in over a month, while the S&P 500 delivered its best performance in over two months. The tech-heavy Nasdaq enjoyed its best gains of the year.

"I think it's just more of a relief rally after being down so many sessions in a row," said Dave Rovelli, managing director at Canaccord Adams. "People are looking for stocks that have sold off a bit."

Over the weekend, the Group of Eight nations met and reaffirmed their commitment to keeping Greece in the eurozone. And two opinion polls released in Greece reportedly put the pro-bailout New Democracy party ahead of the anti-austerity Syriza party.

The combination of the G8 and the poll results was enough to boost sentiment across world markets, with European and Asian stocks eking out gains and the euro holding steady at around $1.28 against the U.S. dollar.

Paul Zemsky, head of asset strategies for ING Investment Management, said the rally was the result of "a smidgen of good news in an oversold market."

"You had a tremendous amount of pessimism, but nothing bad came out of Greece this weekend," he said. "There's some optimism that perhaps the Greek people are realizing how damaging it would be for them to leave [the eurozone]."

The Dow Jones industrial average rose 135 points, or 1.1%. Blue chips, including Caterpillar, Boeing and IBM led the gains.

The S&P 500 gained 21 points, or 1.6%, and the Nasdaq rose 68 points, or 2.5%.

Shares of Facebook plunged as much as 13.7%, before finishing down 11% at $34.03, well below the $38 initial public offering price.

The sharp drop "weighed heavily" on markets at the start of trading, said Anthony Conroy, head trader at ConvergEx Group, noting that the tech-heavy Nasdaq briefly slid into negative territory.

But trading might be choppy this week as worries about Europe will continue to dominate. Elisabeth Afseth, a fixed income analyst with Investec in London, said the weeks leading up to Greece's June 17 election are likely to be volatile for both equity and bond markets.

An informal summit of European leaders is scheduled for Wednesday.

Despite Thursday's bounce, stocks are still down considerably in May, on track for the worst monthly losses since September. The Dow has finished in the red on all but three of the 15 trading days this month.

The blue chip index and the S&P 500 are off more than 5% in May, while the Nasdaq is more than 6% lower.

U.S. stocks closed lower Friday, after the euphoria surrounding Facebook's Friday IPO had worn off. All three indexes clocked their worst weekly losses of the year last week.

World markets: European stocks closed with significant gains. Britain's FTSE 100 climbed 0.9%, the DAX in Germany rose 1.1% and France's CAC 40 jumped 1%.

Asian markets ended mixed. The Shanghai Composite edged 0.2% higher and Japan's Nikkei ended up 0.3%. The Hang Seng in Hong Kong shed 0.2%.

Companies: Yahoo and China's Alibaba Group have agreed to a $7.1 billion deal, in which the Chinese Internet giant will buy back half of Yahoo's 40% stake in the company.

Speaking at a Deutsche Bank conference, JPMorgan Chase CEO Jamie Dimon said the firm would suspend its stock buyback program but would keep its dividend.

Lowe's reported better-than-expected earnings but issued mixed guidance. The stock fell 10%.

Campbell Soup posted a slight decline in earnings per share but performed slightly better than forecasts. The stock fell 2%.

Some social media stocks fell along with Facebook, though not as steeply. Zynga fell less than 1% and LinkedIn declined just 2%. But Groupon surged 7%.

Currencies and commodities: The dollar posted modest gains versus the Japanese yen, but slipped slightly against the euro and the British pound.

Oil for June delivery rose $1.09 to settle at $92.57 a barrel.