Main Street and Wall Street are finally seeing eye to eye when it comes to stock investing.

After going all in on equities for most of the year, individual investors just bailed amid the October sell-off, raising cash at the fastest pace in three years, according to data from Charles Schwab Corp.

Meanwhile, Goldman Sachs data showed hedge funds kept trimming stocks, with clients' net exposure falling to the lowest level since November 2016.

The concerted action highlights a broad deterioration in sentiment as stocks have erased about $3 trillion in value from the September peak, sending the S&P 500 toward one of its worst years since the bull market began in 2009.

While concerns over global trade, interest rates and earnings are unlikely to go away soon, mounting pessimism strikes some as a necessary precursor to a recovery.

"Now the question is, can we get out of it?" said Joseph Saluzzi, Themis Trading partner and co-head of equity trading.

"Some investors may begin to get scared by this type of move," he said. "If they pull back more, the market can exacerbate the downtrend and get to a value spot."

Cash as a percentage of assets among Schwab clients increased in October to 11.1 percent from a record low of 10.3 percent.

Last time retail investors flocked to cash like this was in August 2015, when the S&P 500 was mired in a 10 percent correction. Back then, the index fell another month before staging an 8 percent rally.

Unlike individual investors, hedge funds turned defensive after the February rout. Partly because of that cautious posture, money managers had largely resisted selling in the early part of this sell-off, before giving up.

This month, they are unwinding positions in favored stocks such as technology. Hedge funds, which dove back to tech at the end of October, have turned net sellers again, with the group accounting for more pressure than in other major industries, client data from Goldman Sachs showed. Meanwhile, they boosted bearish bets against internet software developers and electronic equipment makers.

As of mid-November, their exposure to tech stocks hovered at the lowest relative to the market since December 2015.

Coinciding with their retreat, tech stocks suffered another round of deep losses, leading to a general market slide.

Wang and Karsh write for Bloomberg.