It is commonly accepted that credit market frictions are an important source of macroeconomic fluctuations. But what is the link between the two? And what is the driving factor of asset prices volatility? To answer these questions, we have introduced a specific credit friction, limited commitment, in a general equilibrium model with production and investment in productive capital, where agents can trade bonds. The model always displays a stationary equilibrium where bonds are traded. More importantly, limited commitment may generate stochastic endogenous fluctuations driven by self-fulfilling volatile expectations (sunspots), yielding credit and investment cycles and bond price volatility consistent with data.