The S&P 500 turned modestly lower late as investors continued to rotate out of the tech sector into health care, real estate and consumer staples.