Stocks close higher; Microsoft, Facebook surge

Stocks advanced on Friday, although a sharp drop in new home sales added to the uncertainty about when the Federal Reserve may begin to reduce its monthly bond purchases.

Microsoft shares surged over 7 percent, giving the tech sector a boost, after the company said CEO Steve Ballmer will retire within 12 months. Facebook, meanwhile, climbed 5 percent to close above $40.

The Dow Jones Industrial Average climbed 46 points to close above 15,000, helped by Microsoft, a Dow component, and 1-percent gains in Verizon and AT&T shares. Travelers and Cisco were among the laggards.

The S&P 500 and the Nasdaq also posted gains. The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, fell to near 14.

Among S&P sectors, telcos and materials paced the advance while financials and consumer discretionary underperformed.

As markets try to position for the September Fed meeting and some other events expected this fall, Rosenblatt Securities' Gordon Charlop said there could be a little more downside. "I'm not seeing the same kind of aggressiveness from buyers" looking to get in on the dips, he said.

A day after the 3-hour Nasdaq trading halt, Nasdaq OMX Group CEO Robert Greifeld told CNBC that the exchange has fixed the technical issues, but could not guarantee there would be no future problems.

Markets still have no greater clarity on when the Federal Reserve may begin to curtail its $85 billion in monthly bond purchases following Friday's economic data. Sales of new single-family homes fell 13.4 percent to a 394,000 annual rate in July, their lowest level in nine months.

"We've had a strong run in housing like we've had in the stock market and some correction was inevitable in the face of the spike in mortgage rates," Dan Greenhaus of BTIG said.

On Thursday, global manufacturing data painted a more encouraging picture of the world economy.

With the data mixed, Fed officials speaking with CNBC from the annual central bank conference in Jackson Hole, Wyoming, also offered few clues as to what the Fed may do at its September meeting.

James Bullard of the St. Louis Fed, meanwhile, told CNBC the central bank should take its time. "Inflation is running low, you've got mixed data on the economy, so I'd be cautious and I wouldn't want to pre-judge the meeting," he said.

Atlanta Fed president Dennis Lockhart and San Francisco Fed president John Williams told CNBC that the Fed's actions will depend on the incoming economic data. "Any tapering I think we would do would be in gradual steps over time," Williams said.

(Read more: Fed's Lockhart: I could get comfortable with a move in September of some kind)