Mario Tama/Getty

US stocks suffered their worst day of the year on Wednesday after the yield on 30-year Treasurys dropped to a new low and the spread between two- and 10-year Treasury yields inverted for the first time since 2007.

The inversion of the yield curve compounded concerns of an economic slowdown in the US, as the occurrence has preceded each of the last seven recessions.

Disappointing economic data from Germany and China caused the rally in global bonds as investors shifted away from equities and toward the relative safety of long-term Treasurys.

Visit the Markets Insider homepage for more stories.

US stocks plummeted on Wednesday after the spread between two- and 10-year Treasury yields fell below zero for the first time since 2007, igniting fears of an economic slowdown.

The "inversion of the yield curve" has happened before each of the last seven recessions. And it has been coming for some time now, as the spread has been shrinking over the past several months.

Meanwhile, the yield on 30-year Treasurys also fell to a new low, piling on to concerns of a recession.

Here's a look at the major indexes as of the 4:00 p.m. close on Wednesday:

Worrisome data from Germany and China, two of the world's largest economies, spurred the bond rally as investors fled to the relative safety of haven investments like long-term Treasurys.

China's industrial output growth shrunk to a 17-year low in July and fell short of analysts' expectations. Retail sales and capital spending for July also came in below forecasts, indicating a broad-based slowdown in China's economy. Germany's economy contracted by 0.1% in the second quarter as exports slumped amid the trade war between the US and China.

Wednesday's losses erased gains from a rally on Tuesday that was prompted by the Trump administration's decision to delay some tariffs on Chinese imports in September.

Within the S&P 500, these were the biggest losers:

And the meager group of biggest risers:

Bank stocks also fell amid the broader market sell-off as investors grew worried about profits from their lending businesses. Citigroup and Bank of America slid more than 4.5%, and JPMorgan fell about 4%.

Shares of Macy's plummeted as much as 18% to a 10-year low after cutting its 2019 profit estimates and missing second-quarter earnings expectations. The revised forecast doesn't take into account the Trump administration's recent tariff announcement that duties on some goods would be delayed until December 15.

Macy's earnings miss dampened the outlook for the wider-retail industry, sending shares of competing stores Nordstrom and Kohls tumbling more than 10%.

Every sector in the S&P 500 declined on Wednesday. Energy stocks dropped the most, posting a loss of 4%, while financials and communications shed more than 3.5%.

Markets Insider is looking for a panel of millennial investors. If you're active in the markets, CLICK HERE to sign up.

NOW WATCH: This is the shortest route for a road trip across the US to see 50 national landmarks