0

As stated in title, I have optimization problem with 3 assets

I tried the following solution:

G1 = matrix(np.concatenate((np.eye(n_assets1), -np.eye(n_assets1)), axis=0))
sol1 = solvers.qp(covariance_matrix1, -expected_return1, G1, h1, A1, b1)

Running the above code gave me the following error: TypeError: 'G' must be a 'd' matrix of size (6, 5)

How should look my G matrix to make code valid?

Jaro
  • 1

0 Answers0