New York (CNN Business) The Dow fell 800 points Wednesday after the bond market, for the first time in over a decade, flashed a warning signal that has an eerily accurate track record for predicting recessions.

Here's what happened: The 10-year Treasury bond yield fell below 1.6% Wednesday morning, dropping just below the yield of the 2-year Treasury bond. It marked the first time since 2007 that 10-year bond yields fell below 2-year yields.

US stocks fell as investors sold stock in companies and moved it into bonds. Thefell as many as 808 points and was nearly 3.1% lower at the close. The broaderclosed down 2.9% and thesank 3% Wednesday. It was the worst day for stocks of 2019.

Investors are on edge because the German economy shrank in the second quarter , and the US-China trade war still looms large over markets despite the latest truce . Industrial production in China grew at the weakest rate in 17 years in July.

As the global economy sputters, investors are plowing money into long-term US bonds. The 30-year Treasury yield fell to 2.03%, the lowest rate on record.

Government bonds — particularly US Treasuries — are classic "safe-haven" assets that investors like to hold in their portfolios when they're nervous about the economy. Stocks, by contrast, are riskier assets that tend to be more volatile during economic slowdowns.

Here's what this all means: Normally, long-term bonds pay out more than short-term bonds because investors demand to be paid more to tie up their money for a long time. But that key "yield curve" inverted on Wednesday. That means investors are nervous about the near-term prospects for the US economy. Bonds and yields trade in opposite directions, so yields sink when investors buy bonds.

Part of the yield curve has been inverted for several months. In March, the yield on the 3-month Treasury bill rose above the rate on the 10-year Treasury note for the first time since 2007. It inverted again on July 24 and has remained negative. But Wednesday marked the first time in over a decade that the "main" yield curve — the 2-year / 10-year ratio — had inverted.

That spooked Wall Street, because an inversion of the 2/10 curve has preceded every recession in modern history . That doesn't mean a recession is imminent, however: The Great Recession started nearly two years after the December 2005 yield-curve inversion.

William Foster, Moody's lead US analyst, predicts the US economy will avoid a recession in 2019 and in 2020, despite the yield curve inversion's warning sign. He expects growth to slow in the second half this year into 2020.

The US economy remains strong: Unemployment is historically low, consumer spending is booming, and the financial system is healthy.

"Even though we're discouraged by the yield curve's shape right now, we see few signs of danger ahead," said John Lynch, LPL Research chief investment strategist, in a blog post.

Stocks have grown volatile lately, with the Dow plunging and rising more than 350 points in each session this week. But the yield curve inversion doesn't mean the stock market is about to collapse. The S&P 500 has rallied 22% on average between the first time a yield curve inverts and the start of a recession, Lynch noted.

Following the last yield curve inversion in 2005, stocks rose for 12 straight months.