The Dow Jones industrial average gained 21.57 points, or 0.2 percent, to end at 12,471.02 It was down most of the day, losing 64 points in the first hour of trading, following a spike in unemployment claims and a weak report on December retail sales.
Materials and industrial companies led the afternoon recovery. Caterpillar and Alcoa rose the most in the Dow. The S&P 500 finished up 3.02 points, or 0.2 percent, at 1,295.50. The Nasdaq composite rose 13.94 points, 0.5 percent, to 2,724.70
Stocks drove higher in the last hour and a half of trading after oil prices dropped below $100 per barrel for the first time this year. Oil fell on rumors that Europe will delay an embargo on Iran. Crude plunged $2 a barrel in just eight minutes, ending at $99.
Also pushing stocks were strong bond auctions in Italy and Spain. European markets ended mostly higher rose after Italy and Spain held highly successful bond auctions, easing worries about Europe's debt crisis. Italy's benchmark stock index rose 2.1 percent.
In Italy's first bond auction of the new year, the country was able to sell one-year bonds at a rate of just 2.735 percent, less than half the 5.95 percent rate it had to pay last month. That's a signal that investors are becoming more confident in Italy's ability to pay its debts.
Spain was able to raise double the amount of money it had sought to raise in its own bond sale as demand for its debt was strong. Both auctions were seen as important tests of investor sentiment.
Investors have been worried that Italy and Spain, the third- and fourth-largest countries in the euro area, might get dragged into the region's debt crisis. Greece, Ireland and Portugal have been forced to get relief from their lenders after their borrowing costs spiked to levels the countries could no longer afford.
The euro rose nearly a penny against the dollar, to $1.28, as worries eased about Europe's financial woes. The currency, which is shared by 17 European countries, fell to a 16-month low against the dollar the day before.
In other trading, corn futures plunged 6.1 percent to $6.12 per bushel after the government reported that supplies of the grain were higher than traders had expected. Wheat also fell 5.6 percent. An auction of 30-year Treasury bonds drew meager interest from investors as cash flowed back into European debt.
It was the latest day of quiet trading in the stock market. There have been six consecutive days with moves of less than 1 percent in the S&P 500, the quietest stretch since May.
Ralph Fogel, investment strategist and partner at Fogel Neale Partners in New York, said the moderate moves were an encouraging sign following the steep rises and sudden declines that were typical of last summer. "This is a much healthier market than we've seen."
Unemployment benefits spiked last week to the highest level in six weeks, mostly because companies let go of thousands of holiday hires, the government reported. Retail sales barely rose in December and were lower than analysts were expecting.
Despite the mixed news on the economy, investors are starting to focus on the U.S. corporate earnings season, which got under way this week with Alcoa Inc. The aluminum maker predicted stronger demand for its products this year and surprised the market with revenue that was higher than analysts were expecting.
"There's a fair amount of pessimism out there but I also think that investors are slowly becoming immune to the bad news," said Jack Ablin, chief investment officer at Harris Private Bank in Chicago. "As long as the stuff you can sink your teeth into, like corporate profit, is improving, I think it bodes well for the markets this year."
Among stocks making big moves:
— Chevron fell 2.6 percent after the world's second-largest publicly traded oil company said its income will be "significantly" below its fourth-quarter results in the prior quarter because of narrower margins on refining and selling fuels.
— CA Inc. jumped 4.3 percent. The hedge fund Taconic Capital disclosed in a regulatory filing that it has taken a 5.1 percent stake in the business software and technology company and is pressing CA to return more cash to shareholders and increase its profit margins.
— Casino operator Wynn Resorts Ltd. fell 2 percent. The company disclosed in a regulatory filing that its vice chairman has filed a lawsuit against the company. Kazuo Okada claims that Wynn has refused to give him access to records relating to a $135 million donation the company made to the University of Macau and other matters.