Why would anyone want to buy a bond with a negative yield?

It’s a good question especially given that experts estimate that there are almost $16 trillion of bonds in the world that have negative yields. That’s a lot of securities that investors have purchased knowing that they’ll get back less money than they invested. It means that a one-year bond with a face value of $1,000 that yields minus 1% will leave the investor with $990 when the bond matures.

Making such an investment might seem silly. But there are at least five situations where it may make sense.

1. The bond offers security at a cost

Negative-yielding bonds that have a minuscule risk of default can be attractive to some investors. “Think of the negative yield as the cost of storage," says Sam Stovall, chief investment strategist at New York financial research firm CFRA. “Would you rather pay nothing for questionable security, or would you rather pay a little bit more to ensure your principal is safe?" For instance, the “cost of storage" when investing in a 10-year German bund, which has a solid AAA credit rating, would be 0.5% a year based on recent yields. Yes, there’s a cost, but you have a near guarantee that you will get almost all your money back when the security matures.

Holding cash in a deposit account with zero or ultralow interest might not be an available alternative to investors when bond yields turn negative. Some banks already are charging savings-deposit customers a negative yield. Britain’s Starling Bank became the first U.K.-based bank to charge customers a negative interest rate: The digital bank charges 0.5% on euro deposits of €50,000 or more, equivalent to about $58,500 or more.

2. The chance of a quick trading profit

Traders would be willing to buy a negative-yielding bond if they thought that the yield might dive deeper into negative territory. Fixed-income prices and yields move inversely, so if a bond yield gets even more negative, the bond price would rally, allowing the trader to make a profit.

3. When expected currency moves will likely offset the negative yields

People who invest internationally also have to contend with future changes in the value of a currency, or more specifically, the expected movement in the currency’s value. For instance, the 10-year U.S. Treasury note currently yields around 0.7%, which is better than the minus 0.5% for the 10-year German bund. However, anyone buying the bund six months ago would have made money from the rally in the euro that more than offset the difference in the yields. On March 30 one euro would fetch $1.10 versus $1.17 recently. The 6% currency rally more than compensated for the 1.2 percentage point difference in yields.

If that trend continues, then it should be clear that the bund would make a more attractive investment than the U.S. Treasury. However, there are risks in investing this way because forecasting future currency movements is notoriously tricky.

“You’d be putting an awful lot of weight on something that hasn’t had a long history," says David Ranson, director of research at financial-analytics firm HCWE & Co.

4. When the bond is still safe, relatively speaking

During the 2008-09 financial crisis, investors often described the U.S. as the least dirty shirt in the laundry basket, meaning that while the U.S. wasn’t in great shape, other countries were in worse condition. In terms of investing in negatively yielding debt, we can use a similar idea. If bonds of similar quality have different yields, then investors would pick the ones with the least negative yield. Such opportunities are rare because investors quickly take advantage of such discrepancies to snap up the better yielding securities.

5. Purchasing power is maintained

The most important reason investors would willingly choose to invest in negative-yielding bonds is when there is deflation, or a sustained drop in the price level for goods and services. For instance, consider a one-year bond that yields minus 5% but at the same time inflation is expected to be minus 10% over the same period. That means the investor in the bond would have more purchasing power at the end of the year because prices for goods and services would have declined far more than would the value of the investment in the fixed-income security.

“You can have negative interest rates at any level as long as the expected inflation rate justified," says Mr. Ranson. Put simply, if your purchasing power grows over the investment period, it doesn’t matter how negative the yield is on the bond.