Financial planning wisdom generally suggests holding a mix of stocks, bonds, and cash. Of course, the percentage of each will vary from person to person, depending on such factors as age, employment, wealth status, and risk tolerance. Percentages may also change based on current market conditions.

But sometimes even so-called safer assets aren't entirely safe. That was true last year when many investors reduced their equity allocations as the stock market tanked, shifting some of their money to bonds. However, the bond market also fell. In fact, it was the first year since 1969 that both the stock and bond markets slipped by double digits. 

Now, as the stock market rises this year, how should investors think about buying bonds? Let's take a look.

People in a trading office with computers.

Image source: Getty Images.

Why do investors buy bonds?

There aren't too many sure things in investing, but some are more sure than others. When you buy a bond, you receive regular interest (or coupon) payments until the bond matures. True, some stocks will pay a regular dividend, but the stock's price can vary all over the place -- and you might not get back the same principal you put in when you decide to sell the stock. 

That leads to a second advantage of bonds. When the bond matures, whether in five years, 10 years, or the like, you regain the principal. During its life, a bond's value can also rise or fall, depending on various factors like the economy and interest rates. But again, if you hold to the bond's maturity, you will receive back the initial amount you put in.  

Finally, bonds in various forms can often serve as a hedge against stocks. The stock and bond markets tend to perform inversely, because investors allocate more funds to equities when the stock market is rising, sending bond values lower. Conversely, if the stock market is dropping, many investors will shift some of their assets to the greater safety of bonds.

So what happened last year?

Despite the advantages mentioned above, it's not always smooth sailing for bonds -- which is what investors saw last year when interest rates shot up. As that happens, the value of a currently held bond goes down since investors can now buy a similar bond -- say, a 10-year Treasury -- with a higher coupon payment.

And last year interest rates went up a lot. Since March 2023, the Federal Reserve has raised its benchmark interest rate 10 times -- and by five full percentage points -- to a current range of 5% to 5.25%. That helped send the S&P 500 Bond Index down by as much as 20% by last October. While bonds have recovered a bit since then, the index is still flat for the past 12 months.

So what happens next?

A key question now for investors is where interest rates are headed next. At its latest meeting in June, the Federal Reserve indicated that a couple of more interest rate hikes may be on the table. But after that, is it possible that rates may have hit their peak? It's hard to know for certain.

Meanwhile, the S&P 500 is up 16% this year, but it's still nearly 7% off its high from last year. We're not necessarily in bull market territory yet, but investors are riding a wave of enthusiasm as interest rate hikes are on pause and we've yet to hit a recession.

Bond prices are also impacted by interest rates, and you would expect the same pause in rate hikes to make bonds more valuable. But investors have been slower to move back into bonds. So at current levels, bonds do offer some pretty attractive yields right now.

The stock market may offer the greater ability for wealth creation, but bonds at a good price offer an anchor. If you're someone who prizes a well-balanced, fortified portfolio, now is a good time to buy bonds.