mathematical optimization - r solve.QP: constraints are inconsistent, no solution -


i trying find global minimum of problem , cannot figure out why getting error above. trying set 5 of assets equal exact weights , optimize other 5 within range of values. prefer not use meq=5 option.

    dvec<-matrix(0, 1,ncol(dmat))  dmat       b   c   d   e   f   g   h     j   6.85e-08    -0.000000039    -0.00000242 1.00e-07    -0.00000206 -0.00000102 -1.14e-07   -0.000000531    -0.00000137 -0.00000132 b   -3.90e-08   0.001124367 0.000190585 -2.08e-06   0.000221485 0.000153652 5.99e-05    0.000038    0.0000762   0.000200415 c   -2.42e-06   0.000190585 0.001730743 1.30e-07    0.000878497 0.000926944 6.45e-05    0.000339591 0.000958817 0.000665363 d   1.00e-07    -0.00000208 0.00000013  9.68e-07    -0.00000198 -0.00000106 -3.39e-07   0.000000912 0.00000142  0.00000279 e   -2.06e-06   0.000221485 0.000878497 -1.98e-06   0.000857829 0.000590873 4.15e-05    0.00025093  0.000521244 0.000455809 f   -1.02e-06   0.000153652 0.000926944 -1.06e-06   0.000590873 0.001226696 4.72e-05    0.000198401 0.000512625 0.000343511 g   -1.14e-07   0.0000599   0.0000645   -3.39e-07   0.0000415   0.0000472   4.45e-05    0.0000435   0.000052    0.0000425 h   -5.31e-07   0.000038    0.000339591 9.12e-07    0.00025093  0.000198401 4.35e-05    0.000362761 0.00031198  0.000224669   -1.37e-06   0.0000762   0.000958817 1.42e-06    0.000521244 0.000512625 5.20e-05    0.00031198  0.00096765  0.000514901 j   -1.32e-06   0.000200415 0.000665363 2.79e-06    0.000455809 0.000343511 4.25e-05    0.000224669 0.000514901 0.000748266      amat           b   c   d   e   f   g   h     j     b   c   d   e   f   g   h     j       -1  0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0   0     b   0   -1  0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0   0     c   0   0   -1  0   0   0   0   0   0   0   0   0   1   0   0   0   0   0   0   0     d   0   0   0   1   0   0   0   0   0   0   0   0   0   -1  0   0   0   0   0   0     e   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1   0   0   0   0   0     f   0   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1   0   0   0   0     g   0   0   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1   0   0   0     h   0   0   0   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1   0   0       0   0   0   0   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1   0     j   0   0   0   0   0   0   0   0   0   -1  0   0   0   0   0   0   0   0   0   1  bvec       b   c   d   e   f   g   h     j     b   c   d   e   f   g   h     j      (757,631)   (805)   (770,471)   (71,668)    (10,011,652)    (5,870,322)     (10,942,502)    (52,569)    (10,582,791)    (5,293,429)     -       -       -       -       -       5,870,322   10,942,502      52,569      10,582,791      5,293,429       sol<-solve.qp(dmat, dvec, amat, bvec, meq=0) 

error mentioned in subject line due non positive-definiteness of matrix. op figured out is.positive.definite() way check it.


Comments