Coming into 2018, investors were excited about the prospects for the stock market. Stocks were performing well, and the promise of a new set of tax laws that greatly favored corporate profits led to a big move higher for the Dow Jones Industrials (DJINDICES:^DJI) and other top stock benchmarks.

By contrast, investors were nervous about the bond market. With the Federal Reserve having continued to raise short-term interest rates in an effort to normalize monetary policy, many feared that those rising rates would work their way toward longer-maturity bonds, potentially producing massive price declines that many bond investors had never seen before.

Person jumping between two cliffs in front of a sunset, with numbers 2018 on the left and 2019 on the right.

Image source: Getty Images.

As things turned out, though, the bond market yet again gave investors a positive surprise. Bonds didn't manage to avoid modest losses, but they nevertheless topped the performance of the stock market.

BND Total Return Price Chart

BND Total Return Price data by YCharts.

Another down-and-up year for bonds

Near the start of 2018, returns from the bond market played out just about exactly how investors had foreseen. January led to a huge run higher for stocks, but expectations for faster growth sent long-term bond yields higher, sending the price of longer-maturity bonds lower. By the spring, some exchange-traded funds tracking bonds had seen losses of 5% or more -- even when you consider the interest income that those ETFs had generated along the way. Even broader-based bond investments like Vanguard Total Bond Market (NASDAQ:BND), which holds a mix of short- and long-term bonds from a variety of different issuers, showed declines for the year.

By early fall, things looked quite ugly for the bond market. Stocks were up more than 10% as of early October as economic growth accelerated, but the Fed seemed hell-bent to keep boosting interest rates, sending bond prices lower still and yields to their highest levels in years.

^TNX Chart

^TNX data by YCharts. Note: This index represents the percentage yield on 10-year Treasuries multiplied by 10; e.g., a level of 26.86 equates to a rate of 2.686%.

What happened after that shocked investors. The stock market went into a tailspin, falling nearly 20% from its highs and leading some to predict that a recession was imminent. Falling predictions for economic growth are generally bad for stocks, but they're great for the bond market, and bond yields fell significantly. Although they didn't quite get back to where they started the year, long-term interest rates did retrace a lot of their upward move earlier in the year. That helped limit total-return losses for the year on many bond ETFs, even as the broader stock market finished with losses of around 5% in 2018.

Will bonds beat stocks again in 2019?

At this point, there's a huge amount of uncertainty about the likely path of the global economy and the financial markets in 2019. Stocks have rallied impressively to start the year, and fears about a recession have diminished. That's caused bond market yields to move back higher, and bond ETFs are showing modest losses so far year to date.

If the economy gets back on a strong footing, then we're likely to see the same upward pressure on interest rates that occurred during most of 2018, and that could put an end to the bond market's relative outperformance over stocks. However, if the economy falters, then bonds could once again be a surprise winner in 2019.

Check out all our earnings call transcripts.