Class SOCPLinearSectorExposure

  • All Implemented Interfaces:
    Function<Vector,​Double>, RealScalarFunction

    public class SOCPLinearSectorExposure
    extends SOCPPortfolioConstraint
    A sector exposure constraint. \[ \sum_{j \in S_i} |y_j| \leq u_i, \quad i=1, \ldots, k \] where \(y_j\) is the new weight for asset j, \(S_i\) are the given sectors, and \(u_i\) is the exposure limit for \(S_i\).
    • Constructor Detail

      • SOCPLinearSectorExposure

        public SOCPLinearSectorExposure​(Vector[] S,
                                        Vector u)
        Creates a sector exposure constraint.
        Parameters:
        S - the sector indicators; S[i].get(j) == 1 if asset \(j\) is in sector \(S_i\); 0 otherwise
        u - the sector exposure limits
      • SOCPLinearSectorExposure

        public SOCPLinearSectorExposure​(Vector[] S,
                                        Vector u,
                                        double epsilon)
        Creates a sector exposure constraint.
        Parameters:
        S - the sector indicators; S[i].get(j) == 1 if asset \(j\) is in sector \(S_i\); 0 otherwise
        u - the sector exposure limits
        epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
    • Method Detail

      • evaluate

        public Double evaluate​(Vector y)
        Description copied from interface: Function
        Evaluate the function f at x, where x is from the domain.
        Parameters:
        y - x
        Returns:
        f(x)
      • dimensionOfDomain

        public int dimensionOfDomain()
        Description copied from interface: Function
        Get the number of variables the function has. For example, for a univariate function, the domain dimension is 1; for a bivariate function, the domain dimension is 2.
        Returns:
        the number of variables
      • dimensionOfRange

        public int dimensionOfRange()
        Description copied from interface: Function
        Get the dimension of the range space of the function. For example, for a Rn->Rm function, the dimension of the range is m.
        Returns:
        the dimension of the range