S&P, Nasdaq end higher as July hot streak continues : compar