The S&P 500's pullback is nearing its end