Description Usage Arguments Value Author(s) See Also Examples
The return constraint specifes a target mean return value.
This function is called by add.constraint when type="return" is specified, add.constraint
1 2 |
type |
character type of the constraint |
return_target |
return target value |
enabled |
TRUE/FALSE |
message |
TRUE/FALSE. The default is message=FALSE. Display messages if TRUE. |
... |
any other passthru parameters |
an object of class 'return_constraint'
Ross Bennett
1 2 3 4 5 6 | data(edhec)
ret <- edhec[, 1:4]
pspec <- portfolio.spec(assets=colnames(ret))
pspec <- add.constraint(portfolio=pspec, type="return", return_target=mean(colMeans(ret)))
|
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Loading required package: xts
Loading required package: foreach
Loading required package: PerformanceAnalytics
Attaching package: ‘PerformanceAnalytics’
The following object is masked from ‘package:graphics’:
legend
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.