New York • If you'd told investors what was going to happen in 2012 U.S. economic growth at stall speed, an intensifying European debt crisis, a slowdown in China, fiscal deadlock in Washington, decelerating corporate earnings growth and asked how the stock market would perform, few would have predicted a good year.
But that's just what they got.
Turning to 2013, it may be a big if, but assuming Washington lawmakers can get past the "fiscal cliff," many analysts say that the outlook for stocks is good, as a recovering housing market and an improving jobs outlook helps the economy maintain a slow, but steady recovery.
Reasonable returns in 2013 would send the S&P 500 toward, and possibly past, its record close of 1,565 reached in October 2007.
The Dow Jones industrial average, the Standard & Poor's 500 and the Nasdaq composite index will all end 2012 substantially higher, despite losing ground in the final days of year as concerns about the looming increase in taxes and spending mounted amid gridlock in Congress. The dow was nearly 160 points on Friday alone, falling below 13,000.
Yet the index is on track for a 7 percent increase, its fourth yearly gain in a row, having started the year at 12,217. The S&P 500, which started the year at 1,257, is up 12 percent, beating the 7.8 percent average annual gain of the past 20 years. The Nasdaq also logged a better-than-average gain, 14 percent.
"There's been a lot thrown at this market, and it's proven to be very resilient," said Gary Flam, a portfolio manager at Bel Air Investment Advisors in California.
Looking ahead, assuming a budget deal is reached in a reasonable amount of time, investors will be more comfortable owning stocks in 2013, allowing valuations to rise, many economists say, even though for a fifth year in row more Americans in 2012 were selling stock than buying it.
Although earnings growth of S&P 500 listed companies dipped as low as 0.8 percent this past summer, analysts are predicting that it will rebound to average 9.5 percent for 2013, according to data from S&P Capital IQ. Companies have also been hoarding cash. The amount of cash and cash-equivalents being held by companies listed in the S&P 500 climbed to an all-time high $1 trillion at the end of September, 65 percent more than five years ago, according to S&P Dow Jones Indices.
"As you remove little bits of uncertainty, investors can then once again return to focusing on the fundamentals," says Joseph Tanious, a global market strategist at J.P. Morgan Funds. "Corporate America is actually doing quite well."
Stocks fell in the second quarter of 2012 as investors fretted that the euro region's government debt crisis was about to engulf Spain and possibly Italy, increasing the chances of a dramatic slowdown in global economic growth.
"There is still some heavy lifting that needs to be done in Europe," said Steven Bulko, the chief investment officer at Lombard Odier Investment Managers. Now, though, "we are dealing with much more manageable risk than we have had in the past few years."
Next year may also see an increase in mergers and acquisitions as companies seek to make use of the cash on their balance sheets, says Jarred Kessler, global head of equities at broker Cantor Fitzgerald.
M&A deals are good for stock prices because the acquiring company typically pays a premium for the one it's buying.
Not all investors are as sanguine about the prospects for 2013.
The rally in stocks in 2012 had less to do with company earnings and the economy and more to do with monetary stimulus from the Federal Reserve and other central banks around the world, said David Wright, a managing director and co-founder at Sierra Investment Management in Santa Monica, Calif.
Federal Reserve Chairman Ben Bernanke announced Sept. 13 that the central bank would add another round to its bond-purchase program, known as quantitative easing on Wall Street, which is intended to lower borrowing costs and boost growth. Speculation that more stimulus was coming had pushed the S&P 500 index to 1,466, its highest close of the year, a day earlier. The Dow peaked for the year at 13,610, Oct. 5.
"The Fed has done everything it can do and is probably pretty close to having used its last bullet," said Wright. "It's been a good year for stocks, but we think that's an artifact of monetary stimulus."
This year's peaks in the Dow and the S&P 500 won't be surpassed in 2013 and stocks may even slump in the first quarter, as investors lower their earnings expectations, Wright said.
Wells Fargo Securities market analyst Gina Martin Adams also says companies will struggle in the first half of the year as the economy flirts with recession.
The bank recommends that investors add to their holdings of financial and utilities stocks because low rates should help support steady earnings growth in the early part of the 2013. Financial stocks advanced 25 percent in 2012, making them the best performing industry group in the S&P 500. Utility stocks fell 3.4 percent, the worst performing of 10 industry groups in the index. The bank says investors should reduce their exposure to so-called consumer discretionary stocks, such as hotels and restaurant companies, because consumer spending will likely take a hit next year as taxes rise.
Predictions from market experts for 2013
Year-end target for the S&P 500: 1,575
Reasoning: The "turbulent political environment" that held back investment 2012 will end. Company revenues will edge higher and earnings will rise.
Year-end target for the S&P 500: 1,525
Reasoning: Capital spending will stabilize and the U.S. will benefit from improved manufacturing competitiveness and an energy boom.
BMO Private Bank
Year-end target for the S&P 500: 1,500
Reasoning: The fiscal drag from higher taxes and lower government spending will offset an accommodating Federal Reserve.
Wells Fargo Securities
Year-end target for the S&P 500: 1,390
Reasoning: The U.S. economy flirts with recession, exports decline and investment falls.
Best and worst industry group performers in S&P's 500 index in 2012
Financials • The stocks of insurers and banks, led by Bank of America and Citigroup, gained 25 percent.
Consumer discretionary • Homebuilder PulteGroup and appliance giant Whirlpool were among the biggest gainers, pushing this sector up 20 percent.
Heath care • Drugmakers Eli Lilly and Merck gained, moving the industry up 14 percent.
Consumer staples • Although retailers such as Walmart and CVS Caremark had decent years, brewer Molson Coors struggled. The sector rose 7 percent.
Energy • Oil prices fell about 8 percent in 2012. Energy companies such as Chevron, BP and Exxon tracked mainly sideways. The sector rose 1 percent.
Utilities • Often regarded as a safe haven, these stocks fell out of favor with investors. After advancing 15 percent in 2011, they fell nearly 4 percent this year.