Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

return_constraint

constructor for return_constraint


Description

The return constraint specifes a target mean return value. This function is called by add.constraint when type="return" is specified, add.constraint

Usage

return_constraint(type = "return", return_target, enabled = TRUE,
  message = FALSE, ...)

Arguments

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

Value

an object of class 'return_constraint'

Author(s)

Ross Bennett

See Also

Examples

data(edhec)
ret <- edhec[, 1:4]

pspec <- portfolio.spec(assets=colnames(ret))

pspec <- add.constraint(portfolio=pspec, type="return", return_target=mean(colMeans(ret)))

PortfolioAnalytics

Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios

v1.1.0
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb, cph], Hezky Varon [ctb], Guy Yollin [ctb], R. Douglas Martin [ctb]
Initial release
2018-05-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.