pyepo.model.omo.portfolio
Portfolio problem
Attributes
Classes
This class is an optimization model for the portfolio problem |
Module Contents
- pyepo.model.omo.portfolio._HAS_PYOMO = True
- class pyepo.model.omo.portfolio.portfolioModel(num_assets, covariance, gamma=2.25, solver='glpk')
Bases:
pyepo.model.omo.omomodel.optOmoModelThis class is an optimization model for the portfolio problem
- _model
Pyomo model
- Type:
Pyomo model
- solver
optimization solver in the background
- Type:
str
- num_assets
number of assets
- Type:
int
- covariance
covariance matrix of the returns
- Type:
numpy.ndarray
- risk_level
risk level
- Type:
float
- num_assets
- covariance
- risk_level
- _getRiskLevel(gamma)
A method to calculate the risk level
- Parameters:
gamma (float) – risk level parameter
- Returns:
risk level
- Return type:
float
- _getModel()
A method to build Pyomo model
- Returns:
optimization model and variables
- Return type:
tuple
- pyepo.model.omo.portfolio.optmodel