That sentiment change comes with the broad market index already up 27.3% year to date. Despite the strong rally, investors have pulled $23.4 billion out of U.S. stock-based funds over the past year, according to Morningstar.

Expectations are for the S&P 500 to peak at a bull market high of 3,322, according to the December Bank of America Global Research Fund Managers Survey. While that's just 4% from current levels, it represents a solid turn higher just since November, is 10% up from a year ago and is the highest reading since BofA started asking the question in June 2018.

Professional investors closed out 2019 in an upbeat mood and are dumping cash to buy into this stock market rally, according to one of the most widely followed Wall Street surveys.

In addition to that one bullish data point in the BofA survey, there were other indications that the pros are looking for strong gains.

Cash allocations fell to 4.2% of portfolios, the lowest level since March 2013. BofA's "Bull and Bear" reading rose to its most bullish level since April 2018. Also, the global economic backdrop no longer looks so scary: A net 29% of those surveyed see growth improving over the next 12 months, a dramatic turnaround from a net minus-50% in June and a record swing for a two-month period.

A net 68% of respondents say recession is unlikely in 2020. That is the biggest two-month improvement in sentiment since May 2009. That dates marks a key month because the Great Recession was just coming to an end.

The survey "confirms the bulls are back and are buying equities," wrote Michael Hartnett, BofA Global Research's chief investment strategist.

Respondents reported being a net 31% overweight, the highest level of the year, though the allocation level is just above its long-term average, indicating that sentiment has not gotten overheated.

The survey showed that one of the big tailwinds for the next leg in the bull market could be an unexpectedly positive result in the U.S.-China trade war, which would push companies to allocate more to capital expenditures.

Investors said they are selling bonds for stocks and are buying commodities and other asset classes. While allocations to U.S. equities decreased, managers put more money in emerging markets, Japan and the U.K. They increased allocations to banks and tech and pulled back from defensive sectors including utilities and staples. Industrials, health care, energy and materials also saw more interest.

Trades considered to be the most crowded were tech and growth stocks, U.S. Treasurys, and investment grade corporate bonds, with the bet against volatility showing the biggest monthly gain.