High-quality bonds have taken a beating lately, but they still make sense for the long-term investor. On top of that, the market indicates there is less risk of default now than there was a few months ago.

Here's what happened and why such investments still make sense:

Starting in early September, bond prices took a tumble as investors began anticipating that the Federal Reserve would start raising interest rates in an effort to normalize monetary policy. Bond prices move inversely with interest rates, so fixed-income investors reacted swiftly.

For instance, the anticipation of the Fed's hike sent the PIMCO Investment Grade Corporate Bond (CORP) - Get Report  ETF, which tracks a basket of high-quality corporate fixed-income securities, down more than 5% from the beginning of September through Dec. 21.

That might sound like a paltry pullback, but when you look at historic returns in bonds, it's hefty. The Bloomberg Barclays U.S. Aggregate Bond Total Return index shows average annual gains of 4.56% over the last 15 years (through Dec. 21), according to Morningstar. Put in the bleakest way, the bond selloff over the last three-and-a-half months was equivalent to reversing almost an entire year's average return.

There will likely be more interest rate increases in the future. Still, that selloff doesn't mean you should dump all bonds from your portfolio. 

"The money the bonds lose today will be made up for over time as the coupons get reinvested, and should be a benefit," says Matthew Tucker, BlackRock's Head of iShares Americas in San Francisco. "It will help provide better total returns."

In other words, higher interest rates not only mean falling bond prices, they also mean bigger coupons, a.k.a. interest payments. Sooner or later the gains from reinvesting the coupons will makeup for the losses from the falling bond prices and then add some more. Overall, it should mean better total returns for longer-term investors than they would have had if rates didn't rise.

So, don't sell your bonds.

Diversification lowers volatility.

Higher returns from reinvested dividends are only part of the story.

Holding fixed income securities as part of a bigger portfolio helps lower the overall volatility. That's because the prices of bonds and stocks are not correlated. When stocks move higher, bond prices may move up, down, or not at all. Lower volatility means that your quarterly investment statements will see smaller swings in value.

The bonds provide the portfolio with what Tucker calls ballast, or more stability.

What is the appropriate level of bonds in a portfolio? It differs for everyone based on age and tolerance for risk, but a good starting point for most people would be to have 30% to 40% in fixed income, according to Tucker and many other financial experts.

Bond market signals are favorable.

Despite the selloff in bond prices, that doesn't mean high-quality, or investment-grade bonds, are riskier now than they were a few months ago. (This is quite unlike how the stock market operates.)

The spread, or the amount corporate borrowers must pay over what the government pays, has declined dramatically over the past few months. That credit-spread for high-quality companies, which reflects the perceived risks of default by the borrowers, fell to 1.65% on Dec. 21 vs. 1.83% on Sept. 1, according to data from the Federal Reserve Bank of St. Louis.

In short, despite the bond selloff investors see lower risks of default now than they did a few months ago.

These lower spreads also auger increased growth in the economy in the months ahead. HCWE & Co research director David Ranson has told me many times that the reduced spreads are a sign that capital is being put to work in the economy. That leads to higher growth, which of course, would be even better for investors.

The author is an independent contributor and owns none of the securities mentioned in this story.