Retail investors in municipal bonds got whipsawed in 2011.

Speculation about widespread municipal credit defaults and bankruptcies sent them running from the tax-exempt market early in the year. Now as 2012 gets underway, mom-and-pop investors are back and looking to take advantage of some of the performance that made the sector shine in the fourth quarter of 2011.

As a result, municipal managers and analysts are optimistic about the year ahead, though most have been cautioning that 2012 will not see the double-digit returns of last year.

They do agree that the potential for robust demand for munis and muni bonds will be supported by a variety of factors — from attractive relative value, performance and credit quality to the turmoil overseas in Europe. "We closed 2011 in complete contrast to" 2010, said Peter Hayes, managing director and portfolio manager at New York City-based BlackRock Inc., which has $104.2 billion in municipal assets under management, including $7.7 billion in open-end funds. "Retail has been buying, fund flows are positive and the market is rallying," Hayes said.

The triple-A scale has rallied early this year. "This will continue to be the case, at least for the first few months of the year, as supply is limited and value is compelling," Hayes said.

Mutual funds flows, for example, were positive as the new year opened. In what marked the fifth consecutive week of positive flows, weekly reporting funds gained $523 million to $271.8 billion in the week ended January 4, according to Lipper FMI.

Meanwhile, municipals continued to outperform Treasuries during the first week of the year, with yields on muni bond indexes falling and Treasury indexes rising. And though the ratio of municipals to Treasuries also fell, they remained historically attractive. The 10-year ratio fell to 93.50% for that first week of 2012, leaving it below its 97.37% average for 2011. The 30-year ratio fell throughout that week, ending at 115.69%.

But, that was still above its 109.40% average for last year. By the end of 2011, conditions had pushed yields to all-time lows and made munis the year's best-performing fixed-rate sector. The 10.7% total return for the sector as a whole surpassed the 9.8% total return for Treasuries, according to LPL Financial.

Given the positive fundamentals in the municipal market, experts and analysts said 2012 is ripe for opportunity, especially when compared to the tumultuous first half of 2011. "The outlook for 2012 remains positive for continued strong demand and for budget improvements at the state and local level," said Rick Calhoun, first vice president of sales, trading and underwriting at Crews & Associates in Little Rock, Ark. "The Federal Reserve recently signaled that its policy may keep rates low for at least another couple of years, and investors will continue to move farther out on the curve to capture more yield" over the long term, he said.

Analysts noted that the current behavior of investors represents a complete reversal of from last January. The market then was fraught with anxiety after Wall Street analyst Meredith Whitney appeared on "60 Minutes" in December 2010 and predicted there would be 50 to 100 municipal defaults around the country, amounting to hundreds of billions of dollars.

As a result, in the week of Jan. 19, 2011, outflows among weekly reporting muni bond funds surged to an astronomical $4 billion. This was after outflows already were running at a staggering $1 billion a week, according to Lipper.

"At the outset of 2011, investors were more reactionary to the persistent negative headlines that exacerbated the sell-off in municipals," Hayes said. "Unfortunately, this action by investors was at exactly the wrong time, as they should have been buying rather than selling. It took some time for them to understand the safeguards inherent in municipal debt and see that the headlines were blown out of proportion."

Hayes said institutional investors made the most of the 2011 sell-off by buying early. "It was not until late spring that retail investors began to gain confidence and re-emerge as buyers rather than sellers," he said.

According to Calhoun: "When the municipal market started in 2011, many investors turned up their noses at low yields, but as rates continued to fall into the third quarter, they snapped up bonds they would have turned down earlier in the year — based on rates alone." And by the end of 2011, Calhoun said, "investors waved the white flag and surrendered to lower rates — especially since it appears that we may be at the current levels for a while."

Calhoun added that Whitney's "dire predictions for a municipal meltdown sent a shock wave through the market that was short-lived." He noted that the "immediate impact on retail investors — and even some institutional investors — caused investors to rethink assumptions and hunker down for a short period."

However, the scenario was not nearly as detrimental as Whitney had prophesied. In August, Standard & Poor's downgraded the United States to AA-plus from AAA, and Jefferson County, Alabama's historic Chapter 9 filing in November was the largest municipal bankruptcy in U.S. history.

"Throughout 2011, municipal bonds represented good relative value compared to bank certificates of deposits, government agencies and high-grade corporate bonds," Calhoun said. "Even now, it's not uncommon for some municipal issues to yield 150% to 200% of U.S. Treasuries on the short end of the curve."

Meanwhile, the overall credit fundamentals in the municipal market heading into 2012 "generally remain strong," and that also bodes well for steady demand, said Tom Kozlik, director and municipal credit analyst at Janney Montgomery Scott in Philadelphia. "If the last two or three years have illustrated anything, it is that state and local governments possess resilient credit profiles and strong management. The time for investors to be overly concerned with falling credit quality has passed."

Hayes agreed. "From a fundamental credit perspective, municipal credit is stronger as an improving economy and restrained spending have helped budgets. Headline risk is behind us as well, which will help maintain investor confidence."

Some say confidence will be strongest on the short end of the market in 2012. Nat Singer, managing director at Swap Financial in West Orange, N.J., said: "I think it is safe to say that the muni market will continue to outperform all other sectors of fixed income on the short end due to a continued lack of supply, coupled with extraordinary demand."