pyepo.model.grb.portfolio ========================= .. py:module:: pyepo.model.grb.portfolio .. autoapi-nested-parse:: Portfolio problem Attributes ---------- .. autoapisummary:: pyepo.model.grb.portfolio._HAS_GUROBI pyepo.model.grb.portfolio.optmodel Classes ------- .. autoapisummary:: pyepo.model.grb.portfolio.portfolioModel Module Contents --------------- .. py:data:: _HAS_GUROBI :value: True .. py:class:: portfolioModel(num_assets, covariance, gamma=2.25) Bases: :py:obj:`pyepo.model.grb.grbmodel.optGrbModel` This class is an optimization model for portfolio problem .. attribute:: _model Gurobi model :type: GurobiPy model .. attribute:: num_assets number of assets :type: int .. attribute:: covariance covariance matrix of the returns :type: numpy.ndarray .. attribute:: risk_level risk level :type: float .. py:attribute:: num_assets .. py:attribute:: covariance .. py:attribute:: risk_level .. py:method:: _getRiskLevel(gamma) A method to calculate the risk level :returns: risk level :rtype: float .. py:method:: _getModel() A method to build Gurobi model :returns: optimization model and variables :rtype: tuple .. py:data:: optmodel