powered by
The return constraint specifes a target mean return value. This function is called by add.constraint when type="return" is specified, add.constraint
add.constraint
return_constraint( type = "return", return_target, enabled = TRUE, message = FALSE, ... )
an object of class 'return_constraint'
character type of the constraint
return target value
TRUE/FALSE
TRUE/FALSE. The default is message=FALSE. Display messages if TRUE.
any other passthru parameters
Ross Bennett
data(edhec) ret <- edhec[, 1:4] pspec <- portfolio.spec(assets=colnames(ret)) pspec <- add.constraint(portfolio=pspec, type="return", return_target=mean(colMeans(ret)))
Run the code above in your browser using DataLab