Our model shows that when regulation is based on credit ratings, banks with low charter value maximize shareholder value by minimizing capital and selecting identically rated loans and bonds with the highest systematic risk. This regulatory arbitrage is possible if the credit spreads on same-rated loans and bonds are greater when their systematic risk (debt beta) is higher. We empirically confirm this relationship between credit spreads, ratings, and debt betas. We also show that banks with lower capital select syndicated loans with higher debt betas and credit spreads. Banks with lower charter value choose overall assets with higher systematic risk.