Stocks fell on Tuesday, as a disappointing outlook from Hewlett-Packard Co and another batch of soft U.S. data added to growing trepidation about the economy's strength.

The declines caused both the benchmark S&P 500 and Nasdaq to fall at times below their 50-day moving averages. But action was volatile, with some traders looking to catch a bounce in oversold cyclical areas of the market.

Tech stocks fell as investors sold recent winners due to unease about pockets of weakness in the U.S. economy. The PHLX semiconductor index <.SOX>, composed partly of suppliers of desktop computer chips, dropped 1.7 percent.

HP, the world's largest technology company, tumbled 7.9 percent to $36.65 after cutting its forecast due to problems stemming from Japan's earthquake and soft PC sales.

Earnings from blue chips as well as data is showing evidence of an economic slowdown, said Chad Morganlander, a portfolio manager at Stifel Nicolaus & Co in Florham Park, New Jersey. Early evidence of deterioration within the U.S. consumer is showing in numbers from Hewlett-Packard and Wal-Mart.

The Dow Jones industrial average <.DJI> lost 116.59 points, or 0.93 percent, to 12,431.78. The Standard & Poor's 500 Index <.SPX> shed 6.33 points, or 0.48 percent, to 1,323.14. The Nasdaq Composite Index <.IXIC> dropped 12.74 points, or 0.46 percent, to 2,769.57.

Some analysts have pointed to oversold conditions in cyclical areas of the market, such as energy, materials and industrials, which they say are primed for a short-term bounce.

An oversold trading rally appears poised to develop for cyclical, but a sustained multi-month outperformance trend is unlikely to develop until the third quarter, wrote Robert Sluymer, a technical analyst at RBC Capital Markets.

Data showed U.S. housing starts and permits for future home construction fell in April, pointing to prolonged weakness in the housing sector while the Federal Reserve reported factory output slumped in April as an automobile parts shortage hurt production.

The PHLX housing sector index <.HGX> declined 1.2 percent. Forest product company and homebuilder Weyerhaeuser Co lost 2.9 percent to $21.49.

Commodity-related stocks also lagged as the dollar rose on concerns about a Greek debt restructuring. The S&P materials index <.GSPM> fell 1.3 percent and the S&P energy index <.GSPE> shed 0.6 percent.

A rise in the greenback reduces the appeal of dollar-priced commodities, which become relatively more expensive. Worry over European sovereign debt is giving investors a reason to make a flight to safety to the U.S. dollar.

Shares of defensive companies, however, continued to outperform. The S&P utilities sector <.GSPU> rose 0.5 percent, boosted by a 3 percent gain in the shares of American Electric Power to $38.85.

Wal-Mart Stores Inc's stock slipped 1.3 percent to $55.36 after news the retailer's same-store sales have now fallen for two years.

Through Tuesday, of the 464 companies in the S&P 500 that have reported earnings, 69 percent have topped analysts' estimates, according to Thomson Reuters data.

(Editing by Jan Paschal)