The macroeconomics of self-fulfilling prophecies