NEW YORK - The stock market closed slightly higher as investors responded 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.