A day after Italian elections sent stocks tumbling, the Dow Jones Industrial Average (^DJI 0.40%) battled back to finish with a gain of 116 points, or 0.8%, on some strong economic reports and Federal Reserve Chairman Ben Bernanke's defense of its bond-buying program.

January new-home sales jumped 16% to 437,000, well ahead of expectations of 383,000, as they reached their highest level since July 2008. The surprising increase helped reassure investors of the continuing housing recovery after a weak housing starts report last week, and sent homebuilder stocks soaring as Hovnavian jumped 11% and KB Home gained 7%. Dow component Home Depot (HD 0.94%) was also up 5.7%, propelled by the new-home sales report and its own strong earnings report (more on that later).

The conference board's Consumer Confidence rating also jumped from 58.4 in January to 69.0 in February, topping expectations of 62.0, proof that consumers appear to be recovering from concerns about the fiscal cliff and adjusting to the payroll-tax increase. The February reading was the highest since November.

And Fed Chairman Ben Bernanke made his semiannual trip to Capitol Hill to give his report on the economy. The chairman defended the central bank's bond-buying program, dismissing rumors from last week that the Fed would soon disband it. Investors responded positively to his comments.

Home Depot was the big winner on the Dow, gaining 5.7% after reporting that profits increased 34% to $0.68 a share, beating estimates of $0.64. Sales grew 14% to $18.2 billion, and same-store sales jumped 7%, a strong clip aided by the housing recovery and repairs needed following Hurricane Sandy. Guidance for 2013 came in below expectations, however, with an EPS of $3.37 on a 2% sales increase. Analysts are forecasting $3.50 a share. The home-improvement retailer also raised its quarterly dividend 34% to $0.39 a share.

Hewlett-Packard (HPQ -0.46%) was another big winner, gaining 3.8%, as the market responded warmly to the PC-maker's announcement that it will use Android for its new tablets. HP will sell the WebOS mobile operating system, which it obtained when it bought Palm for $1.2 billion in 2010, to South Korean electronics-maker LG for an undisclosed amount. CEO Meg Whitman also said she plans on selling other components that don't fit the company's strategy. Shares of the tech veteran have been roaring since the Autonomy debacle, up 70% in three months.