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
portfolio_expected_value
portfolio_value
portfolio_variance
random_model
random_model(n, seed=None)
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.