Sadly, you are not, which is why we Realtors are, um, discouraged, from using the word “investment” in our sales pitches. Certainly people do make money, especially down here in lower Fairfield County, but it should never be counted upon to automatically happen.
And it can be difficult to calculate whether or not a profit was made. If you live in a $3M house, a comparable house on the rental market would run you around $15,000/mo. After three years, you’ve saved $504,000 in rent you didn’t have to pay, but wait! maybe you had maintenance expenses like a roof repair, a paint job, window replacement? Renters never have to worry about such expenses.
On the other hand, renters can’t take advantage of the tax deduction for mortgage interest (for loan amounts up to $1M). So, to get an accurate answer, you’ll need to calculate all this into the profit equation. Oh, and there is another consideration, namely that somewhat intangible “feeling” you get from owning your own home.
And finally there is the “forced savings” effect. When you own, you tie up money, often quite a bit, which is therefore unavailable for possibly unwise other uses like bad financial investments, boats, and sports cars! When you’ve lost everything else, you may still have your house.

8 Old Club House Road just sold for $2,151,000. Back in 2007, it got $3,000,000. Attached link shows before/after for this property (if link doesn’t work, use the one below).

8 Old Club House, in the good old days of 2007. A better market, plus, this 1999 new construction was, by 2016, 17 years old!
Alternate link for 8 Old Club House