One thing you should never do is buy your home as an “investment.”
1. Your house doesn’t earn money when you live there. In fact it costs you money, not just as part of your mortgage, but also in maintenance, insurance, HOA fees, etc. Exceptions for those renting out a room or living in a duplex and leasing out the other condo space.
2. Banking on appreciated value in your house is a risky move. Your are undiversified, illiquid, and otherwise bogged down by your house, financially speaking.
3. It is nearly impossible to treat your house with the same emotional distance as you would a traditional investment. You cannot just up and leave your home the same way you can buy and trade equities, and there’s a significant Human Factor to home ownership as well.
That said, one thing home ownership does provide is a hedge.