pyepo.model.copt.portfolio
Portfolio problem
Attributes
Classes
This class is an optimization model for the portfolio problem |
Module Contents
- class pyepo.model.copt.portfolio.portfolioModel(num_assets, covariance, gamma=2.25)
Bases:
pyepo.model.copt.coptmodel.optCoptModelThis class is an optimization model for the portfolio problem
- _model
COPT model
- Type:
COPT model
- 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 COPT model
- Returns:
optimization model and variables
- Return type:
tuple
- pyepo.model.copt.portfolio.optmodel