Using Ripple for assets accounting, loans, deposits, stock exchange, etc
Ripple has a contract system under development. This will allow people to bind Ripple assets or accounts to a set of rules. This should be usable for most of the things mentioned in your question.

Loans, ideally, would be done just as negative balances on a pathway.