The real thing to do would be leveraging your owned home to buy stocks to bypass the limit on the mortgage interest deduction. (You have to do it this way - the IRS doesn't care that money is fungible)
It's not necessarily bad, but margin rates float and should be compared with rates on ARMs, not fixed-rate mortgages. Furthermore, one you get the mortage, the bank cannot call in your loan just because the value of the house falls. Brokers will call in a margin loan if the value of stocks falls far enough.