1
$\begingroup$

The IBM Qiskit Portfolio Optimization sample finally provides an array similar to [1,0,1,1] representing the 4 digits as the stocks. So does the 0 and 1 represent the corresponding stock and whether to invest it or not ?

Is there any possibility to get in a weighted form such as invest 10% in stock #1 and 30% in stock #2 and so on.

$\endgroup$
1
$\begingroup$

Yes. The problem has been formulated as a binary optimization problem.

As mentioned in the notebook, $x$ denotes the vector of binary decision variables, which indicates which assets to pick $x[i]=1$ and which not to pick $x[i]=0$.

$\endgroup$
1
  • $\begingroup$ Thank you very much for the clarification. Is there anyway that we could develop the solution that it gives a weight saying what percentage that each should be invested? $\endgroup$ May 15 at 1:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.