(Bloomberg) -- JPMorgan Chase & Co.’s Marko Kolanovic says the worst of the rout that’s wiped 4.1 percent from the S&P 500 this week is likely over now that selling forced by computer-driven trading strategies has run its course.

Stocks halted a six-day slide -- the worst since February -- with the S&P 500 clinging to a gain that at one point Friday reached 1.7 percent. The rout has been exacerbated by so-called commodity trading advisers and other systematic investors.

Systematic selling may be about 70 percent over, Kolanovic said, and investors should buy the dip unless volatility continues higher.

The biggest selling pressure on markets this week was from option gamma hedging, or bets related to changes in volatility levels, on Oct. 10 -- but that risk is now balanced and could turn into a positive impact as option buyers purchase equities, Kolanovic wrote in a note Friday.

“The remaining part of systematic selling is from volatility targeting (insurance, parity funds, etc.) which will go on for several more days,” Kolanovic wrote. “We think that the majority of systematic selling is behind us (~70%).”

Volatility targeters will sell over a longer period of time than other systematic strategies -- usually three to 10 days -- so “these flows should be easier to digest by the market,” the note said.

Barclays Capital strategist Maneesh Deshpande wrote in a note yesterday that volatility-control funds will need to sell about $130 billion of equities to cut their exposure over the next couple of days, and exchange-traded-fund investors may sell around $40 billion in the next few days.

READ: Barclays Sees Signs of Capitulation, But More Selling to Come

Share buybacks, fundamental investors lured by cheaper valuations and fixed-weight portfolio rebalancings should help counter selling, Kolanovic said, adding that the amount of systematic assets and leverage was an estimated 10 percent to 30 percent less heading into this week than it was at the time of the February meltdown.

“Given that equity indices already experienced comparable declines to February (and e.g. Russell 2000 even a bigger drawdown), we think that the current setup favors buying the dip,” Kolanovic wrote. “A risk to the thesis is that market volatility continues to move higher, which would result in further outflows from Volatility Targeting funds.”

The S&P 500 rose as much as 1.7 percent Friday before nearly erasing those gains in the middle of the session. Stocks bounced once again, closing 1.4 percent higher at 2,767.13.

“We still expect the market to go higher into year-end, and maintain our S&P 500 price target of 3,000,” Kolanovic said. “We expect a net positive earnings season in October, strong buyback activity in November and positive seasonal effects in December.”

(Adds closing index results beginning in the first paragraph.)

To contact the reporter on this story: Joanna Ossinger in New York at jossinger@bloomberg.net

To contact the editors responsible for this story: Chris Nagi at chrisnagi@bloomberg.net, Dave Liedtka, Andrew Dunn

©2018 Bloomberg L.P.