turnover_constraint | R Documentation |
The turnover constraint specifies a target turnover value.
This function is called by add.constraint when type="turnover" is specified, see add.constraint
.
Turnover is calculated from a set of initial weights. Turnover is
computed as sum(abs(initial_weights - weights)) / N
where N
is
the number of assets.
turnover_constraint(
type = "turnover",
turnover_target,
weight_initial = NULL,
enabled = TRUE,
message = FALSE,
...
)
type |
character type of the constraint |
turnover_target |
target turnover value |
enabled |
TRUE/FALSE |
message |
TRUE/FALSE. The default is message=FALSE. Display messages if TRUE. |
... |
any other passthru parameters to specify box and/or group constraints |
Note that with the ROI solvers, turnover constraint is currently only supported for the global minimum variance and quadratic utility problems with ROI quadprog plugin.
an object of class 'turnover_constraint'
Ross Bennett
add.constraint
data(edhec)
ret <- edhec[, 1:4]
pspec <- portfolio.spec(assets=colnames(ret))
pspec <- add.constraint(portfolio=pspec, type="turnover", turnover_target=0.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.