some refactoring
calculate portfolio with lowest variance