Chart the efficient frontier and risk-return scatter of the assets for
optimize.portfolio
or efficient.frontier
objects
chart.EfficientFrontier(object, ...)# S3 method for optimize.portfolio.ROI
chart.EfficientFrontier(object, ...,
match.col = "ES", n.portfolios = 25, xlim = NULL, ylim = NULL,
cex.axis = 0.8, element.color = "darkgray", main = "Efficient Frontier",
RAR.text = "SR", rf = 0, tangent.line = TRUE, cex.legend = 0.8,
chart.assets = TRUE, labels.assets = TRUE, pch.assets = 21,
cex.assets = 0.8)
# S3 method for optimize.portfolio
chart.EfficientFrontier(object, ...,
match.col = "ES", n.portfolios = 25, xlim = NULL, ylim = NULL,
cex.axis = 0.8, element.color = "darkgray", main = "Efficient Frontier",
RAR.text = "SR", rf = 0, tangent.line = TRUE, cex.legend = 0.8,
chart.assets = TRUE, labels.assets = TRUE, pch.assets = 21,
cex.assets = 0.8)
# S3 method for efficient.frontier
chart.EfficientFrontier(object, ...,
match.col = "ES", n.portfolios = NULL, xlim = NULL, ylim = NULL,
cex.axis = 0.8, element.color = "darkgray", main = "Efficient Frontier",
RAR.text = "SR", rf = 0, tangent.line = TRUE, cex.legend = 0.8,
chart.assets = TRUE, labels.assets = TRUE, pch.assets = 21,
cex.assets = 0.8)
object to chart.
passthru parameters to plot
string name of column to use for risk (horizontal axis).
match.col
must match the name of an objective measure in the
objective_measures
or opt_values
slot in the object created
by optimize.portfolio
.
number of portfolios to use to plot the efficient frontier.
set the x-axis limit, same as in plot
.
set the y-axis limit, same as in plot
.
numerical value giving the amount by which the axis should be magnified relative to the default.
provides the color for drawing less-important chart elements, such as the box lines, axis lines, etc.
a main title for the plot.
string name for risk adjusted return text to plot in the legend.
risk free rate. If rf
is not null, the maximum Sharpe Ratio or modified Sharpe Ratio tangency portfolio will be plotted.
TRUE/FALSE to plot the tangent line.
numerical value giving the amount by which the legend should be magnified relative to the default.
TRUE/FALSE to include the assets.
TRUE/FALSE to include the asset names in the plot.
chart.assets
must be TRUE
to plot asset names.
plotting character of the assets, same as in plot
.
numerical value giving the amount by which the asset points and labels should be magnified relative to the default.
Ross Bennett
For objects created by optimize.portfolio with 'DEoptim', 'random', or 'pso' specified as the optimize_method:
The efficient frontier plotted is based on the the trace information (sets of
portfolios tested by the solver at each iteration) in objects created by
optimize.portfolio
.
For objects created by optimize.portfolio with 'ROI' specified as the optimize_method:
The mean-StdDev or mean-ETL efficient frontier can be plotted for optimal
portfolio objects created by optimize.portfolio
.
If match.col="StdDev"
, the mean-StdDev efficient frontier is plotted.
If match.col="ETL"
(also "ES" or "CVaR"), the mean-ETL efficient frontier is plotted.
Note that trace=TRUE
must be specified in optimize.portfolio
GenSA does not return any useable trace information for portfolios tested at each iteration, therfore we cannot extract and chart an efficient frontier.
By default, the tangency portfolio (maximum Sharpe Ratio or modified Sharpe Ratio)
will be plotted using a risk free rate of 0. Set rf=NULL
to omit
this from the plot.