If you had slept Rip Van Winkle-style through 2011, you'd be awakening now to find that your stock portfolio was much the same as you left it.

Presuming you stayed awake, you endured a volatile year for equities. Market swings were so violent that by the third quarter many investors threw in the towel for a loss. Had they stuck it out, they would have found that stocks — despite all those gyrations — ended flat for the year.

That's past. The new year is a good time to poll market analysts on their outlook and to find out if there are moves small investors should take — or avoid — in 2012.

There's not rousing enthusiasm out there for robust market growth. Many analysts would commit only to being "cautiously optimistic," which seems to leave room for things to go bad. Other professionals plan to boost their stock holdings, but their timing differs — a sign of how difficult it is to read this market.

Daniel McHugh, president of Lombard Securities in Baltimore, says he's moved half his portfolio into cash since the summer. He predicts Europe's debt problems will spark a recession there and further weaken our economy, triggering a steep stock market decline in the first six months.

"It could present us with a wonderful buying opportunity," he says.

But Chuck Carlson, chief executive of Horizon Investment Services in Indiana, says two Dow Jones benchmarks recently traded above their October highs, a signal of a bull market.

"We're raising our stock exposure," he says.

The decision when to jump in or out of stocks, of course, is best left to the pros. Conditions can turn so suddenly that by the time most of us react, it's far too late. The best course for the average investor — as dull as it may sound — is to invest in a widely diversified portfolio of stocks and bonds so your portfolio can better weather ups and downs.

Karen Dolan, director of fund analysis with Morningstar, recommends mutual fund investors also diversify their money managers' styles.

For example, she says, if one fund manager makes a big bet on riskier stocks, you could balance that with a fund manager who sticks to large, stable companies with rich cash flows.

"Regardless of how it turns out, you got your bases covered," she says.

Many of the issues that rattled 2011 markets remain in 2012. The European debt crisis is unlikely to be resolved soon. In a presidential election year, U.S. politicians are likely to be even less willing to compromise to fix our fiscal problems. And China's gangbusters economy is slowing down.

"China is so big. If it slows a little bit, it has a major impact on the markets," says Ellen McGee, portfolio manager with FBB Capital Partners in Bethesda.

And stock market volatility is here to stay for a while. At least by now, "investors are getting used to this volatility," says Kate Warne, investment strategist for St. Louis-based Edward Jones.

Still, this year has many things going for it.

Corporate earnings are strong. Companies have cleaned up their balance sheets. The U.S. economy has grown for nine straight quarters.

"We're in a recovery," says David Berman, an adviser with Berman McAleer Inc. in Timonium. "It is not deniable."

One more reason for optimism: An incumbent president seeking a second term.

"The fact that we have a sitting president running for re-election is positive," says Jeffrey Hirsch, editor of the Stock Trader's Alamanc.