For the U.S. stock market, 2011 was a long wild ride to nowhere.

The broad S&P 500 endured huge daily swings but a year of drama left the index on Friday (December 30) almost where it started. It lost a mere 0.003 percent, closest to unchanged since 1947, according to Standard & Poor’s.

The Dow industrials gained 5.5 percent for the year as investors sought safety in large-cap, dividend-paying stocks. The Nasdaq lost 1.8 percent.

“In 2011, consumer staples, utilities, health care, those were the sectors that actually performed well. Whereas, the banks were down over 20 percent, materials down over 15 percent, industrials down seven percent. Those are the areas of the market that really got hammered as we started to question to durability of the economic recovery,” explained Douglas Blake, a Senior Wealth Manager at Newbridge Securities.

On Friday, the Dow Jones industrial average fell 69.48 points, or 0.57 percent, to 12,217.56, while the Standard & Poor’s 500 Index lost 5.41 points, or 0.43 percent, to 1,257.61. The Nasdaq Composite Index ended down 8.59 points, or 0.33 percent, at 2,605.15.

World stocks have lost more than 9 percent for the year.

Global markets have been battered this year by the euro-zone debt crisis, upheaval in the Middle East, and U.S. political gridlock. Similar events are predicted to await investors in 2012.

But in the U.S., there has been a steady flow of encouraging U.S. economic data.

“I think we will continue to see some volatility, but the good news is we are seeing positive news out of the U.S. economy; unemployment claims this morning, housing picking up, autos. So there are components of the economy that are improving, which should help to drive a positive growth, two and a half percent is our forecast for 2012,” predicted Jim Dunigan, Executive Vice President and Managing Executive, Investments at PNC Financial Services Group.

Dunigan added, “We think corporate profits will hang in there and continue to support equity prices. So it’s a positive outlook and I think if Europe can avoid a severe recession, they will certainly experience somewhat of a mild recession, the U.S. would be less affected and our growth and corporate profits would hold up here.”

Bank of America Corp was the Dow’s worst performer, tumbling 58.3 percent this year, and it was also one of theS&P 500‘s biggest losers. JPMorgan Chase & Co slumped 21.6 percent in 2011.

McDonald’s Corp advanced 31 percent this year, making it the Dow’s biggest gainer.

Reflecting the wild market swings, the CBOE Volatility Index, or VIX .VIX, rose about 32 percent for the year, the first increase since 2008. The S&P 500 climbed 9 percent at its peak, and dropped 14.5 percent to its bottom.