Unemployment is near lows not seen in half a century. The American economy is set for its best year since 2005. Large corporations are producing giant profits. Even wages are starting to rise.

And the stock markets are a mess.

The losses extended on Tuesday, as the S&P 500-stock index turned negative for the year, stoking fears that one of the longest bull markets in history could be at risk.

The stock market’s struggles may seem incongruous against the backdrop of strong economic growth. But stocks often act as an early warning system, picking up subtle changes before they appear in the economic data.

In recent weeks, retail stocks have been hit over concerns of rising costs, a sign that President Trump’s global trade battles may be starting to take a toll and that higher wages are cutting into profits. Commodities and the companies that depend on them have been pummeled by the prospect of weaker demand should the global economy slow. Five tech giants — Facebook, Amazon, Alphabet, Apple, and Netflix — have shed more than $800 billion in market value since the end of August, the fallout from slowing growth and regulatory scrutiny.

Read more in The New York Times.