"Wal-Mart issued upside guidance for its first fiscal quarter, an upgrade at Intel by Bank of America to buy from neutral and unemployment claims, while still high, were less than expected," said Robert Pavlik, chief investment officer at Oaktree Asset Management.
The Dow Jones Industrial Average erased early losses to climb 102.27 points to 12,631.64, with all but four of its 30 components advancing.
Comments from Goldman Sachs Chief Executive Lloyd Blankfein that the credit crisis may be near the end also boosted financial stocks and helped lift sentiment in the market, according to Action Economics.
The S&P 500 Index rose 11.04 points to 1,365.59, and the technology-heavy Nasdaq Composite Index gained 36.2 points to 2,358.36, with the sector buoyed by Yahoo Inc.'s maneuvering to put more heat on Microsoft Corp. to hike its buyout bid. .
Shares of Yahoo gained 2.9%, while Microsoft's were up 1.7%.
"Bigger picture, we're still in a trading range for the most part. Folks are still trying to figure out which direction we're headed, and investors are waiting for more earnings reports to see where the economy stands and where the sectors are headed," added Pavlik.
Advancing sectors were led by consumer-discretionary shares, up 1.9%, with information technology closely behind, recently gaining 1.8%. The utility sector was off 0.6%, while energy fell 0.5%.
Early economic data revealed that the U.S. trade deficit widened sharply.
Other data had weekly jobless claims falling 53,000 to 357,000 last week. .
Volume on the New York Stock Exchange came to 1.6 billion, while 998 million shares were exchanged on the Nasdaq. On the NYSE, nearly two stocks posted gains for every issue on the decline. On the Nasdaq, advancers beat decliners 8 to 5.
Retailers released same-store sales figures for March, with companies generally producing worse than forecast results. Limited Brands Inc. , Wet Seal Inc. and Pacific Sunwear of California Inc. were among the disappointments.
Wal-Mart proved an exception, with it shares offering an early rise, recently up 1.6%, after it lifted its view on first-quarter earnings and reported a 0.7% same-store sales rise.
Shares of Wal-Mart advanced 2%.
Bed Bath & Beyond Inc. erased earlier losses to advance 2.7% after it projecting first-quarter earnings per share may be as much as 32% below forecasts.
On the New York Mercantile Exchange, oil futures fell $1.87 to $109 a barrel. .
Other action on the NYME had gold futures dropping $10.10 to $923.50 an ounce. .
Heading into Thursday's session, the Bank of England cut interest rates by a quarter-percentage point to 5%, citing "disruption in financial markets." The European Central Bank kept rates steady at 4%, while the central bank of Iceland -- known for having one of the highest interest rates in the developed world -- hiked rates by a half a point.
U.S. stocks on Wednesday saw their worst single day in two weeks after oil, gasoline and corn hit records and United Parcel Service Inc. cut its earnings outlook.
By Kate Gibson