"For the majority of U.S. history – or at least as far back as reliable information goes – housing prices have increased only slightly more than the level of inflation in the economy. Only during the period between 1990 and 2006, known as the Great Moderation, did housing returns rival those of the stock market. The stock market has consistently produced more booms and busts than the housing market, but it has also had better overall returns as well."
Any investment should be measured in terms of opportunity costs :)