S&P 500 ends Thursday within ten points of all-time highs near $4,800