Stocks fluctuated over the course of the trading session on Thursday but largely maintained a positive bias before ending the day mostly higher. The major averages all moved to the upside, with the Nasdaq and S&P 500 reaching new record closing highs.