| pputil.meanvar {pprobeSup} | R Documentation |
Returns a mean-variance utility based on the scenarios – a value for each random portfolio.
pputil.meanvar(rp, scenarios, risk.aversion = 1, level = NULL, verbose = FALSE)
rp |
a random portfolio object. |
scenarios |
a three-dimensional array: times in rows, assets in columns and scenarios in the third dimension. |
risk.aversion |
a (positive) number giving the amount penalize variance relative to the mean (of log returns). |
level |
if Otherwise, should be a number between 0 and 1 giving the quantile of the utility to return. |
verbose |
logical value, if |
a numeric vector as long as the number of random portfolios. The utility for each portfolio and scenario is the mean log return (across time) minus the risk aversion times the variance.
The value for each portfolio is the mean or level quantile
of the utilities across scenarios.
if verbose is TRUE, then printing is done.
In test suite, mildly tested.
This help file was last revised 2013 May 02.
scenario.optimizer, pputil.fourmoments,
pputil.omega, pputil.value.
mvOpt <- scenario.optimizer(multipleTimesScen,
utility=pputil.meanvar,
extraArgs=list(risk.aversion=1.4),
max.weight=.04, gross=1e7, long.only=TRUE, port.size=50,
existing=currentHoldings)
sameThing <- scenario.optimizer(multipleTimesScen,
utility=pputil.fourmoments,
extraArgs=list(parameters=c(-1.4, 0, 0)),
max.weight=.04, gross=1e7, long.only=TRUE, port.size=50,
existing=currentHoldings)