The origin of financial crises