is there a simple allocation and rebalance algo I can clone?

Author