“I’ve seen a remarkable sweep of history,” the president said. “I know many look at the world today and see difficulties and react with despair but I do not.”