The stock market logged its best month in nine years in April but the advances heading into the final day of trading for May are far more modest. Still, a gain for May would mark the third straight month of advances.
Trading was choppy in the first half of the day, following disappointing news on new home sales and foreclosures, while energy shares drew support from crude oil's advance.
The government said sales of new homes edged up only 0.3% in April, less than analysts expected. A separate report showed that a record 12% of mortgage holders were behind on payments or in foreclosure in the first quarter.
Investors were also focusing on General Motors, which said a committee of bondholders agreed to a sweetened deal to erase some of GM's unsecured debt in exchange for stock. The agreement may not prevent the automaker from seeking bankruptcy court protection, but investors are eager for any signs that a reorganization would be orderly. GM shares rose 15 cents, or 13%, to $1.30.
Homebuilder stocks fell after the disappointing reports on housing and as the prospect of higher interest rates stirred worries that already weak demand will worsen. Analysts say the housing market must find a bottom before the broader economy can recover.
"We still have headwinds ahead, in terms of the housing market going down," said Michael Sheldon, chief market strategist at RDM Financial Group.
Among builders, Toll Brothers fell 58 cents, or 3.2%, to $17.44, while Beazer Homes USA fell 18 cents, or 7%, to $2.39.
In other trading Thursday, the Russell 2000 index of smaller companies rose 2.35, or 0.5%, to 492.21.
About two stocks rose for every one that fell on the New YorkStock Exchange, where volume came to 1.4 billion shares, compared with 1.3 billion shares Wednesday.
The dollar was mixed against other major currencies. Gold prices rose.
Overseas, Britain's FTSE 100 fell 0.7%, Germany's DAX index fell 1.4%, and France's CAC-40 slid 0.8%. Japan's Nikkei stock average edged up 0.1%.