Nasdaq, S&P 500 close at record highs for 4th straight day