Class SOCPLinearSelfFinancing

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

    public class SOCPLinearSelfFinancing
    extends SOCPPortfolioConstraint
    A self financing constraint. \[ \sum_{j=1}^{n}x_{j} = 0, \quad y = w_0 + x \] where \(y\) is the new weights, \(w_0\) is the initial weights, and \(x\) is the change of weights. Thus, \[ e^T x = 0 \]
    • Constructor Detail

      • SOCPLinearSelfFinancing

        public SOCPLinearSelfFinancing​(Vector w0)
        Creates a self financing constraint.
        Parameters:
        w0 - the initial weights
      • SOCPLinearSelfFinancing

        public SOCPLinearSelfFinancing​(Vector w0,
                                       double epsilon)
        Creates a self financing constraint.
        Parameters:
        w0 - the initial weights
        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