Updated 5:20 p.m.
NEW YORK - The pendulum swung again for stocks on Thursday.
The stock market got a boost on Thursday from a couple of encouraging signs that the economy could pick up after a winter slump. That wiped out a drop from the day before triggering by some unnerving news from the Federal Reserve.
Manufacturing in the U.S. expanded at the fastest pace in almost four years in February, according to a private survey by Markit. In a separate report, the Conference Board said that its index of leading indicators posted a moderate gain in January, suggesting that the economy will continue to expand in the first half of the year.
"Today's market is reflecting the fact that the economy has gone through the doldrums due to the weather and we should now see a substantial pickup," said Peter Cardillo, chief market economist at Rockwell Global Capital.
The Standard & Poor's 500 index rose 11.03 points, or 0.6 percent, to 1,839.78. The Dow Jones industrial average gained 92.67 points, or 0.6 percent, to 16,133.23. The Dow fell 89 points Wednesday after minutes from the Fed's latest meeting showed that a few policymakers raised the possibility that an increase in interest rates should come "relatively soon."
The Nasdaq composite climbed 29.59 points, or 0.7 percent, to 4,267.55.
The stock market is now close to erasing all of its losses after a volatile start to the year. Concerns about slowing growth in China and other emerging markets, as well as worries about the health of the U.S. economy, had pushed the S&P 500 down almost 6 percent for the year by the start of February.
Among individual stocks, Safeway rose after the grocer said it was in talks to put itself up for sale. The grocer's stock climbed 71 cents, or 2.1 percent, to $35.32 after the company said late Wednesday that discussions are ongoing but that it hasn't yet reached an agreement on a transaction.
Tesla Motors was also another winner after posting strong earnings and forecasting a sharp rise in sales this year. Tesla's stock jumped $16.33, or 8.4 percent, to $209.97.
Stocks moved between small gains and losses in the first hour of trading as investors weighed the data from the U.S. against a survey that showed manufacturing in China contracted for a second straight month in February.
Data showing weakness in China's manufacturing sector had pushed stocks lower in January, but on Thursday investors decided to focus on the positive news out of the U.S., and by late morning stocks moved decisively higher. The S&P 500 ended the day nine points short of its record high of 1,848.38 set Jan. 15.
After a surge of almost 30 percent in the S&P 500 in 2013, the market has become more volatile this year. Given those strong gains, stocks will struggle to climb much further this year, said Tom Karsten, an investment adviser at Karsten Advisors.
"While we may see continued economic growth, I don't think that it's powerful enough to justify that there would really be much upward possibility for equity prices," said Karsten.
Among the day's losers were Wal-Mart and oil and gas company Denbury.
Wal-Mart's stock fell $1.33, or 1.8 percent, to $73.52 after it offered a weak profit outlook, signaling that it expects economic pressures to keep weighing on its low-income shoppers around the world. The world's largest retailer also said Thursday that its fourth-quarter profit, which covers the crucial holiday season, dropped 21 percent.
Energy company Denbury Resources fell 24 cents, or 1.5 percent, to $15.95 after it posted earnings that fell short of the expectations of Wall Street analysts. The company also said that its 2014 production would likely be at the lower end of its expectations.
In government bond trading, the yield on the 10-year note rose to 2.75 percent from 2.74 percent on Wednesday. The price of oil fell 39 cents, or 0.4 percent, to $102.92. The price of gold fell $3.50, or 0.3 percent, to $1,316.90 an ounce.