group_fail {PortfolioAnalytics}R Documentation

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


[Package PortfolioAnalytics version 2.0.0 Index]