The S&P 500 rose on Wednesday, heading for its third straight day of gains, as U.S. housing starts hit a four-year high, but weak results from tech bellwethers weighed on the Dow.

Homebuilders climbed after data showed groundbreaking on new homes jumped 15 percent in September, the quickest pace since July 2008 and a sign the housing sector was supporting the economy.

Both Intel Corp and IBM tumbled a day after they reported results, keeping the Dow negative. IBM alone caused a 66-point drag on the blue chip average.

Intel gave a weak fourth-quarter revenue outlook while IBM posted third-quarter revenue that came in under expectations. Intel dropped 2.7 percent to $21.75 while IBM lost 4.3 percent to $201.85. Both were among the biggest drags on the Dow and Nasdaq.

Bank of America swung between small losses and small gains in heavy, volatile trading after it said per-share earnings were break-even and down sharply compared with the previous year.

But M&T Bank jumped 5 percent to $102.27 after posting third-quarter results, helping to lift the KBW Bank index 1.2 percent.

Earnings among financial stocks have yielded mixed results thus far. Earlier this week, results from Citigroup and Goldman Sachs indicated improvement in the group, though those reports followed disappointments from JPMorgan Chase and Wells Fargo .

"It seems like it's a classic earnings period reaction. Either people are too exuberant and expectations are raised too high to beat when the actual number comes out or people are too pessimistic and the earnings are just not as low," said Rick Meckler, president of investment firm LibertyView Capital Management in New York.

After the housing starts report the PHLX housing index rose 3.5 percent, led by a 4.9 percent climb in DR Horton Inc to $21.69.

"The housing number gave people some confidence that maybe we are moving in the right direction economically, so it's one of those days where the glass seems half full more than half empty." said Meckler.

The S&P just notched its best two-day advance in a month, a rise of 1.8 percent, on the heels of its worst weekly decline in four months. Expectations for a disappointing earnings season, which prompted the decline, have been dampened this week as more companies post quarterly results.

The Dow Jones industrial average dropped 11.98 points, or 0.09 percent, to 13,539.80. The Standard & Poor's 500 Index gained 4.14 points, or 0.28 percent, to 1,459.06. The Nasdaq Composite Index added 2.88 points, or 0.09 percent, to 3,104.06.

According to Thomson Reuters data through Wednesday morning, earnings for S&P 500 components are expected to decline 1.7 percent from a year ago. With 14 percent of S&P companies having reported, 64 percent have beaten earnings expectations, less than the 67 percent average for the past four quarters.

Apollo Group Inc plummeted 18.2 percent to $22.49 as the S&P's biggest decliner a day after giving a weak 2013 outlook.

ASML agreed to buy Cymer , its key supplier of a light-based technology crucial to making a new generation of much smaller chips, for $2.5 billion. Cymer surged 55.9 percent to $74.55 while U.S.-listed shares of ASML shed 4.3 percent to $51.30.

(Reporting by Chuck Mikolajczak; Editing by Kenneth Barry)