Today: Politicians' talks on the "fiscal cliff" cheer investors and push Wall Street up, but then they released the bad news after the bell. Also: Apple (AAPL) and Facebook end uneven years with gains, 2012 ends as good overall year for stocks.

'Fiscal cliff' talks boost stocks, but bad news waits for after the bell

Politicians seemed headed for a last-minute deal Monday to replace a series of tax hikes and spending cuts set to take place at the end of year, sending stocks soaring. However, as soon as markets closed for the day with all three major U.S. stock indexes higher than the big round numbers they eclipsed earlier this year and Apple back above a $500 billion market cap, congressional leaders announced that a New Year's Eve vote would not take place in the House of Representatives.

Wall Street has danced higher and lower on news of talks about the so-called fiscal cliff for months, as politicians negotiated a new budgeting plan that would avoid changes that could boomerang a recovering economy into recession and cause taxes for all Americans to return to rates changed more than a decade ago. Investors expected a last-minute deal, and it seemed that was in the cards as Senate leaders and Vice President Joe Biden hashed out a deal on New Year's Eve and President Barack Obama told the media that the deal was not done, but was on its way.

"One thing we can count on with respect to this Congress is that if there's even one second left before you have to do what you're supposed to do, they will use that last second," Obama said.

In response, investors sent stocks soaring higher, with tech stocks leading the way. The tech-heavy Nasdaq gained 2 percent to eclipse the 3,000 mark at the end of the year; the Dow Jones industrial average gained 1.3 percent to again push higher than 13,000; and the Standard & Poor's 500 stayed above 1,400 with a 1.7 percent gain. The three major U.S. indexes closed higher than those milestone figures on the same day for the first time in 2012, and Monday's bounce ensured that they would end the year the same way.

"It's still impossible to know what the specific details are, but this all makes me hopeful that Congress can at least defuse the ticking time bomb," Jack Ablin, chief investment officer of BMO Private Bank, told Bloomberg News. "Just the fact that Congress can agree on something is worth celebration."

However, mere seconds after Wall Street closed up shop for 2012, leaders in the House announced that they would not agree on anything on New Year's Eve. Even if the Senate finalizes a deal and votes it through that chamber, the House would meet only to vote on other bills, members said.

The timing of the post-close news gives Capitol Hill an extra day to finalize a deal without investors sending stocks on another wild ride -- markets are closed Tuesday for New Year's Day, and Congress can still make features of the deal retroactive to avoid any issues with missing the deadline.

Apple and Facebook close 2012 on upswing after roller-coaster years

Silicon Valley's buzziest stocks were part of Monday's large rise and continued making news, as Apple rose 4.4 percent to break back into the $500 billion club as the final bell rang in 2012, while the area's social-networking newcomers continued to dominate headlines.

Cupertino tech giant Apple has suffered in the final quarter of the year, declining to "bear market" territory after a whirlwind first nine months of 2012. After one of the most successful holiday-shopping quarters in memory, the company began a blazing rise that saw its stock increase as much as 74.1 percent, become just the sixth company with a market capitalization higher than $500 billion and eventually set a record for highest market cap ever for an American company, without adjusting for inflation.

Apple's fourth-quarter weakness, however, knocked it out of the $500 billion club, though it remains the most valuable company in the United States. Monday's rise pushed it back above that magic number, however, with its closing stock price of $532.17 giving Apple a market cap -- the total worth of all shares in a company -- of $500.6 billion. The stock ended the year with a gain of 31.4 percent.

Besides Apple, the biggest Silicon Valley story on Wall Street in 2012 was Facebook, the world's most popular social network. The Menlo Park company had the biggest initial public offering in tech for 2012, breaking the record for highest valuation at the time of a public debut in May. However, the bigger news came after the IPO, when the company's stock price crumbled from the initial price of $38 amid allegations that its underwriters informed large institutional investors of weakness in Facebook's earnings potential while keeping the information from smaller investors. Facebook stock lost more than half its value, declining as low as $17.55 before its most recent quarterly earnings finally showed revenues from its mobile offerings, sating some investors and pushing the price back up.

The final day of 2012 continued the trend, as Facebook gained 2.7 percent to $26.62 while analysts at its underwriting banks continued to press the case for investing in the social network, a stance that has even convinced former Facebook bear BMO Capital Markets. Facebook ends its IPO year down 30 percent from its IPO price, but 51.7 percent higher than the lowest price paid for the company's shares since it reached public markets. In that regard, Facebook has been much more successful than its former close partner, Zynga: The San Francisco social-gaming firm closed Monday at $2.36, down 76.4 percent from its IPO price, after confirming the death of 11 games.

Stock indexes turn in a strong 2012, could be set for more in 2013

Overall, 2012 was a good year for the markets, with strong gains for all three major U.S. stock indexes as well as the SV150 index of Silicon Valley's largest tech companies. Despite the strongest percentage growth since stocks bounced back from the Great Recession in 2009, there still could be room for more growth in 2013.

After failing to gain in 2011, the broad-based S&P 500 rose 13.4 percent in 2012, and the blue-chip Dow Jones industrial average gained 7.3 percent on the year. In tech, the Nasdaq had the largest annual gain for the three major indexes, at 15.9 percent, and the SV150 increased 12.8 percent, despite Apple's end-of-year swoon.

Despite the rise in stock prices, corporate earnings are growing at a faster pace, S&P Capitol IQ reports: The stocks in the S&P 500 collectively have a price-to-earnings ratio of 13.5 as the year ends, less than the average since 1988, which stands at 17.9, suggesting that equities are cheaper than in years past.

"As you remove little bits of uncertainty, investors can then once again return to focusing on the fundamentals," J.P. Morgan Funds global market strategist Joseph Tanious told The Associated Press. "Corporate America is actually doing quite well."

However, other analysts believe that the Federal Reserve's active year has accounted for stocks' rise, which could change in 2013.

"The Fed has done everything it can do and is probably pretty close to having used its last bullet," said David Wright, a managing director and co-founder at Sierra Investment Management in Santa Monica. "It's been a good year for stocks, but we think that's an artifact of monetary stimulus."

Silicon Valley tech stocks

Up: Advanced Micro Devices, Apple, Electronic Arts (ERTS), Hewlett-Packard (HPQ), Netflix (NFLX), Facebook, eBay (EBAY), Adobe (ADBE), Yahoo (YHOO), Tesla, Intel

Down: Yelp

The tech-heavy Nasdaq composite index: Up 59.2, or 2 percent, to 3,019.51

The blue chip Dow Jones industrial average: Up 166.03, or 1.28 percent, to 13,104.14

And the widely watched Standard & Poor's 500 index: Up 23.76, or 1.69 percent, to 1,426.19

Check in weekday afternoons for the 60-Second Business Break, a summary of news from Mercury News staff writers, The Associated Press, Bloomberg News and other wire services. Contact Jeremy C. Owens at 408-920-5876; follow him at Twitter.com/mercbizbreak.