The factor exposure constraint sets upper and lower bounds on exposures to risk factors.
This function is called by add.constraint when type="factor_exposure" is specified, see add.constraint
factor_exposure_constraint(type = "factor_exposure", assets, B, lower, upper,
enabled = TRUE, message = FALSE, ...)
an object of class 'factor_exposure_constraint'
character type of the constraint
named vector of assets specifying initial weights
vector or matrix of risk factor exposures
vector of lower bounds of constraints for risk factor exposures
vector of upper bounds of constraints for risk factor exposures
TRUE/FALSE
TRUE/FALSE. The default is message=FALSE. Display messages if TRUE.
any other passthru parameters to specify risk factor exposure constraints
Ross Bennett
B
can be either a vector or matrix of risk factor exposures (i.e. betas).
If B
is a vector, the length of B
must be equal to the number of
assets and lower and upper must be scalars. If B
is passed in as a vector,
it will be converted to a matrix with one column.
If B
is a matrix, the number of rows must be equal to the number
of assets and the number of columns represent the number of factors. The length
of lower and upper must be equal to the number of factors. The B
matrix should
have column names specifying the factors and row names specifying the assets.
Default column names and row names will be assigned if the user passes in a
B
matrix without column names or row names.
add.constraint