Python program that uses SCIPY/NUMPY and linear programming to calculate minimum margin required for groups of trades in a portfolio.