This is totally wrong. Stock markets invest in productive endeavor, not in creating a shortage then "servicing the need for accommodation".
Secondly - and this shows you are living in a dream world - banks are not intermediaries of funds. When you borrow to buy a house credit is created not sourced.