U.S. stocks rose on Thursday in the wake of higher gold prices and sales from retailers and media companies were higher than expected.

Stocks fell sharply on Wednesday, with the Dow losing over 200 points, as oil futures soared past $123 a barrel. Wal- Mart Stores Inc. surged after shoppers seeking discounted goods boosted sales. News Corp., the owner of Fox television, climbed on revenue that was lifted by advertising sales and on a gain from the sale of its stake in DirecTV Group Inc.

The S&P 500 added 414, or 0.3 percent, to 1,396.71 at 11:58 a.m. in New York. The Dow Jones Industrial Average gained 63.92, or 0.5 percent, to 12,878.27. The Nasdaq Composite Index increased 12.36, or 0.5 percent, to 2,450.85.

Wal-Mart and Costco Wholesale Corp. both surpassed estimates as shoppers bought food and clothes along with gasoline at Wal-Mart's Sam's Club and Costco. These warehouse stores sell fuel cheaper than other retailers, an attractive asset to consumers as oil continues to hit reach new records. Wal-Mart was recently up 73 cents to $57.56.

News Corp posted third-quarter revenue that topped analysts' estimates after. News Corp. said profit tripled from a year earlier, boosted by a gain from the sale of its stake in DirecTV Group Inc and revenue from advertisements for ``American Idol'' and the Super Bowl. The media company, which is controlled by Rupert Murdoch , rose 74 cents to $19.94.

Best Buy said it's going to pay $2.1 billion for half of Carphone Warehouse's stores in Europe. Best Buy shares fell 75 cents to $42.70.

Toyota Motor fell 4.6 percent after reporting a 28 percent profit fall and said year to April profits would fall due to a weak dollar and a tough U.S. auto market.

The Labor Department reported that the number of Americans filing applications for the first time fell to 365,000 from a revised 383,000 the prior week. The level of continuing claims declined by 10,000 to 3.02 million for the week ended April 26.