Stocks moved moderately higher over the course of the trading session on Thursday after initially showing a lack of direction. The gains on the day partly offset the notable weakness seen in the two previous sessions.