var: the covariance matrix: a numeric (real), symmetric matrix
wmin: numeric: a lower bound on weights. May also be a vector that holds specific bounds for each asset.
wmax: numeric: an upper bound on weights. May also be a vector that holds specific bounds for each asset.
method: character. Currently, only "qp" is supported.
groups: a list of group definitions
groups.wmin: a numeric vector
groups.wmax: a numeric vector
Details
For method "qp", the function uses solve.QP from package quadprog. Because of the algorithm that solve.QP uses, var has to be positive definite (i.e. must be of full rank).
Returns
a numeric vector (the portfolio weights) with an attribute variance (the portfolio's variance)
References
Gilli, M., Maringer, D. and Schumann, E. (2019) Numerical Methods and Optimization in Finance. 2nd edition. Elsevier. tools:::Rd_expr_doi("10.1016/C2017-0-01621-X")