The nine-year bull market might be on its last legs.

Fifty-eight percent of global money managers surveyed by Bank of America Merrill Lynch think the stock market has already peaked or will later this year.

Despite the market mayhem of recent months, the S&P 500 has quadrupled since its financial-crisis lowpoint in early 2009.

Yet a more cautious attitude led investors to trim their holdings of stocks in early April to the lowest level since President Trump's election in November 2016, Bank of America said. The survey featured responses from 216 fund managers that control about $650 billion of assets.

"The bulls have been silenced but not defeated," Michael Hartnett, Bank of America Merrill Lynch's chief investment strategist, wrote to clients. He noted that while cash balances have risen, 39% of investors think stocks won't peak until 2019 or later.

The number one fear among money managers surveyed is that a trade war will erupt. Trump's crackdown on China's theft of intellectual property has already led to several rounds of tariffs by Washington and Beijing. China announced plans on Tuesday to place a huge import charge on US shipments of sorghum, a grain used to feed livestock.

The worry is that trade restrictions will derail the global economy and dash the confidence of businesses and consumers. Trade war fears rocked the stock market in recent weeks, though Wall Street has rebounded on hopes that China and the United States will step back from the brink.

Some analysts remain worried about trade.

"I believe it is erroneous to assume that there will be a dialing down of trade tensions," Kristina Hooper, chief global market strategist at Invesco, wrote in recent blog post. "Protectionism remains the big risk markets need to be concerned about."

Related: Stock the market! I want to get off!

Trade war or not, it's clear that the extreme euphoria of late 2017 has faded along with hopes of a global economic boom.

Just 5% of investors polled by Bank of America expect faster global growth over the next 12 months. That's down from about 40% a few months ago and the lowest since the June 2016 Brexit vote in the United Kingdom.

The IMF warned on Tuesday that, although the global economy is still on an upswing, growth will slow after 2019.

Waning economic optimism has forced investors to dial back their predictions for blockbuster profits. Just 20% of investors surveyed by Bank of America expect profits to improve over the next 12 months. That's an 18-month low.

Earnings are surging now thanks to the corporate tax cut, but that momentum will be difficult -- if not impossible -- to sustain.

S&P 500 earnings per share are projected to surge by 18.4% in 2018, according to FactSet. But that stellar growth is expected to slow to 10.4% next year.

Likewise, revenue growth is forecast to slow from 6.7% this year to 4.8% in 2019.

Related: IMF says global economy will slow after 2019

An earnings slowdown could make it more difficult for companies to pay down the debt they've piled on over the past few years. Corporate debt relative to GDP recently matched an all-time high.

A record-high 33% of investors surveyed by Bank of America think companies have borrowed too much. There was also an eight-year high in the percentage of investors who want companies to improve their balance sheets.

The bulls are hoping that the cautious sentiment among investors is just a reflection of Wall Street's messy bottoming process. After sinking into a correction and falling to a recent low on April 2, the Dow has surged about 1,500 points, or 6%. It's now back to even on the year and less than 2,000 points from the all-time high set in January.

"When the market is finding its lowest point (the bottom), the process to get there can be quite frustrating and even confusing," John Lynch, chief investment strategist at LPL Financial, wrote to clients.

Lynch is betting the stock market can still post double-digit returns this year thanks to soaring earnings and the growing economy.

"When everyone expects trouble," Lynch wrote, "it can pay to be contrarian."