Stocks eke out modest gains; S&P 500 shy of record

Robert McQuade, left, works with fellow traders on the floor of the New York Stock Exchange, Wednesday, Feb. 26, 2014. The stock market is little changed as investors pick over more earnings reports from retailers and other U.S. companies. (AP Photo/Richard Drew)

NEW YORK (AP) — The stock market is closing slightly higher as investors respond to an increase in new home sales and earnings gains at major retailers.

Indexes wavered between small gains and losses for much of the day Wednesday.

The Standard & Poor's 500 index edged up a fraction to close at 1,845, three points below the record high close it set six weeks ago.

The Dow Jones industrial average rose 18 points, or 0.1 percent, to 16,198. The Nasdaq composite climbed four points, or 0.1 percent, to 4,292.

Lennar rose 4 percent and PulteGroup rose 3 percent after the government reported sales of new homes increased jumped last month at the fastest pace in more than five years.

Lowe's climbed 5 percent after the home improvement retailer reported higher earnings.