Class MVOptimizerMinWeights
- java.lang.Object
-
- tech.nmfin.portfoliooptimization.lai2010.optimizer.MVOptimizerMinWeights
-
- All Implemented Interfaces:
MVOptimizer
- Direct Known Subclasses:
MVOptimizerLongOnly
public class MVOptimizerMinWeights extends Object implements MVOptimizer
Solves for weights with lower bounds.
-
-
Constructor Summary
Constructors Constructor Description MVOptimizerMinWeights(Vector w0)
Constructs the solver with a constraint on the minimum weights (w ≥ w0).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
optimalWeights(Vector mu, Matrix V, double lambda, double eta)
Solves for the optimal weights given the moments, lambda, and eta.
-
-
-
Field Detail
-
w0
protected Vector w0
-
-
Constructor Detail
-
MVOptimizerMinWeights
public MVOptimizerMinWeights(Vector w0)
Constructs the solver with a constraint on the minimum weights (w ≥ w0). For example, a zero vector indicates a no short-selling constraint.- Parameters:
w0
- the minimum weights
-
-
Method Detail
-
optimalWeights
public Vector optimalWeights(Vector mu, Matrix V, double lambda, double eta)
Description copied from interface:MVOptimizer
Solves for the optimal weights given the moments, lambda, and eta.- Specified by:
optimalWeights
in interfaceMVOptimizer
- Parameters:
mu
- the expected returnsV
- the covariance matrixlambda
- the risk-aversion index λeta
- η- Returns:
- the weights
-
-