So, if you have extra cash on hand due to a cash out, I'd recommend CD's, money market or bonds. If you were going to be sitting on it for more then 2 years (think like 5) I'd just invest it. There aren't many option for short term cash investments that aren't full of risk. At least none I am aware of.
Not sure if your taking about taking out a margin loan and investing or if I am misunderstanding but DON'T. Risk is too high. Taking out a small margin loan as MMM did, at the time of purchasing a house, I see no major issues, beyond the risks that MMM already talked about. (Which is what I think you were meaning but ya know, wanna cover all fronts.)