NEW YORK, Feb 12 (Reuters) - U.S. stocks edged higher on Tuesday, with the S&P 500 holding near multi-year highs ahead of President Barack Obama’s State of the Union address, as housing stocks advanced.

The economy will be a major topic of Obama’s speech before a joint session of Congress set for 9 p.m. (0200 GMT Wednesday). Investors will listen for any clues on a deal with Republicans to avert automatic spending cuts due to take effect March 1, including the tone of the speech.

The S&P 500 has risen in the past six weeks and is up 6.7 percent so far this year. But gains have been harder to come by since the benchmark S&P index hit a five-year high on Feb. 1. The market has had to consolidate strong gains at the year’s start while investors search for reasons to drive stocks higher.

“It is a drift higher here, it certainly seemed like we were stalled out for awhile,” said Tim Ghriskey, chief investment officer of Solaris Group in Bedford Hills, New York.

“There are a lot of people looking for some type of pullback, some type of profit-taking, and often when everybody is looking it simply doesn’t happen.”

Housing shares helped lift equities in the latter portion of trading, led by a 14.4 percent jump in Masco Corp to $20.35 after the home improvement product maker posted fourth-quarter earnings and said it expects new home construction to show strong growth in 2013. The PHLX housing sector index rose 4.3 percent.

The White House has signaled Obama, in his speech, will urge U.S. investment in infrastructure, manufacturing, clean energy and education. He is also expected to call for comprehensive trade talks with the European Union.

Coca-Cola Co shares fell 2.9 percent to $37.51 and were the biggest drag on the Dow after the world’s largest soft drink maker reported quarterly revenue slightly below analysts’ estimates, hurt by a weaker-than-expected performance in Europe.

With earnings season starting to wind down, Thomson Reuters data through Tuesday morning shows of the 353 companies in the S&P 500 that have reported earnings, 70.3 percent have exceeded analysts’ expectations, above a 62 percent average since 1994 and 65 percent over the past four quarters.

Fourth-quarter earnings for S&P 500 companies are estimated to have risen 5.3 percent, according to the data, above a 1.9 percent forecast at the start of the earnings season.