NEW YORK - A surprisingly strong housing report helped push the stock market mostly higher Wednesday, while weak earnings reports from Intel and IBM weighed on the Dow Jones industrial average.

Even though the two tech giants disappointed, overall earnings results have come in much better than some investors had feared, said Dan Veru, chief investment officer at Palisade Capital Management in Fort Lee, N.J.

"Everyone is breathing a sigh of relief that things aren't all that bad," Veru said. "That's what you see happening now."

The Dow edged up 5.22 points to close at 13,557, barely managing its fourth straight day of gains. The broader Standard & Poor's 500 index gained 5.99 points to 1,460.91.

Better results from Mattel, Goldman Sachs, and Johnson & Johnson shot the stock market higher Tuesday. For the week, the Dow is up 1.7 percent and the S&P 500 is up 2.3 percent.

Heading into this earnings season, FedEx, Caterpillar and other global heavyweights had warned investors that China's slowing economy and Europe's ongoing debt crisis would weigh on quarterly profits.

Analysts still expect that third-quarter earnings for companies in the S&P 500 will shrink for the first time since 2009.

IBM reported sales late Tuesday that missed Wall Street's expectations. On a call with analysts, IBM's chief financial officer said the company faced "more challenging" market conditions in September, the final month of the quarter, as cautious customers and a weakening euro undercut its results. IBM's stock sank $10.37 to $200.63.

Without IBM's drop, the Dow would have been 79 points higher.

The Commerce Department said Wednesday that builders broke ground on building new single-family houses and apartments at the fastest pace since July 2008.