Over the years, countless experts have pointed to the bond market as a bubble waiting to burst. All of those experts are still waiting, though, as the bond market once again confounded skeptics in 2012 -- albeit posting far more modest gains than in previous years.

The obvious question is how bonds continue to perform well despite a 30-year run of extremely strong returns. Let's take a look at the factors that have supported bonds in 2012 with an eye toward seeing if they'll continue in the coming year.

How bonds stayed high
The bond market doesn't usually get much attention from investors generally. Trading individual bonds has gotten a lot easier recently than it once was, thanks to discount brokerage platforms that have broadened beyond stocks to cover bonds as well. Nevertheless, with many issuers having dozens of different bond issues outstanding, each with their own specific features, the intricacies of the bond market aren't quite as transparent to many investors as the stock market's workings.

But in 2012, investors' ravenous appetite for income has brought attention to bonds, particularly higher-yielding issues. Meeting that demand, companies haven't hesitated to take advantage of low interest rates to get financing. Last month, for instance, Amazon.com went to the bond market for the first time in 14 years, paying less than 0.75% on three-year notes while locking in rates of 1.3% and 2.6% on five- and 10-year debt respectively. The iShares iBoxx Investment Grade Corporate ETF (LQD 0.25%) gained about 11% over the past year even as overall corporate bond issuance topped the $1 trillion mark in 2012.

Even companies with weaker credit ratings have been able to tap credit markets for cash. Even as junk bond yields fell into the 6% range, investor demand for bonds held up well, and the SPDR Barclays High Yield Bond ETF (JNK 0.52%) and iShares iBoxx HY Corporate Bond ETF (HYG 0.55%) were among the best-performing funds with returns of around 11% to 12%. On the actively managed front, PIMCO Total Return ETF (BOND 0.02%) debuted to remarkable success, with nearly $4 billion in assets under management and a gain of nearly 10% since its March inception as an exchange-traded fund.

Safer isn't always better
Treasuries, however, didn't participate as much in the bull run as they had in previous years. Both long-term and intermediate-term Treasury ETFs produced total returns in the 4% to 5% range, with only minimal price appreciation as declines in rates slowed compared to 2011.

That divergence makes sense when you consider changing policies in the government and among investors. With the U.S. fiscal cliff dominating the investing landscape, ongoing issues about debt and another potential downgrade of the nation's bond rating have put some would-be Treasury investors on edge. Moreover, with ongoing Federal Reserve action in the credit markets, investors have to be on guard for activities that could leave them vulnerable to a reversal if the Fed takes away its bond-buying programs in the future.

Burned bears
With all these factors supporting bonds, bearish investors got burned once again. ProShares UltraShort 20+ Year Treasury ETF (TBT 0.43%) has been a popular choice for those trying to time a reversal in the bull market for bonds, but shares have fallen 16% in the past year as the combination of volatility and steady declines in yield hurt the inverse leveraged ETF. Those returns show that even in a relatively weak environment for Treasuries, leveraged bond ETFs can still lead to losses.

Despite the common-sense idea that yields will have to reverse course at some point and head higher, the experience of the past several years has made it clear that trying to time the turn in bonds is no easier than trying to time the stock market. As with other types of investing, finding the right bonds and taking advantage of specific opportunities to buy is your best bet to maximize your total return -- regardless of whether or when higher rates may finally arrive.