PortfolioAnalytics (version 1.1.0)

pos_limit_fail: function to check for violation of position limits constraints

Description

This is used as a helper function for rp_transform to check for violation of position limit constraints. The position limit constraints checked are max_pos, max_pos_long, and max_pos_short.

Usage

pos_limit_fail(weights, max_pos, max_pos_long, max_pos_short)

Arguments

weights

vector of weights to test

max_pos

maximum number of assets with non-zero weights

max_pos_long

maximum number of assets with long (i.e. buy) positions

max_pos_short

maximum number of assets with short (i.e. sell) positions

Value

TRUE if any position_limit is violated. FALSE if all position limits are satisfied