S&P 500 rises to record and turns positive for the year