Stocks rose on Tuesday, as sales of previously owned U.S. homes fell less than expected in February, while the industrial and technology sectors buoyed the market.

Heavy equipment maker Caterpillar Inc gained 3.3 percent to $61.75 and ranked as the Dow's top advancer. Wells Fargo raised its 12- to 18-month price target on the stock to a range of $73 to $75 from $63 to $65.

The National Association of Realtors said sales fell to an annual rate of 5.02 million units in February. The decline, which was less than forecast, highlighted the fragility of a housing recovery.

At the same time, home builder KB Home posted a wider-than-expected quarterly loss, pushing its stock down 3.8 percent to $16.77. The Dow Jones home construction index <.DJUSHB> fell 0.8 percent.

On the Nasdaq, Integrated Silicon Solution Inc shares surged 18.2 percent to $8.85 after the company raised its second-quarter revenue and earnings outlook at the close of the previous session.

We seem to be in an nice updward drift ... going into quarter end. (There) appears to be anticipation of strong first-quarter earnings, said Fred Dickson, chief market strategist at D.A. Davidson & Co. in Lake Oswego, Oregon.

The Dow Jones industrial average <.DJI> was up 39.98 points, or 0.37 percent, at 10,825.87. The Standard & Poor's 500 Index <.SPX> was up 1.94 points, or 0.17 percent, at 1,167.75. The Nasdaq Composite Index <.IXIC> was up 4.52 points, or 0.19 percent, at 2,399.91, after earlier hitting a 52-week high at 2,402.63.

If the Nasdaq ends above the 2,400 mark on Tuesday, it will be its first close above that level since late August 2008.

The semiconductor index <.SOXX> was up 1.5 percent, with dominant chip maker Intel Corp contributing the most to the Nasdaq's gain. Intel was up 1.2 percent at $22.51.

First-quarter reports are expected to begin in earnest next month, and forecasts call for year-over-year gains.

Housing has remained among the weakest areas of the economy, and analysts say the sector's recovery will be slow.

Our view is that housing is bottoming and beginning a slow improvement, but we're going to bounce along the bottom for a while. It won't be any different from the previous cycle in the 1980s, said Henry Smith, chief investment officer of Haverford Trust Co in Philadelphia.

Among the home builders, one bright spot was Lennar , up 1.5 percent at $16.55 on the New York Stock Exchange.

Healthcare stocks ranked among the laggards after President Barack Obama on Tuesday signed into law the landmark healthcare reform bill approved late Sunday by the U.S. House of Representatives .

The Morgan Stanley Healthcare Payor index <.HMO> dropped 1.3 percent, and Centene Corp , a smaller insurer that specializes in Medicaid plans, slipped 1.4 percent to $23.80.

Elsewhere in the market, Baidu Inc jumped 3.2 percent to $598.12 on Nasdaq after rival Google Inc shut down its mainland Chinese portal and began rerouting searches to its Hong Kong operation.

(Reporting by Caroline Valetkevitch; Additional reporting by Leah Schnurr; Editing by Jan Paschal)