New York (CNNMoney) — U.S. stocks rallied Thursday, with the Dow closing near a 5-year high, as upbeat reports on the economy offset mixed corporate results.
The Dow Jones industrial average, the S&P 500 and the Nasdaq all rose more than 0.6%, with the S&P 500 closing at a new 5-year high.
The advance came after the government reported a sharp rise in the number of new homes being built in December. Home Depot was the top gainer on the Dow, while hombuilders PulteGroup and Toll Brothers both gained more than 3%.
Investors also welcomed news that first-time claims for unemployment benefits fell to a five-year low last week.
The drop in unemployment claims raised hopes the U.S. economy is gaining "traction," said Doug Roberts, chief market strategist for Channel Capital Research. The report bodes well for the job market, he said, which should help support the economy by boosting consumers' spending power.
"The initial claims number triggered the rally," said Roberts. "Everything is linked to consumer spending."
Despite the improved economic outlook, bank stocks were among the worst performers.
Bank of America shares fell 4.4% after the company reported earnings that were slightly better than analysts had expected, although the results were impacted by various charges stemming from BofA's legal problems.
Citigroup shares sank 3% after it reported profits that missed expectations, partly due to high legal costs amounting to $1.3 billion. Chief Executive Michael Corbat cited a "challenging" environment.
After the market closed, Intel said it earned $3.2 billion, or 48 cents per share, in the fourth quarter. The chipmaker reported $13.5 billion in revenue for the quarter, matching analysts' expectations.
American Express said fourth quarter earnings fell 45% to 56 cents per share. The results included a restructuring charge and other one-time items. Capital One said earnings surged 60% in the quarter to $1.41 per share, driven by acquisitions including its purchase of ING Direct.
"It's been a real mixed bag with the numbers," said Ben Schwartz, chief market strategist at Lightspeed Financial.
Boeing was in focus after officials Europe, India and Japan joined the Federal Aviation Administration after it grounded all Dreamliner planes. They cited worries about onboard lithium-ion batteries that have caught fire twice recently. Shares rose 1%, recovering from sharp losses on Wednesday.
Shares of BlackRock rose after the world's largest asset manager reported better-than-expected earnings.
Overall, S&P 500 companies are expected to report earnings growth of 3.2% for the last three months of 2012, according to S&P's Capital IQ.
"People weren't expecting a great earnings season, and they're not getting one," said Rex Macy, chief investment officer at Wilmington Trust Investment Advisors. "They're getting a decent one. Earnings are meeting lowered expectations."
Still the economic recovery is "sound" and there is a certain level of "comfort" in the market, said Macy. The main risk, he added, is that officials in Washington will fail to resolve the crisis over the nation's borrowing limit.
"If Washington doesn't mess things up, we should be fine," he said.
Shares of Herbalife fell after the vitamin supplement company said it would likely incur temporary expenses relate to "recent events." Activist investor Bill Ackman, who runs the $11 billion hedge fund Pershing Square, has called Herbalife a pyramid scheme and publicly said that he's betting $1 billion that its stock will fall to zero. On the other side is Dan Loeb, who runs Third Point. He's taken an 8% stake in Herbalife and says Ackman's claims are preposterous.
CBS shares jumped after the company announced it would take its American outdoor division, which runs billboards, and convert it into a real estate investment trust. It's planning to outright sell its European and Asian outdoor operations.
Mining giant Rio Tinto replaced its CEO after taking a $14 billion writedown on its aluminum and coal businesses.
European markets closed higher. The FTSE 100 in London rose 0.5%, the CAC 40 in Paris gained nearly 1% and the Dax in Frankfurt added 0.6%. In Asia, Japan's Nikkei closed narrowly higher, but the Hang Seng slipped and the Shanghai Composite fell more than 1%.
Oil prices jumped 1.3% to $95.48 a barrel. Gold was up nearly $5 to $1,688 an ounce. The yield on the 10-year Treasury note was unchanged at 1.87%. The U.S. dollar gained versus the Japanese yen and British pound, but fell against the euro.