Class MCLNiedermayer

  • All Implemented Interfaces:
    MarkowitzCriticalLine

    public class MCLNiedermayer
    extends Object
    implements MarkowitzCriticalLine
    Implements Markowitz's critical line algorithm. The portfolio minimization problem is formulated as: \[ minimize_w \frac{1}{2} w^t \Sigma w - \lambda \mu^t w \text{subject to} 1^t w = 1, w \ge 0 \]

    By default, this implementation computes the turning points along a critical line and returns the optimal weights once a given lambda or target return is reached. This ensures the best performance for one-off usage. However, if the critical line is known to be reused for many thousands of times, it might be more time-saving to compute and cache the whole critical line by calling setCachingCriticalLine(boolean) before computing weights.

    • Constructor Detail

      • MCLNiedermayer

        public MCLNiedermayer​(Vector gain,
                              Matrix covariance)
        Creates the critical line for given gain vector and covariance matrix, with non-negativity constraint.
        Parameters:
        gain - the gain vector
        covariance - the covariance matrix
      • MCLNiedermayer

        public MCLNiedermayer​(Vector gain,
                              Matrix covariance,
                              Vector lower,
                              Vector upper)
        Creates the critical line for given gain vector and covariance matrix, with given lower and upper bounds for weights.
        Parameters:
        gain - the gain vector
        covariance - the covariance matrix
        lower - the lower bounds for asset weights
        upper - the upper bounds for asset weights