U.S. stocks fell on Tuesday, with the S&P 500 and the Nasdaq falling below their 50-day moving average, as a negative outlook from Hewlett-Packard Co and weak U.S. economic data raised jitters about the state of the recovery.

Tech stocks fell as investors sold recent winners due to unease about pockets of weakness in the U.S. economy.

HP, the world's largest technology company,

cut its financial forecasts because of problems stemming from Japan's earthquake, soft PC sales and lowered expectations for its service business. HP's stock was down 6.5 percent at $37.21.

U.S. housing starts and permits for future home construction fell in April as an overhang of homes on the market discouraged builders. The report pointed to prolonged weakness in the housing sector.

Separately, the Federal Reserve reported factory output slumped in April as an automobile part shortage hurt production, showing the economy was off to a weak start in the second quarter.

This shows that we are kind of losing momentum ... and it is certainly disturbing considering that we are nearing the end of QE2, said Jack Ablin, chief investment officer at Harris Private Bank in Chicago, referring to the U.S. monetary stimulus program known as QE2.

The Dow Jones industrial average <.DJI> was down 61.83 points, or 0.49 percent, at 12,486.54. The Standard & Poor's 500 Index <.SPX> was down 4.02 points, or 0.30 percent, at 1,325.45. The Nasdaq Composite Index <.IXIC> was down 12.87 points, or 0.46 percent, at 2,769.44.

The fall by the S&P 500 and Nasdaq below their 50-day moving average could be a technical signal of more losses to come.

In other earnings news, Wal-Mart Stores Inc posted a bigger-than-expected jump in quarterly profit as strength overseas mitigated continued pressure in the United States. Wal-Mart's same-store sales have now fallen for two years.

(Reporting by Angela Moon, Editing by Kenneth Barry)