US markets closed out the year Monday with a sharp jump on news that Congress was close to a deal to avert the fiscal cliff -- but also on a 4.4 percent gain by market giant Apple.
The Dow Jones Industrial Average finished up 166.03 points (1.28 percent) at 13,104.14.
The broad-market S&P 500 gained 23.79 (1.69 percent) at 1,426.19, while the tech-rich Nasdaq Composite surged 59.20 points (2.00 percent) to 3,019.51.
The gains reversed losses of the previous week when cliff worries were strong, and left the main indices with respectable gains for the year: 7.3 percent for the Dow, 13.4 percent for the S&P 500, and 15.9 percent for the Nasdaq.
With a midnight deadline looming to avert the sharp tax hikes and spending cuts aimed at slashing the fiscal deficit -- but which could force a recession -- the White House and congressional leaders said a deal was nigh that would mitigate the worst effects.
Nothing was certain: while the Senate was expected to pass the compromise legislation after it is finalized, possibly before the midnight Monday deadline, in the Republican-controlled House of Representatives, where resistance could be tougher, the vote would not be before Tuesday.
But the markets pushed higher in expectation that the immediate threat of more than $400 billion in tax increases would mostly be avoided.
"A compromise over taxes and spending would be an important step that supports economic growth in the year ahead," said Gary Thayer, strategist at Wells Fargo Advisors.
Major shares were nearly all in the green, led by Apple's surge.
The world's most valuable company by market capitalization -- an even $500 billion at the end of trade Monday -- was a major driver of the markets ruing the year. Even though its price at Monday's close, $532.17, was well below the year's high of $705.07, Apple shares still racked up a 25.8 percent gain for 2012.
Other major gainers on Monday included ExxonMobil, up 1.8 percent; General Electric (2.6 percent); and Caterpillar (2.8 percent).
Bond prices fell. The 10-year US Treasury yield rose to 1.76 percent from 1.71 percent Friday, while the 30-year moved to 2.95 percent from 2.88 percent. Bond prices and yields move inversely.