Fiscal cliff fears gave way to euphoria as Congress may have agreed on terms for a tentative deal and the news sent stocks soaring, despite an announcement later that the House would not vote tonight and that, therefore, the U.S. would technically go over the cliff, if temporarily.

The Dow Jones Industrials (DJINDICES:^DJI) soared 166 points, finishing the year with an 886-point gain, or about 7%, before considering the impact of dividends. The S&P 500 finished with a more impressive 13% gain for the year, besting last year's flat performance.

All 30 Dow stocks gained ground on the day, but the biggest gainers were predictably ones that have been most sensitive to the economy all year. Caterpillar (NYSE:CAT) jumped more than 3%, while General Electric (NYSE:GE) rose 2.7% and Bank of America (NYSE:BAC) added to its huge gains with another 2.2% advance. For B of A, another piece of good news comes from reports that it and other banks may be close to reaching a settlement with the Office of the Comptroller of the Currency to resolve mishandling of foreclosures during the mortgage crisis. Meanwhile, for Caterpillar and GE, news that manufacturing conditions in China have improved points to the possibility of better growth for the industrial giants in the coming year.

But the big winner of the day was Hewlett-Packard (NYSE:HPQ), which soared more than 4%. The company got good news when it held onto a Veterans Affairs Department contract worth more than half a billion dollars over protests from rival IBM that the department didn't appropriately consider other proposals. After reconsideration, though, the VA made no changes. Still, the longer-term question for HP is whether it can truly rebound from its horrific performance in 2012. If so, value investors could be rewarded for their courage.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.