After the great turmoil of the latest financial crisis, the criticism of the regulatory frameworks became increasingly stronger. The rules that banks needed to comply with are presumed to be procyclical and unable to prevent and mitigate the extent of strong financial and economic cycles. As a result, Basel III introduced a set of macroprudential tools to overcome these regulatory shortfalls. One tool that strives to counteract the issue of procyclicality is the countercyclical capital buffer (CCyB). This paper introduces a heterogeneous agent-based model that investigates the implication of the new regulatory measure. We develop a housing and a financial market where economic agents trade residential property that is financed by financial institutions. To examine the macroeconomic performance of the CCyB, we evaluate the dynamics of key stability indicators of the housing and the financial market under four different market conditions: in an undisturbed market and in times of three different structural shocks. Computational experiments reveal that the CCyB is effective in stabilizing the housing and the financial market in all market settings. But the extent of the stabilizing effect varies according to market conditions. In the shock scenarios, the CCyB performs better in dampening market fluctuations and increasing banking soundness. Although the new macroprudential tool helps to mitigate economic fluctuations and to stabilize market conditions in the aftermath of a crisis, it is not able to prevent any of the crises tested.