This paper proposes a flexible-price theory of the role of money in an economy with incomplete idiosyncratic risk sharing. When the risk premium goes up, money provides a safe store of value that prevents interest rates from falling, reducing investment. Investment is too high during booms when risk is low, and too low during slumps when risk is high. Monetary policy cannot correct this: money is superneutral and Ricardian equivalence holds. The optimal allocation requires the Friedman rule and a tax/subsidy on capital. The real effects of money survive even in the cashless limit.