This function charts the optimize.portfolio
object in risk-return space.
chart.RiskReward(object, ...)# S3 method for optimize.portfolio.DEoptim
chart.RiskReward(
object,
...,
neighbors = NULL,
return.col = "mean",
risk.col = "ES",
chart.assets = FALSE,
element.color = "darkgray",
cex.axis = 0.8,
xlim = NULL,
ylim = NULL
)
# S3 method for optimize.portfolio.GenSA
chart.RiskReward(
object,
...,
neighbors = NULL,
return.col = "mean",
risk.col = "ES",
chart.assets = FALSE,
element.color = "darkgray",
cex.axis = 0.8,
ylim = NULL,
xlim = NULL,
rp = FALSE
)
# S3 method for optimize.portfolio.pso
chart.RiskReward(
object,
...,
neighbors = NULL,
return.col = "mean",
risk.col = "ES",
chart.assets = FALSE,
element.color = "darkgray",
cex.axis = 0.8,
xlim = NULL,
ylim = NULL
)
# S3 method for optimize.portfolio.ROI
chart.RiskReward(
object,
...,
neighbors = NULL,
return.col = "mean",
risk.col = "ES",
chart.assets = FALSE,
element.color = "darkgray",
cex.axis = 0.8,
xlim = NULL,
ylim = NULL,
rp = FALSE
)
# S3 method for optimize.portfolio.random
chart.RiskReward(
object,
...,
neighbors = NULL,
return.col = "mean",
risk.col = "ES",
chart.assets = FALSE,
element.color = "darkgray",
cex.axis = 0.8,
xlim = NULL,
ylim = NULL
)
# S3 method for opt.list
chart.RiskReward(
object,
...,
risk.col = "ES",
return.col = "mean",
main = "",
ylim = NULL,
xlim = NULL,
labels.assets = TRUE,
chart.assets = FALSE,
pch.assets = 1,
cex.assets = 0.8,
cex.axis = 0.8,
cex.lab = 0.8,
colorset = NULL,
element.color = "darkgray"
)
optimal portfolio created by optimize.portfolio
.
any other passthru parameters.
set of 'neighbor' portfolios to overplot, see Details.
string matching the objective of a 'return' objective, on vertical axis.
string matching the objective of a 'risk' objective, on horizontal axis.
TRUE/FALSE. Includes a risk reward scatter of the assets in the chart.
color for the default plot scatter points.
The magnification to be used for axis annotation relative to the current setting of cex
.
set the x-axis limit, same as in plot
.
set the y-axis limit, same as in plot
.
TRUE/FALSE to generate random portfolios to plot the feasible space
a main title for the plot.
TRUE/FALSE to include the names in the plot.
plotting character of the assets, same as in plot
numerical value giving the amount by which the asset points should be magnified relative to the default.
numerical value giving the amount by which the labels should be magnified relative to the default.
color palette or vector of colors to use.
neighbors
may be specified in three ways.
The first is as a single number of neighbors. This will extract the neighbors
closest
portfolios in terms of the out
numerical statistic.
The second method consists of a numeric vector for neighbors
.
This will extract the neighbors
with portfolio index numbers that correspond to the vector contents.
The third method for specifying neighbors
is to pass in a matrix.
This matrix should look like the output of extractStats
, and should contain
risk.col
,return.col
, and weights columns all properly named.
optimize.portfolio