Consumers were even more optimistic in October than economists polled by Reuters expected.

Consumer confidence rose to 125.9 in October, according to the Conference Board.

The index "increased to its highest level in almost 17 years," Lynn Franco, Director of Economic Indicators at The Conference Board, said in a statement. That was in December 2000, when the index hit 128.6.

The surge in confidence comes at a time when U.S. share prices have hit record highs. Stocks have been lifted by strong economic growth, a surge in corporate earnings and increasing expectations of tax reform. On Tuesday, stocks traded slightly higher, near all-time highs.