In U.S. data 1981-2012, unsecured firm credit moves procyclically and tends to lead GDP, while secured firm credit is acyclical; similarly, shocks to unsecured firm credit explain a far larger fraction of output fluctuations than shocks to secured credit. In this paper we develop a tractable dynamic general equilibrium model in which unsecured firm credit arises from self-enforcing borrowing constraints, preventing an efficient capital allocation among heterogeneous firms. Unsecured credit rests on the value that borrowers attach to a good credit reputation which is a forward-looking variable. We argue that self-fulfilling beliefs over future credit conditions naturally generate endogenously persistent business cycle dynamics. A dynamic complementarity between current and future borrowing limits permits uncorrelated sunspot shocks to unsecured debt to trigger persistent aggregate fluctuations in both secured and unsecured debt, factor productivity and output. We show that these sunspot shocks are quantitatively important, accounting for around half of output volatility.