This paper studies how the credit expansion policy pursued by the Chinese government in an effort to stimulate its economy in the post-crisis period affects bank–firm loan contracts and the macroeconomy. We build a structural model with financial frictions in which the optimal loan contract reflects the trade-off between leverage and the probability of default.