Bank of America's near-perfect market indicator is pointing to a strong buy

  • Bank of America's Sell-Side Indicator, a measure of stock allocations in analysts' portfolios, declined during the October sell-off by the most in 14 months.
  • When the gauge hits this level, market returns have been positive 94 percent of the time, with a median 12-month return of 19 percent.
Brendan McDermid | Reuters

The continuing deterioration in investor sentiment is triggering a buy signal from a measure that has a 94 percent success rate.

Bank of America Merrill Lynch's Sell-Side Indicator fell by the most in 14 months during the stock market's awful October, which saw the S&P 500 tumble 6.9 percent. The gauge measures sentiment from sell-side analysts and fell to a reading of 56.4 from 56.9, indicating the percentage level of portfolios allocated to stocks.

The indicator is contrarian in nature, meaning that extremes in sentiment suggest that the market is about to go the other way. For example, a reading of 61.9 represents high bullishness and thus triggers a "sell" signal.

When sentiment hits the current level or lower, returns over the next 12 months have been positive 94 percent of the time, according to BofAML. The median return in such cases is a gain of 19 percent.

The firm's strategists note that the indicator is just one of five tools it uses to estimate market direction.

"The current level is the lowest in almost a year as pessimism gripped the market amid concerns over profit growth peaking, a hawkish Fed, China-US trade tensions, and weak global fundamentals," Savita Subramanian, equity and quant strategist at the firm, said in a note.

The indicator isn't perfect. However, the firm did use a similar gauge, its "Bull & Bear" indicator, to accurately warn clients in late January and early February that a sell-off was coming.

Overall, BofAML holds an optimistic view of the market. The firm's 2018 target for the S&P 500 remains 3,000, indicating a 10.6 percent gain from Wednesday's close.

WATCH:Five strategies you should use to protect your portfolio