S&P 500 closes at new all-time high of 6,305