NEW YORK - Wall Street sealed the third month of its spring rally with a huge advance. The fourth month looks a little less certain.

Stocks shot higher right before the closing bell yesterday after fluctuating on a mix of economic data. Analysts said the surge was the work of short-sellers who had bet that stocks would fall and then had to rush to buy when those bets turned out to be wrong.

A jump in commodities prices, which came on expectations that an improving economy will lift demand for raw materials, also fed the advance.

Even though Wall Street ended May with a big win, it was the shakiest month of the spring rally. When trading resumes Monday, investors are expected to show more of their recent skepticism about how strong the recovery will be once the recession has ended.

New worries are weighing on investors, including climbing interest rates and a weaker dollar. Crude oil prices recently hit a six-month high above $66 a barrel, while the dollar yesterday sank to its lowest level in months against the euro and British pound. Some analysts say these developments are simply the consequence of a recovery in the economy and the financial markets, but others say the trends could threaten the economy's health in the long term.

Another more short-term obstacle is General Motors Corp.'s expected bankruptcy filing Monday. The market has been factoring in the likelihood of a GM bankruptcy for months, but investors still are unsure what the fallout might be for auto suppliers and other companies.

The Dow Jones industrial average rose 96.53, or 1.2 percent, to 8,500.33. The Standard & Poor's 500 index gained 12.31, or 1.4 percent, to 919.14, while the Nasdaq composite index rose 22.54, or 1.3 percent, to 1,774.33.

All three indexes rose sharply for the week and had their third straight monthly gain.

Yesterday's economic data were mixed. The Commerce Department's report on first-quarter gross domestic product showed the economy contracted at an annual rate of 5.7 percent, a bit more than analysts' forecasts. Also, personal spending was revised lower. But the drop in GDP was smaller than the 6.1 percent estimated last month, and the report showed corporate profits rising.

The Chicago-area purchasing executives monthly report of Midwest manufacturing activity showed a bigger decrease in May than in April. Analysts had anticipated a smaller contraction. The report is viewed as a precursor to the Institute for Supply Management's national manufacturing index, due Monday.

But the University of Michigan's index of consumer sentiment showed a larger-than-expected increase in May. Another report earlier in the week suggested an upswing in consumer confidence, too.

Oil prices have been jumping to six-month highs as the dollar tumbles. Light sweet crude rose $1.23 to settle at $66.31 a barrel on the New York Mercantile Exchange.