U.S. stocks finish higher, with Dow and S&P seeing seventh day of gains