The model predicts that the optimal holding of liquid assets rises with factors that increase the firm’s default risk. For example, cash is positively related to the amount of debt and the cost of external financing, and, negatively, to the firm’s profitability. Because these factors affect default premia, this endogenous adjustment in liquidity results in a positive relationship between liquidity and default premia. At the same time, exogenous variations in the firm’s liquidity that are unrelated to default risk factors are negatively correlated with default premia, as they reduce the probability of default and increase lenders’ recoveries upon default. For example, if growth opportunities or agency problems affect the firm’s default premia, then the variations in liquidity levels that they induce should be negatively correlated with these premia. Hence the model focuses on the distinction between endogenous liquid assets, which depend on determinants of risk premia and their exogenous component, expected to be negatively related to default risk premia. It also predicts that higher liquidity reduces the risk of default in the short run, but may increase that risk in the long run, as a constrained firm trying to conserve liquidity may have to forego profitable investment opportunities. Finally, the model generates a number of empirical predictions regarding the dependence of liquidity on various firm characteristics, suggesting a theoretical framework for empirical studies of liquidity levels.