Stocks extended gains on Thursday, helped by optimism about earnings and investor buying of the quarter's high performers.

The S&P 500's push above a key level could signal further gains.

The Dow Jones industrial average <.DJI> gained 96.80 points, or 0.80 percent, to 12,182.82. The Standard & Poor's 500 Index <.SPX> gained 13.18 points, or 1.02 percent, to 1,310.72. The Nasdaq Composite Index <.IXIC> gained 41.41 points, or 1.53 percent, to 2,739.71.