This paper develops a macroeconomic model with a banking sector in which banks face endogenous borrowing constraints. There is no uncertainty about economic fundamentals. Banking bubbles can emerge through a positive feedback loop mechanism. Changes in household confidence can cause the collapse of bubbles, resulting in a financial crisis. Credit policy can mitigate economic downturns but also incur an efficiency loss. Bank capital requirements can prevent the formation of banking bubbles by limiting leverage. But a too restrictive requirement leads to less lending and hence less production.