NEW YORK -- A weak showing in home sales and a mixed batch of earnings reports kept the stock market flipping between minor gains and losses on Wall Street. With an hour left in the trading day, the major market indexes were slightly up.
A strong profit report from Procter & Gamble helped indexes start higher early Thursday, but they weakened in late morning trading after a realtor group said that the pace of contracts for new home sales had leveled off.
That turned the stocks of builders sharply lower. PulteGroup was off 3 percent, giving up an early gain. D.R. Horton fell 2 percent and Toll Brothers fell 3 percent.
In afternoon trading Thursday the Dow Jones industrial average was up five points at 13,082. It had climbed as much as 87 points earlier in the day.
The Standard & Poor's 500 rose three points to 1,412 and the Nasdaq gained six points to 2,987.
"This is a market still working through a difficult earnings season," said Jason Pride, the director of investment strategy for Glenmede, a wealth-management firm.
Pride said investors probably celebrated too much after the Federal Reserve pledged more support for the economy in early September. They overlooked shrinking economies in Europe, slower growth in China and other signs that this earnings season would be rough. In the past two weeks, they've paid for it.
"We had a party and now we're dealing with a hangover," he said. "The market is basically back to where it was at the end of August. I don't think that's unreasonable."
The stock market has been in a slump for more than a week because of the weak revenue numbers and lower profit projections that have emerged from the latest round of corporate earnings reports.
The Dow gained 127 points Oct. 16 but since then has managed only two daily gains, both of them meager. The average has lost 474 points since that last significant increase.
Among companies reporting earnings Thursday, infant formula maker Mead Johnson Nutrition plunged 10 percent after its revenue came in well below what Wall Street analysts were expecting. The company also cut its forecast for full-year earnings and its stocks slumped $6.92 to $62.59.
Profits at United Airlines declined with fewer people flying, and the company fell well short of Wall Street expectations. The stock fell 77 cents to $19.50, a loss of 4 percent.
Homebuilders fell broadly after the pace of growth in home sales slowed last month. PulteGroup, which returned to profitability in the third quarter, gave up an early gain and was trading down 51 cents at $16.94. Toll Brothers fell 93 to $34.32 and D.R. Horton fell 25 cents to $21.16.
Procter & Gamble was the biggest gainer in the Dow after the consumer products company, whose products include Tide, Gillette and Charmin, reported earnings that beat analysts' expectations. P&G rose $1.90 to $69.98.
Online game maker Zynga jumped 26 cents to $2.39 after the company reported revenue that was stronger than analysts had anticipated. The company also said it would cut costs and enter the gambling business.
Health insurer Aetna rose 38 cents to $44.33 after reporting a 2 percent gain in third-quarter earnings. Higher revenue and lower-than-expected health care claims helped the company beat Wall Street's profit expectations.
Apple and Amazon.com report earnings after the market closes.
As investors moved into stocks, they sold U.S. government bonds, sending yields higher. The benchmark 10-year U.S. Treasury note yielded 1.83 percent, up from 1.79 percent late Wednesday.