Consumer sentiment unexpectedly rose in November, according to data released Friday by the University of Michigan.

The university's index of consumer sentiment climbed to 96.8 from 95.5 last month. Economists polled by Dow Jones expected consumer sentiment to dip to 94.9 for November. An index reflecting consumer expectations moving forward also rose to 87.3 from 84.2 in October.

Richard Curtin, chief economist at the Surveys of Consumers, said consumer sentiment has been at 95 or higher in 30 of the past 35 months. That level of optimism has not been seen since the period between January 1998 and December 2000, when the index remained at 100 or above in 34 or 36 months.

"Although impeachment proceedings occurred in both time periods, the current period is distinctive for the much sharper partisan divisions in the economic expectations among consumers as well as the wide gap in optimism between consumers and business firms," Curtin said. "One side anticipates a recession, while the other side expects an uninterrupted expansion in the year ahead."

"To be sure, there is ample reason for both optimism as well as pessimism, but not the extreme differences voiced by these groups," he added.

Favorable evaluations of consumers' financial situation is at a record high while household wealth is rising, the economist noted. But risks from the ongoing U.S.-China trade war and slow global economic growth could lead to "negative shocks" for consumers.

Correction: This story has been amended to reflect Curtin said consumer sentiment has been at 95 or higher in 30 of the past 35 months.

Subscribe to CNBC on YouTube.