Stocks close little changed after a volatile session