Stocks edge higher following more positive earnings surprises; Dow at record; Wal-Mart gains

U.S. stocks indexes are closing mostly higher as traders welcome more positive news on corporate earnings and deals.

Baker Hughes soared 15 percent late Thursday after a report that Halliburton was in talks to buy the oilfield services company.

The surge mitigated a slump in the energy sector brought on by the latest decline in the price of oil. Crude lost 4 percent and is trading at a four-year low as investors worry about supplies outstripping demand.

Wal-Mart Stores and media conglomerate Viacom rose after reporting results that were better than analysts were expecting.

The Standard & Poor's 500 edged up a point to 2,039.

The Dow Jones industrial average rose 40 points, or 0.2 percent, to 17,652, another record.

The Nasdaq rose five points, or 0.1 percent, to 4,680.