We develop a model of banking crises which Is consistent with two important features of the data: First, banking crises are usually preceded by credit booms. Second, credit booms often do not result in a crisis. That is, there are “good” booms as well as “bad” booms in the language of Gorton and Ordonez (2019). We then consider how the optimal macroprudential policy weighs the benefits of preventing a crisis against the costs of stopping a good boom. We show that countercyclical capital buffers are a critical feature of a successful macropudential policy.