Stocks hit all-time highs for the first time since January