algorithmic portfolio diversification