Learn R Programming

fPortfolio (version 4023.84)

portfolio-setSpec: Settings for Specifications of Portfolios

Description

Functions to set specifications for a portfolio.

Usage

setType(spec) <- value
setOptimize(spec) <- value
setEstimator(spec) <- value
setTailRisk(spec) <- value
setParams(spec, name) <- value
setAlpha(spec) <- value

setWeights(spec) <- value setTargetReturn(spec) <- value setTargetRisk(spec) <- value setRiskFreeRate(spec) <- value setNFrontierPoints(spec) <- value setStatus(spec) <- value

setSolver(spec) <- value setObjective(spec) <- value setTrace(spec) <- value

Value

setType

setOptimize

setEstimator

setParam


Model Settings: just modify the model settings including the portfolio type, the mean/covariance estimator, and optional parameters of an existing portfolio structure.


setWeights

setTargetReturn

setTargetRisk

setTargetAlpha

setRiskFreeRate

setNFrontierPoints

setStatus


Portfolio Settings: just modify the portfolio settings including predefined weights, the target return, the risk free rate, the number of frontier points, and the return and risk range of an existing portfolio structure.


setSolver

setObjective

setTrace


Optim Settings: just modifies the solver setting, i.e. the type of solver to be used for portfolio optimization.

Arguments

spec

an S4 object of class fPFOLIOSPEC, the specification to be modified, by default the default of the function portfolioSpec().

name

a character string, the name of the value to be set.

value

a value for that component of spec to be set.

Details

setTypeSets type of portfolio optimization,
setOptimizeSets what to optimize, min risk or max return,
setEstimatorSets names of mean and covariance estimators,
setParamsSets optional model parameters,
setWeightsSets weights vector,
setTargetReturnSets target return value,
setTargetRiskSets target risk value,
setTargetAlphaSets CVaR target alpha value,
setRiskFreeRateSets risk-free rate value,
setNFrontierPointsSets number of frontier points,
setStatusSets status value,
setSolverSets the type of solver to be used,
setObjectiveSets objective function name to be used,
setTraceSets the logical trace flag.

References

Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); Portfolio Optimization with R/Rmetrics, Rmetrics eBook, Rmetrics Association and Finance Online, Zurich.