We examine, conditional on structural shocks, the macroeconomic performance of different countercyclical capital buffer (CCyB) rules in small open economy estimated medium scale DSGE. We find that rules based on the credit gap create a trade-off between the stabilization of fluctuations originating in the housing market and fluctuations caused by foreign demand shocks. The trade-off disappears if the regulator targets house prices instead. As a result, the optimal simple CCyB rule depends only on the house price but not the credit gap. Moreover, the optimal simple rule leads to significant welfare gains compared to the no CCyB case.