S&P, Nasdaq hit record closing highs on earnings bullishness