We examine macroprudential bank capital policy in a macroeconomic model with a financial accelerator originating in the banking sector. Under Ramsey-optimal policy, the bank capital buffer tracks closely a model-based measure of the credit gap, defined as the gap between equilibrium credit in the economy featuring financial frictions and that in a hypothetical frictionless economy. Simple rules that vary the capital buffer in response to the credit gap perform worse than Ramsey policy, but only modestly so. When monetary policy controls inflation less aggressively, optimal macroprudential responses are smaller. Optimal macroprudential policy operates at a lower frequency than monetary policy.