Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.finance.applications.ising.portfolio

Convert portfolio optimization instances into Pauli list

Functions

get_operator(mu, sigma, q, budget, penalty)get qubit op
portfolio_expected_value(x, mu)returns portfolio expected value
portfolio_value(x, mu, sigma, q, budget, penalty)returns portfolio value
portfolio_variance(x, sigma)returns portfolio variance
random_model(n[, seed])Generate random model (mu, sigma) for portfolio optimization problem.

get_operator

get_operator(mu, sigma, q, budget, penalty)

GitHub

get qubit op

portfolio_expected_value

portfolio_expected_value(x, mu)

GitHub

returns portfolio expected value

portfolio_value

portfolio_value(x, mu, sigma, q, budget, penalty)

GitHub

returns portfolio value

portfolio_variance

portfolio_variance(x, sigma)

GitHub

returns portfolio variance

random_model

random_model(n, seed=None)

GitHub

Generate random model (mu, sigma) for portfolio optimization problem.

Parameters

  • n (int) – number of assets.
  • seed (int or None) – random seed - if None, will not initialize.

Returns

expected return vector numpy.ndarray: covariance matrix

Return type

numpy.narray

Was this page helpful?
Report a bug or request content on GitHub.