Wall Street ends tumultuous year near record highs