By Kate Gibson

U.S. stocks on Thursday overcame most losses sparked by Wal-Mart Stores Inc.'s gloomy forecast, gaining some relief after lawmakers reached an agreement with Citigroup Inc. on a proposal intended to reduce home foreclosures.

Bouncing back from a triple-digit decline, the Dow Jones Industrial Average (DJI) ended down 27.24 points, or 0.3%, at 8,742.46.

Wal-Mart (WMT) proved the blue-chip index's greatest laggard, off 7.5%. The world's largest retailer posted lower-than-expected December sales and cut its fourth-quarter forecast. .

"Wal-Mart had been the stand-alone shining star, one of the two stocks up on the Dow last year," said Art Hogan, chief market strategist at Jefferies & Co.

"Unfortunately, like the rest of retail, it's falling into the category of being hurt by lower consumer spending. Any way you slice it, Wal-Mart is going to be a big disappointment."

The S&P 500 (SPX) gained 3.08 points, or 0.3%, to 909.73, with telecommunication services, energy and materials faring the best among the S&P's 10 industry groups.

Also turning positive, the Nasdaq Composite (RIXF) added 17.95 points, or 1.1%, to 1,617.01.

Volume on the New York Stock Exchange came to nearly 1.2 billion, and advancers outpaced decliners more than 3 to 2. On the Nasdaq, almost 754 million shares traded, and advancers led decliners 8 to 5.

In the final hour of trading, investors seemed cheered by news of a breakthrough agreement that could help curtail home foreclosures. Sen. Richard Durbin, D-Ill., hailed a decision by Citigroup to drop opposition to legislation that would give bankruptcy judges the power to eliminate some mortgage debt.

A slew of other retailers -- including Gap Inc. (GPS), Macy's Inc. (M) and Limited Brands Inc. (LTD) -- cut their profit outlooks. .

Sears Holdings Corp. (SHLD), the operator of Kmart and Sears, forecast quarterly profit above Wall Street expectations, and its shares climbed 23%.

"In contrast to Wal-Mart, the retailer [Sears] posted better-than-expected December sales figures and also guided fourth quarter earnings estimates higher," said Frederick Ruffy, options strategist at WhatsTrading.com.

Game Stop Corp. (GME) also offered a bright spot in a largely dismal holiday season, with shares of the video-game retailer climbing 13% after it reported a 10% rise in same-store sales during the 2008 holiday season. .

Crude lapses

On the New York Mercantile Exchange, crude futures fell for a third straight session amid worries the deepening economic troubles in the world's biggest oil-consuming country would further cut energy demand. .

Better-than-anticipated weekly jobless claims data did little to overshadow the disappointing retail results, and they did not alter gloomy forecasts for Friday's unemployment report.

The government early Thursday reported a drop in weekly jobless claims, but analysts said the decline was likely due to technical glitches that come with seasonally adjusting the numbers around the holidays.

"The unemployment rate and change in nonfarm payroll numbers are expected to be bad. The issue is the magnitude," said Hogan.

President-elect Barack Obama also spoke about unemployment in urging Congress to get to work on a package of new spending and tax cuts, saying the costly plan is need to head off dire consequences for the country. .

The three-month dollar Libor continued to slide, falling to 1.35% from 1.4%.

"We should expect 3-month Libor to fall below 1%, simple bond math makes it obvious. With the Fed committed to keeping short-term rates low, no expectation exists that short rates will rise anytime soon," said Tony Crescenzi, bond market strategist, Miller Tabak & Co.

Overnight in Asia, technology, energy and financial shares led regional markets lower, with the Hang Seng losing 3.8% and the Nikkei 225 slumping 3.9%. .

In Europe, stocks fell, with mineral extractors and banks taking the brunt of the losses.

Click here to go to Dow Jones NewsPlus, a web front page of today's most important business and market news, analysis and commentary. You can use this link on the day this article is published and the following day.