Aggregate housing demand shocks are an important source of house price fluctuations in the standard macroeconomic models, and through the collateral channel, they drive macroeconomic fluctuations. These reduced-form shocks, however, fail to generate a highly volatile price-to-rent ratio that comoves with the house price observed in the data (the “price-rent puzzle”). We build a tractable heterogeneous-agent model that provides a microeconomic foundation for housing demand shocks. The model predicts that a credit supply shock can generate large comovements between the house price and the price-to-rent ratio. We provide empirical evidence from cross-country and cross-MSA data to support this theoretical prediction.