Historian Niall Ferguson has a warning for investors