First and foremost, any home purchased needs to work as a home: it fulfills your housing needs at an affordable monthly cost – ideally, a cost, after tax deductions and principal pay-down, less than or similar to that of renting the property. However, though it cannot be compared on an apples-to-apples basis to investments such as stocks, bonds and CDs (that you don’t live in), it’s worth looking at the issue of home ownership as a financial investment as well.
If you increase your screen-view zoom to 125%, the charts will be easier to read.

An average SF Metro Area home purchased in 1988 appreciated by 244% as of July 2013, while the overall CPI inflation rate was 97%. If the home had been sold at the recent bottom of the market, the difference would have narrowed to 165% appreciation vs. 95% inflation. Purchase and sell timing always matters and if one has to sell at the bottom of the market, it affects the return on any investment. As the chart illustrates, home-price appreciation usually outpaces inflation by a significant margin over the longer term: this is a good thing for homeowners and doesn’t include other benefits such as living in the property and the capital gains exclusion on the sale of a principal residence.
This analysis applies well to homes purchased with all cash and no financing. Leverage alters the picture substantially.

This is why, using reasonable leverage, real estate is typically considered a good long-terminvestment – short-term can be much riskier – as well as an excellent hedge against inflation. Of course, if leverage is abused as it was in the years of subprime lending, underwriting standards decline, predatory lending and home-refinancing frenzy (i.e. “using one’s home as a piggy bank”), other risks arise.
In earlier times, when people didn’t move around as much, one bought one’s home, paid it off over the years and when retirement came, had a home owned free and clear – a huge financial asset to be used as appropriate.

We have generated two sample rent vs. buy scenarios for San Francisco here:
2-BR Apartment Rental vs. Condo Purchase and 3-BR House Rental vs. Purchase
And you can perform your own rent vs. buy scenario calculations here, using your own financial circumstances, assumptions and projections: Rent vs. Buy Calculator
Important caveats: Trying to compare buying a home to other financial investments on an apples-to-apples basis is impossible, because there are so many other variables at play: the use and enjoyment of the home, how the cost of homeownership compares to renting, physical condition decline over time (without further investment), risks and returns on other types of investments, home tax deductions, the capital gains exclusion on profit from a principal residence sale ($250k for single owner/ $500k for couple), market timing and other factors. All the analyses above are simply sample scenarios, looking at homeownership from a number of angles using a variety of assumptions. It is unknown whether they will apply to future trends.
As said in the first line of this report, first and foremost, any home purchased needs to work as a home: it fulfills your housing needs at an affordable monthly cost. If that’s where you start, with a fixed rate loan, and you don’t refinance out growing home equity, and you don’t have to sell during a market downturn (which, admittedly, isn’t always possible to avoid), then you should come out all right and more often, very well.