@Jon S. Yes I'd be happy to elaborate!
Let's break it down: $150,000 Duplex, 20% down ($30000), 30 Year Fixed Rate mortgage at 4.5% = Mortgage payment of $608/month, Each side rents for $775 = $1550/month in rent, 50% Rule for expenses ($775)
These assumptions result in a monthly cashflow of $167, we'll round down to $150/month to keep the numbers round. $1800/year in cashflow = 6% COC return of your $30,000 down payment.
Now, some important and EXTREMELY conservative assumptions. 0% appreciation of your property and your investment account is a Roth so you will not pay taxes when you take out the money.
In 30 years you will own the duplex free and clear, have earned $54,000 in cashflow that you most likely didn't pay taxes on if you have a good accountant. So, that's $204,000 earned over the 30 years. Your $30,000 investment compounded at an 8% rate and is now worth ~$302,000. So, the stock market would win. The S&P500 compounded at roughly 7.85% over the last 30 years, if you assume growth will continue at the same rate it did over the last 30 years, then chose the stock market. If you assume virtually any appreciation in housing values, then the real estate investment wins (historically 4% appreciation for home values in the US).
The point I'm trying to make is that if absolutely everything goes right for the stock market and everything goes wrong for the housing market then stocks would win.(That's not how it works, everything is tied together, it's literally impossible) If trends continue to be the same, real estate would win. There's lots of important assumptions to take into consideration for both sides, and when you apply conservative and modest assumptions to real estate it crushes the market.