Three years ago, bringing up bonds was a conversation killer. Now everybody wants to own them. But buying bonds isn't as easy as opening an online brokerage account and starting to trade.

There are thousands upon thousands of bonds out there. A single company can have a dozen or more different bond issues to choose from. And although you can easily buy Treasuries directly from the government, corporate bonds are only sold in increments of $10,000 or more.

Thankfully, you can simply sock your money in a bond fund and not have to grapple with all these problems.

Now you just have to figure out how to buy a good fund.

What's It Going to Cost You?

The three keys to buying a solid bond fund are expenses, expenses and expenses. This is particularly true with the yields so low on Treasury securities.

"With a yield of just 4%, if you can cut expenses by one percentage point, you're saving 25% of your return," says Fran Kinniry, principal in investment counseling and research at Vanguard.

Just like with stock funds, the less you pay in expenses, the more money winds up in your pocket every year. It might be impossible to know which investment, sector or manager will do well in the future. But you can find out exactly how much you're going to pay to own a fund ever year. That's reflected right in the fund's expense ratio.

And keeping costs to a minimum is even more important with a bond fund. Despite the 11% return on the average long-term government bond fund this year, bonds over the long haul don't return as much as stocks. (Stocks are generally more risky than bonds, and you're supposed to get paid more for taking on that risk.) And, as my colleague Beverly Goodman notes, some folks are worried about the huge

influx of cash chasing the bond fund market these days.

If you want low costs, you can head straight for Vanguard. But there are plenty of other cheap bond funds, such as the Bill Gross-run

(HABDX) - Get Report

Harbor Bond fund. Rule of thumb: You never want to pay more than 1% in annual expenses for a bond fund.

The D-Word Still Applies

If you don't want to take a bet on the direction of interest rates or the creditworthiness of companies, then you can simply buy a widely diversified bond fund.

The

(VBMFX) - Get Report

Vanguard Total Bond Market Index is just that. This broad index fund has been criticized lately for badly trailing its benchmark index this year. But its 10-year annualized return of 7.1% still beats 81% of similar funds. Plus, the fund's extremely low costs are still a major advantage moving forward. This fund is a cheap and easy way to build a high-quality bond portfolio of short- to long-term bonds.

Just as with stock funds, you can also give your money to a manager. And Gross is arguably the best bond manager around. The Harbor Bond is just one way to bet on his expertise. He also manages the

(PTTDX)

Pimco Total Return fund, the largest fund on the basis of assets -- that includes stock funds as well.

The Time Factor

You can buy a diversified fund that owns bonds of various maturities, or you can focus on just one area.

Bond funds, like the bonds they own, come in three basic maturity ranges: short, intermediate and long-term. The longer the maturity, the more exposure a bond has to interest-rate movements and the more volatile its price is going to be.

Quality Flight Into Bonds Spells Bubble Trouble
Bond fund buyers beware: You can lose money. This environment is not sustainable.

What Does the 'Smart Money' Make of AOL Time Warner?
Some managers think this battered stock may climb to $20.

If a 10-year bond is yielding 4% and rates rise, then that bond is now worth a lot less. Rates rise and prices fall. And those price swings will be more dramatic the longer the maturity.

You can decide how long you're going to own a bond fund, and then match your time horizon with the fund's average maturity. If you only have two or three years to invest, then stick with a short-term fund. If you're looking for a little more yield but can wait a few more years, then an intermediate-term fund might be a better investment.

You also have to decide how much credit risk you're willing to bear. Debt securities issued by the U.S. government don't really carry credit risk -- the U.S. government isn't going out of business. But corporate bonds certainly do. Corporate bonds are issued and backed by companies and tend to act more like stocks than like Treasury bonds. Their movements are affected by the health of the actual company. If you're buying a corporate fund, you should find a manager with solid long-term record of picking these kinds of bonds.

But even with that risk, a corporate bond fund isn't such a bad bet here. With investors rushing to safe investments over the past year, the hot returns have been in Treasuries and Treasury funds. Now corporate bonds look historically cheap compared with Treasuries.

Yield is an good estimate of your expected return on a bond. The yield on the 10-year Treasury is around a 40-year low. That says you aren't getting much in current income,

and

there's not much price appreciation left in those bonds. Rates don't have that much further to fall.

Just remember: When rates go up, prices go down. And you can lose money in a Treasury fund. And if you've got money that you cannot afford to lose, then put it in a money market fund or a CD.