The S&P 500 closed up 8.32 points, 0.6%, at 1,480.95 and the Dow Jones industrial average hit a five-year high intraday, but fell back and ended up 84.79 points, 0.6%, to 13,596.02. The Nasdaq composite closed up 18.46 points, up 0.6%, at 3,136.

Andrew Wilkinson, chief economic strategist at Miller Tabak, said the U.S. housing figures, in particular, boost confidence that "a spreading recovery will overflow into broader consumption habits and further permeate the economy."

If the U.S. economy, the world's largest, enjoys such an boost, that would be a boon to the global recovery, and potentially ease problems elsewhere, not least in Europe.

"We think the economy is set for a great 2013 and the stock market looks set to break higher," said Wilkinson.

It's not all clear for the U.S. economy though. Another battle in Congress over raising the U.S. debt ceiling is looming. Ratings agency Fitch has already warned that it may strip the U.S. of its triple A rating if there's a delay in raising it.

Shares of Bank of America also fell after the bank reported an earnings decline. The bank say it is continuing to work on clearing up old problems at its mortgage unit.

Boeing shares fell after the Federal Aviation Administration said late Wednesday that they are temporarily grounding Boeing's 787 Dreamliners because battery problems led to an emergency landing of an All Nippon Airways flight. The plane makers stock dropped 3.4% the day before.

Stocks started 2013 with a rally after lawmakers came up with a last-minute plan to stop the U.S. going over the "fiscal cliff," a series of tax hikes and spending cuts that economists say would probably have pushed the U.S. into recession.

The yield on the 10-year Treasury note, which moves inversely to its price, rose 4 basis points to 1.88%.

- CBS stock finished up; the media company said late Wednesday that it was converting its U.S. outdoor advertising business to a real estate investment trust and selling the international portion of the business.

- BlackRock shares gained for the day; the investment manager said its fourth-quarter net income surged, beating analysts' forecasts. The company also increased its dividend.

Markets ended the prior trading session in a mixed mood. The Dow lost ground for the day but the S&P and Nasdaq managed to carve out modest gains.

In Europe Thursday, the FTSE 100 index of leading British shares ended up 0.5% while Germany's DAX 30 index finished up 0.6%. The CAC-40 index in France closed up 1%.

Earlier in Asia, Japan's Nikkei 225 index swung between gains and losses before closing nearly 0.1% higher at 10,609.64. On Wednesday, the Nikkei slid around 2.6% after investors interpreted comments from economy minister Akira Amari as suggesting he was concerned over the sharp fall in the yen in recent weeks.

"That misunderstanding has been cleared up by Amari, who clarified that he meant that the yen is still in the process of correcting back into line with fundamentals," said Lee Hardman, currency analyst at the Bank of Tokyo-Mitsubishi UFJ.

The impact of his comments on the yen was short-lived, with the dollar up 1.5% at 89.92 yen on Thursday. But the euro was 0.7% higher against the greenback at $1.338.

South Korea's Kospi fell almost 0.2% to 1,974.27 while Hong Kong's Hang Seng changed direction after posting morning gains, slipping 0.1% to 23,339.76. Mainland China's Shanghai Composite Index fell 1.1% to 2,284.91 ahead of Friday's economic growth figures, which could provide broader direction across markets on the last day of the week.

Oil prices ended up 1.1% to $95.32 a barrel after being up more than 2% in electronic trading on the New York Mercantile Exchange.

Copyright 2015 The Associated Press. All
rights reserved. This material may not be published, broadcast, rewritten or redistributed.