Stocks edged higher on Monday, reversing early losses, as oil prices retreated from worrisome levels and new data showed continued improvement in the struggling U.S. housing market.

The S&P 500 has risen nearly 9 percent so far this year. It has been stuck in a tight range between 1,355 and 1,370 as expectations that the index is due to consolidate after the strong gains have vied against data pointing to a firmer U.S. economic recovery, including gains in the key housing and labor markets.

The benchmark index briefly rose above 1,370.58, its highest level since June 2008 and a key resistance point that could spark further gains.

Oil prices have put a brake on gains in the S&P in recent weeks, spurred higher by worries over disruptions to Middle East supplies due to sanctions against Iran along with expectations for greater demand from an improving U.S. economy.

But equities managed to rebound from initial lows as U.S. crude futures dropped 0.6 percent to $109.15 a barrel after hitting a 10-month high on Friday.

Rick Bensignor, chief market strategist at Merlin Securities in New York, said he has growing confidence that oil prices will not continue to rise without an action by Iran. The West suspects that Iran's nuclear program is aimed at producing nuclear weapons, something that Iran denies.

We had written weeks ago that we saw $105.5 to $108.5 top end of the trading range barring Iran doing something but they haven't done anything. Bensignor said. You are talking about $10 to $15 over the price of crude oil that has come in over the last two months has come in all on just talk.

Equities also got a boost after an industry group reported that contracts for home resales hit a near two-year high in January, that latest evidence that the industry may be in the beginning stages of a recovery.

The PHLX housing sector index <.HGX> climbed 1.2 percent, buoyed by a 3.7 percent advance in shares of building materials maker Owens Corning .

The economic numbers basically continue to come in well and what you have really had this year is just an absence of sellers - it's not that buyers have been so predominately bidding for stocks - so it doesn't take much to make a market go up when you have no sellers, said Bensignor.

The Dow Jones industrial average <.DJI> gained 25.46 points, or 0.20 percent, to 13,008.41. The Standard & Poor's 500 Index <.SPX> added 3.28 points, or 0.24 percent, to 1,369.02. The Nasdaq Composite Index <.IXIC> rose 6.40 points, or 0.22 percent, to 2,970.15.

Lowe's Cos , the world's second-largest home improvement chain, reported higher-than-expected quarterly sales, and its shares rose 1.6 percent to $27.58.

Through Monday morning, of the 468 S&P 500 companies that have reported earnings for the most recent quarter, 63 percent have beaten analyst expectations. More than 20 companies in the index are expected to report results this week.

Biotech stocks fell after Dendreon Corp said demand was soft for its high-priced Provenge prostate cancer treatment as the year began, and it forecast low-single-digit sales growth in the first quarter.

Dendreon slumped 18.7 percent to $12.08. The NYSEArca biotech index <.BTK> lost 1.6 percent.

(Reporting By Chuck Mikolajczak; Editing by Leslie Adler)