An "inverted yield curve" has historically signaled a pending recession.

Longer-term bonds pay higher yields, or returns, to investors than shorter-term bonds--with an inverted yield curve, those trends reverse.

The yield curve is now the most inverted since 2007, before the Great Recession.

The bond market is flashing a classic recession signal about the U.S. economy, with the most inverted "yield curve" since 2007 -- and that was before President Donald Trump shocked investors by threatening on Thursday to hit Mexico with tariffs. Time to run for the hills?

First, some background on what an inverted yield curve is all about. A bond yield is the return an investor gets on a government or corporate bond. Typically, investors demand higher yields from longer-term bonds to compensate them for the higher risk of tying up their money for a longer period of time. But when yields on some shorter-term bonds rise above those on longer bonds -- as is currently the case -- it has historically signaled a pending recession.

As a result, some financial pros are telling investors to brace for impact. After all, the yield curve inverted roughly 14 months before each of the past nine U.S. recessions. Others say a slowdown isn't a sure thing and that the yield curve is a red flag, not a divining rod. To be sure, by many measures the economy is healthy, with low unemployment, rising wages and and steady GDP growth.

Get Breaking News Delivered to Your Inbox

Still, the warning signs are there, according to some experts. "The message from the financial markets is clearly one of a slowing economy," wrote Joseph Lavorgna of Natixis in a research note. "Importantly, these expectations are not just limited to what is happening with the [yield] curve. Other metrics are also flashing caution on the outlook for U.S. real GDP growth."

Lower rates ahead?

One takeaway for investors is that the inverted yield curve suggests a more near-term development than a recession: Interest rate cuts from the Federal Reserve.

Only last year, the central bank was gradually raising interest rates, arguing that pushing up rates was necessary to keep the economy from overheating. After President Donald Trump took issue with the Fed's rate hikes, complaining that it was slowing growth, the Fed earlier this year said it would take a pause in rate-hike policy amid concerns about economic growth.

But the inverted yield curve suggests investors believe the Fed will go one step farther and actually lower rates, which would push bond prices up and their yields down. Lower rates would also help stimulate a slowing economy, which might be needed to offset the impact of the U.S.-China trade war.

"The bond market thinks this rate hike cycle is over, and the futures market agrees—it is pricing in an 83% chance of a rate cut this year, and zero for a rate hike," wrote Will Denyer, an economist at Gavekal Research.

Trade war impact

Although the U.S. grew a robust 3.1% in the first three months of the year, the economy is already decelerating, according to economists. In part, that's due to the Trump administration's trade war with China, a conflict experts said could take a toll on everything from jobs to consumer spending.

Gregory Daco, chief economist at Oxford Economics, thinks those rising trade tensions are one reason why U.S. economic growth has peaked. As a result, he expects the Fed's next move on interest rates will be a 0.25% cut early next year.

Experts are recommending that investors stay alert. Denyer advises avoiding bonds because of lower yields, especially when compared with equities. He also recommends "modest" overweighting of stocks, partially because of their attractiveness compared with bonds, and because corporations will enjoy a lower cost of borrowing if the Fed lowers rates.

As for the risk of a recession, Commonwealth Financial Network chief investment officer Brad McMillan thinks other economic signals remain strong, such as job growth and consumer confidence.

"So, will we have a recession?" he wrote in a research note. "At some point, certainly. But right now we are at a yellow light, not a red one."