This paper analyzes the net impact of two opposing effects of active risk management at banks on banks' stability: higher risk taking incentives versus better isolation of credit supply from varying economic conditions. We develop an environment where banks actively manage their portfolio risk by buying and selling credit protection. We show that anticipation of future risk management opportunities allows banks to operate with riskier balance sheets. However, since they are better insulated from shocks than other banks, they are less prone to failure. Empirical evidence from US bank holding companies is broadly supportive of the theoretical predictions. In particular, we find that active risk management banks were less likely to fail during the crisis of 2007-2009, even though the balance sheet displayed higher risk-taking. These results provide an important message for bank regulation which has mainly focused on balance sheet risks when assessing financial stability. The evidence shown in this paper highlights the importance of the measurement of the overall risk exposure at banks, which turns out to be reduced as a result of successful credit risk management.