Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

group_fail

Test if group constraints have been violated


Description

The function loops through each group and tests if cLO or cUP have been violated for the given group. This is a helper function for rp_transform.

Usage

group_fail(weights, groups, cLO, cUP, group_pos = NULL)

Arguments

weights

weights vector to test

groups

list of vectors specifying the groups of the assets

cLO

numeric or vector specifying minimum weight group constraints

cUP

numeric or vector specifying minimum weight group constraints

group_pos

vector specifying the number of non-zero weights per group

Value

logical vector: TRUE if group constraints are violated for a given group

Author(s)

Ross Bennett


PortfolioAnalytics

Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios

v1.1.0
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb, cph], Hezky Varon [ctb], Guy Yollin [ctb], R. Douglas Martin [ctb]
Initial release
2018-05-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.