Stocks tick higher in volatile trading; S&P claws near all-time high