Housing market bubbles and business cycles in an agent-based credit economy