High-quality bonds, particularly those issued by the federal government, are a favorite of investors looking for an asset that's less volatile and risky than stocks. However, all bonds come with a significant risk of their own: If you buy a long-term bond and then interest rates rise, the value of your bond will drop, because a bond's returns are based on the interest rate at the time of issuance. No one will want to buy your bond with a 2% yield when the new issues are offering 4%.

If you're interested in bonds but worried about rising interest rates, then there's a special type of bond you should consider.

TIPS to the rescue

Treasury Inflation-Protected Securities, or TIPS, are designed to get around the risk of rising interest rates. The principal of these special bonds will go up with inflation and down with deflation. Because the interest you receive is based on the amount of the principal, you get higher payouts during periods of inflation. Once the bond matures, you'll get back either the adjusted principal or the original principal -- whichever is higher. That means extended periods of deflation won't hurt your principal, although they will reduce your interest payouts.

Treasury bonds

Image source: Getty images.

What makes TIPS a better investment for rising-interest rate environments is the fact that interest rates and inflation usually move in the same direction. When the prices of goods are rising, interest rates are almost certain to rise as well. So while an ordinary bond would be losing value and returning less than newly issued bonds as interest rates climb, a TIPS bond will be increasing in value and paying out more (although the bond's interest rate won't go up).

As an example, let's say you hold a TIPS bond with an original principal of $1,000 and an interest rate of 2%. If inflation ticks upward and the principal is accordingly adjusted to $1,100, then your semiannual payout will rise from $10 to $11 per bond.

What you pay for inflation protection

Of course, there's no such thing as a free lunch, and TIPS are no exception to this rule. TIPS pay out at a slightly lower yield than the equivalent government bond that lacks inflation production. The difference between the two yields varies based on whether people think inflation is likely to rise steeply, rise slowly, or not rise at all. If experts say a period of steep inflation is coming, then the interest rate offered on TIPS will drop, because people will be willing to pay more for protection that they think will be more valuable. If experts predict little or no inflation, then the difference between yields on TIPS and on unprotected bonds will narrow. The difference between TIPS yields and regular bond yields is called the "breakeven" rate, because it's the amount that inflation will need to go up in order to make TIPS yield as much as, or more than, an unprotected bond.

Running the numbers

Now here's the crunchy part. Over the long term, the average rate of inflation in the US is roughly 3%. Therefore, any time the breakeven rate between long-term TIPS and long-term unprotected bonds is less than 3%, the odds become good that TIPS will produce better returns than standard bonds. And if the analyst-predicted rate of inflation over the next few years is greater than the breakeven rate, that's also a good sign for TIPS. When the two come together, it's an even stronger indicator that TIPS are a good buy. In late 2016, the Federal Reserve Bank of Philadelphia surveyed forecasters and found that the predicted rate of inflation over the next 10 years was 2.2%. Thus, if the breakeven rate drops below 2.2% in the near future, 10-year TIPS are likely to be a solid investment choice. As of this writing, the Federal Reserve Bank reports that the 10-year break-even rate for TIPS is 1.81%.

Another way to invest in TIPS

If buying TIPS from Treasury Direct doesn't appeal, consider investing in a fund or ETF that buys TIPS for you. Typically, funds that focus on short-duration TIPS are less risky in times when interest rates are in flux. The benefit of these funds when compared to buying TIPS directly is that you can get bonds with a range of maturity dates while investing relatively little money. That allows you diversify your TIPS investments without committing a huge sum of money.

The Motley Fool has a disclosure policy.