Shaky Europe. Political gridlock. Volatile markets.

Familiar themes for those who lived through this year, and investors should be ready to revisit them next year.

With a spiraling debt crisis in Europe, political upheaval around the world, and crumbling creditworthiness in major industrial nations, 2011 was a tough year to know where to invest -- and 2012 is unlikely to offer much respite.

The S&P 500, an index of the biggest U.S. companies' market value, spent much of the year getting pushed up and down, flummoxing shorts and longs -- and scaring Moms and Pops away from stocks. It ended the year at 1,257.60, down a mere 0.04 of an index point.

But the S&P 500's tepid performance was encouraging, compared with that of other world equity markets. The United States may still be seen as a safe haven, although even that looks uncertain.

For every rally built on improving economic figures this year, sell-offs were never far away on worries the European debt crisis would eventually drag the continent into a recession and perhaps the United States as well. That could continue in 2012.

China and other fast-growing emerging markets can no longer be leaned on as those economies slow. In 2011's last half, the poorest-performing sectors outside the financials sector were most connected to global growth -- materials, energy, and industrial companies.

There is a growing realization that the global economy is in jeopardy, said Bruce Bittles, chief investment strategist at Robert W. Baird & Co in Nashville, Tenn. There is uncertainty in every corner of the world.

That uncertainty fed substantial volatility in 2011. Despite the S&P's flat performance this year, there were 66 trading days when stocks moved in a 2 percent range. In 2008, when Lehman Brothers Holdings Inc. collapsed during a global financial crisis, there were more than 130 trading days when stocks swung that much. But that led to a flight from equities by retail investors.

U.S. equity funds had outflows in every month since May. More than $483 billion left U.S. mutual funds in 2011 through the year's second-to-last week, even though the U.S. market outperformed foreign stocks late in the game.

Beating Global Rivals

The S&P 500 ended the year off a scant 0.003 percent, the closest it has come to unchanged since 1947, according to Standard & Poor's. The Dow Jones Industrial Average finished 2011 with a 5.5 percent gain, while the Nasdaq Composite Index slipped 1.8 percent.

In contrast, the MSCI world stocks index fell 9 percent, while the FTSEurofirst-300 index slid nearly 11 percent.

The darlings in the emerging markets fared the worst. China's Shanghai Composite index lost 22 percent, India's BSE sank 25 percent, and Brazil's Bovespa dropped 18 percent.

Strategists say the U.S. stock market may benefit from reasonable economic growth and attractive market valuation. The S&P 500 is expected to rise 6 percent by the end of 2012, according to the most recent poll of Wall Street strategists.

When Wall Street gets back to work on Tuesday, it will face a holiday-shortened week and a slew of economic indicators. The most crucial numbers will come on Friday when the government will release the December nonfarm payrolls report. Economists polled by Reuters expect a December gain of 150,000 jobs, compared with an increase of 120,000 jobs in November.

Volatility is likely to persist through early 2012 because of the uncertainty in Europe and rising concern about slowing earnings growth due to recent revisions.

The S&P 500's price-to-earnings ratio -- what investors are willing to pay for a dollar of earnings over the past year -- is under 12, below the 25-year average of 15. In weaker indices like Germany's DAX, the figure is below 9.

We're building a massive recession into these numbers, said Marc Pado, U.S. market strategist at Cantor Fitzgerald & Co. in San Francisco.

U.S. companies cutting earnings' outlooks recently outpaced those raising them by the greatest ratio in 10 years. Some sectors, such as materials, have seen a sharp drop in forecasts for the fourth quarter, Thomson Reuters data showed.

Last week, downbeat earnings from the Oracle Corp. shook confidence in the technology sector's health before the quarterly earnings season's start next month. Oracle joined a growing list of companies, including some of tech's biggest names, whose results and outlooks have set off alarm bells.

Next year, S&P 500 earnings are seen rising 9.9 percent, down from an estimate of 13 percent in October.

Graphics: Global markets in 2011: Volatile and Unpredictable

Recession Fears

Many economists believe the Eurozone is already in recession. They forecast that the economies of the 17-nation bloc will stagnate in 2012 after contracting in this year's fourth quarter and next year's first quarter.

Investors are worried that Italy and Spain will have to keep refinancing borrowings at unsustainable levels early next year, which could escalate the crisis.

The correlation between the U.S. stock market and the euro skyrocketed this year as investors tied bets on risky assets to the euro's moves. That trend ebbed as equities rallied near the end of the year, but it is likely to flare up again.

So far the U.S. economy has stayed on course for moderate growth. Economists expect it to expand by about 2.1 percent next year. But it is unclear how a slowdown in the rest of the world will affect the economy stateside.

The key may be China rather than Europe.

China is the 800-pound gorilla in the room and is probably the most important country to watch in terms of their contribution to global growth, said Michael Sheldon, chief market strategist at RDM Financial in Westport, Conn.

Chinese business confidence is weakening. A survey showed export orders fell for the first time in nearly three years.

The drop in materials shares in 2011's second half reflects worry about declining activity overseas. The S&P Materials Index lost nearly 14 percent in the last six months.

Gridlock Shock

One of the pivotal events of 2011 was the downgrade of the United States' perfect triple-A credit rating. Standard & Poor's cited congressional bickering as the reason for the downgrade.

August's stalemate in Washington over raising the debt ceiling sparked a sell-off that accelerated after the downgrade.

Investors expect the gridlock in Congress to get worse as the U.S. presidential election approaches next November. The election is likely to be close, which will not make legislative efforts to tackle high debt levels and weak demand any easier.

Rancor was in view again in December as Congress struggled to pass a two-month extension of U.S. payroll-tax cuts.

There will be less certainty about taxation and regulation, so that will inhibit business formation and business growth, said Brian Battle, a trader at Performance Trust Capital Partners in Chicago.

Goldman Sachs Group Inc. sees global growth highly susceptible in 2012 to even minor shocks -- and those shocks may be political.

Slowing growth (and in places outright contraction), public-sector cuts, and a renegotiation of the social compact between state and society in different parts of the world is an environment ripe for political turmoil, Goldman said in a note to clients.

(Reporting by Edward Krudy; Editing by Jan Paschal)