Stocks hovered near the flat line throughout the day to end what was a turbulent trading week for U.S. equities.