Class MarkowitzByCLM


  • public class MarkowitzByCLM
    extends MarkowitzByQP
    Solves for the optimal weights in the Markowitz formulation by critical line method. That is, /[ w_eff = argmin {q * (w' V w) - w'r}, w'1 = 1, w ≥ w_lower, w ≤ w_upper. /]
    • Constructor Detail

      • MarkowitzByCLM

        public MarkowitzByCLM​(Vector r,
                              Matrix V)
        Solves w_eff = argmin {q * (w' V w) - w'r}, w'1 = 1, w ≥ 0.
        Parameters:
        r - the expected returns
        V - the covariance matrix
      • MarkowitzByCLM

        public MarkowitzByCLM​(Vector r,
                              Matrix V,
                              Vector w_lower,
                              Vector w_upper)
        Solves w_eff = argmin {q * (w' V w) - w'r}, w'1 = 1, w ≥ w_lower, w ≤ w_upper.
        Parameters:
        r - the expected returns
        V - the covariance matrix
        w_lower - the lower limits for weights
        w_upper - the upper limits for weights
      • MarkowitzByCLM

        public MarkowitzByCLM​(Vector r,
                              Matrix V,
                              Vector w_lower,
                              Vector w_upper,
                              double benchmarkRate)
        Constructs a Markowitz portfolio from expected future returns and future covariance for a given benchmark rate, with lower and upper limits on asset weights.
        Parameters:
        r - expected future returns of assets
        V - future covariance of assets
        w_lower - the lower limits for weights
        w_upper - the upper limits for weights
        benchmarkRate - the benchmark rate used to compute Sharpe ratio
    • Method Detail

      • getOptimalW

        protected Vector getOptimalW​(double q)
                              throws Exception
        Description copied from class: MarkowitzByQP
        Solves w_eff = argmin {q * (w' Σ w) - w'r}.
        Overrides:
        getOptimalW in class MarkowitzByQP
        Parameters:
        q - the risk-aversion coefficient
        Returns:
        the optimal weights w_eff
        Throws:
        QPInfeasible - when the underlying quadratic programming problem is infeasible
        Exception