Traders in the OEX pit at the Chicago Board Options Exchange climb the walls of the pit in their scramble to make trades 18 April 2001 in Chicago, Illinois, at the moment news hits that the Federal Reserve has made an unexpected half-point cut in interest rates. A

Investors pulled a whopping $84 billion from stock-focused funds in the past six weeks, compared with the record inflows of $24 billion into funds invested in government bonds during the same period. BofAML's market indicator is flashing signs that investors are moving too far away from risk assets and it's time to hop back in.

The recent exit from risky assets like stocks by investors sent a powerful contrarian "buy" signal for the market not seen since during the Brexit turmoil, according to a Bank of America Merrill Lynch market gauge with a strong short-term track record.

BofAML uses a proprietary "Bull & Bear" indicator that gauges when inflows or outflows point to investors moving too far to either side. The current reading of 1.8 shows "extreme bear," triggering the first buy sign for risk assets since June 2016 when the Brexit vote tanked the global markets, Michael Hartnett, BofAML's chief investment strategist, said in a note titled "Time to Buy" on Friday.

The stock market has tumbled since October when trade battles intensified and recession fears crept in. It ended 2018 with losing 6 percent, wiping out all the gains earlier in the year. In January 2018, the same indicator sent a strong sell signal when investors poured record cash into equities funds, indicating the market may be overheating.

The Bull & Bear indicator has proven its accuracy when it hits the "extreme bear" level — with the previous 15 buy signals since 2000, global stocks turned out to return 6.1 percent on average three months later, Hartnett pointed out.

To be sure, Hartnett said this may bot be the "big low" for the markets over the long term, but for now it's due for a bounce.

Stocks rocketed higher on Friday after a better-than-expected jobs report and rebound in tech shares like Apple, which were hit hard on Thursday because of the iPhone maker's reduced forecast.

WATCH: Fed offered more change in communication than policy