Stocks rose in a late rally on Friday as a strong forecast from a chip maker lifted tech shares and helped alleviate concerns about the economy's health after an unexpected drop in retail sales.

National Semiconductor Corp rose 5 percent to $14.21 a day after it forecast margins and revenues above estimates after a horrible 2009 [ID:nN10251890]. The Philadelphia Semiconductor index <.SOXX> rose 1.4 percent.

The macro news has been increasingly negative, but you still have some companies reporting good forecasts, and people start to think (selling) got a bit overdone, said Doug Roberts, chief investment strategist at ChannelCapitalResearch.com in Shrewsbury, New Jersey.

National Semiconductor made a positive announcement. That's why you're seeing the strength primarily in tech, he said.

Even so, the volume was lackluster, indicating little conviction that the advance will continue next week.

The Dow Jones industrial average <.DJI> gained 38.54 points, or 0.38 percent, to 10,211.07. The Standard & Poor's 500 Index <.SPX> rose 4.76 points, or 0.44 percent, to 1,091.60. The Nasdaq Composite Index <.IXIC> climbed 24.89 points, or 1.12 percent, to 2,243.60.

For the week, the Dow rose 2.8 percent, the S&P gained 2.5 percent and the Nasdaq advanced 1.1 percent.

COLD DAY FOR RETAILERS

U.S. retailers' sales unexpectedly fell in May for the first time in eight months, the U.S. Commerce Department reported.

But a jump in a consumer sentiment index to a near 2-1/2-year high in a preliminary reading for June tempered fears of a slowing economic recovery. The consumer sentiment reading came from the Thomson Reuters/University of Michigan Surveys of Consumers.

Consumer-related shares were the hardest hit, with Home Depot down 1.5 percent at $32.22, and Procter & Gamble , down 1.5 percent at $61.01, weighing down the Dow industrials. The S&P retail index <.RLX> slid 0.2 percent.

But commodity-related companies also gave support to stocks, with the S&P materials sector <.GSPM> up 1.2 percent.

U.S. Steel Corp jumped 3.8 percent to $44.82.

VIX FALLS

In another bullish sign, the S&P 500 found technical support around the 1,077 level that marks its 14-day simple moving average. The benchmark posted its first back-to-back close above its 14-day SMA since late April.

The CBOE Volatility Index <.VIX>, a gauge of investor anxiety, fell 5.8 percent to settle at 28.79, its lowest level since May 13.

Big-cap pharmaceutical companies' shares also advanced after Barclays Capital upgraded the sector to positive from neutral, citing the revenue potential of new products.

Pfizer Inc was the Dow's top percentage gainer, up 3.7 percent at $15.46.

U.S.-listed shares of BP Plc climbed 3.6 percent to $33.97 as UK officials made supportive comments about the company, even as scientists doubled estimates of the Gulf of Mexico's oil spill.

About 7.31 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, the lowest in more than two months and sharply below last year's estimated daily average of 9.65 billion.

Advancing stocks outnumbered declining ones on the NYSE by a ratio of about 11 to 4, while on the Nasdaq, about five stocks rose for every two that fell.

(Reporting by Rodrigo Campos; Additional reporting by Leah Schnurr; Editing by Jan Paschal)