Don’t be fooled by the near-record highs in the US stock market: Sophisticated investors are on edge about the health of the global economy and corporate profits.

Pessimistic fund mangers are rushing out of stocks and piling into cash and ultra-safe government bonds, according to a Bank of America Merrill Lynch survey published on Tuesday. They’re also rapidly marking down their estimates of global growth and earnings.

“Investors have not been this bearish since the Global Financial Crisis, with pessimism driven by trade war and recession concerns,” Michael Hartnett, Bank of America Merrill Lynch’s chief investment strategist, wrote in the report, which surveyed 179 fund managers with more than half a trillion dollars of assets under management.

That doesn’t mean investors are bracing for a repeat of the 2008 financial crisis. Rather, the survey provides evidence of a sharp deterioration in sentiment among financial professionals.

Survey: Finance execs see recession coming but confident about own firms, need talent

That gloomy mood helps explain why bond yields have cratered around the world as jittery investors bet on more easy money from central banks. The 10-year Treasury yield tumbled on Tuesday to 2.03%, down sharply from 2.6% in April.

In Europe, France’s 10-year bond rates turned negative on Tuesday after European Central Bank President Mario Draghi signaled a willingness to do more to boost the continent’s sagging economy.

Intense focus on trade

The biggest fear continues to be the trade war. Fifty-six percent of investors surveyed by Bank of America listed it as the top “tail risk.”

The intense focus on trade was on full display on Tuesday. Gains on Wall Street accelerated after President Donald Trump tweeted that he will have an “extended meeting” with Chinese President Xi Jinping at next week’s G20 summit in Japan.

The trade war between the world’s two largest economies has set off fears of a severe slowdown or even recession.

Exclusive Q&A: Inside Duke CFO survey, from hiring to recession to immigration

Global growth expectations “collapsed” between May and June by the most in the 23-year history of the Bank of America fund manager survey. Fifty percent of investors are now expecting growth will weaken over the next year.

And a record-high 87% of investors surveyed by Bank of America say the global economy is in the late cycle.

Equity allocations tumble to 10-year lows

Unsurprisingly, Wall Street is bracing for once-booming corporate profits to soften. Global profit expectations plunged by 40 percentage points in June — the second-sharpest one-month decline in the survey history.

It’s not just the Bank of America report suggesting that the strong stock market performance belies nervousness beneath the surface.

The CNN Business Fear & Greed Index of market sentiment is still flashing “fear,” compared with “greed” a year ago. That’s despite the fact that the S&P 500 has climbed more than 6% in June. The broad index is now just 1% from all-time highs.

Although US stocks have rebounded, sophisticated investors are taking a more defensive posture by rotating out of risky assets and into safer ones. Asset allocations are “implying recessionary conditions,” Bank of America said.

For example, the amount of capital being deployed into global stocks tumbled by 32 percentage points in June, the second-biggest drop in the Bank of America survey’s history. Equity allocations are now the lowest level since March 2009 — the month the bear market in US stocks ended.

Peter Boockvar, chief investment officer at Bleakley Advisory Group, said it’s unclear what signal — if any — can be gleaned from the near record high in stocks and near record low in credit spreads.

“Are they discounting good times ahead or are markets just responding to hopes of a cut and the Fed and the markets are just chasing each other in circles?” Boockvar wrote in a note to clients on Tuesday.

Contrarian signal?

It’s clear that investors are going headfirst into fixed income, with bond allocations soaring to the highest level since September 2011, Bank of America said.

The average cash balance among fund managers jumped to 5.6% in June, compared with 4.6% during the prior three months. Bank of America said that it was the biggest jump in cash since the debt ceiling crisis of 2011.

However, that could be a sign that bearish sentiment has gotten too extreme.

When average cash balances rise above 4.5%, a contrarian buy signal is triggered for stocks, Bank of America said. The firm’s “Bull & Bear Indicator” is also inching toward a contrarian buy signal, though it’s not there yet.

“The tactical ‘pain trade’ is higher yields and higher stocks,” Hartnett wrote, “particularly if the Fed cuts rates on Wednesday.”