S&P 500 notches record high for second day after Target, Lowe’s results beat