A Theory of Political and Economic Cycles