You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that the PortfolioOptimizer in Qiskit Finance/Optimization can solve quadratic programs such as minimum variance. Following the Qiskit Optimization tutorial. However, it returns binary integers on whether or not to select a stock. How do I change the class code to return a weight that each stock should hold within the portfolio?
Take a look at this, see if its what you need, which was done some time back qiskit-community/qiskit-finance#57 - there is a unit test added which shows its use etc.
So to my understanding, we can find integer returns by using PortfolioOptimization.bounds. However, this becomes very costly? Is there a way to return float weights? Or am I misunderstanding something.
The portfolio optimization used to have only a buy or not result for each stock, and was changed to support integer amounts. This is the functionality it has. Now the portfolio optimization code relies on Qiskit Optimization to solve the problem it defines, through the model it creates. You can potentially look at using Qiskit Optimization more directly to define a problem/model that more fits your needs and have it solve it.
Hello,
I understand that the PortfolioOptimizer in Qiskit Finance/Optimization can solve quadratic programs such as minimum variance. Following the Qiskit Optimization tutorial. However, it returns binary integers on whether or not to select a stock. How do I change the class code to return a weight that each stock should hold within the portfolio?
https://qiskit.org/documentation/finance/tutorials/01_portfolio_optimization.html
The text was updated successfully, but these errors were encountered: