Description Usage Arguments Details
Scatter and weights chart for portfolio optimizations run with trace=TRUE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## S3 method for class 'optimize.portfolio.DEoptim'
plot(x, ...,
return.col = "mean", risk.col = "ES",
chart.assets = FALSE, neighbors = NULL,
main = "optimized portfolio plot", xlim = NULL,
ylim = NULL)
## S3 method for class 'optimize.portfolio.random'
plot(x, ...,
return.col = "mean", risk.col = "ES",
chart.assets = FALSE, neighbors = NULL, xlim = NULL,
ylim = NULL, main = "optimized portfolio plot")
## S3 method for class 'optimize.portfolio'
plot(x, ...,
return.col = "mean", risk.col = "ES",
chart.assets = FALSE, neighbors = NULL, xlim = NULL,
ylim = NULL, main = "optimized portfolio plot")
## S3 method for class 'optimize.portfolio.ROI'
plot(x, ...,
rp = FALSE, risk.col = "ES", return.col = "mean",
chart.assets = FALSE, element.color = "darkgray",
neighbors = NULL, main = "ROI.Portfolios", xlim = NULL,
ylim = NULL)
## S3 method for class 'optimize.portfolio.pso'
plot(x, ...,
return.col = "mean", risk.col = "ES",
chart.assets = FALSE, cex.axis = 0.8,
element.color = "darkgray", neighbors = NULL,
main = "PSO.Portfolios", xlim = NULL, ylim = NULL)
## S3 method for class 'optimize.portfolio.GenSA'
plot(x, ...,
rp = FALSE, return.col = "mean", risk.col = "ES",
chart.assets = FALSE, cex.axis = 0.8,
element.color = "darkgray", neighbors = NULL,
main = "GenSA.Portfolios", xlim = NULL, ylim = NULL)
|
x |
set of portfolios created by
|
... |
any other passthru parameters |
rp |
TRUE/FALSE to plot feasible portfolios
generated by |
return.col |
string name of column to use for returns (vertical axis) |
risk.col |
string name of column to use for risk (horizontal axis) |
chart.assets |
TRUE/FALSE to include risk-return scatter of assets |
neighbors |
set of 'neighbor portfolios to overplot |
main |
an overall title for the plot: see
|
xlim |
set the limit on coordinates for the x-axis |
ylim |
set the limit on coordinates for the y-axis |
element.color |
provides the color for drawing less-important chart elements, such as the box lines, axis lines, etc. |
cex.axis |
the magnification to be used for axis
annotation relative to the current setting of
|
return.col
must be the name of a function used to
compute the return metric on the random portfolio weights
risk.col
must be the name of a function used to
compute the risk metric on the random portfolio weights
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.
The ROI and GenSA solvers do not store the portfolio
weights like DEoptim or random portfolios, random
portfolios can be generated for the scatter plot with the
rp
argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.